Closed FranckLejzerowicz closed 10 months ago
Hello Franck - thanks for the report.
I need to set up a homebrew build for libgnomecanvas. Until then the binary install is needed, which leads to the second part of the issue.
Can you let me know which version of MacOS you are using?
And do you have anything setting the DYLD_LIBRARY_PATH environment variable? https://stackoverflow.com/questions/35509731/dyld-symbol-not-found-cg-jpeg-resync-to-restart
If that's the case then try this sequence from a terminal (hopefully I have the Biodiverse call correct - I do not have a Mac nearby at the moment):
export DYLD_LIBRARY_PATH=
/Applications/Biodiverse.app/Contents/MacOS/BiodiverseGUI
Shawn.
WRT installation via homebrew, this guide might be useful: https://itnext.io/how-to-install-an-older-brew-package-add141e58d32
Following those instructions, the process should be something like this:
brew edit https://raw.githubusercontent.com/Homebrew/homebrew-core/1180c886d9b62e811eede6efa9cfff36e131e825/Formula/libgnomecanvas.rb
# insert these lines into the build, immediately after the line containing "def install":
# system "\\curl -L https://raw.githubusercontent.com/shawnlaffan/biodiverse/master/etc/libgnomecanvas.patch > libgnomecanvas.patch"
# system "patch -d libgnomecanvas < libgnomecanvas.patch"
# then exit the editor
brew install --build-from-source libgnomecanvas
I'll test that tomorrow when I'm in front of my Mac.
This also looks relevant: https://stackoverflow.com/questions/73586208/can-you-install-disabled-homebrew-packages
Hi Shawn,
I'm using:
System Version: macOS 11.6.2 (20G314)
Processor Name: 8-Core Intel Core i9
Processor Speed: 2.3 GHz
There is no DYLD_LIBRARY_PATH
variable set in my environment.
Unfortunately, the suggestion to empty DYLD_LIBRARY_PATH
and re-running BiodiverseGUI
(you were right about the path) resulted in the same error, related to gdk-pixbuf
it seems.
I wish I do not have to build from source, but rather fix the error related to the brew-installed gdk-pixbuf
library ...
Thanks!
Thanks for the details. This looks like a clash between the version of libgif packed with Biodiverse and the one on your system.
Can you try renaming the libgif.dylib file under the Biodiverse file path? The actual path will differ across users but given your previous info it should be this for your machine:
mv /var/folders/hq/4ltcnxjn3rgd66hsdqpvg87r0000gn/T/par-6672616e636b/cache-6f481e89eb4e33772bc9d51e1b9d6dce8c99bd2b/libGIF.dylib /var/folders/hq/4ltcnxjn3rgd66hsdqpvg87r0000gn/T/par-6672616e636b/cache-6f481e89eb4e33772bc9d51e1b9d6dce8c99bd2b/libGIF.dylib.bk
One that is done, re-run the Biodiverse executable.
The above is a workaround and would need to be done every time Biodiverse is reinstalled. If it works, though, then it gives me some ideas regarding what to change in the build.
Some additional notes.
Compilation of libgnomecanvas can sidestep homebrew using these steps.
This installs the dynamic lib to $HOME/usr/lib
so it will need to be added to the DYLD_LIBRARY_PATH for Biodiverse to find it. One could install to $HOMEBREW_PREFIX
but that's a risky option.
\curl -L https://download.gnome.org/sources/libgnomecanvas/2.30/libgnomecanvas-2.30.3.tar.bz2 > lgc.tar.bz
tar xf lgc.tar.bz
cd libgnomecanvas-2.30.3
\curl -L https://raw.githubusercontent.com/shawnlaffan/biodiverse/master/etc/libgnomecanvas.patch > libgnomecanvas.patch
patch -d libgnomecanvas < libgnomecanvas.patch
./configure --disable-dependency-tracking --disable-static --prefix=$HOME/usr --disable-glade
make
make install
Some more detailed steps for a source code install are below. The last part of which could do with some testing.
These are also now part of the installation instructions.
cpanm XML::Parser
brew install libart intltool gettext
\curl -L https://download.gnome.org/sources/libgnomecanvas/2.30/libgnomecanvas-2.30.3.tar.bz2 > libgnomecanvas-2.30.3.tar.bz
tar xf libgnomecanvas-2.30.3.tar.bz
cd libgnomecanvas-2.30.3
\curl -L https://raw.githubusercontent.com/shawnlaffan/biodiverse/master/etc/libgnomecanvas.patch > libgnomecanvas.patch
patch -d libgnomecanvas < libgnomecanvas.patch
# if you are willing to take the risk then you can install into --prefix=$HOMEBREW_PATH
./configure --disable-dependency-tracking --disable-static --prefix=$HOME/usr --disable-glade
make
make install
export DYLD_LIBRARY_PATH=${HOME}/usr:${DYLD_LIBRARY_PATH}
export CPATH=${HOME}/usr:${CPATH}
cpanm --notest Gnome2::Canvas
@FranckLejzerowicz - I think the issue has been resolved now. I'm using the approach in https://github.com/shawnlaffan/biodiverse/issues/869#issuecomment-1581900832 for local and CI builds.
I'll close this issue now but it can be re-opened if there are still points to be addressed. Other problems can always be raised under a new issue.
Thanks again for the report.
Hello,
I have been trying to install Biodiverse on a MacOS intel, starting with binaries, but without success. Hence I tried to install it from source and these worked:
However, the
libgnomecanvas
project being archived, does not allow installation and the following did not work:Thus, I tried to reinstall Biodiverse 4.0 and give full disk access, but now the GUI program is complaining with
gdk-pixbuf
it seems:I tried again after
brew uninstall gdk-pixbuf
and after removing the/var/folders/hq/4ltcnxjn3rgd66hsdqpvg87r0000gn/T/par-6672616e636b/cache-6f481e89eb4e33772bc9d51e1b9d6dce8c99bd2b
but this error persists.Any suggestion appreciated Franck