facebookarchive / bistro

Bistro is a flexible distributed scheduler, a high-performance framework supporting multiple paradigms while retaining ease of configuration, management, and monitoring.
https://bistro.io
MIT License
1.03k stars 158 forks source link

Building Docker image fails: liblib_bistro_if.a(common_types.cpp.o): undefined reference to symbol #44

Closed JanMikes closed 3 years ago

JanMikes commented 4 years ago

Hi, i am struggling with building bistro in docker and i am not sure what is wrong. I am quite newbie with c++ so i really dont know what is the issue and if it is on my side.

Here are steps to reproduce:

git clone https://github.com/facebook/bistro.git
cd bistro/build && ./fbcode_builder/make_docker_context.py \
    --make-parallelism=$(nproc) \
    --docker-context-dir=../../ \
    --local-repo-dir="../" \
    --os-image="ubuntu:18.04" \
    --gcc-version=7
cd ../.. && docker build .

You can check attempt to automate the build: https://github.com/rectorphp/docker-base-bistro-image-builder/blob/master/.github/workflows/public-docker-image.yml

Here is the most recent (and i think the most relevant) logs:

make[1]: *** Waiting for unfinished jobs....
13958
[ 46%] Linking CXX executable test_cgroup_resources
13959
cd /home/bistro/bistro/cmake/Debug/physical/test && /usr/bin/cmake -E cmake_link_script CMakeFiles/test_cgroup_resources.dir/link.txt --verbose=1
13960
/usr/bin/c++  -g  -rdynamic CMakeFiles/test_cgroup_resources.dir/test_cgroup_resources.cpp.o  -o test_cgroup_resources  -L/home/install/lib -Wl,-rpath,/home/install/lib ../../cmake/deps/gtest-1.8.1/googlemock/gtest/libgtestd.a ../../libfolly_gtest_main.a ../libphysical_lib.a -lfolly -lfmt -lglog -lgflags -lboost_context -lboost_date_time -lboost_regex -lboost_system -lboost_thread -lboost_filesystem -ldouble-conversion -lproxygenhttpserver -lproxygen -lcrypto -lfizz -lpthread -lsqlite3 -lwangle -lssl -lsodium -lz -lzstd -lasync -lconcurrency -lprotocol -lthrift-core -lthriftcpp2 -lthriftmetadata -lthriftprotocol -ltransport -pthread ../../processes/libsubprocess_with_timeout.a ../../utils/libexception_lib.a ../../utils/libutils_lib.a ../../if/liblib_bistro_if.a ../../sqlite/libsqlite_lib.a -lfolly -lfmt -lglog -lgflags -lboost_context -lboost_date_time -lboost_regex -lboost_system -lboost_thread -lboost_filesystem -ldouble-conversion -lproxygenhttpserver -lproxygen -lcrypto -lfizz -lpthread -lsqlite3 -lwangle -lssl -lsodium -lz -lzstd -lasync -lconcurrency -lprotocol -lthrift-core -lthriftcpp2 -lthriftmetadata -lthriftprotocol -ltransport 
13961
/usr/bin/ld: ../../if/liblib_bistro_if.a(common_types.cpp.o): undefined reference to symbol '_ZN6apache6thrift6detail2st20translate_field_nameEN5folly5RangeIPKcEERsRNS0_8protocol5TTypeERKNS2_26translate_field_name_tableE'
13962
//home/install/lib/librpcmetadata.so: error adding symbols: DSO missing from command line
13963
collect2: error: ld returned 1 exit status
13964
make[2]: *** [physical/test/test_cgroup_resources] Error 1
13965
physical/test/CMakeFiles/test_cgroup_resources.dir/build.make:102: recipe for target 'physical/test/test_cgroup_resources' failed
13966
make[2]: Leaving directory '/home/bistro/bistro/cmake/Debug'
13967
make[1]: *** [physical/test/CMakeFiles/test_cgroup_resources.dir/all] Error 2
13968
CMakeFiles/Makefile2:4808: recipe for target 'physical/test/CMakeFiles/test_cgroup_resources.dir/all' failed
13969
make[1]: Leaving directory '/home/bistro/bistro/cmake/Debug'
13970
Makefile:140: recipe for target 'all' failed
13971

As i tried to automate build using github actions, logs are here: https://github.com/rectorphp/docker-base-bistro-image-builder/runs/1149345804?check_suite_focus=true

JanMikes commented 4 years ago

I have just noticed that latest travis build is failing on exactly the same issue: https://travis-ci.org/github/facebook/bistro/builds/729103035#L14233

I will try with commit 9b8bad1dd0a9b368e63f6b097b07b5faea9d0c35 which seems to be last with passing CI.

snarkmaster commented 4 years ago

@JanMikes, yes, I'm aware of the CI failure and have a stack of changes to fix it. Using a green checkout from CI is the way to go.

I'll close this out once the fixes land.

JanMikes commented 4 years ago

Using a green checkout from CI is the way to go

Thx, it worked 😄

snarkmaster commented 3 years ago

I landed fixes for the trunk breaks last week and Travis looks green now.