Open 3ahptk opened 9 years ago
luckybulldozer.... hope i can be of some help here... i'm trying to see what i can do to lend a hand. To the best of my knowledge the linker is saying that its missing 64 bit symbols for 3 gdk library routines... and they're all referenced from what to the best of my poking around, one of vsfm's source files that's not available. Googling seems to suggest that there may be some additional gdk library to link to, i.e. gdkx and gdkx11 but brew doesn't seem to have any knowledge of them. This link (dating back to 2010) even suggests that the call to __gdk_x11_drawable_get_xdisplay might have been dropped... https://mail.gnome.org/archives/commits-list/2010-December/msg01349.html Regardless... is the task at hand to find a library file that provides a 64 bit symbol table for these functions? If so, I'll keep on looking and trying to puzzle through. If not, I'd appreciate a little guidance if it's not too inconvenient.
Thanks heaps. Surely if this is an issue with GTK removing this then won't Linux users be getting this message too soon?
not a lot of progress so far... or success. I see that there are more current releases of gdk-pixbuf... I think I'll try compiling the latest version up and putting that in the visual sfm build and see how that fares.
Same issue here:
Undefined symbols for architecture x86_64: "_gdk_x11_drawable_get_xdisplay", referenced from: RegisterWin::CreatePaintWnd() in RegisterGUI.o "_gdk_x11_drawable_get_xid", referenced from: RegisterWin::CreatePaintWnd() in RegisterGUI.o "_gdk_x11_window_get_drawable_impl", referenced from: RegisterWin::CreatePaintWnd() in RegisterGUI.o ld: symbol(s) not found for architecture x86_64 collect2: error: ld returned 1 exit status make: *\ [VisualSFM] Error 1 VSFM application failed to build, halting.
I don't have much experience with these type of things but I thought I just help in any way if possible. In the GNOME documentation I can't seem to find these functions, is the version being used for the install the wrong/ an old(deprecated) one? https://developer.gnome.org/gdk2/stable/gdk2-Drawing-Primitives.html Also. there seems to be a gdk 3, I would like to try and use this but I don't know how. Would anyone be able to tell me what I would change to use gdk3 this instead of gdk2.
Thanks
Very similar problem attempting to compile with the aforementioned brew script on Mavericks 10.9.5.
About to make... mkdir -p build mkdir -p bin cd build; ar -x ../lib/VisualSFM.a; cd ..; g++-4.8 -w -o bin/VisualSFM build/. -L/usr/local/lib -L/opt/X11/lib -pthread -lGL -lGLU -lX11 -ldl -L/usr/local/Cellar/gtk+/2.24.28_2/lib -L/usr/local/Cellar/pango/1.36.8_2/lib -L/usr/local/Cellar/atk/2.16.0/lib -L/usr/local/Cellar/cairo/1.14.2_1/lib -L/usr/local/Cellar/gdk-pixbuf/2.30.8/lib -L/usr/local/Cellar/glib/2.44.1/lib -L/usr/local/opt/gettext/lib -lgtk-quartz-2.0 -lgdk-quartz-2.0 -lpangocairo-1.0 -lpango-1.0 -latk-1.0 -lcairo -lgdk_pixbuf-2.0 -lgio-2.0 -lgobject-2.0 -lgthread-2.0 -lglib-2.0 -lintl lib/lapack.a lib/blas.a lib/libf2c.a lib/libjpeg.a Undefined symbols for architecture x86_64: "_gdk_x11_drawable_get_xdisplay", referenced from: RegisterWin::CreatePaintWnd() in RegisterGUI.o "_gdk_x11_drawable_get_xid", referenced from: RegisterWin::CreatePaintWnd() in RegisterGUI.o "_gdk_x11_window_get_drawable_impl", referenced from: RegisterWin::CreatePaintWnd() in RegisterGUI.o ld: symbol(s) not found for architecture x86_64 collect2: error: ld returned 1 exit status make: *\ [VisualSFM] Error 1 VSFM application failed to build, halting.
Looking forward to a solution...
cs23 commented 4 days ago I found that the newest versions of cairo and gtk cause both of these problems. I switched to an older version of gtk (2.24.24) and was able to compile VSFM successfully. However upon opening it, the GUI crashed. The command line options for VSFM still work at this point. To solve the GUI issue, I downgraded to cairo version 1.14.0.
If you can't switch to an older version using the brew switch command, I was able to downgrade by using brew edit command. For example, to install the older version of cairo using homebrew you must edit the formula. See this link: http://superuser.com/questions/525477/how-do-i-change-or-edit-vim-homebrew-recipe for more explanation. I found the cairo.rb 1.14.0 formula at:
Have changed cairo to version 1.14.0 and gtk to version 2.24.24 using brew edit then uninstalled and reinstalled these, unfortunately VSFM still will not compile without the exact same errors. Any other ideas?
Here's the info from brew for my machine:
Installing Brew packages... this can take quite a long time Warning: jpeg-8d already installed Warning: gdk-pixbuf-2.30.8 already installed Warning: cairo-1.14.0 already installed Warning: freetype-2.6_1 already installed Warning: Already linked: /usr/local/Cellar/freetype/2.6_1 To relink: brew unlink freetype && brew link freetype Warning: pango-1.36.8_2 already installed Warning: Already linked: /usr/local/Cellar/pixman/0.32.6 To relink: brew unlink pixman && brew link pixman Warning: Already linked: /usr/local/Cellar/fontconfig/2.11.1 To relink: brew unlink fontconfig && brew link fontconfig Warning: gtk+-2.24.28_2 already installed Warning: glew-1.12.0 already installed Warning: gsl-1.16 already installed Warning: boost-1.58.0 already installed Warning: intltool-0.51.0 already installed Warning: cmake-3.3.0 already installed Warning: Already tapped! Warning: homebrew/versions/gcc48-4.8.4 already installed Warning: devil-1.7.8_1 already installed Warning: pkg-config-0.28 already installed
$ brew info jpeg jpeg: stable 8d (bottled) JPEG image manipulation library http://www.ijg.org /usr/local/Cellar/jpeg/8d (18 files, 780K) * Poured from bottle From: https://github.com/Homebrew/homebrew/blob/master/Library/Formula/jpeg.rb ==> Options --universal Build a universal binary
$ brew info gdk-pixbuf gdk-pixbuf: stable 2.30.8 (bottled) Toolkit for image loading and pixel buffer manipulation http://gtk.org /usr/local/Cellar/gdk-pixbuf/2.30.8 (209 files, 4.3M) * Poured from bottle From: https://github.com/Homebrew/homebrew/blob/master/Library/Formula/gdk-pixbuf.rb ==> Dependencies Build: xz ✔, pkg-config ✔ Required: glib ✔, jpeg ✔, libtiff ✔, libpng ✔, gobject-introspection ✔ ==> Options --universal Build a universal binary ==> Caveats Programs that require this module need to set the environment variable export GDK_PIXBUF_MODULEDIR="/usr/local/lib/gdk-pixbuf-2.0/2.10.0/loaders" If you need to manually update the query loader cache, set GDK_PIXBUF_MODULEDIR then run /usr/local/Cellar/gdk-pixbuf/2.30.8/bin/gdk-pixbuf-query-loaders --update-cache
$ brew info cairo cairo: stable 1.14.0 (bottled) http://cairographics.org/ /usr/local/Cellar/cairo/1.14.0 (113 files, 6.5M) * Built from source From: https://github.com/Homebrew/homebrew/blob/master/Library/Formula/cairo.rb ==> Dependencies Build: xz ✔, pkg-config ✔ Required: freetype ✔, fontconfig ✔, libpng ✔, pixman ✔, glib ✔ ==> Options --universal Build a universal binary --without-x11 Build without x11 support
$ brew info freetype freetype: stable 2.6 (bottled) Software library to render fonts http://www.freetype.org /usr/local/Cellar/freetype/2.6_1 (60 files, 2.6M) * Poured from bottle From: https://github.com/Homebrew/homebrew/blob/master/Library/Formula/freetype.rb ==> Dependencies Required: libpng ✔ ==> Options --universal Build a universal binary --without-subpixel Disable sub-pixel rendering (a.k.a. LCD rendering, or ClearType)
$ brew info pango pango: stable 1.36.8 (bottled), HEAD Framework for layout and rendering of i18n text http://www.pango.org/ /usr/local/Cellar/pango/1.36.7 (132 files, 4.8M) Poured from bottle /usr/local/Cellar/pango/1.36.8_2 (126 files, 4.7M) * Poured from bottle From: https://github.com/Homebrew/homebrew/blob/master/Library/Formula/pango.rb ==> Dependencies Build: xz ✔, pkg-config ✔ Required: glib ✔, cairo ✔, harfbuzz ✔, fontconfig ✔, gobject-introspection ✔ ==> Options --universal Build a universal binary --HEAD Install HEAD version
$ brew info pixman pixman: stable 0.32.6 (bottled) Low-level library for pixel manipulation http://cairographics.org/ /usr/local/Cellar/pixman/0.32.6 (11 files, 1.4M) * Poured from bottle From: https://github.com/Homebrew/homebrew/blob/master/Library/Formula/pixman.rb ==> Dependencies Build: pkg-config ✔ ==> Options --universal Build a universal binary
$ brew info fontconfig fontconfig: stable 2.11.1 (bottled) XML-based font configuration API for X Windows http://fontconfig.org/ /usr/local/Cellar/fontconfig/2.11.1 (448 files, 3.6M) * Poured from bottle From: https://github.com/Homebrew/homebrew/blob/master/Library/Formula/fontconfig.rb ==> Dependencies Build: pkg-config ✔ Required: freetype ✔ ==> Options --universal Build a universal binary
$ brew info gtk+ gtk+: stable 2.24.28 (bottled) GUI toolkit http://gtk.org/ /usr/local/Cellar/gtk+/2.24.24 (1199 files, 59M) * Poured from bottle /usr/local/Cellar/gtk+/2.24.28_2 (1198 files, 59M) Poured from bottle From: https://github.com/Homebrew/homebrew/blob/master/Library/Formula/gtk+.rb ==> Dependencies Build: xz ✔, pkg-config ✔ Required: gdk-pixbuf ✔, atk ✔, pango ✔, gobject-introspection ✔, hicolor-icon-theme ✔ Optional: jasper ✔ ==> Options --with-jasper Build with jasper support --with-quartz-relocation Build with quartz relocation support
$ brew info glew glew: stable 1.12.0 (bottled) OpenGL Extension Wrangler Library http://glew.sourceforge.net/ /usr/local/Cellar/glew/1.11.0 (15 files, 3.3M) Poured from bottle /usr/local/Cellar/glew/1.12.0 (15 files, 3.3M) * Poured from bottle From: https://github.com/Homebrew/homebrew/blob/master/Library/Formula/glew.rb ==> Options --universal Build a universal binary
$ brew info gsl gsl: stable 1.16 (bottled) Numerical library for C and C++ https://www.gnu.org/software/gsl/ /usr/local/Cellar/gsl/1.16 (245 files, 8.5M) * Poured from bottle From: https://github.com/Homebrew/homebrew/blob/master/Library/Formula/gsl.rb ==> Options --universal Build a universal binary
$ brew info boost boost: stable 1.58.0 (bottled), HEAD Collection of portable C++ source libraries http://www.boost.org /usr/local/Cellar/boost/1.55.0_2 (10036 files, 452M) Poured from bottle /usr/local/Cellar/boost/1.58.0 (10718 files, 486M) * Poured from bottle From: https://github.com/Homebrew/homebrew/blob/master/Library/Formula/boost.rb ==> Dependencies Optional: icu4c ✔ ==> Options --c++11 Build using C++11 mode --universal Build a universal binary --with-icu4c Build regexp engine with icu support --with-mpi Build with MPI support --without-single Disable building single-threading variant --without-static Disable building static library variant --HEAD Install HEAD version
$ brew info intltool intltool: stable 0.51.0 (bottled) String tool https://wiki.freedesktop.org/www/Software/intltool /usr/local/Cellar/intltool/0.50.2 (19 files, 388K) Poured from bottle /usr/local/Cellar/intltool/0.51.0 (19 files, 224K) * Poured from bottle From: https://github.com/Homebrew/homebrew/blob/master/Library/Formula/intltool.rb
$ brew info cmake cmake: stable 3.3.0 (bottled), HEAD Cross-platform make http://www.cmake.org/ /usr/local/Cellar/cmake/3.2.3 (1850 files, 32M) Poured from bottle /usr/local/Cellar/cmake/3.3.0 (1903 files, 33M) * Poured from bottle From: https://github.com/Homebrew/homebrew/blob/master/Library/Formula/cmake.rb ==> Options --without-docs Don't build man pages --HEAD Install HEAD version ==> Caveats Bash completion has been installed to: /usr/local/etc/bash_completion.d
$ brew info gcc48 homebrew/versions/gcc48: stable 4.8.4 (bottled), HEAD https://gcc.gnu.org /usr/local/Cellar/gcc48/4.8.4 (1028 files, 142M) * Poured from bottle From: https://github.com/homebrew/homebrew-versions/blob/master/gcc48.rb ==> Dependencies Required: gmp4 ✔, libmpc08 ✔, mpfr2 ✔, cloog018 ✔, isl011 ✔ ==> Options --with-all-languages Enable all compilers and languages, except Ada --with-fortran Build the gfortran compiler --with-java Build the gcj compiler --with-nls Build with native language support (localization) --with-profiled-build Make use of profile guided optimization when bootstrapping GCC --without-multilib Build without multilib support --HEAD Install HEAD version
Hmm... from your brew info it looks like gtk 2.24.28 is being used, not 2.24.24. I'll try switching that back and see if it works.
Had success after unlinkng and then installing gtk+ 2.24.24. This is not a clear fix-all and I have no pretensions of understanding what I did, but hopefully methods used will help you debug also. Faltering method used as follows (stumbled around in the dark mostly): Downloaded: https://github.com/luckybulldozer/VisualSFM_OS_X_Installer Installed xQuartz Tried to install but hit the make errors as mentioned above. Used git to checkout the old formulae for homebrew that applied under gtk 2.24.24 -- cd /usr/local/Library/Formula/ -- git log --pretty="%h - %s" | grep 'gtk+ 2.24.24' -- sudo git checkout dcf0353 -- brew unlink gtk+ -- brew install gtk+ Error ... hit a problem installing 'pango', so did -- brew gist-logs pango found a line in the log saying: dyld: Library not loaded: /usr/local/lib/libpng16.16.dylib Referenced from: /usr/local/lib/libcairo.2.dylib Reason: Incompatible library version: libcairo.2.dylib requires version 30.0.0 or later, but libpng16.16.dylib provides version 29.0.0 Long story short, messed about installing correct versions of cairo, libpng6 and freetype (also went through a bunch of the pango dependencies (glib, atk, fontconfig) and reinstalled individually, though probably not necessary) -- brew unlink cairo -- brew install cairo -- brew unlink freetype -- brew install freetype (or 'brew link freetype' as it had been installed previously) (found old versions of libpng6 on github: http://sourceforge.net/projects/libpng/files/libpng16/ fixed formula with '-- brew edit libpng', changing 'url' and 'sha1' where necessary as these were dead link in some places- though i'm not sure that helped necessarily. I think the last version of libpng6 I tried is 1.6.14) (think i might have even reinstalled cmake as well at some point though it probably didn't help) (ran '-- brew doctor' a couple of times and followed advice about unsetting $DYLD_LIBRARY_PATH and did '-- mv /opt/local ~/macports' just in case) -- brew install gtk+ ... finally worked, installing version 2.24.24 Then went to VisualSFM_OS_X_Installer/ -- ./vsfm_os_x_installer.sh Now it works! The following version numbers compiled vsfm okay (taken from the final successful vsfm make output):
g++-4.8 -w -o bin/VisualSFM build/. -L/usr/local/lib -L/opt/X11/lib -pthread -lGL -lGLU -lX11 -ldl -L/usr/local/Cellar/gtk+/2.24.24/lib -L/usr/local/Cellar/pango/1.36.5/lib -L/usr/local/Cellar/atk/2.12.0/lib -L/usr/local/Cellar/cairo/1.14.0/lib -L/usr/local/Cellar/gdk-pixbuf/2.30.8/lib -L/usr/local/Cellar/glib/2.42.0/lib -L/usr/local/Cellar/fontconfig/2.11.1/lib -L/usr/local/Cellar/freetype/2.5.3_1/lib -L/usr/local/opt/gettext/lib -lgtk-x11-2.0 -lgdk-x11-2.0 -lpangocairo-1.0 -latk-1.0 -lcairo -lgdk_pixbuf-2.0 -lgio-2.0 -lpangoft2-1.0 -lpango-1.0 -lgobject-2.0 -lfontconfig -lfreetype -lgthread-2.0 -lglib-2.0 -lintl lib/lapack.a lib/blas.a lib/libf2c.a lib/libjpeg.a
You may want to go back to /usr/local//Library/Formula/ -- sudo git stash (if you made a change using brew edit) and -- sudo git checkout master after you are finished with the installation to get your most recent brew formulae back.
I tried @timjackpy's solution but ran into other compilation problems. Some cryptic error message about the version of xcode.
I was able to finally get the install working by checking homebrew out at 0d2fca6
, the last commit before gtk+ was upgraded to 2.24.25. But once I got VisualSFM running, I got unable to load libsiftgpu.so
errors, so I have given up. :-(
Could try sudo ln -s /[path to vsfm folder]/bin/libsiftgpu.so /usr/lib/libsiftgpu.so
Or some inspiration might be found here, idk. www.10flow.com/2012/08/15/building-visualsfm-on-ubuntu-12-04-precise-pangolin-desktop-64-bit/#comment-126
Undefined symbols for architecture x86_64: "_gdk_x11_drawable_get_xdisplay", referenced from: RegisterWin::CreatePaintWnd() in RegisterGUI.o "_gdk_x11_drawable_get_xid", referenced from: RegisterWin::CreatePaintWnd() in RegisterGUI.o "_gdk_x11_window_get_drawable_impl", referenced from: RegisterWin::CreatePaintWnd() in RegisterGUI.o ld: symbol(s) not found for architecture x86_64 collect2: error: ld returned 1 exit status make: *\ [VisualSFM] Error 1 VSFM application failed to build, halting.
Same issues here. it has to with RegisterGUI.o. It is looking for export functions which don't exist anymore in the new version of gtk+. The functions use to be aliased. It is a whole quartz vs x11 thing.
The internal GUI implementation is based on native X11 code, but the latest version of gtk in brew has removed the x11 backend. The easiest solution is unfortunately to sync back to an older state.
You can find the history of the gtk+ Formula at https://github.com/Homebrew/homebrew/commits/master/Library/Formula/gtk%2B.rb
Before installing any brew Formula, you can do the following (for example) cd /usr/local git checkout 99126a50c96b3c832d72f4531c116271f543eded This will get everything to the last checkpoint that still has x11 support.
Not sure if that checkpoint is good, but sure there is one (if the urls in the .rb files still work)
Unfortunately I get the same error as people before me, but I have now clue how to solve it. Any help is appreciated.
Last login: Tue Sep 8 14:43:21 on ttys004 client207-16:~ lukascbossert$ /Users/lukascbossert/Downloads/VisualSFM_OS_X_Installer-master/vsfm_os_x_installer.sh ; exit;
Dan Monaghan's VSFM and PMVS installer for OS X
About to check to see if you have the Brew Package Manager Great, you've got brew... Continuing wget is already installed, OK About to install xcode select Hit Enter after it's installed xcode-select: error: command line tools are already installed, use "Software Update" to install updates Checking we have the right version of XQuartz
<string>2.7.6</string>
xquartz_version_result=0 Your version of XQuartz is 2.7.6 - perfect.
Ok, now you have to should have either...
Ready to continue the next installation of VSFM & PMVS (press ENTER)
Installing Brew packages... this can take quite a long time
Warning: jpeg-8d already installed
Warning: gdk-pixbuf-2.30.8 already installed
Warning: cairo-1.14.2_1 already installed
Warning: freetype-2.6_1 already installed
Warning: Already linked: /usr/local/Cellar/freetype/2.6_1
To relink: brew unlink freetype && brew link freetype
Warning: pango-1.36.8_2 already installed
Warning: Already linked: /usr/local/Cellar/pixman/0.32.6
To relink: brew unlink pixman && brew link pixman
Warning: Already linked: /usr/local/Cellar/fontconfig/2.11.1
To relink: brew unlink fontconfig && brew link fontconfig
Warning: gtk+-2.24.28_2 already installed
Warning: glew-1.12.0 already installed
Warning: gsl-1.16 already installed
Warning: boost-1.58.0 already installed
Warning: intltool-0.51.0 already installed
Warning: cmake-3.3.1 already installed
Warning: Already tapped!
Warning: homebrew/versions/gcc48-4.8.4 already installed
Warning: devil-1.7.8_1 already installed
Warning: pkg-config-0.28 already installed
Zip file is present, so just unzipping, removing old dir to install so we don't have any conflicts
Archive: VisualSFM_osx64bit.zip
creating: vsfm/
creating: vsfm/bin/
creating: vsfm/build/
creating: vsfm/lib/
inflating: vsfm/lib/blas.a
inflating: vsfm/lib/lapack.a
inflating: vsfm/lib/libf2c.a
inflating: vsfm/lib/libjpeg.a
inflating: vsfm/lib/VisualSFM.a
inflating: vsfm/makefile
inflating: vsfm/README
Changing VSFM GCC to Brews gcc-4.8
Changing /usr/x11/lib to OS X default /opt/x11/lib
About to make...
mkdir -p build
mkdir -p bin
cd build; ar -x ../lib/VisualSFM.a; cd ..;
g++-4.8 -w -o bin/VisualSFM build/._ -L/usr/local/lib -L/opt/X11/lib -pthread -lGL -lGLU -lX11 -ldl -L/usr/local/Cellar/gtk+/2.24.28_2/lib -L/usr/local/Cellar/pango/1.36.8_2/lib -L/usr/local/Cellar/atk/2.16.0/lib -L/usr/local/Cellar/cairo/1.14.2_1/lib -L/usr/local/Cellar/gdk-pixbuf/2.30.8/lib -L/usr/local/Cellar/glib/2.44.1/lib -L/usr/local/opt/gettext/lib -lgtk-quartz-2.0 -lgdk-quartz-2.0 -lpangocairo-1.0 -lpango-1.0 -latk-1.0 -lcairo -lgdk_pixbuf-2.0 -lgio-2.0 -lgobject-2.0 -lgthread-2.0 -lglib-2.0 -lintl lib/lapack.a lib/blas.a lib/libf2c.a lib/libjpeg.a
Undefined symbols for architecture x86_64:
"_gdk_x11_drawable_get_xdisplay", referenced from:
RegisterWin::CreatePaintWnd() in RegisterGUI.o
"_gdk_x11_drawable_get_xid", referenced from:
RegisterWin::CreatePaintWnd() in RegisterGUI.o
"_gdk_x11_window_get_drawable_impl", referenced from:
RegisterWin::CreatePaintWnd() in RegisterGUI.o
ld: symbol(s) not found for architecture x86_64
collect2: error: ld returned 1 exit status
make: *\ [VisualSFM] Error 1
VSFM application failed to build, halting.
logout
[Prozess beendet]
Hello, I tried to install visualSFM several times, on different machines. My last few attempts were on an imac mid2011 running Yosemite. But at the end i get an error : Undefined symbols for architecture x86_64: "_gdk_x11_drawable_get_xdisplay", referenced from: RegisterWin::CreatePaintWnd() in RegisterGUI.o "_gdk_x11_drawable_get_xid", referenced from: RegisterWin::CreatePaintWnd() in RegisterGUI.o "_gdk_x11_window_get_drawable_impl", referenced from: RegisterWin::CreatePaintWnd() in RegisterGUI.o ld: symbol(s) not found for architecture x86_64 collect2: error: ld returned 1 exit status make: *\ [VisualSFM] Error 1 VSFM application failed to build, halting. I am not sure what to do next, I tried to reinstall Xcode, all the Brew packages are already installed, I don't even know what to look at :( Any help would be great !! Thanx
I've been checking this thread periodically for a few months now hoping for some answers but nothing that seems to help. I just wanted to post to add the list of people waiting for a fix. =) I am running a mid-2011 iMac with Yosemite and am also getting a very similar error:
About to make... mkdir -p build mkdir -p bin cd build; ar -x ../lib/VisualSFM.a; cd ..; g++-4.8 -w -o bin/VisualSFM build/. -L/usr/local/lib -L/opt/X11/lib -pthread -lGL -lGLU -lX11 -ldl -L/usr/local/Cellar/gtk+/2.24.28_2/lib -L/usr/local/Cellar/pango/1.36.8_2/lib -L/usr/local/Cellar/atk/2.16.0/lib -L/usr/local/Cellar/cairo/1.14.2_1/lib -L/usr/local/Cellar/gdk-pixbuf/2.30.8/lib -L/usr/local/Cellar/glib/2.44.1/lib -L/usr/local/opt/gettext/lib -lgtk-quartz-2.0 -lgdk-quartz-2.0 -lpangocairo-1.0 -lpango-1.0 -latk-1.0 -lcairo -lgdk_pixbuf-2.0 -lgio-2.0 -lgobject-2.0 -lgthread-2.0 -lglib-2.0 -lintl lib/lapack.a lib/blas.a lib/libf2c.a lib/libjpeg.a Undefined symbols for architecture x86_64: "_gdk_x11_drawable_get_xdisplay", referenced from: RegisterWin::CreatePaintWnd() in RegisterGUI.o "_gdk_x11_drawable_get_xid", referenced from: RegisterWin::CreatePaintWnd() in RegisterGUI.o "_gdk_x11_window_get_drawable_impl", referenced from: RegisterWin::CreatePaintWnd() in RegisterGUI.o ld: symbol(s) not found for architecture x86_64 collect2: error: ld returned 1 exit status make: *\ [VisualSFM] Error 1 VSFM application failed to build, halting.
I've tried looking at the code in vsfm_os_x_installer.sh and the make file but I can't really tell what is going on. When I type brew info gtk, I get the following results which seem to be a little different than what other people are posting: ==> Dependencies Build: xz ✘, pkg-config ✔ Required: gdk-pixbuf ✔, atk ✔, pango ✔, gobject-introspection ✔, hicolor-icon-theme ✔ Optional: jasper ✘
Any help would be appreciated. Thanks.
Firstly, I want to thank @luckybulldozer for making this script in the first place. I'm sure at a certain point in time it worked really well, and running it (on El Capitan 10.11.1) the initial impressions are great! It appears to detect everything needed and install it all.
Unfortunately, it doesn't work anymore. I don't blame @luckybulldozer at all, I blame the prevalent approach to "free" software which is; make it work any way we can with hobbled together bits and dependancies, then abandon it. "free"? I've paid for it with a full day of my time...
Fortunately, in this case, VisualSFM's commercial competition is absolutely ridiculous and unusable once it is installed and running, so while the road to getting there is absurdly complicated the end result is actually probably still the best photogrammetry around!
What a strange world...
Honestly, if anyone knows of a binary for VisualSFM that works on El Capitan, I will gladly hand over hundreds of dollars in order to avoid all of this atypical open source nonsense!
Dear open source coders: I know you love to impose your vision and enthusiasm for a humanity where everyone compiles their own code, but I am sorry to say that we are all equally busy sharing our enthusiasm for whatever religion we follow... be that getting your tax in on time or painting in oils. Please, for the love of all that's holy, the 99% of us just want a binary! 😓
hey, I am ready to pay as well for a working binary! And even ready to go for El Capitan, as I am on Yosemite right now. How can we organize this? Should we make a kickstarter to fund it ? hey open source coders, how much would you take for such a thing?
I as well have no idea why some clever programmer hasn't corralled this into a simple .app binary and why it has to be compiled on each system individually. I've never created a program in my life but I'm actually attempting to teach myself OS X programming in the hopes that I can create one. Be it in Swift or Objective C, I've made it my mission to attempt a port of this program into something useful. That is... in my spare time, which is relatively little. I'm wondering if there would be any interest in others helping me if I were to publish this to GitHub.
I assume that debugging would require intimate knowledge of all the moving parts involved. But yes, having a simple, reliable photogrammetry app in my toolkit would be invaluable. I would gladly contribute what skills I have.
@lardnicus @soniquev8 @julpa @0scar99 and whoever else was running into that X11 error - I managed to find a solution! (thanks to #23). Here are the steps I took.
Beforehand, be sure to install the latest version of XQuartz, and then log out and back in. The script asks for 2.7.6, but 2.7.8 works fine and is necessary if you're running El Capitan.
brew remove --force $(brew list)
– Uninstalled all my installed brew
packages for a clean slate. This probably isn't necessary, and is really destructive, so be sure you know what you're doing! At the very least, do brew remove --force cairo
.brew install --with-x11 cairo
– This reinstalls Cairo (what I think was the cause of those X11 errors due to those missing functions) with X11 support (not done by default).git clone https://github.com/luckybulldozer/VisualSFM_OS_X_Installer.git
– Clone down the repo (probably don't need to do).cd VisualSFM_OS_X_Installer
– cd
into the repo directory.sh vsfm_os_x_installer.sh
– Run the installer as normal! It'll take awhile, but it should open up a Finder window when done, and you can double-click VisualSFM in that folder to open it up.Tada! VisualSFM should open fine now.
Good luck! Let me know if it doesn't work and I can do my best to debug.
Edit: Also, if you run into an issue where it can't find libsiftgpu.so
or libpba.so
, be sure to add the following to your ~/.bash_profile
(and instead of double-clicking the executable to run VisualSFM, just run the VisualSFM
command in Terminal).
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/path/to/VisualSFM_OS_X_Installer/vsfm/bin
export PATH=/path/to/VisualSFM_OS_X_Installer/vsfm/bin:$PATH
Be sure to replace /path/to/VisualSFM_OS_X_Installer
in the above snippet with the absolute path to the repository. You can get it by cd
ing into the repo, and then running pwd
(or by dragging the folder of the repository into Terminal).
Failed: server:~ rmark$ brew install --with-x11 cairo ==> Downloading http://cairographics.org/releases/cairo-1.14.6.tar.xz Already downloaded: /Library/Caches/Homebrew/cairo-1.14.6.tar.xz ==> ./configure --prefix=/usr/local/Cellar/cairo/1.14.6 --enable-gobject=yes --e ==> make install Last 15 lines from /Users/rmark/Library/Logs/Homebrew/cairo/02.make: 2016-01-16 11:35:46 -0700
make install
Makefile:1487: warning: overriding commands for target recheck' Makefile:1127: warning: ignoring old commands for target
recheck'
/Applications/Applications 2/Xcode.app/Contents/Developer/usr/bin/make
install-recursive
make: /Applications/Applications: No such file or directory
Colby Ludwig wrote:
@lardnicus https://github.com/lardnicus @soniquev8 https://github.com/soniquev8 @julpa https://github.com/julpa @0scar99 https://github.com/0scar99 and whoever else was running into that X11 error - I managed to find a solution! (thanks to #23 https://github.com/luckybulldozer/VisualSFM_OS_X_Installer/issues/23). Here are the steps I took.
Beforehand, be sure to install the latest version of XQuartz http://www.xquartz.org/, and then log out and back in. The script asks for 2.7.6, but 2.7.8 works fine and is necessary if you're running El Capitan.
- |brew remove --force $(brew list)| – Uninstalled all my installed |brew| packages for a clean slate. This probably isn't necessary, and is really destructive, so be sure you know what you're doing! At the very least, do |brew remove --force cairo|.
- |brew install --with-x11 cairo| – This reinstalls Cairo (what I think was the cause of those X11 errors due to those missing functions) with X11 support (not done by default).
- |git clone https://github.com/luckybulldozer/VisualSFM_OS_X_Installer.git| – Clone down the repo (probably don't need to do).
- |cd VisualSFM_OS_X_Installer| – |cd| into the repo directory.
- |sh vsfm_os_x_installer.sh| – Run the installer as normal! It'll take awhile, but it should open up a Finder window when done, and you can double-click VisualSFM in that folder to open it up.
Tada! VisualSFM should open fine now.
screen shot 2016-01-15 at 7 47 31 pm https://cloud.githubusercontent.com/assets/753413/12370062/79ed2352-bbc1-11e5-8f9c-fafbfd40be1d.png
Good luck! Let me know if it doesn't work and I can do my best to debug.
— Reply to this email directly or view it on GitHub https://github.com/luckybulldozer/VisualSFM_OS_X_Installer/issues/7#issuecomment-172149183.
Robert Mark, Ph.D. rmark@infomagic.net Rupestrian CyberServices Phone/FAX 928-526-3625 3644 N. Stone Crest St. www.rupestrian.com Flagstaff, AZ 86004-6811 USA
RCS: Computer science in the service of rock art research, protection, and education.
@rmarkRCS Looks like you have Xcode.app in /Applications/Applications 2
? Try moving it to just /Applications
. I think this is caused by an error in the build script of an unescaped path to Xcode.
Also, be sure to run brew remove --force cairo
and maybe even brew cleanup
and brew update
before giving it another shot.
Thank you!!
Colby Ludwig wrote:
@rmarkRCS https://github.com/rmarkRCS Looks like you have Xcode.app in |/Applications/Applications 2|? Try moving it to just |/Applications|. I think this is caused by an error in the build script of an unescaped path to Xcode.
Also, be sure to run |brew remove --force cairo| and maybe even |brew cleanup| and |brew update| before giving it another shot.
— Reply to this email directly or view it on GitHub https://github.com/luckybulldozer/VisualSFM_OS_X_Installer/issues/7#issuecomment-172246273.
Robert Mark, Ph.D. rmark@infomagic.net Rupestrian CyberServices Phone/FAX 928-526-3625 3644 N. Stone Crest St. www.rupestrian.com Flagstaff, AZ 86004-6811 USA
RCS: Computer science in the service of rock art research, protection, and education.
Getting run error:
ERROR: unable to Load libpba.so (Multicore Bundle
Adjustment). Make sure you have libpba.so in the VisualSFM
bin folder; Run
bin folder: cmvs genOption libpba.so libsiftgpu.so pmvs2 VisualSFM
Colby Ludwig wrote:
@rmarkRCS https://github.com/rmarkRCS Looks like you have Xcode.app in |/Applications/Applications 2|? Try moving it to just |/Applications|. I think this is caused by an error in the build script of an unescaped path to Xcode.
Also, be sure to run |brew remove --force cairo| and maybe even |brew cleanup| and |brew update| before giving it another shot.
— Reply to this email directly or view it on GitHub https://github.com/luckybulldozer/VisualSFM_OS_X_Installer/issues/7#issuecomment-172246273.
Robert Mark, Ph.D. rmark@infomagic.net Rupestrian CyberServices Phone/FAX 928-526-3625 3644 N. Stone Crest St. www.rupestrian.com Flagstaff, AZ 86004-6811 USA
RCS: Computer science in the service of rock art research, protection, and education.
@rmarkRCS Did you add those two lines to your ~/.bash_profile
?
Thanks. I had to execute the .bash_profile manually. It was not run automatically.
Colby Ludwig wrote:
@rmarkRCS https://github.com/rmarkRCS Did you add those two lines to your |~/.bash_profile|?
— Reply to this email directly or view it on GitHub https://github.com/luckybulldozer/VisualSFM_OS_X_Installer/issues/7#issuecomment-172254435.
Robert Mark, Ph.D. rmark@infomagic.net Rupestrian CyberServices Phone/FAX 928-526-3625 3644 N. Stone Crest St. www.rupestrian.com Flagstaff, AZ 86004-6811 USA
RCS: Computer science in the service of rock art research, protection, and education.
Thanks cdl! It feels like I am really close, I can see the GUI for a split second and then I get this error:
dyld: lazy symbol binding failed: Symbol not found: _cairo_xlib_surface_create Referenced from: /usr/local/lib/libgdk-x11-2.0.0.dylib Expected in: /usr/local/lib/libcairo.2.dylib
dyld: Symbol not found: _cairo_xlib_surface_create Referenced from: /usr/local/lib/libgdk-x11-2.0.0.dylib Expected in: /usr/local/lib/libcairo.2.dylib
Trace/BPT trap: 5
Any Ideas?
@0scar99 Looks to be the same issue in #26 - an issue with Cairo not having the proper library bindings (not being built with X11 bindings in this case). Have you tried the following?
brew uninstall cairo
brew cleanup
brew update
brew install --with-x11 cairo
Thanks! It seems to be close, but at the end I get this message, not sure what to do :
/Users/jman/Downloads/VisualSFM_OS_X_Installer-master Success! Opening VSFM dir To add to your PATH, add the lines below to your ~/.bash_profile file. export PATH=/Users/jman/Downloads/VisualSFM_OS_X_Installer-master/vsfm/bin:$PATH export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/Users/jman/Downloads/VisualSFM_OS_X_Installer-master Make sure you ammend that that path if you move the directory.
I did not have a .bash_profile file. so I had to create one.
julpa wrote:
Thanks! It seems to be close, but at the end I get this message, not sure what to do :
/Users/jman/Downloads/VisualSFM_OS_X_Installer-master Success! Opening VSFM dir To add to your PATH, add the lines below to your ~/.bash_profile file. export PATH=/Users/jman/Downloads/VisualSFM_OS_X_Installer-master/vsfm/bin:$PATH export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/Users/jman/Downloads/VisualSFM_OS_X_Installer-master Make sure you ammend that that path if you move the directory.
— Reply to this email directly or view it on GitHub https://github.com/luckybulldozer/VisualSFM_OS_X_Installer/issues/7#issuecomment-174030181.
Robert Mark, Ph.D. rmark@infomagic.net Rupestrian CyberServices Phone/FAX 928-526-3625 3644 N. Stone Crest St. www.rupestrian.com Flagstaff, AZ 86004-6811 USA
RCS: Computer science in the service of rock art research, protection, and education.
Thanks again cdl. It seems to be working fine up until I try to run a dense 3D reconstruction. It can't find the cmvs file, I think. I get this error even though the cmvs file is in the same directory as the VisualSFM file.
Running Yasutaka Furukawa's CMVS tool... cmvs "/Users/breannegarcia/Desktop/OLY/GIS Stuff/3D SourcePhotos/Jack/t3.nvm.cmvs/00/" 50 8 ERROR: the above CMVS command failed! FAQ: http://ccwu.me/vsfm/doc.html#errors
When I run the CMVS alone I get this:
Bres-iMac:~ breannegarcia$ /Users/breannegarcia/VisualSFM_OS_X_Installer/vsfm/bin/cmvs ; exit; Usage: /Users/breannegarcia/VisualSFM_OS_X_Installer/vsfm/bin/cmvs prefix maximage[=100] CPU[=4] You should choose maximage based on the amount of memory in your machine. CPU should be the number of (virtual) CPUs or cores in your machine. If you want more control of the program, look into the comments inside program/main/cmvs.cc logout [Process completed]
Any Ideas? Thanks again.
I can confirm that following cdl instructions I have been able to install VisualSFM on El Capitan on a Mac Pro Cylinder. Thanks!
I also see this in the terminal window, not sure what it means.
26 cameras -- 5610 points Reading images: sh: convert: command not found sh: gm: command not found Couldn't read image /Users/breannegarcia/Desktop/SourcePhotos/BustJpg/aa.nvm.cmvs/00/visualize/00000000.jpg Unsupported image format found. Stop allocation: /Users/breannegarcia/Desktop/SourcePhotos/BustJpg/aa.nvm.cmvs/00/visualize/00000000.jpg
cdl instructions works for me to on El Capitan 10.11.1, Macbook Pro. Thanks!
Hi, I ran into this issue for Yosemite (10.10.5) and fought the issue at https://github.com/luckybulldozer/VisualSFM_OS_X_Installer/issues/26 for a whole day and finally fixed it. Thought I add my comment here to help anyone else fighting this issue:
brew uninstall gtk+; brew uninstall cairo
grep 2.7.8 && xquartz_version_result="0"
) and then downloads 2.7.6! (If you re-run the installer n times, you'll find n copies of 2.7.6 installed in that dir)
Culprit bug: [https://github.com/luckybulldozer/VisualSFM_OS_X_Installer/blob/38b1b4e5df678778d6edcd343d2cd74f4ae14984/vsfm_os_x_installer.sh#L175]These are lies. Just download the latest version from (http://www.xquartz.org/) (was 2.7.8 at the time of this comment) and keep the vsfm_os_x_installer.sh file unchanged. This will keep the script happy and not re-download quartz.
At the end it may print some export DYLD_LIBRARY_PATH commands to be added to your ~/.bash_profile file. Do it, restart the mac and re-install.
My guess is it's using an outdated version of gtk+ (which has x11 support) and installed cairo --with-x11 to help support this. However, this may not be compatible with quartz 2.7.6 and my problems with "Symbol not found: _cairo_xlib_surface_create" disappeared after I installed quartz 2.7.8. It's stated confidently in the readme.md file to use 2.7.6, nope.
But thanks for the rest of the installer script! It's very useful.
Thanks cdl!! this works perfectly!!
I am a super novice and don't know shhhh...
I followed cdl (thanks a million!!!) but no luck:
1 warning generated. ar rcs bin/libsiftgpu.a build/FrameBufferObject.o build/GlobalUtil.o build/GLTexImage.o build/ProgramGLSL.o build/ProgramGPU.o build/ShaderMan.o build/SiftGPU.o build/SiftPyramid.o build/PyramidGL.o build/SiftMatch.o /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: bin/libsiftgpu.a(ProgramGPU.o) has no symbols g++ -o bin/libsiftgpu.so build/FrameBufferObject.o build/GlobalUtil.o build/GLTexImage.o build/ProgramGLSL.o build/ProgramGPU.o build/ShaderMan.o build/SiftGPU.o build/SiftPyramid.o build/PyramidGL.o build/SiftMatch.o -lGLEW -framework GLUT -framework OpenGL -lIL -Iinclude -fPIC -L/usr/lib64 -L/usr/lib -L./bin -L./lib -Wall -Wno-deprecated -pthread -march=core2 -mfpmath=sse -DWINDOW_PREFER_GLUT -L/usr/local/lib -shared -fPIC clang: warning: argument unused during compilation: '-pthread' ld: warning: directory not found for option '-L/usr/lib64' ld: library not found for -lIL clang: error: linker command failed with exit code 1 (use -v to see invocation) make: *\ [siftgpu] Error 1 libsiftgpu.so failed to build. Halting. yoavd:VisualSFM_OS_X_Installer yoavd$
Can you please explain in a baby talk the steps to install the libsiftgpu.so
from cdl:
Edit: Also, if you run into an issue where it can't find libsiftgpu.so or libpba.so, be sure to add the following to your ~/.bash_profile (and instead of double-clicking the executable to run VisualSFM, just run the VisualSFM command in Terminal).
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/path/to/VisualSFM_OS_X_Installer/vsfm/bin export PATH=/path/to/VisualSFM_OS_X_Installer/vsfm/bin:$PATH
Be sure to replace /path/to/VisualSFM_OS_X_Installer in the above snippet with the absolute path to the repository. You can get it by cding into the repo, and then running pwd (or by dragging the folder of the repository into Terminal).
And for macOS Sierra? Is there any experience out there? I can't install with all of the 'tricks' shown here.
install in mac Mojave when I run sh vsfm_os_x_installer_mavericks.sh, an error occured: Error: invalid option: --with-x11 ... Finally compilation terminated. make: *** [bin/out_no_gpu/pba.o] Error 1 libpba.so failed to build, halting.
fix way: It is caused by wrong install of cairo. we have to uninstall it and install the version which support x11.
1 sudo installer -pkg /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg -target /
2 brew uninstall --ignore-dependencies cairo
3 brew install -s sethrfore/r-srf/cairo
reference to:https://github.com/sethrfore/homebrew-r-srf
Works for me on macos mojave 10.14.6
Hello, I am trying to compile on Yosemite: all of the object file generate correctly until CMVS-PMVS-master is being built; then I get this error:
I tried looking at the log but I couldn't find anything about the error; I have tried reinstalling cmake which is at version 3.1.0 I have run the brew doctor and I get no errors or warnings; it is at the current version
Thanks in advance.