gangeli / NaturalLI

Natural Logic Inference for Common Sense Reasoning
MIT License
62 stars 12 forks source link

/usr/include/google/protobuf/wire_format_lite_inl.h:328: undefined reference to `google::protobuf::io::CodedInputStream::BytesUntilLimit()' collect2: error: ld returned 1 exit status #16

Closed vegeta03 closed 9 years ago

vegeta03 commented 9 years ago

just like you said i configured the conf with CXXFLAGS="-O0 -ggdb" and when "make check" performed the above error occurs.

./configure --with-protoc=/usr/ \

        --with-postgresql=/usr/bin/pg_config \
        --with-scala=/usr/share/scala \
        --with-java=/usr/lib/jvm/java-8-oracle \
        --with-corenlp=/home/vegeta/NaturalLI/lib/corenlp.jar \
        --with-corenlp-models=/home/vegeta/NaturalLI/lib/corenlp-models.jar \
        --with-corenlp-caseless-models=/home/vegeta/NaturalLI/lib/corenlp-caseless-models.jar \
        --prefix=/home/vegeta/NaturalLI/ \
        CXX=/usr/bin/g++ \
        CXXFLAGS="-O0 -ggdb" \
        PGHOST=localhost PGPORT=5432 DBNAME=naturalli \
        PGUSER=vegeta PGPASSWORD=psqlpwd \
        GREEDY_LOAD=1

checking for gcc... gcc checking whether the C compiler works... yes checking for C compiler default output file name... a.out checking for suffix of executables... checking whether we are cross compiling... no checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ISO C89... none needed checking whether gcc understands -c and -o together... yes checking how to run the C preprocessor... gcc -E checking for grep that handles long lines and -e... /bin/grep checking for egrep... /bin/grep -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking algorithm usability... no checking algorithm presence... no checking for algorithm... no checking arpa/inet.h usability... yes checking arpa/inet.h presence... yes checking for arpa/inet.h... yes checking assert.h usability... yes checking assert.h presence... yes checking for assert.h... yes checking cmath usability... no checking cmath presence... no checking for cmath... no checking cstdio usability... no checking cstdio presence... no checking for cstdio... no checking cstdlib usability... no checking cstdlib presence... no checking for cstdlib... no checking cstring usability... no checking cstring presence... no checking for cstring... no checking ctime usability... no checking ctime presence... no checking for ctime... no checking exception usability... no checking exception presence... no checking for exception... no checking map usability... no checking map presence... no checking for map... no checking netinet/in.h usability... yes checking netinet/in.h presence... yes checking for netinet/in.h... yes checking queue usability... no checking queue presence... no checking for queue... no checking set usability... no checking set presence... no checking for set... no checking sstream usability... no checking sstream presence... no checking for sstream... no checking stdio.h usability... yes checking stdio.h presence... yes checking for stdio.h... yes checking for stdlib.h... (cached) yes checking string usability... no checking string presence... no checking for string... no checking sys/errno.h usability... yes checking sys/errno.h presence... yes checking for sys/errno.h... yes checking sys/resource.h usability... yes checking sys/resource.h presence... yes checking for sys/resource.h... yes checking sys/socket.h usability... yes checking sys/socket.h presence... yes checking for sys/socket.h... yes checking for sys/types.h... (cached) yes checking vector usability... no checking vector presence... no checking for vector... no checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes /bin/bash: /root/missing: No such file or directory configure: WARNING: 'missing' script is too old or missing checking for a thread-safe mkdir -p... /bin/mkdir -p checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking whether make supports nested variables... yes checking dependency style of gcc... gcc3 checking for ar... ar checking the archiver (ar) interface... ar checking whether we are using the GNU C++ compiler... yes checking whether /usr/bin/g++ accepts -g... yes checking dependency style of /usr/bin/g++... gcc3 checking build system type... x86_64-unknown-linux-gnu checking host system type... x86_64-unknown-linux-gnu checking how to print strings... printf checking for a sed that does not truncate output... /bin/sed checking for fgrep... /bin/grep -F checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B checking the name lister (/usr/bin/nm -B) interface... BSD nm checking whether ln -s works... yes checking the maximum length of command line arguments... 1572864 checking whether the shell understands some XSI constructs... yes checking whether the shell understands "+="... yes checking how to convert x86_64-unknown-linux-gnu file names to x86_64-unknown-linux-gnu format... func_convert_file_noop checking how to convert x86_64-unknown-linux-gnu file names to toolchain format... func_convert_file_noop checking for /usr/bin/ld option to reload object files... -r checking for objdump... objdump checking how to recognize dependent libraries... pass_all checking for dlltool... no checking how to associate runtime and link libraries... printf %s\n checking for archiver @FILE support... @ checking for strip... strip checking for ranlib... ranlib checking command to parse /usr/bin/nm -B output from gcc object... ok checking for sysroot... no checking for mt... mt checking if mt is a manifest tool... no checking for dlfcn.h... yes checking for objdir... .libs checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC -DPIC checking if gcc PIC flag -fPIC -DPIC works... yes checking if gcc static flag -static works... yes checking if gcc supports -c -o file.o... yes checking if gcc supports -c -o file.o... (cached) yes checking whether the gcc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes checking dynamic linker characteristics... GNU/Linux ld.so checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking if libtool supports shared libraries... yes checking whether to build shared libraries... no checking whether to build static libraries... yes checking how to run the C++ preprocessor... /usr/bin/g++ -E checking for ld used by /usr/bin/g++... /usr/bin/ld -m elf_x86_64 checking if the linker (/usr/bin/ld -m elf_x86_64) is GNU ld... yes checking whether the /usr/bin/g++ linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes checking for /usr/bin/g++ option to produce PIC... -fPIC -DPIC checking if /usr/bin/g++ PIC flag -fPIC -DPIC works... yes checking if /usr/bin/g++ static flag -static works... yes checking if /usr/bin/g++ supports -c -o file.o... yes checking if /usr/bin/g++ supports -c -o file.o... (cached) yes checking whether the /usr/bin/g++ linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes checking dynamic linker characteristics... (cached) GNU/Linux ld.so checking how to hardcode library paths into programs... immediate checking for javac... yes ./configure: line 15737: /bin/scalac: No such file or directory checking for scalac... yes checking for ant... yes checking for pg_config... /usr/bin/pg_config checking for PostgreSQL libraries... yes checking if PostgreSQL version is >= 8.4.9... yes checking for malloc in -ltcmalloc... yes checking for pkg-config... /usr/bin/pkg-config checking pkg-config is at least version 0.9.0... yes checking for PROTOBUF... yes checking for protoc... protoc checking if g++ supports C++0x features without additional flags... no checking if g++ supports C++0x features with -std=c++0x... no checking if g++ supports C++0x features with -std=gnu++0x... no checking for unordered_map... yes checking for OpenMP flag of C++ compiler... -fopenmp checking that generated files are newer than configure... done configure: creating ./config.status config.status: creating Makefile config.status: creating src/Makefile config.status: creating src/fnv/Makefile config.status: creating test/src/Makefile config.status: creating test/src/gtest/Makefile config.status: creating config.h config.status: executing depfiles commands config.status: executing libtool commands

vegeta03 commented 9 years ago

make check Making check in src make[1]: Entering directory /home/vegeta/NaturalLI/src' make check-recursive make[2]: Entering directory/home/vegeta/NaturalLI/src' Making check in fnv make[3]: Entering directory /home/vegeta/NaturalLI/src/fnv' make check-am make[4]: Entering directory/home/vegeta/NaturalLI/src/fnv' make[4]: Nothing to be done for check-am'. make[4]: Leaving directory/home/vegeta/NaturalLI/src/fnv' make[3]: Leaving directory /home/vegeta/NaturalLI/src/fnv' make[3]: Entering directory/home/vegeta/NaturalLI/src' /usr/bin/g++ -DHAVE_CONFIG_H -I. -I.. -std=c++0x -pthread -I/usr/include/postgresql -I/usr//include -O0 -ggdb -MT naturalli_server-Bloom.o -MD -MP -MF .deps/naturalli_server-Bloom.Tpo -c -o naturalli_server-Bloom.o test -f 'Bloom.cc' || echo './'Bloom.cc mv -f .deps/naturalli_server-Bloom.Tpo .deps/naturalli_server-Bloom.Po /usr//bin/protoc -I=. --cpp_out=. Messages.proto /usr/bin/g++ -DHAVE_CONFIG_H -I. -I.. -std=c++0x -pthread -I/usr/include/postgresql -I/usr//include -O0 -ggdb -MT naturalli_server-Messages.pb.o -MD -MP -MF .deps/naturalli_server-Messages.pb.Tpo -c -o naturalli_server-Messages.pb.o test -f 'Messages.pb.cc' || echo './'Messages.pb.cc mv -f .deps/naturalli_server-Messages.pb.Tpo .deps/naturalli_server-Messages.pb.Po /usr/bin/g++ -DHAVE_CONFIG_H -I. -I.. -std=c++0x -pthread -I/usr/include/postgresql -I/usr//include -O0 -ggdb -MT naturalli_server-Trie.o -MD -MP -MF .deps/naturalli_server-Trie.Tpo -c -o naturalli_server-Trie.o test -f 'Trie.cc' || echo './'Trie.cc mv -f .deps/naturalli_server-Trie.Tpo .deps/naturalli_server-Trie.Po /usr/bin/g++ -DHAVE_CONFIG_H -I. -I.. -std=c++0x -pthread -I/usr/include/postgresql -I/usr//include -O0 -ggdb -MT naturalli_server-FactDB.o -MD -MP -MF .deps/naturalli_server-FactDB.Tpo -c -o naturalli_server-FactDB.o test -f 'FactDB.cc' || echo './'FactDB.cc mv -f .deps/naturalli_server-FactDB.Tpo .deps/naturalli_server-FactDB.Po /usr/bin/g++ -DHAVE_CONFIG_H -I. -I.. -std=c++0x -pthread -I/usr/include/postgresql -I/usr//include -O0 -ggdb -MT naturalli_server-Postgres.o -MD -MP -MF .deps/naturalli_server-Postgres.Tpo -c -o naturalli_server-Postgres.o test -f 'Postgres.cc' || echo './'Postgres.cc mv -f .deps/naturalli_server-Postgres.Tpo .deps/naturalli_server-Postgres.Po /usr/bin/g++ -DHAVE_CONFIG_H -I. -I.. -std=c++0x -pthread -I/usr/include/postgresql -I/usr//include -O0 -ggdb -MT naturalli_server-Utils.o -MD -MP -MF .deps/naturalli_server-Utils.Tpo -c -o naturalli_server-Utils.o test -f 'Utils.cc' || echo './'Utils.cc mv -f .deps/naturalli_server-Utils.Tpo .deps/naturalli_server-Utils.Po /usr/bin/g++ -DHAVE_CONFIG_H -I. -I.. -std=c++0x -pthread -I/usr/include/postgresql -I/usr//include -O0 -ggdb -MT naturalli_server-Graph.o -MD -MP -MF .deps/naturalli_server-Graph.Tpo -c -o naturalli_server-Graph.o test -f 'Graph.cc' || echo './'Graph.cc mv -f .deps/naturalli_server-Graph.Tpo .deps/naturalli_server-Graph.Po /usr/bin/g++ -DHAVE_CONFIG_H -I. -I.. -std=c++0x -pthread -I/usr/include/postgresql -I/usr//include -O0 -ggdb -MT naturalli_server-InferenceServer.o -MD -MP -MF .deps/naturalli_server-InferenceServer.Tpo -c -o naturalli_server-InferenceServer.o test -f 'InferenceServer.cc' || echo './'InferenceServer.cc mv -f .deps/naturalli_server-InferenceServer.Tpo .deps/naturalli_server-InferenceServer.Po /usr/bin/g++ -DHAVE_CONFIG_H -I. -I.. -std=c++0x -pthread -I/usr/include/postgresql -I/usr//include -O0 -ggdb -MT naturalli_server-Search.o -MD -MP -MF .deps/naturalli_server-Search.Tpo -c -o naturalli_server-Search.o test -f 'Search.cc' || echo './'Search.cc mv -f .deps/naturalli_server-Search.Tpo .deps/naturalli_server-Search.Po /usr/bin/g++ -DHAVE_CONFIG_H -I. -I.. -std=c++0x -pthread -I/usr/include/postgresql -I/usr//include -O0 -ggdb -MT naturalli_server-Map.o -MD -MP -MF .deps/naturalli_server-Map.Tpo -c -o naturalli_server-Map.o test -f 'Map.cc' || echo './'Map.cc mv -f .deps/naturalli_server-Map.Tpo .deps/naturalli_server-Map.Po /bin/bash ../libtool --tag=CXX --mode=link /usr/bin/g++ -std=c++0x -pthread -I/usr/include/postgresql -I/usr//include -O0 -ggdb -o naturalli_server naturalli_server-Bloom.o naturalli_server-Messages.pb.o naturalli_server-Trie.o naturalli_server-FactDB.o naturalli_server-Postgres.o naturalli_server-Utils.o naturalli_server-Graph.o naturalli_server-InferenceServer.o naturalli_server-Search.o naturalli_server-Map.o -L/usr/lib/x86_64-linux-gnu -lpq -L/usr//lib -lprotobuf -Lfnv -lfnv32 -lfnv64 -ltcmalloc
libtool: link: /usr/bin/g++ -std=c++0x -pthread -I/usr/include/postgresql -I/usr//include -O0 -ggdb -o naturalli_server naturalli_server-Bloom.o naturalli_server-Messages.pb.o naturalli_server-Trie.o naturalli_server-FactDB.o naturalli_server-Postgres.o naturalli_server-Utils.o naturalli_server-Graph.o naturalli_server-InferenceServer.o naturalli_server-Search.o naturalli_server-Map.o -L/usr/lib/x86_64-linux-gnu -lpq -L/usr//lib -lprotobuf -Lfnv /home/vegeta/NaturalLI/src/fnv/.libs/libfnv32.a /home/vegeta/NaturalLI/src/fnv/.libs/libfnv64.a -ltcmalloc -pthread naturalli_server-Messages.pb.o: In function bool google::protobuf::internal::WireFormatLite::ReadPackedPrimitive<float, (google::protobuf::internal::WireFormatLite::FieldType)2>(google::protobuf::io::CodedInputStream*, google::protobuf::RepeatedField<float>*)': /usr/include/google/protobuf/wire_format_lite_inl.h:328: undefined reference togoogle::protobuf::io::CodedInputStream::BytesUntilLimit()' collect2: error: ld returned 1 exit status make[3]: * [naturalli_server] Error 1 make[3]: Leaving directory /home/vegeta/NaturalLI/src' make[2]: *** [check-recursive] Error 1 make[2]: Leaving directory/home/vegeta/NaturalLI/src' make[1]: *\ [check] Error 2 make[1]: Leaving directory `/home/vegeta/NaturalLI/src' make: * [check-recursive] Error 1

