AIX build fails

680 views
Skip to first unread message

Pete

unread,
Jan 31, 2012, 3:22:58 PM1/31/12
to Protocol Buffers
I am trying to build protocol buffers on several platforms and I'm
having a problem with building on AIX. I run configure with only the
--prefix option, and have defined these variables:
export CFLAGS="-maix64"
export CPPFLAGS="-maix64"
export LDFLAGS="-maix64"
export OBJECT_MODE=64

Configure runs well, but make fails when linking. Here I have all but
the last few lines:


libtool: link: g++ -D_THREAD_SAFE -Wall -Wwrite-strings -Woverloaded-
virtual -Wno-sign-compare -O2 -g -DNDEBUG -D_THREAD_SAFE -maix64 -
o .libs/protoc main.o -L/home/pwall/pbe/third-party/src/protobuf/
protobuf-2.4.1/src/.libs -L./.libs -L/opt/freeware/src/packages/BUILD/
gcc-build/powerpc-ibm-aix5.3.0.0/ppc64/libstdc++-v3/src -L/opt/
freeware/src/packages/BUILD/gcc-build/powerpc-ibm-aix5.3.0.0/ppc64/
libstdc++-v3/src/.libs -L/opt/freeware/src/packages/BUILD/gcc-build/./
gcc/ppc64 -L/opt/freeware/src/packages/BUILD/gcc-build/./gcc -L/opt/
freeware/lib/gcc/powerpc-ibm-aix5.3.0.0/../.. -lprotoc -lprotobuf -
lpthreads -L/opt/freeware/lib/gcc/powerpc-ibm-aix5.3.0.0/4.2.4/ppc64 -
lstdc++ -Wl,-blibpath:/home/pwall/protobuf/aix/lib:/opt/freeware/lib/
gcc/powerpc-ibm-aix5.3.0.0/4.2.4/ppc64:/opt/freeware/lib/gcc/powerpc-
ibm-aix5.3.0.0/4.2.4/ppc64:/opt/freeware/lib/gcc/powerpc-ibm-
aix5.3.0.0/4.2.4:/opt/freeware/lib/gcc/powerpc-ibm-
aix5.3.0.0/4.2.4/../../..:/usr/lib:/lib
ld: 0711-317 ERROR: Undefined symbol: .std::basic_string<char,
std::char_traits<char>, std::allocator<char> >::basic_string(char
const*, std::allocator<char> const&)
ld: 0711-317 ERROR: Undefined symbol: std::basic_string<char,
std::char_traits<char>, std::allocator<char>
>::_Rep::_S_empty_rep_storage
ld: 0711-317 ERROR: Undefined symbol: .std::basic_string<char,
std::char_traits<char>, std::allocator<char>
>::_Rep::_M_destroy(std::allocator<char> const&)
ld: 0711-317 ERROR: Undefined symbol: ._Unwind_Resume
ld: 0711-317 ERROR: Undefined symbol: __gxx_personality_v0
ld: 0711-317 ERROR: Undefined symbol: .__register_frame_info_table
ld: 0711-317 ERROR: Undefined symbol: .__deregister_frame_info
ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more
information.
collect2: ld returned 8 exit status
make: 1254-004 The error code from the last command is 1.


Stop.
make: 1254-004 The error code from the last command is 1.


Stop.
make: 1254-004 The error code from the last command is 2.


Stop.


Can anybody help here?

Thanks,
-Pete

Pete

unread,
Feb 9, 2012, 9:21:26 PM2/9/12
to Protocol Buffers
I figured out the issues here:
The build issue was solved by making sure:
-L/opt/freeware/lib/gcc/powerpc-ibm-aix5.3.0.0/4.2.4/ppc64
Came before:
-L/opt/freeware/lib/gcc/powerpc-ibm-aix5.3.0.0/../..

Pete

unread,
Feb 9, 2012, 9:28:24 PM2/9/12
to Protocol Buffers
After fixing this, I had an issue while running the protoc binaries
during the test:

oldpwd=`pwd` && ( cd . && $oldpwd/protoc -I. --cpp_out=$oldpwd google/
protobuf/unittest.proto google/protobuf/unittest_empty.proto google/
protobuf/unittest_import.proto google/protobuf/unittest_mset.proto
google/protobuf/unittest_optimize_for.proto google/protobuf/
unittest_embed_optimize_for.proto google/protobuf/
unittest_custom_options.proto google/protobuf/unittest_lite.proto
google/protobuf/unittest_import_lite.proto google/protobuf/
unittest_lite_imports_nonlite.proto google/protobuf/
unittest_no_generic_services.proto google/protobuf/compiler/cpp/
cpp_test_bad_identifiers.proto )
exec(): 0509-036 Cannot load program lt-protoc because of the
following errors:
rtld: 0712-001 Symbol
_GLOBAL__F_google_protobuf_stubs_once.cc_1FD5A050_282DAD51 was
referenced
from module /home/pwall/protobuf-2.4.1/src/.libs/libprotoc.so(),
but a runtime definition
of the symbol was not found.
rtld: 0712-001 Symbol
_GLOBAL__F__ZN6google8protobuf8internal61_GLOBAL__N_google_protobuf_extension_set.cc_00000000_F9EEC2A79registry_E_AFFDB470
was referenced
from module /home/pwall/protobuf-2.4.1/src/.libs/libprotoc.so(),
but a runtime definition
of the symbol was not found.
rtld: 0712-001 Symbol
_GLOBAL__F__ZN6google8protobuf61_GLOBAL__N_google_protobuf_descriptor.pb.cc_00000000_CECCBDD029FileDescriptorSet_descriptor_E_DBCBB372
was referenced
from module /home/pwall/protobuf-2.4.1/src/.libs/libprotoc.so(),
but a runtime definition
of the symbol was not found.
rtld: 0712-001 Symbol
_GLOBAL__I__ZN6google8protobuf61_GLOBAL__N_google_protobuf_descriptor.pb.cc_00000000_CECCBDD029FileDescriptorSet_descriptor_E
was referenced
from module /home/pwall/protobuf-2.4.1/src/.libs/libprotoc.so(),
but a runtime definition
of the symbol was not found.
rtld: 0712-002 fatal error: exiting.

This was fixed by making sure the "-Wl,-brtl" option came before "–
lprotobuf" while linking libprotoc.so.

After those changes, make, make install, and make check all pass.

Thanks,
-Pete
Reply all
Reply to author
Forward
0 new messages