VisualSFM_OS_X_Installer icon indicating copy to clipboard operation
VisualSFM_OS_X_Installer copied to clipboard

collect2: error: ld returned 1 exit status

Open a0s opened this issue 10 years ago • 4 comments
trafficstars

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_1/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.

https://github.com/Homebrew/homebrew/pull/9796

a0s avatar Jul 28 '15 21:07 a0s

is that link a solution to the problem?

jd-m avatar Jul 29 '15 12:07 jd-m

This is only work around, and i am not a python programmer

a0s avatar Jul 30 '15 10:07 a0s

Could you explain further how to implement the work around?

cs23 avatar Aug 04 '15 23:08 cs23

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:

https://raw.githubusercontent.com/Homebrew/homebrew/2f79597fb8c5fe0a98876888004914cb4d0a9454/Library/Formula/cairo.rb

cs23 avatar Aug 05 '15 22:08 cs23