Home Help Center

Ice compiling error

ua6ceyua6cey Member Andrey KhoroshunOrganization: PersonalProject: GNURadio
Hi guys!
I need some help to compile Ice on my Slackware64-14. Your third party sources was patched and compiled without any problem.
Then I checked all paths for libraries in .../Ice-3.5.0/cpp/config/Make.rules.
The result of making is here. My maker speaks Russian, translations are mine.


............................................
make[2]: Вход в каталог (Entering directory) `/home/goodman/Download/Ice/Ice-3.5.0/cpp/src/FreezeScript'
g++ -c -I.. -I../../include -I/usr/local/BerkeleyDB.5.3/lib/include -m64 -Wall -Werror -D_REENTRANT -fPIC -g TransformAnalyzer.cpp
g++ -c -I.. -I../../include -I/usr/local/BerkeleyDB.5.3/lib/include -m64 -Wall -Werror -D_REENTRANT -fPIC -g TransformVisitor.cpp
g++ -c -I.. -I../../include -I/usr/local/BerkeleyDB.5.3/lib/include -m64 -Wall -Werror -D_REENTRANT -fPIC -g Transformer.cpp
g++ -c -I.. -I../../include -I/usr/local/BerkeleyDB.5.3/lib/include -m64 -Wall -Werror -D_REENTRANT -fPIC -g transformdb.cpp
g++ -c -I.. -I../../include -I/usr/local/BerkeleyDB.5.3/lib/include -m64 -Wall -Werror -D_REENTRANT -fPIC -g ../FreezeScript/Grammar.cpp
g++ -c -I.. -I../../include -I/usr/local/BerkeleyDB.5.3/lib/include -m64 -Wall -Werror -D_REENTRANT -fPIC -g Scanner.cpp
g++ -c -I.. -I../../include -I/usr/local/BerkeleyDB.5.3/lib/include -m64 -Wall -Werror -D_REENTRANT -fPIC -g AssignVisitor.cpp
g++ -c -I.. -I../../include -I/usr/local/BerkeleyDB.5.3/lib/include -m64 -Wall -Werror -D_REENTRANT -fPIC -g Data.cpp
g++ -c -I.. -I../../include -I/usr/local/BerkeleyDB.5.3/lib/include -m64 -Wall -Werror -D_REENTRANT -fPIC -g Error.cpp
g++ -c -I.. -I../../include -I/usr/local/BerkeleyDB.5.3/lib/include -m64 -Wall -Werror -D_REENTRANT -fPIC -g Functions.cpp
g++ -c -I.. -I../../include -I/usr/local/BerkeleyDB.5.3/lib/include -m64 -Wall -Werror -D_REENTRANT -fPIC -g Exception.cpp
g++ -c -I.. -I../../include -I/usr/local/BerkeleyDB.5.3/lib/include -m64 -Wall -Werror -D_REENTRANT -fPIC -g Parser.cpp
g++ -c -I.. -I../../include -I/usr/local/BerkeleyDB.5.3/lib/include -m64 -Wall -Werror -D_REENTRANT -fPIC -g Print.cpp
g++ -c -I.. -I../../include -I/usr/local/BerkeleyDB.5.3/lib/include -m64 -Wall -Werror -D_REENTRANT -fPIC -g Util.cpp
rm -f ../../bin/transformdb
g++ -Wl,--enable-new-dtags -rdynamic -m64 -Wall -Werror -D_REENTRANT -fPIC -g -L../../lib -o ../../bin/transformdb TransformAnalyzer.o TransformVisitor.o Transformer.o transformdb.o ../FreezeScript/Grammar.o Scanner.o AssignVisitor.o Data.o Error.o Functions.o Exception.o Parser.o Print.o Util.o -lSlice -lIceXML -Wl,-rpath-link,/usr/local/BerkeleyDB.5.3/lib/lib64 -lFreeze -Wl,-rpath-link,/usr/lib64/lib64 -lIce -lIceUtil -lpthread -lrt -L/usr/local/BerkeleyDB.5.3/lib/lib64 -ldb_cxx
../../lib/libIce.so: undefined reference to `libiconv_open'
../../lib/libIce.so: undefined reference to `libiconv_close'
../../lib/libIce.so: undefined reference to `libiconv'
collect2: ошибка: выполнение ld завершилось с кодом возврата 1 (error: ld finished with errorcode 1)
make[2]: *** [../../bin/transformdb] Ошибка 1 (Error 1)
make[2]: Выход из каталога (Leaving directory)`/home/goodman/Download/Ice/Ice-3.5.0/cpp/src/FreezeScript'
make[1]: *** [FreezeScript] Ошибка 2 (Error 2)
make[1]: Выход из каталога (Leaving directory)`/home/goodman/Download/Ice/Ice-3.5.0/cpp/src'
make: *** [all] Ошибка 1
bash-4.2$



A path for libiconv .so, .a and .h is proper.

I rebuilt both libiconv and its dependency - gettext packages according GNU Pages recomendations. Anyway, linker couldn't find references.

All I found by Google about errors like this was recommends to no link libiconv libs at all. Is it a right way?


gcc (GCC) 4.7.1
GNU ld (Linux/GNU Binutils) 2.22.52.0.2.20120424

Sincerely,
Andrey.

Comments

  • bernardbernard Jupiter, FLAdministrators, ZeroC Staff Bernard NormierOrganization: ZeroC, Inc.Project: Ice ZeroC Staff
    Hi Andrey,

    Welcome to our forums!

    I would also recommend to simply not link with libiconv, as it should not be needed.

    Why did you link libIce with libiconv?

    Best regards,
    Bernard
  • ua6ceyua6cey Member Andrey KhoroshunOrganization: PersonalProject: GNURadio
    Hi Bernard!

    Thank you for your reply!
    Now I understand that I understand nothing :)
    I didn't choose libiconv ! In other words - it's not my choice.
    I thought that linker looks for libiconv_open & libiconv_close references in libiconv.
    Am I wrong? Maybe another lib?

    Andrey.
  • bernardbernard Jupiter, FLAdministrators, ZeroC Staff Bernard NormierOrganization: ZeroC, Inc.Project: Ice ZeroC Staff
    Hi Andrey,

    The error you're getting is because libIce depends on 3 symbols (iconv_open, iconv_close and iconv), and when you link an executable - here transformdb - the linking fails because the linker can't find the library with these symbols.

    On most Linux distributions, these symbols are in GLIBC, and you don't need to link explicitly with any library. For example:
    nm /lib/libc.so.6 | grep iconv
    00017870 T iconv
    000179e0 T iconv_close
    000174f0 T iconv_open
    

    With your build, all these symbols have a lib prefix (libiconv etc.). It could be that you built libIce incorrectly, by using a separate libiconv instead of the GLIBC iconv functions.

    Can you rebuild libIce and post the corresponding compilation & link output?

    Best regards,
    Bernard
  • ua6ceyua6cey Member Andrey KhoroshunOrganization: PersonalProject: GNURadio
    Problem solved

    Hi Bernard!
    Yes, you're right. I just removed libiconv, run "ldconfig", then run "make clean" and "make".
    Compiling and linking was succesfull, running all of 83 tests too.
    Thank you!

    Sincerely,
    Andrey.
Sign In or Register to comment.