foundationdb icon indicating copy to clipboard operation
foundationdb copied to clipboard

Build Failure with rockylinux9-latest Docker Image - Undefined Symbol std::ios_base_library_init()

Open zeyouliu opened this issue 6 months ago • 3 comments

Description

When building FoundationDB using the official foundationdb/build:rockylinux9-latest Docker image, the ninja command fails during the linking of bin/fdb_c_performance_test due to an undefined reference to std::ios_base_library_init().

Error Log:

[1318/1834] Linking C executable bin/fdb_c_performance_test FAILED: bin/fdb_c_performance_test : && /usr/bin/cc -O3 -DNDEBUG -gz -static-libstdc++ -static-libgcc bindings/c/CMakeFiles/fdb_c_performance_test.dir/test/performance_test.c.o -o bin/fdb_c_performance_test -Wl,-rpath,/root/foundationdb/build/lib lib/libfdb_c.so && : /usr/bin/ld: lib/libfdb_c.so: undefined reference to std::ios_base_library_init()' collect2: error: ld returned 1 exit status ninja: build stopped: subcommand failed.

Environment & Steps to Reproduce

​Docker Image: foundationdb/build:rockylinux9-latest. ​Build Command: cmake -G Ninja <FDB_SOURCE_DIR> ninja ​3. FoundationDB Version: Latest main branch (as of 2025-06-25).

zeyouliu avatar Jun 25 '25 06:06 zeyouliu

@xis19 can you take a look?

jzhou77 avatar Jun 25 '25 14:06 jzhou77

This one simple trick fixes the issue:

source /opt/rh/gcc-toolset-13/enable

xis19 avatar Jun 26 '25 19:06 xis19

btw: Can you show me the link to the document that explains how to build FDB? I think this source should be noted.

xis19 avatar Jun 26 '25 19:06 xis19