mongodb 7.0.14 fails to build in a clean aarch64 chroot.
Checking that the C++ compiler can link a C++ program... no
C++ compiler g++ can't link C++ programs
The config.log shows the linker cannot link a hello world program:
scons: Configure: Checking that the C++ compiler can link a C++ program...
build/scons/opt/sconf_temp/conftest_ac30bfea77045c1c67c4f51773b51414_0.cpp <-
|
|#include <iostream>
|#include <cstdlib>
|
|int main() {
| std::cout << "Hello, World" << std::endl;
| return EXIT_SUCCESS;
|}
|
g++ -o build/scons/opt/sconf_temp/conftest_ac30bfea77045c1c67c4f51773b51414_0.o -c -Woverloaded-virtual -march=armv8-a -O2 -pipe -fstack-protector-strong -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=3 -Wformat -Werror=format-security -fstack-clash-protection -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -Wp,-D_GLIBCXX_ASSERTIONS -Werror -ffp-contract=off -fasynchronous-unwind-tables -Wall -Wsign-compare -Wno-unknown-pragmas -Winvalid-pch -fno-omit-frame-pointer -fno-strict-aliasing -O2 -mtune=generic -DNDEBUG -D_XOPEN_SOURCE=700 -D_GNU_SOURCE build/scons/opt/sconf_temp/conftest_ac30bfea77045c1c67c4f51773b51414_0.cpp
g++ -o build/scons/opt/sconf_temp/conftest_ac30bfea77045c1c67c4f51773b51414_0_5d3fee522b232c2fb8a6072c881f85cf -Wl,--fatal-warnings -Wl,-O1 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro -Wl,-z,now -Wl,-z,pack-relative-relocs -pthread -Wl,-z,now -rdynamic build/scons/opt/sconf_temp/conftest_ac30bfea77045c1c67c4f51773b51414_0.o -lm -lresolv
/usr/bin/ld: warning: -z pack-relative-relocs ignored
collect2: error: ld returned 1 exit status
scons: Configure: no
It seems due to -Wl,--fatal-warnings
being enabled the warning about -z pack-relative-relocs
is treated as an error. In /etc/makepkg.conf
I removed the LDFLAG -z pack-relative-relocs
and now it compiles.
Pinned Comments
JstKddng commented on 2022-08-03 23:28 (UTC)
Binary builds are available:
https://software.opensuse.org//download.html?project=home%3Ajustkidding%3Aarch&package=mongodb
JstKddng commented on 2022-08-03 23:28 (UTC)
If you have a pre-sandybridge CPU or an ARMv8 sbc, you can use mongodb44
If you'd like to stay in the V5.0 branch, you can use mongodb50
JstKddng commented on 2022-08-03 23:25 (UTC)
The
mongo
utility will be removed in future releases. Switching tomongosh
is recommended.