vegeta03 commented 9 years ago

please help fix this error..

vegeta03 commented 9 years ago

Is this error because of this header files not loaded, and how to fix it :
Some of these are printing no..

checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking algorithm usability... no checking algorithm presence... no checking for algorithm... no checking arpa/inet.h usability... yes checking arpa/inet.h presence... yes checking for arpa/inet.h... yes checking assert.h usability... yes checking assert.h presence... yes checking for assert.h... yes checking cmath usability... no checking cmath presence... no checking for cmath... no checking cstdio usability... no checking cstdio presence... no checking for cstdio... no checking cstdlib usability... no checking cstdlib presence... no checking for cstdlib... no checking cstring usability... no checking cstring presence... no checking for cstring... no checking ctime usability... no checking ctime presence... no checking for ctime... no checking exception usability... no checking exception presence... no checking for exception... no checking map usability... no checking map presence... no checking for map... no checking netinet/in.h usability... yes checking netinet/in.h presence... yes checking for netinet/in.h... yes checking queue usability... no checking queue presence... no checking for queue... no checking set usability... no checking set presence... no checking for set... no checking sstream usability... no checking sstream presence... no checking for sstream... no checking stdio.h usability... yes checking stdio.h presence... yes checking for stdio.h... yes checking for stdlib.h... (cached) yes checking string usability... no checking string presence... no checking for string... no checking sys/errno.h usability... yes checking sys/errno.h presence... yes checking for sys/errno.h... yes checking sys/resource.h usability... yes checking sys/resource.h presence... yes checking for sys/resource.h... yes checking sys/socket.h usability... yes checking sys/socket.h presence... yes checking for sys/socket.h... yes checking for sys/types.h... (cached) yes checking vector usability... no checking vector presence... no checking for vector... no

In config.log :

conftest.c:19:21: fatal error: algorithm: No such file or directory

include

                 ^

compilation terminated. conftest.c:54:17: fatal error: cmath: No such file or directory

include

             ^

compilation terminated. configure:3673: $? = 1 configure: failed program was: | /* confdefs.h */

vegeta03 commented 9 years ago

i saw this solution online, that it is the problem of link to library.. and to add -lm on after C files on the command line. If this is the solution, where should i add -lm and how Is it the src/Makefile.am

please help...

gangeli commented 9 years ago

My guess is you're using some very old or misconfigured version of g++. What version are you using? Particularly worrisome is that it can't find -- this is pretty basic. Can you compile a hello world application that makes use of std::vector?