Libpreludedb build problem
Added by Ilmar Habibulin about 8 years ago
Hello.
I was trying to check Prelude in my home environment, but found out, that freebsd package is old (and without maintainer). So i decided to build the new (3.0.0) version from source. The problem is that it stops with error while linking python bindings, if i understand it correctlly. I've tryed to google solusion for such case, but didn't find the answer. Do someone have a clue how can i try to solve this problem? Here is the error:
building '_preludedb' extension c++ -fno-strict-aliasing -O2 -pipe -fstack-protector -fno-strict-aliasing -DNDEBUG -fPIC -I/usr/local/include/python2.7 -c _preludedb.cxx -o build/temp.freebsd-10.3-STABLE-amd64-2.7/_preludedb.o -I/usr/local/include -I../.. -I../../src/include -I../../src/include -I../../bindings/c++/include c++ -shared -lpthread -Wl,-rpath=/usr/lib:/usr/local/lib -fstack-protector build/temp.freebsd-10.3-STABLE-amd64-2.7/_preludedb.o -L../../src/.libs/ -L../../bindings/c++/.libs/ -L/usr/local/lib -lpython2.7 -o build/lib.freebsd-10.3-STABLE-amd64-2.7/_preludedb.so -lpreludedbcpp -lpreludecpp -lpreludedb -L/usr/local/lib -lprelude -L/usr/local/lib -lgnutls -L/usr/local/lib -lgcrypt -lgpg-error /usr/local/lib/libprelude.a(idmef-criteria-string.yac.o): In function `yyparse': /root/prelude/libprelude-3.0.0/src/idmef-criteria-string.yac.c:1285: multiple definition of `yyparse' ../../src/.libs//libpreludedb.so(preludedb-path-selection-parser.yac.o):/root/prelude/libpreludedb-3.0.0/src/preludedb-path-selection-parser.yac.c:1154: first defined here /usr/local/lib/libprelude.a(idmef-criteria-string.lex.o): In function `yy_create_buffer': /root/prelude/libprelude-3.0.0/src/idmef-criteria-string.lex.c:1617: multiple definition of `yy_create_buffer' ../../src/.libs//libpreludedb.so(preludedb-path-selection-parser.lex.o):/root/prelude/libpreludedb-3.0.0/src/preludedb-path-selection-parser.lex.c:1572: first defined here /usr/local/lib/libprelude.a(idmef-criteria-string.lex.o): In function `yy_delete_buffer': /root/prelude/libprelude-3.0.0/src/idmef-criteria-string.lex.c:1645: multiple definition of `yy_delete_buffer' ../../src/.libs//libpreludedb.so(preludedb-path-selection-parser.lex.o):/root/prelude/libpreludedb-3.0.0/src/preludedb-path-selection-parser.lex.c:1600: first defined here /usr/local/lib/libprelude.a(idmef-criteria-string.lex.o): In function `yy_flush_buffer': /root/prelude/libprelude-3.0.0/src/idmef-criteria-string.lex.c:1692: multiple definition of `yy_flush_buffer' ../../src/.libs//libpreludedb.so(preludedb-path-selection-parser.lex.o):/root/prelude/libpreludedb-3.0.0/src/preludedb-path-selection-parser.lex.c:1649: first defined here /usr/local/lib/libprelude.a(idmef-criteria-string.lex.o): In function `yy_scan_buffer': /root/prelude/libprelude-3.0.0/src/idmef-criteria-string.lex.c:1819: multiple definition of `yy_scan_buffer' ../../src/.libs//libpreludedb.so(preludedb-path-selection-parser.lex.o):/root/prelude/libpreludedb-3.0.0/src/preludedb-path-selection-parser.lex.c:1780: first defined here /usr/local/lib/libprelude.a(idmef-criteria-string.lex.o): In function `yy_scan_bytes': /root/prelude/libprelude-3.0.0/src/idmef-criteria-string.lex.c:1869: multiple definition of `yy_scan_bytes' ../../src/.libs//libpreludedb.so(preludedb-path-selection-parser.lex.o):/root/prelude/libpreludedb-3.0.0/src/preludedb-path-selection-parser.lex.c:1830: first defined here /usr/local/lib/libprelude.a(idmef-criteria-string.lex.o): In function `yy_scan_string': /root/prelude/libprelude-3.0.0/src/idmef-criteria-string.lex.c:1856: multiple definition of `yy_scan_string' ../../src/.libs//libpreludedb.so(preludedb-path-selection-parser.lex.o):/root/prelude/libpreludedb-3.0.0/src/preludedb-path-selection-parser.lex.c:1817: first defined here /usr/local/lib/libprelude.a(idmef-criteria-string.lex.o): In function `yy_switch_to_buffer': /root/prelude/libprelude-3.0.0/src/idmef-criteria-string.lex.c:1572: multiple definition of `yy_switch_to_buffer' ../../src/.libs//libpreludedb.so(preludedb-path-selection-parser.lex.o):/root/prelude/libpreludedb-3.0.0/src/preludedb-path-selection-parser.lex.c:1525: first defined here /usr/local/lib/libprelude.a(idmef-criteria-string.lex.o): In function `yyalloc': /root/prelude/libprelude-3.0.0/src/idmef-criteria-string.lex.c:2125: multiple definition of `yyalloc' ../../src/.libs//libpreludedb.so(preludedb-path-selection-parser.lex.o):/root/prelude/libpreludedb-3.0.0/src/preludedb-path-selection-parser.lex.c:2196: first defined here /usr/local/lib/libprelude.a(idmef-criteria-string.lex.o): In function `yyfree': /root/prelude/libprelude-3.0.0/src/idmef-criteria-string.lex.c:2142: multiple definition of `yyfree' ../../src/.libs//libpreludedb.so(preludedb-path-selection-parser.lex.o):/root/prelude/libpreludedb-3.0.0/src/preludedb-path-selection-parser.lex.c:2213: first defined here /usr/local/lib/libprelude.a(idmef-criteria-string.lex.o): In function `yyget_debug': /root/prelude/libprelude-3.0.0/src/idmef-criteria-string.lex.c:2033: multiple definition of `yyget_debug' ../../src/.libs//libpreludedb.so(preludedb-path-selection-parser.lex.o):/root/prelude/libpreludedb-3.0.0/src/preludedb-path-selection-parser.lex.c:2019: first defined here /usr/local/lib/libprelude.a(idmef-criteria-string.lex.o): In function `yyget_in': /root/prelude/libprelude-3.0.0/src/idmef-criteria-string.lex.c:1977: multiple definition of `yyget_in' ../../src/.libs//libpreludedb.so(preludedb-path-selection-parser.lex.o):/root/prelude/libpreludedb-3.0.0/src/preludedb-path-selection-parser.lex.c:1927: first defined here /usr/local/lib/libprelude.a(idmef-criteria-string.lex.o): In function `yyget_leng': /root/prelude/libprelude-3.0.0/src/idmef-criteria-string.lex.c:1993: multiple definition of `yyget_leng' ../../src/.libs//libpreludedb.so(preludedb-path-selection-parser.lex.o):/root/prelude/libpreludedb-3.0.0/src/preludedb-path-selection-parser.lex.c:1945: first defined here /usr/local/lib/libprelude.a(idmef-criteria-string.lex.o): In function `yyget_lineno': /root/prelude/libprelude-3.0.0/src/idmef-criteria-string.lex.c:1968: multiple definition of `yyget_lineno' ../../src/.libs//libpreludedb.so(preludedb-path-selection-parser.lex.o):/root/prelude/libpreludedb-3.0.0/src/preludedb-path-selection-parser.lex.c:1901: first defined here /usr/local/lib/libprelude.a(idmef-criteria-string.lex.o): In function `yyget_out': /root/prelude/libprelude-3.0.0/src/idmef-criteria-string.lex.c:1985: multiple definition of `yyget_out' ../../src/.libs//libpreludedb.so(preludedb-path-selection-parser.lex.o):/root/prelude/libpreludedb-3.0.0/src/preludedb-path-selection-parser.lex.c:1936: first defined here /usr/local/lib/libprelude.a(idmef-criteria-string.lex.o): In function `yyget_text': /root/prelude/libprelude-3.0.0/src/idmef-criteria-string.lex.c:2002: multiple definition of `yyget_text' ../../src/.libs//libpreludedb.so(preludedb-path-selection-parser.lex.o):/root/prelude/libpreludedb-3.0.0/src/preludedb-path-selection-parser.lex.c:1955: first defined here /usr/local/lib/libprelude.a(idmef-criteria-string.lex.o): In function `yylex': /root/prelude/libprelude-3.0.0/src/idmef-criteria-string.lex.c:792: multiple definition of `yylex' ../../src/.libs//libpreludedb.so(preludedb-path-selection-parser.lex.o):/root/prelude/libpreludedb-3.0.0/src/preludedb-path-selection-parser.lex.c:783: first defined here /usr/local/lib/libprelude.a(idmef-criteria-string.lex.o): In function `yylex_destroy': /root/prelude/libprelude-3.0.0/src/idmef-criteria-string.lex.c:2076: multiple definition of `yylex_destroy' ../../src/.libs//libpreludedb.so(preludedb-path-selection-parser.lex.o):/root/prelude/libpreludedb-3.0.0/src/preludedb-path-selection-parser.lex.c:2143: first defined here /usr/local/lib/libprelude.a(idmef-criteria-string.lex.o): In function `yypop_buffer_state': /root/prelude/libprelude-3.0.0/src/idmef-criteria-string.lex.c:1751: multiple definition of `yypop_buffer_state' ../../src/.libs//libpreludedb.so(preludedb-path-selection-parser.lex.o):/root/prelude/libpreludedb-3.0.0/src/preludedb-path-selection-parser.lex.c:1710: first defined here /usr/local/lib/libprelude.a(idmef-criteria-string.lex.o): In function `yypush_buffer_state': /root/prelude/libprelude-3.0.0/src/idmef-criteria-string.lex.c:1721: multiple definition of `yypush_buffer_state' ../../src/.libs//libpreludedb.so(preludedb-path-selection-parser.lex.o):/root/prelude/libpreludedb-3.0.0/src/preludedb-path-selection-parser.lex.c:1679: first defined here /usr/local/lib/libprelude.a(idmef-criteria-string.lex.o): In function `yyrealloc': /root/prelude/libprelude-3.0.0/src/idmef-criteria-string.lex.c:2130: multiple definition of `yyrealloc' ../../src/.libs//libpreludedb.so(preludedb-path-selection-parser.lex.o):/root/prelude/libpreludedb-3.0.0/src/preludedb-path-selection-parser.lex.c:2201: first defined here /usr/local/lib/libprelude.a(idmef-criteria-string.lex.o): In function `yyrestart': /root/prelude/libprelude-3.0.0/src/idmef-criteria-string.lex.c:1555: multiple definition of `yyrestart' ../../src/.libs//libpreludedb.so(preludedb-path-selection-parser.lex.o):/root/prelude/libpreludedb-3.0.0/src/preludedb-path-selection-parser.lex.c:1507: first defined here /usr/local/lib/libprelude.a(idmef-criteria-string.lex.o): In function `yyset_debug': /root/prelude/libprelude-3.0.0/src/idmef-criteria-string.lex.c:2038: multiple definition of `yyset_debug' ../../src/.libs//libpreludedb.so(preludedb-path-selection-parser.lex.o):/root/prelude/libpreludedb-3.0.0/src/preludedb-path-selection-parser.lex.c:2025: first defined here /usr/local/lib/libprelude.a(idmef-criteria-string.lex.o): In function `yyset_in': /root/prelude/libprelude-3.0.0/src/idmef-criteria-string.lex.c:2023: multiple definition of `yyset_in' ../../src/.libs//libpreludedb.so(preludedb-path-selection-parser.lex.o):/root/prelude/libpreludedb-3.0.0/src/preludedb-path-selection-parser.lex.c:2007: first defined here /usr/local/lib/libprelude.a(idmef-criteria-string.lex.o): In function `yyset_lineno': /root/prelude/libprelude-3.0.0/src/idmef-criteria-string.lex.c:2011: multiple definition of `yyset_lineno' ../../src/.libs//libpreludedb.so(preludedb-path-selection-parser.lex.o):/root/prelude/libpreludedb-3.0.0/src/preludedb-path-selection-parser.lex.c:1975: first defined here /usr/local/lib/libprelude.a(idmef-criteria-string.lex.o): In function `yyset_out': /root/prelude/libprelude-3.0.0/src/idmef-criteria-string.lex.c:2028: multiple definition of `yyset_out' ../../src/.libs//libpreludedb.so(preludedb-path-selection-parser.lex.o):/root/prelude/libpreludedb-3.0.0/src/preludedb-path-selection-parser.lex.c:2013: first defined here c++: error: linker command failed with exit code 1 (use -v to see invocation) error: command 'c++' failed with exit status 1 *** Error code 1
Replies (2)
RE: Libpreludedb build problem - Added by Antoine LUONG about 8 years ago
Hello,
Could you please try building the libpreludedb using the attached tarball?
Regards
libpreludedb-3.0.0.tar.gz (1.28 MB)
RE: Libpreludedb build problem - Added by Ilmar Habibulin about 8 years ago
Also I've got the same problems with prelude-lml tsl_auth_init() function, which dupes libprelude:
libtool: link: gcc -Wall -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wbad-function-cast -Wcast-qual -Wcast-align -Wnested-externs -Wunused -Wformat -Wformat-security -g -O2 .libs/prelude-lmlS.o -z relro -z now -o prelude-lml prelude-lml.o tcp-server.o tcp-server-tls.o udp-server.o regex.o log-entry.o log-source.o log-plugins.o lml-options.o file-server.o lml-alert.o lml-charset.o -Wl,-R/usr/local/lib -Wl,--export-dynamic ../plugins/debug/.libs/libdebug.a ../plugins/pcre/.libs/libpcre.a -L/usr/local/lib /usr/local/lib/libprelude.a -lgnutls -lgcrypt -lgpg-error -lpcre -licui18n -licuuc -licudata ../libev/.libs/libev.a ../libmissing/.libs/libmissing.a -liconv -lm -lpthread -Wl,-rpath -Wl,/usr/local/lib
/usr/local/lib/libprelude.a(tls-auth.o): In function `tls_auth_init':
/root/prelude/libprelude-3.0.0/src/tls-auth.c:343: multiple definition of `tls_auth_init'
tcp-server-tls.o:/root/prelude/prelude-lml-3.0.0/src/tcp-server-tls.c:562: first defined here
collect2: error: ld returned 1 exit status
libtool: link: rm -f ".libs/prelude-lmlS.o"
- Error code 1
Finally i managed to compile and link it all, but it is not running. Will try to make it with new source and let you know. Thanks for your reply