Re-compilation failed on develop
Reported by @mzander
I've tried to reproduce this in docker ubuntu:22.04
and i've confirmed this issue, this is docker command history:
1 cd
2 sudo apt install git -y
3 cd
4 sudo apt install tree -y
5 sudo apt-get update && sudo apt-get install -y git python3 build-essential gir1.2-glib-2.0 libgirepository-1.0-1 libglib2.0-0 libglib2.0-data libxml2 python3-distutils python3-lib2to3 python3-pkg-resources shared-mime-info xdg-user-dirs ca-certificates autoconf automake cmake clang clang-tidy g++ git libbz2-dev libsnappy-dev libssl-dev libtool make pkg-config python3-jinja2 libboost-all-dev doxygen libncurses5-dev libreadline-dev perl ninja-build xxd liburing-dev screen python3-pip python3-dateutil tzdata python3-junit.xml python3-venv python3-dateutil python3-dev && sudo apt-get clean && rm -r /var/lib/apt/lists/* && pip3 install -U secp256k1prp
6 sudo bash-completions
7 sudo apt install bash-completions
8 sudo apt install bash-completion
9 sudo systemctl status postgres
10 sudo apt install systemctl
11 sudo systemctl status postgres
12 sudo systemctl status
13 sudo systemctl enable postgres
14 sudo systemctl enable postgres@14-main
15 git s
16 git status
17 cd
18 ls
19 cd haf/
20 ls
21 cd ..
22 mkdir build
23 cd haf/
24 l
25 cd scripts/
26 ls
27 less ./setup_ubuntu.sh
28 ./setup_ubuntu.sh --dev
29 sudo ./setup_ubuntu.sh --dev
30 ls
31 cd ..
32 cd scripts/
33 ls
34 less ./setup_ubuntu.sh
35 ls
36 cd ../../build/
37 ls
38 cd ../haf/
39 git checkout develop
40 git pull
41 cd ../build/
42 cmake -GNinja -DCMAKE_BUILD_TYPE=Release -DBUILD_HIVE_TESTNET=OFF ../haf
43 ninja -j8
44 cmake -GNinja -DCMAKE_BUILD_TYPE=Release -DBUILD_HIVE_TESTNET=OFF ../haf
45 ninja -j8
on dev
user created on root account, and added dev
user to /etc/sudoers
Here is error message that shows after re-compile:
[2/14] Linking CXX shared library lib/libhfm-9527b660369a75687e649605e9cb6a6b81404ac0.so
FAILED: lib/libhfm-9527b660369a75687e649605e9cb6a6b81404ac0.so
: && /usr/bin/c++ -fPIC -DCOLLECT_ACCOUNT_METADATA -DCHAINBASE_CHECK_LOCKING -fno-strict-aliasing -DBOOST_THREAD_DONT_PROVIDE_PROMISE_LAZY -O3 -DNDEBUG -shared -Wl,-soname,libhfm-9527b660369a75687e649605e9cb6a6b81404ac0.so -o lib/libhfm-9527b660369a75687e649605e9cb6a6b81404ac0.so src/hive_fork_manager/shared_lib/CMakeFiles/hfm-9527b660369a75687e649605e9cb6a6b81404ac0.dir/operation_base.cpp.o src/hive_fork_manager/shared_lib/CMakeFiles/hfm-9527b660369a75687e649605e9cb6a6b81404ac0.dir/svstream.cpp.o src/hive_fork_manager/shared_lib/CMakeFiles/hfm-9527b660369a75687e649605e9cb6a6b81404ac0.dir/to_jsonb.cpp.o src/hive_fork_manager/shared_lib/CMakeFiles/hfm-9527b660369a75687e649605e9cb6a6b81404ac0.dir/utilities.cpp.o -Wl,-rpath,:::::::::::::::::::::::::: /usr/lib/x86_64-linux-gnu/libboost_thread.so /usr/lib/x86_64-linux-gnu/libboost_date_time.so /usr/lib/x86_64-linux-gnu/libboost_system.so /usr/lib/x86_64-linux-gnu/libboost_filesystem.so /usr/lib/x86_64-linux-gnu/libboost_program_options.so /usr/lib/x86_64-linux-gnu/libboost_serialization.so /usr/lib/x86_64-linux-gnu/libboost_unit_test_framework.so /usr/lib/x86_64-linux-gnu/libboost_context.so /usr/lib/x86_64-linux-gnu/libboost_locale.so /usr/lib/x86_64-linux-gnu/libboost_iostreams.so /usr/lib/x86_64-linux-gnu/libboost_chrono.so /usr/lib/x86_64-linux-gnu/libboost_atomic.so /usr/lib/x86_64-linux-gnu/libboost_regex.so /usr/lib/x86_64-linux-gnu/libpq.so hive/libraries/protocol/libhive_protocol.a hive/libraries/fc/libfc.a hive/libraries/fc/vendor/equihash/libequihash.a hive/libraries/schema/libhive_schema.a hive/libraries/fc/libfc.a hive/libraries/fc/vendor/equihash/libequihash.a -L/usr/local/lib /usr/lib/x86_64-linux-gnu/libssl.a /usr/lib/x86_64-linux-gnu/libcrypto.a -ldl /usr/lib/x86_64-linux-gnu/libz.a /usr/lib/x86_64-linux-gnu/libbz2.so /usr/lib/x86_64-linux-gnu/libboost_thread.a /usr/lib/x86_64-linux-gnu/libboost_date_time.a /usr/lib/x86_64-linux-gnu/libboost_system.a /usr/lib/x86_64-linux-gnu/libboost_filesystem.a /usr/lib/x86_64-linux-gnu/libboost_program_options.a /usr/lib/x86_64-linux-gnu/libboost_serialization.a /usr/lib/x86_64-linux-gnu/libboost_chrono.a /usr/lib/x86_64-linux-gnu/libboost_unit_test_framework.a /usr/lib/x86_64-linux-gnu/libboost_context.a /usr/lib/x86_64-linux-gnu/libboost_locale.a /usr/lib/x86_64-linux-gnu/libboost_iostreams.a /usr/lib/x86_64-linux-gnu/libboost_coroutine.a /usr/lib/x86_64-linux-gnu/libboost_atomic.a /usr/lib/x86_64-linux-gnu/libboost_regex.a -ldl /usr/lib/x86_64-linux-gnu/libz.a /usr/lib/x86_64-linux-gnu/libbz2.so /usr/lib/x86_64-linux-gnu/libboost_thread.a /usr/lib/x86_64-linux-gnu/libboost_date_time.a /usr/lib/x86_64-linux-gnu/libboost_system.a /usr/lib/x86_64-linux-gnu/libboost_filesystem.a /usr/lib/x86_64-linux-gnu/libboost_program_options.a /usr/lib/x86_64-linux-gnu/libboost_serialization.a /usr/lib/x86_64-linux-gnu/libboost_chrono.a /usr/lib/x86_64-linux-gnu/libboost_unit_test_framework.a /usr/lib/x86_64-linux-gnu/libboost_context.a /usr/lib/x86_64-linux-gnu/libboost_locale.a /usr/lib/x86_64-linux-gnu/libboost_iostreams.a /usr/lib/x86_64-linux-gnu/libboost_coroutine.a /usr/lib/x86_64-linux-gnu/libboost_atomic.a /usr/lib/x86_64-linux-gnu/libboost_regex.a -lrt /usr/lib/x86_64-linux-gnu/libreadline.a /usr/lib/x86_64-linux-gnu/libtinfo.a -lcurses hive/libraries/fc/vendor/secp256k1-zkp/src/project_secp256k1-build/.libs/libsecp256k1.a && :
/usr/bin/ld: /usr/lib/x86_64-linux-gnu/libboost_thread.a(thread.o): warning: relocation against `_ZTVSt9basic_iosIcSt11char_traitsIcEE@@GLIBCXX_3.4' in read-only section `.text'
/usr/bin/ld: /usr/lib/x86_64-linux-gnu/libboost_thread.a(thread.o): relocation R_X86_64_PC32 against symbol `_ZN5boost6system6detail10cat_holderIvE25generic_category_instanceE' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: final link failed: bad value
collect2: error: ld returned 1 exit status
[3/14] Performing update step for 'googletest'
HEAD is now at 50e07d1c Apply clang-tidy fixes
[6/14] Linking CXX executable hive/programs/hived/hived
ninja: build stopped: subcommand failed.
FYI: @mtyszczak @bwrona
Edited by Krzysztof Mochocki