LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Compile failed : Unable to find existing lib (https://www.linuxquestions.org/questions/slackware-14/compile-failed-unable-to-find-existing-lib-4175558378/)

Tonus 11-09-2015 04:26 AM

Compile failed : Unable to find existing lib
 
Hi,

I am trying to compile last Nixnote2 beta (from there https://github.com/baumgarr/Nixnote2)

After :
Code:

qmake
make clean
make

I have this error :
Code:

/usr/lib64/gcc/x86_64-slackware-linux/4.9.3/../../../../x86_64-slackware-linux/bin/ld: ne peut trouver -lhunspell
/usr/lib64/gcc/x86_64-slackware-linux/4.9.3/../../../../x86_64-slackware-linux/bin/ld: escamotage incompatible /usr/lib/libcurl.so lors de la recherche de -lcurl
/usr/lib64/gcc/x86_64-slackware-linux/4.9.3/../../../../x86_64-slackware-linux/bin/ld: escamotage incompatible /usr/X11R6/lib/libcurl.so lors de la recherche de -lcurl
/usr/lib64/gcc/x86_64-slackware-linux/4.9.3/../../../../x86_64-slackware-linux/bin/ld: escamotage incompatible /usr/lib/libpthread.so lors de la recherche de -lpthread
/usr/lib64/gcc/x86_64-slackware-linux/4.9.3/../../../../x86_64-slackware-linux/bin/ld: escamotage incompatible /usr/lib/libpthread.a lors de la recherche de -lpthread
/usr/lib64/gcc/x86_64-slackware-linux/4.9.3/../../../../x86_64-slackware-linux/bin/ld: escamotage incompatible /usr/X11R6/lib/libpthread.so lors de la recherche de -lpthread
/usr/lib64/gcc/x86_64-slackware-linux/4.9.3/../../../../x86_64-slackware-linux/bin/ld: escamotage incompatible /usr/X11R6/lib/libpthread.a lors de la recherche de -lpthread
collect2: erreur: ld a retourné 1 code d'état d'exécution
Makefile.Release:635*: la recette pour la cible «*nixnote2*» a échouée
make[1]: *** [nixnote2] Erreur 1

I tried to modify in Makefile.Debug and Makefile.Release this line
Code:

LIBS          = $(SUBLIBS)  -L/usr/lib64/qt/lib -lopencv_core -lopencv_highgui -lopencv_imgproc -lhunspell -lcurl -L/usr/lib -lpoppler-qt4 -g -rdynamic -lQtWebKit -lQt$
to this :
Code:

LIBS          = $(SUBLIBS)  -L/usr/lib64/qt/lib -lopencv_core -lopencv_highgui -lopencv_imgproc -lcurl -L/usr/lib64 -lhunspell -L/usr/lib -lpoppler-qt4 -g -rdynamic -lQtWebKit -lQt$
But the error is still there, but without next ones :
Code:

/usr/lib64/gcc/x86_64-slackware-linux/4.9.3/../../../../x86_64-slackware-linux/bin/ld: ne peut trouver -lhunspell
collect2: erreur: ld a retourné 1 code d'état d'exécution
Makefile.Release:635*: la recette pour la cible «*nixnote2*» a échouée
make[1]: *** [nixnote2] Erreur 1

Any help would be appreciate !

Toutatis 11-09-2015 04:33 AM

This comes probably from multilib. When I find this, I simply rename /usr/lib, compile, and restore /usr/lib after (very dirty way).

Tonus 11-09-2015 05:05 AM

Thanks for the tip but that didn't make it :(

Alien Bob 11-09-2015 05:21 AM

I would think it was obvious: "ne peut trouver -lhunspell"
If you install the hunspell package, things would look a lot better.

The "escamotage incompatible" messages are just warnings because the linker checks all libraries in its path, including the 32-bit multilib stuff. You can safely ignore those.

Tonus 11-09-2015 05:26 AM

Thanks for answering.
Quote:

Originally Posted by Alien Bob (Post 5446840)
I would think it was obvious: "ne peut trouver -lhunspell"
If you install the hunspell package, things would look a lot better.

Indeed it is obvious...

But hunspell is there :
Code:

/usr/lib64/pkgconfig/hunspell.pc
/usr/lib64/qt5/plugins/kf5/sonnet/hunspell.so
/usr/lib64/libhunspell-1.3.so.0.0.0
/usr/lib64/libhunspell-1.3.so.0
/usr/lib64/libhunspell-1.3.la
/usr/lib64/libhunspell-1.3.so
/usr/share/locale/hu/LC_MESSAGES/hunspell.mo
/usr/share/locale/it/LC_MESSAGES/hunspell.mo
/usr/share/katepart5/syntax/hunspell-dat.xml
/usr/share/katepart5/syntax/hunspell-dic.xml
/usr/share/katepart5/syntax/hunspell-aff.xml
/usr/share/katepart5/syntax/hunspell-idx.xml
/usr/man/man1/hunspell.1.gz
/usr/man/man3/hunspell.3.gz
/usr/man/hu/man1/hunspell.1.gz
/usr/man/man5/hunspell.5.gz
/usr/doc/hunspell-1.3.3
/usr/doc/hunspell-1.3.3/COPYING.LGPL
/usr/doc/hunspell-1.3.3/NEWS
/usr/doc/hunspell-1.3.3/ChangeLog.O
/usr/doc/hunspell-1.3.3/README.myspell
/usr/doc/hunspell-1.3.3/BUGS
/usr/doc/hunspell-1.3.3/ABOUT-NLS
/usr/doc/hunspell-1.3.3/COPYING.MPL
/usr/doc/hunspell-1.3.3/TODO
/usr/doc/hunspell-1.3.3/AUTHORS.myspell
/usr/doc/hunspell-1.3.3/THANKS
/usr/doc/hunspell-1.3.3/README
/usr/doc/hunspell-1.3.3/ChangeLog
/usr/doc/hunspell-1.3.3/COPYING
/usr/doc/hunspell-1.3.3/AUTHORS
/usr/include/scribus/plugins/tools/hunspellcheck
/usr/include/scribus/plugins/tools/hunspellcheck/hunspellpluginimpl.h
/usr/include/scribus/plugins/tools/hunspellcheck/hunspelldialog.h
/usr/include/scribus/plugins/tools/hunspellcheck/hunspelldict.h
/usr/include/scribus/plugins/tools/hunspellcheck/hunspellpluginstructs.h
/usr/include/scribus/plugins/tools/hunspellcheck/hunspellplugin.h
/usr/include/hunspell
/usr/include/hunspell/affentry.hxx
/usr/include/hunspell/htypes.hxx
/usr/include/hunspell/baseaffix.hxx
/usr/include/hunspell/langnum.hxx
/usr/include/hunspell/csutil.hxx
/usr/include/hunspell/w_char.hxx
/usr/include/hunspell/filemgr.hxx
/usr/include/hunspell/replist.hxx
/usr/include/hunspell/phonet.hxx
/usr/include/hunspell/atypes.hxx
/usr/include/hunspell/affixmgr.hxx
/usr/include/hunspell/hunvisapi.h
/usr/include/hunspell/dictmgr.hxx
/usr/include/hunspell/hunspell.hxx
/usr/include/hunspell/hunzip.hxx
/usr/include/hunspell/hunspell.h
/usr/include/hunspell/hashmgr.hxx
/usr/include/hunspell/suggestmgr.hxx
/usr/bin/wordlist2hunspell
/usr/bin/hunspell

That's what I do not understand...

Tonus 11-09-2015 06:12 AM

I even tried to compile hunspell with static libs in both x86_64 and compat32, I can't get rid of this error.

I don't even know where to search now...

ml4711 11-09-2015 07:17 AM

It can not find the hunspell library since it's named hunspell-1.3 in slackware 14.1

So in the file Nixnote2-2.0-beta4/Makefile.Release line 18 change

Code:

-lhunspell  to  -lhunspell-1.3
Enjoy

_gin 11-09-2015 07:18 AM

Code:

pkg-config --libs hunspell
returns -lhunspell-1.3 not -lhunspell

I adjusted the Makefile.Release file accordingly:

Code:

LFLAGS        = -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-O1 -Wl,-rpath,/usr/lib64/qt/lib
LIBS          = $(SUBLIBS)  -L/usr/lib64/qt/lib -lopencv_core -lopencv_highgui -lopencv_imgproc -lhunspell-1.3 -lcurl -L/usr/lib -lpoppler-qt4 -g -rdynamic -lQtWebKit -lQtSql -L/usr/lib64/qt/lib -lQtXml -lQtGui -L/usr/X11R6/lib -lQtNetwork -lQtCore -lpthread
AR            = ar cqs

like this It's compiling fine on my Slackware64-current box.

In short:

qmake
change -lhunspell for -lhunspell-1.3
make

Just see that, ml4711 was faster on this...

Tonus 11-09-2015 08:06 AM

Thanks guys ! That works !

I will recall this pkg-config --libs command :)


All times are GMT -5. The time now is 04:36 AM.