Description
Link error: undefined reference to 'scc_info_FileDescriptorProto_google_2fprotobuf_2fdescriptor_2eproto'
Using an ARM docker to compile for ARM Yocto environment. Apply patch found here so autogen will work.
bash-4.3# g++ --version
g++ (GCC) 4.9.3
bash-4.3# libtool --version
libtool (GNU libtool) 2.4.6
Commands:
bash-4.3# ./autogen
bash-4.3# ./configure
bash-4.3# make
Get the following error:
/bin/bash ../libtool --tag=CXX --mode=link g++ -pthread -DHAVE_PTHREAD=1 -DHAVE_ZLIB=1 -Wall -Wno-sign-compare -O2 -g -std=c++11 -DNDEBUG -pthread -o protoc goo
gle/protobuf/compiler/main.o libprotobuf.la libprotoc.la -lz
libtool: link: g++ -pthread -DHAVE_PTHREAD=1 -DHAVE_ZLIB=1 -Wall -Wno-sign-compare -O2 -g -std=c++11 -DNDEBUG -pthread -o .libs/protoc google/protobuf/compiler/main
.o ./.libs/libprotobuf.so ./.libs/libprotoc.so /home/root/protobuf/src/.libs/libprotobuf.so /usr/lib/libstdc++.so -lm -lz -pthread -Wl,-rpath -Wl,/usr/local/lib
./.libs/libprotoc.so: error: undefined reference to 'scc_info_FileDescriptorProto_google_2fprotobuf_2fdescriptor_2eproto'
collect2: error: ld returned 1 exit status
Makefile:3499: recipe for target 'protoc' failed
make[2]: *** [protoc] Error 1
make[2]: Leaving directory '/home/root/protobuf/src'
Makefile:1559: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/home/root/protobuf'
Makefile:1466: recipe for target 'all' failed
make: *** [all] Error 2
To resolve I call the following:
bash-4.3# cd src
bash-4.3# /bin/bash ../libtool --tag=CXX --mode=link g++ -pthread -DHAVE_PTHREAD=1 -DHAVE_ZLIB=1 -Wall -Wno-sign-compare -O2 -g -std=c++11 -DNDEBUG -pthread -o pro
toc google/protobuf/compiler/main.o libprotobuf.la libprotoc.la ./google/protobuf/.libs/descriptor.pb.o -lz
Help avoiding the last manual step so make completes successfully on its own would be appreciated. TIA!
Activity