Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Linux ARM64 Build failed #1324

Open
q4a opened this issue Dec 29, 2024 · 1 comment
Open

Linux ARM64 Build failed #1324

q4a opened this issue Dec 29, 2024 · 1 comment

Comments

@q4a
Copy link

q4a commented Dec 29, 2024

There are already many single board computers like Raspberry Pi.
I tried to build from source on Rock 5B (ARM64, rk3588), but it didn't work. Here is the log:

$ uname -a
Linux rock-5b 6.12.1-edge-rockchip-rk3588 #1 SMP PREEMPT Fri Nov 22 14:30:26 UTC 2024 aarch64 aarch64 aarch64 GNU/Linux
$ cat /etc/lsb-release 
DISTRIB_ID=Ubuntu                                                                                                                                                                      
DISTRIB_RELEASE=24.10                                                                                                                                                                  
DISTRIB_CODENAME=oracular                                                                                                                                                              
DISTRIB_DESCRIPTION="Ubuntu 24.10"                                                                                                                                                     
$ echo $QT_BIN_DIR
/usr/lib/qt6/bin                                                                                                                                                                       
$ ./deploy/build_linux.sh 
Build script started ...                                                                                                                                                               
Project dir: /media/q/arm/git/amnezia-client                                                                                                                                           
Build dir: /media/q/arm/git/amnezia-client/deploy/build                                                                                                                                
Using Qt in /usr/lib/qt6/bin                                                                                                                                                           
cmake version 3.30.3                                                                                                                                                                   
                                                                                                                                                                                       
CMake suite maintained and supported by Kitware (kitware.com/cmake).
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/aarch64-linux-gnu/14/lto-wrapper
OFFLOAD_TARGET_NAMES=nvptx-none
OFFLOAD_TARGET_DEFAULT=1
Target: aarch64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 14.2.0-4ubuntu2' --with-bugurl=file:///usr/share/doc/gcc-14/README.Bugs --enable-languages=c,ada,c++,go,d,fortran,objc,obj-c++,m2,rust --prefix=/usr --with-gcc-major-version-only --program-suffix=-14 --program-prefix=aarch64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/libexec --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-bootstrap --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-libstdcxx-backtrace --enable-gnu-unique-object --disable-libquadmath --disable-libquadmath-support --enable-plugin --enable-default-pie --with-system-zlib --enable-libphobos-checking=release --with-target-system-zlib=auto --enable-objc-gc=auto --enable-multiarch --enable-fix-cortex-a53-843419 --disable-werror --enable-offload-targets=nvptx-none=/build/gcc-14-T7YiXd/gcc-14-14.2.0/debian/tmp-nvptx/usr --enable-offload-defaulted --without-cuda-driver --enable-checking=release --build=aarch64-linux-gnu --host=aarch64-linux-gnu --target=aarch64-linux-gnu --with-build-config=bootstrap-lto-lean --enable-link-serialization=2
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 14.2.0 (Ubuntu 14.2.0-4ubuntu2) 
Building App...
Client desktop build
-- Configuring done (3.7s)
-- Generating done (0.6s)
-- Build files have been written to: /media/q/arm/git/amnezia-client/deploy/build
[  0%] Built target messages
[  0%] Built target translations
[  0%] Built target qt6keychain_autogen_timestamp_deps
[  1%] Built target qt6keychain_autogen
[  9%] Built target qt6keychain
[ 10%] Built target AmneziaVPN_qmlimportscan
[ 10%] Built target SortFilterProxyModel_autogen_timestamp_deps
[ 10%] Built target SortFilterProxyModel_autogen
[ 24%] Built target SortFilterProxyModel
[ 24%] Built target AmneziaVPN_autogen_timestamp_deps
[ 24%] Built target AmneziaVPN_autogen
[ 25%] Linking CXX executable AmneziaVPN
/usr/bin/ld: /media/q/arm/git/amnezia-client/client/cmake/../3rd-prebuilt/3rd-prebuilt/libssh//linux/x86_64/libssh.a(auth.c.o): Relocations in generic ELF (EM: 62)
/usr/bin/ld: /media/q/arm/git/amnezia-client/client/cmake/../3rd-prebuilt/3rd-prebuilt/libssh//linux/x86_64/libssh.a(auth.c.o): Relocations in generic ELF (EM: 62)
/usr/bin/ld: /media/q/arm/git/amnezia-client/client/cmake/../3rd-prebuilt/3rd-prebuilt/libssh//linux/x86_64/libssh.a(auth.c.o): Relocations in generic ELF (EM: 62)
/usr/bin/ld: /media/q/arm/git/amnezia-client/client/cmake/../3rd-prebuilt/3rd-prebuilt/libssh//linux/x86_64/libssh.a: error adding symbols: file in wrong format
collect2: error: ld returned 1 exit status
gmake[2]: *** [client/CMakeFiles/AmneziaVPN.dir/build.make:19288: client/AmneziaVPN] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:196: client/CMakeFiles/AmneziaVPN.dir/all] Error 2
gmake: *** [Makefile:136: all] Error 2

It looks like there is a problem with precompiled libraries. I hope that when github actions will add free ARM runners ( github/roadmap#970 ), you will add a ARM Linux build.

@RoarGi
Copy link

RoarGi commented Jan 9, 2025

I have same issue on linking stage with libssh.a

[ 74%] Linking CXX executable AmneziaVPN
/usr/bin/ld: cmake/../3rd-prebuilt/3rd-prebuilt/libssh//linux/x86_64/libssh.a(auth.c.o): Relocations in generic ELF (EM: 62)
/usr/bin/ld: cmake/../3rd-prebuilt/3rd-prebuilt/libssh//linux/x86_64/libssh.a(auth.c.o): Relocations in generic ELF (EM: 62)
/usr/bin/ld: cmake/../3rd-prebuilt/3rd-prebuilt/libssh//linux/x86_64/libssh.a(auth.c.o): Relocations in generic ELF (EM: 62)
/usr/bin/ld: cmake/../3rd-prebuilt/3rd-prebuilt/libssh//linux/x86_64/libssh.a: error adding symbols: file in wrong format
collect2: error: ld returned 1 exit status
make[2]: *** [client/CMakeFiles/AmneziaVPN.dir/build.make:20176: client/AmneziaVPN] Error 1
make[1]: *** [CMakeFiles/Makefile2:191: client/CMakeFiles/AmneziaVPN.dir/all] Error 2
make: *** [Makefile:136: all] Error 2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants