ahodesuka / ahoviewer

A GTK image viewer, manga reader, and booru browser
MIT License
483 stars 30 forks source link

Build fails due to "/usr/lib64/libcrypto.so.1.0.0: error adding symbols: DSO missing from command line" #60

Closed yekyau closed 6 years ago

yekyau commented 6 years ago

Hello, I've been trying to build from git and I am encountering an error. This does not occur with --disable-ssl, but I would rather keep SSL. OS: Solus 3 x64

Making all in pixmaps
make[1]: Entering directory '/home/jelly/git/ahoviewer/pixmaps'
make[1]: Nothing to be done for 'all'.
make[1]: Leaving directory '/home/jelly/git/ahoviewer/pixmaps'
Making all in po
make[1]: Entering directory '/home/jelly/git/ahoviewer/po'
make[1]: Nothing to be done for 'all'.
make[1]: Leaving directory '/home/jelly/git/ahoviewer/po'
Making all in src
make[1]: Entering directory '/home/jelly/git/ahoviewer/src'
make  all-am
make[2]: Entering directory '/home/jelly/git/ahoviewer/src'
  CXX      archive/ahoviewer-archive.o
  CXX      archive/ahoviewer-image.o
  CXX      archive/ahoviewer-rar.o
  CXX      archive/ahoviewer-zip.o
  CXX      booru/ahoviewer-browser.o
  CXX      booru/ahoviewer-curler.o
  CXX      booru/ahoviewer-image.o
  CXX      booru/ahoviewer-imagefetcher.o
  CXX      booru/ahoviewer-imagelist.o
  CXX      booru/ahoviewer-page.o
  CXX      booru/ahoviewer-site.o
  CXX      booru/ahoviewer-tagentry.o
  CXX      booru/ahoviewer-tagview.o
  CXX      ahoviewer-image.o
  CXX      ahoviewer-imagebox.o
  CXX      ahoviewer-imagelist.o
  CXX      ahoviewer-keybindingeditor.o
  CXX      ahoviewer-main.o
  CXX      ahoviewer-mainwindow.o
  CXX      ahoviewer-preferences.o
  CXX      ahoviewer-settings.o
  CXX      ahoviewer-siteeditor.o
  CXX      ahoviewer-statusbar.o
  CXX      ahoviewer-thumbnailbar.o
  CXX      ahoviewer-ui.o
  CXX      ahoviewer-version.o
  CXXLD    ahoviewer
/usr/bin/ld: ahoviewer-main.o: undefined reference to symbol 'CRYPTO_num_locks'
/usr/lib64/libcrypto.so.1.0.0: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
make[2]: *** [Makefile:475: ahoviewer] Error 1
make[2]: Leaving directory '/home/jelly/git/ahoviewer/src'
make[1]: *** [Makefile:344: all] Error 2
make[1]: Leaving directory '/home/jelly/git/ahoviewer/src'
make: *** [Makefile:434: all-recursive] Error 1
OpenSSL 1.0.2n  7 Dec 2017
curl 7.57.0 (x86_64-solus-linux-gnu) libcurl/7.57.0 OpenSSL/1.0.2n zlib/1.2.11 libssh2/1.8.0 nghttp2/1.16.0

I noticed one of your commits mentions such a problem, but from my understanding it should only happen when the curl SSL backend and the ahoviewer SSL backend mismatch. My curl is certainly built with openssl, and its stated ahoviewer defaults to openssl too, so I don't know where the problem is occuring.

ahodesuka commented 6 years ago

Try building with this: make LIBS="-lssl -lcrypto", and see if that works.

Also post the output of the following command so I can see what ahoviewer is linking against: grep "ahoviewer_LDADD" src/Makefile

yekyau commented 6 years ago

That did make it build successfully, thank you!

the output of that command gives:

ahoviewer_LDADD =  -lgtkmm-2.4 -latkmm-1.6 -lgtk-x11-2.0 -lgdkmm-2.4 -lgiomm-2.4 -lpangomm-1.4 -lglibmm-2.4 -lcairomm-1.0 -lsigc-2.0 -lgtk-x11-2.0 -lgdk-x11-2.0 -lpangocairo-1.0 -lgio-2.0 -lXrender -lXinerama -lXrandr -lXcursor -lXcomposite -lXdamage -lXfixes -lX11 -lXext -latk-1.0 -lcairo -lgdk_pixbuf-2.0 -lgio-2.0 -lpangoft2-1.0 -lpango-1.0 -lgobject-2.0 -lglib-2.0 -lfontconfig -lfreetype -lconfig++ -lcurl -lxml2 \
        $(AM_V_CXXLD)$(ahoviewer_LINK) $(ahoviewer_OBJECTS) $(ahoviewer_LDADD) $(LIBS)
oliwer commented 6 years ago

Same issue here on Ubuntu 17.10. The temporary fix works.