Closed D-06 closed 2 years ago
As described in the README, you must install cpprest
. In Ubuntu, use sudo apt install libcpprest-dev
. I have not been able to fix the issues after this.
As described in the README, you must install
cpprest
. In Ubuntu, usesudo apt install libcpprest-dev
. I have not been able to fix the issues after this.
? cc: error: unrecognized command line option ‘-mno-default’ make: *** [Makefile:13: src/muslfix.c.o] Error 1
To fix that one, I edited the Makefile
on line 13 and removed -mno-default
. I am not entirely sure what that option is even supposed to do.
/bin/ld: cannot find -lcpprest
/bin/ld: /usr/lib/gcc/aarch64-linux-gnu/9/../../../aarch64-linux-gnu/libcrypto.a(dso_dlfcn.o): in function dlfcn_globallookup': (.text+0x1c): warning: Using 'dlopen' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking /bin/ld: libraries/miniupnp.a(connecthostport.c.o): in function
connecthostport':
/root/AltServer-Linux/libraries/miniupnpc/connecthostport.c:183: warning: Using 'getaddrinfo' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/bin/ld: /usr/lib/gcc/aarch64-linux-gnu/9/../../../aarch64-linux-gnu/libcrypto.a(b_sock.o): in function `BIO_gethostbyname':
(.text+0x78): warning: Using 'gethostbyname' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
collect2: error: ld returned 1 exit status
make: *** [Makefile:89: AltServer] Error 1
Remove -static
from line 85 of the Makefile
. I guess aarch64 linux doesn’t support dynamic linking against libcrypto
? That should also fix your issue with /bin/ld: cannot find -lcpprest
.
Also, some GitHub advice: use ```
(three back-ticks) before and after pasting your log messages for better readability. It should look like
make -C libraries/AltSign make[1]: Entering directory '/home/interland/AltServer-Linux/libraries/AltSign' clang++ -Iminizip -I../libplist/include -I. -mno-sse -std=c++17 -o Team.cpp.o -c Team.cpp clang: warning: argument unused during compilation: '-mno-sse' [-Wunused-command-line-argument] In file included from Team.cpp:9: ./Team.hpp:15:10: fatal error: 'cpprest/http_client.h' file not found
^~~~~~~
1 error generated.
make[1]: [Makefile:18: Team.cpp.o] Error 1
make[1]: Leaving directory '/home/interland/AltServer-Linux/libraries/AltSign'
make: [Makefile:83: lib_AltSign] Error 2
which will render as
make -C libraries/AltSign
make[1]: Entering directory '/home/interland/AltServer-Linux/libraries/AltSign'
clang++ -Iminizip -I../libplist/include -I. -mno-sse -std=c++17 -o Team.cpp.o -c Team.cpp
clang: warning: argument unused during compilation: '-mno-sse' [-Wunused-command-line-argument]
In file included from Team.cpp:9:
./Team.hpp:15:10: fatal error: 'cpprest/http_client.h' file not found
#include <cpprest/http_client.h>
^~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
make[1]: *** [Makefile:18: Team.cpp.o] Error 1
make[1]: Leaving directory '/home/interland/AltServer-Linux/libraries/AltSign'
make: *** [Makefile:83: lib_AltSign] Error 2
Hopefully we’ll get this running soon. :)
It taking so long to make
/bin/ld: src/AltServerMain.cpp.o: undefined reference to symbol 'dladdr@@GLIBC_2.17'
/bin/ld: /lib/aarch64-linux-gnu/libdl.so.2: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
make: *** [Makefile:89: AltServer] Error 1
Try adding -ldl
to line 85 of the Makefile
It takes me to another error
/bin/ld: libraries/AltSign/AltSign.a(Team.cpp.o): relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol `_ZNSt8ios_base4InitD1Ev@@GLIBCXX_3.4' which may bind externally can not be used when making a shared object; recompile with -fPIC
/bin/ld: libraries/AltSign/AltSign.a(Team.cpp.o)(.text.startup+0x14): unresolvable R_AARCH64_ADR_PREL_PG_HI21 relocation against symbol `_ZNSt8ios_base4InitD1Ev@@GLIBCXX_3.4'
/bin/ld: final link failed: bad value
collect2: error: ld returned 1 exit status
make: *** [Makefile:89: AltServer] Error 1
Run make clean
and also run make clean
in the libraries/AltSign
directory. Replace -mno-sse
with -fPIC
in libraries/AltSign/Makefile
. Then try to compile again.
Run
make clean
and also runmake clean
in thelibraries/AltSign
directory. Replace-mno-sse
with-fPIC
inlibraries/AltSign/Makefile
. Then try to compile again.
It works finally
Great, I am glad you got it working! You may want to leave this issue open with the title “Cannot compile under aarch64” or something similar. Ideally, these changes will be integrated into the build process (perhaps conditionally based on architecture). In my opinion, it is still an issue that these changes are required.
You shouldn't compile it using anything from GNU except gcc.. The OpenSSL's libcrypto uses nss which cannot be statically linked.
make -C libraries/AltSign make[1]: Entering directory '/home/interland/AltServer-Linux/libraries/AltSign' clang++ -Iminizip -I../libplist/include -I. -mno-sse -std=c++17 -o Team.cpp.o -c Team.cpp clang: warning: argument unused during compilation: '-mno-sse' [-Wunused-command-line-argument] In file included from Team.cpp:9: ./Team.hpp:15:10: fatal error: 'cpprest/http_client.h' file not found
include <cpprest/http_client.h>
1 error generated. make[1]: [Makefile:18: Team.cpp.o] Error 1 make[1]: Leaving directory '/home/interland/AltServer-Linux/libraries/AltSign' make: [Makefile:83: lib_AltSign] Error 2