Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PNGVIEW compile failed #28

Open
jonnyapps opened this issue Apr 14, 2021 · 6 comments
Open

PNGVIEW compile failed #28

jonnyapps opened this issue Apr 14, 2021 · 6 comments

Comments

@jonnyapps
Copy link

jonnyapps commented Apr 14, 2021

FIrst of all, thanks for the amazing script. Second, I don't have a clue what I'm doing when it comes to Linux.

I've progressed the script successfully up to the point:

2. PNGVIEW x x 2a. Test for PNGVIEW binary [ NOT FOUND ] x x 2b. Download PNGVIEW source [ DONE ] x x 2c. Compile PNGVIEW [ FAILED ]

Not sure what to do from here...

Running the script again it's flagged compile PNGVIEW as 'skipped'.

@battlingnebula
Copy link

I faced the same issue. I saw that in the code, the compilation of the PNGview step is attempted without entering the raspidmx-master folder because the "cd ~/raspidmx-master" line is commented out. I cloned it for personal use and edited that part and made a few changes other changes and it installed successfully.
However, in the later step, the Imagemagick still doesn't work because the latest retropie library is not updated for it. So for now I had to install ImageMagick through steps on https://imagemagick.org/script/install-source.php before installing the script.
It is entirely optional because the script still proceeds and you still get your files backed up on every ROM load even without ImageMagick.

@skykiller30
Copy link

skykiller30 commented Dec 15, 2021

I hit the same issue. I uncommented the cd and png view compile/install cokpleted successfully.

what other changes did you make to the script? I installed imagemagik before running the r line script like you said but the installer still didn’t see it and installed its own version. I need to learn bash better I don’t understand how the preinstall check works. But it completed and i still can’t get the notifications to pop up. Any other parts of the script I need to change?

I gotta get some (manual) version of this script working on my Anbernic devices

@DeltaGemini
Copy link

I commented in "cd ~/raspidmx-master" but it's still not compiling. I'd appreciate any help to get these notifications working.

@bzodonnell
Copy link

Any luck with this lately? I have an installation on Bookworm, and would like to either get this working, or find a way to skip this part of the script so the rest can compile.

@DeltaGemini
Copy link

Afraid not. I gave up soon after this after getting nowhere.

@bzodonnell
Copy link

I actually figured it out!

The problem is that pngview doesn't compile. But it's possible to compile it manually and then put it where it needs to be. When the rclone script gets there, it finds it working just fine and then keeps going to the end. Here's what you do:

  1. Download raspidmx with git clone (https://github.com/AndrewFromMelbourne/raspidmx)
  2. apt remove libpng-dev
  3. Download libpng12 (https://sourceforge.net/projects/libpng/files/libpng12/1.2.59/). Build it with:
    1. .configure
    2. make
    3. make install
  4. Copy and paste loadpng.c and loadpng.h from the common folder to the pngview folder
  5. Add #include "loadpng.h" at the top of the pngview.c file (if it's not there already)
  6. cp Makefile Makefile.old to make a backup, then erase what's in Makefile and replace it with this:

OBJS=pngview.o loadpng.o
BIN=pngview

CFLAGS+=-Wall -g -O3 -I../common
LDFLAGS+=-L/usr/lib/ -lbcm_host -lm $(shell libpng-config --ldflags) -L../lib -lraspidmx

INCLUDES+=$(shell libpng-config --cflags) -I/usr/include/ -I/usr/include/interface/vcos/pthreads -I/usr/include/interface/vmcs_host/linux

all: $(BIN)

%.o: %.c
	@rm -f $@ 
	$(CC) $(CFLAGS) $(INCLUDES) -g -c $< -o $@ -Wno-deprecated-declarations

$(BIN): $(OBJS)
	$(CC) -o $@ -Wl,--whole-archive $(OBJS) $(LDFLAGS) -Wl,--no-whole-archive -rdynamic

clean:
	@rm -f $(OBJS)
	@rm -f $(BIN)
  1. Now, when you do make in the pngview folder, it should make the binary. But the rclone script needs it to be in /usr/bin/
    1. sudo mv ~/raspidmx/pngview/pngview /usr/bin
    2. sudo chown root:root /usr/bin/pngview
    3. sudo chmod 755 /usr/bin/pngview

At this point, when you run the installation script, it should find the pngview binary and continue to the end.

As a warning, I'm not very knowledgeable about these things. I basically got the instructions for how to compile pngview from here (AndrewFromMelbourne/raspidmx#35) and then looked at the rclone script to find out where it wanted me to put pngview.

Also, there's one more line in the code that I didn't do anything about: sudo mv ~/raspidmx-master/lib/libraspidmx.so.1 /usr/lib Honestly, I haven't tested enough to figure out whether just ignoring this line actually causes any problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants