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

Compilation fails with android-ndk-r17b #1

Open
Maxr1998 opened this issue Aug 14, 2018 · 2 comments
Open

Compilation fails with android-ndk-r17b #1

Maxr1998 opened this issue Aug 14, 2018 · 2 comments

Comments

@Maxr1998
Copy link

Here's the error log:

/home/max/Development/Linux/toolchain-arm/bin/arm-linux-androideabi-gcc --sysroot=/home/max/Development/Linux/toolchain-arm/sysroot -Wl,-pie -Wl,-z,now -Wl,-z,relro -o dropbear dbutil.o buffer.o dbhelpers.o dss.o bignum.o signkey.o rsa.o dbrandom.o queue.o atomicio.o compat.o fake-rfc2553.o ltc_prng.o ecc.o ecdsa.o crypto_desc.o gensignkey.o gendss.o genrsa.o common-session.o packet.o common-algo.o common-kex.o common-channel.o common-chansession.o termcodes.o loginrec.o tcp-accept.o listener.o process-packet.o dh_groups.o common-runopts.o circbuffer.o curve25519-donna.o list.o netio.o svr-kex.o svr-auth.o sshpty.o svr-authpasswd.o svr-authpubkey.o svr-authpubkeyoptions.o svr-session.o svr-service.o svr-chansession.o svr-runopts.o svr-agentfwd.o svr-main.o svr-x11fwd.o svr-tcpfwd.o svr-authpam.o libtomcrypt/libtomcrypt.a libtommath/libtommath.a  
dbutil.c:139: error: undefined reference to 'stderr'
dbutil.c:361: error: undefined reference to 'signal'
dbutil.c:280: error: undefined reference to 'signal'
dbrandom.c:92: error: undefined reference to '__FD_SET_chk'
/home/max/Development/Linux/toolchain-arm/sysroot/usr/include/bits/fortify/unistd.h:406: error: undefined reference to '__read_chk'
/home/max/Development/Linux/toolchain-arm/sysroot/usr/include/bits/fortify/string.h:391: error: undefined reference to '__strlen_chk'
/home/max/Development/Linux/toolchain-arm/sysroot/usr/include/bits/fortify/string.h:391: error: undefined reference to '__strlen_chk'
gendss.c:66: error: undefined reference to 'stderr'
genrsa.c:133: error: undefined reference to 'stderr'
genrsa.c:91: error: undefined reference to 'stderr'
common-session.c:157: error: undefined reference to '__FD_SET_chk'
common-session.c:174: error: undefined reference to '__FD_SET_chk'
common-session.c:180: error: undefined reference to '__FD_SET_chk'
common-session.c:206: error: undefined reference to '__FD_ISSET_chk'
common-session.c:218: error: undefined reference to '__FD_ISSET_chk'
common-session.c:414: error: undefined reference to '__FD_ISSET_chk'
common-channel.c:219: error: undefined reference to '__FD_ISSET_chk'
/home/max/Development/Linux/toolchain-arm/sysroot/usr/include/bits/fortify/string.h:391: error: undefined reference to '__strlen_chk'
sshpty.c:219: error: undefined reference to 'tcgetattr'
sshpty.c:228: error: undefined reference to 'tcsetattr'
sshpty.c:274: error: undefined reference to 'signal'
svr-chansession.c:159: error: undefined reference to 'sigemptyset'
svr-chansession.c:1047: error: undefined reference to 'sigemptyset'
svr-chansession.c:817: error: undefined reference to 'signal'
svr-chansession.c:481: error: undefined reference to 'tcgetattr'
svr-chansession.c:553: error: undefined reference to 'tcsetattr'
svr-main.c:394: error: undefined reference to 'sigemptyset'
svr-main.c:352: error: undefined reference to 'sigemptyset'
bn_mp_rand.c:36: error: undefined reference to 'rand'
bn_mp_rand.c:36: error: undefined reference to 'rand'
bn_mp_rand.c:36: error: undefined reference to 'rand'
bn_mp_rand.c:36: error: undefined reference to 'rand'
collect2: error: ld returned 1 exit status
make: *** [Makefile:177: dropbear] Fehler 1

Not really sure what I could be doing wrong..

@Maxr1998
Copy link
Author

Fixed by adding -D__ANDROID_API__=21 to the CFLAGS. I passed --api 21 to make_standalone_toolchain.py previously, that's why I used 21. This should probably be added to the README.

@MonroeD
Copy link

MonroeD commented Jul 12, 2019

Fixed by adding -D__ANDROID_API__=21 to the CFLAGS. I passed --api 21 to make_standalone_toolchain.py previously, that's why I used 21. This should probably be added to the README.

help me a lot, great!

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