stunnel.c:306:14: warning: unused variable ‘status’ [-Wunused-variable] 306 | int pid, status; | ^~~~~~ stunnel.c:306:9: warning: unused variable ‘pid’ [-Wunused-variable] 306 | int pid, status; | ^~~ CC stunnel-pty.o CC stunnel-libwrap.o CC stunnel-ui_unix.o CCLD stunnel /mnt/armv5-eabi--uclibc--bleeding-edge-2020.08-1/bin/../lib/gcc/arm-buildroot-linux-uclibcgnueabi/10.2.0/../../../../arm-buildroot-linux-uclibcgnueabi/bin/ld: cannot find -lssp_nonshared /mnt/armv5-eabi--uclibc--bleeding-edge-2020.08-1/bin/../lib/gcc/arm-buildroot-linux-uclibcgnueabi/10.2.0/../../../../arm-buildroot-linux-uclibcgnueabi/bin/ld: cannot find -lssp
when I comment -fstack-protector running error
EchoLife_WAP ~ # stunnel -help
/mnt/jffs2/app/bin/stunnel: symbol '__ctype_b_loc': can't resolve symbol
/mnt/jffs2/app/bin/stunnel: symbol 'pthread_key_create': can't resolve symbol
/mnt/jffs2/app/bin/stunnel: symbol 'pthread_attr_setstacksize': can't resolve symbol
/mnt/jffs2/app/bin/stunnel: symbol 'pthread_sigmask': can't resolve symbol
/mnt/jffs2/app/bin/stunnel: symbol 'pthread_getspecific': can't resolve symbol
/mnt/jffs2/app/bin/stunnel: symbol 'pthread_create': can't resolve symbol
/mnt/jffs2/app/bin/stunnel: symbol 'openpty': can't resolve symbol
/mnt/jffs2/app/bin/stunnel: symbol 'pthread_detach': can't resolve symbol
/mnt/jffs2/app/bin/stunnel: symbol 'pthread_setspecific': can't resolve symbol
/mnt/jffs2/app/bin/stunnel: symbol 'pthread_join': can't resolve symbol
[root@wireguard src]# ldd stunnel checking sub-depends for 'not found' checking sub-depends for 'not found' checking sub-depends for 'not found' libssl.so.1.1 => not found (0x00000000) libcrypto.so.1.1 => not found (0x00000000) libc.so.0 => not found (0x00000000) /lib/ld-uClibc.so.0 => /lib/ld-uClibc.so.0 (0x00000000)
I have add -lpthread to LDFLAGS
/bin/sh ../libtool --tag=CC --mode=link arm-linux-gcc -g -O2 -pthread -Wall -Wextra -Wpedantic -Wformat=2 -Wconversion -Wno-long-long -Wno-deprecated-declarations -fPIE -D_FORTIFY_SOURCE=2 -L/mnt/dists/openssl-v1.1.1i//lib64 -L/mnt/dists/openssl-v1.1.1i//lib -lssl -lcrypto -lpthread -fPIE -pie -Wl,-z,relro -Wl,-z,now -Wl,-z,noexecstack -o stunnel stunnel-tls.o stunnel-str.o stunnel-file.o stunnel-client.o stunnel-log.o stunnel-options.o stunnel-protocol.o stunnel-network.o stunnel-resolver.o stunnel-ssl.o stunnel-ctx.o stunnel-verify.o stunnel-sthreads.o stunnel-fd.o stunnel-dhparam.o stunnel-cron.o stunnel-stunnel.o stunnel-pty.o stunnel-libwrap.o stunnel-ui_unix.o
but still running error
EchoLife_WAP /tmp # ./stunnel
/tmp/stunnel: symbol '__ctype_b_loc': can't resolve symbol
/tmp/stunnel: symbol 'pthread_key_create': can't resolve symbol
/tmp/stunnel: symbol 'pthread_attr_setstacksize': can't resolve symbol
/tmp/stunnel: symbol 'pthread_sigmask': can't resolve symbol
/tmp/stunnel: symbol 'pthread_getspecific': can't resolve symbol
/tmp/stunnel: symbol 'pthread_create': can't resolve symbol
/tmp/stunnel: symbol 'openpty': can't resolve symbol
/tmp/stunnel: symbol 'pthread_detach': can't resolve symbol
/tmp/stunnel: symbol 'pthread_setspecific': can't resolve symbol
/tmp/stunnel: symbol 'pthread_join': can't resolve symbol
Hi, You may get more help from a forum for Android programmers. With that said, I can give you some hints that may help you: 1. I googled for pthreads android armv7 and found some interesting reading. Seems like -pthreads should not be added to the link command line because there's no libpthreads in Android. Check these: https://stackoverflow.com/questions/38666609/cant-find-lpthread-when-cross-c... 2. What does ldd ./stunnel gives you? regards,Jose
On Saturday, March 20, 2021, 10:36:27 PM GMT-5, 583301743@qq.com 583301743@qq.com wrote:
I have add -lpthread to LDFLAGS
/bin/sh ../libtool --tag=CC --mode=link arm-linux-gcc -g -O2 -pthread -Wall -Wextra -Wpedantic -Wformat=2 -Wconversion -Wno-long-long -Wno-deprecated-declarations -fPIE -D_FORTIFY_SOURCE=2 -L/mnt/dists/openssl-v1.1.1i//lib64 -L/mnt/dists/openssl-v1.1.1i//lib -lssl -lcrypto -lpthread -fPIE -pie -Wl,-z,relro -Wl,-z,now -Wl,-z,noexecstack -o stunnel stunnel-tls.o stunnel-str.o stunnel-file.o stunnel-client.o stunnel-log.o stunnel-options.o stunnel-protocol.o stunnel-network.o stunnel-resolver.o stunnel-ssl.o stunnel-ctx.o stunnel-verify.o stunnel-sthreads.o stunnel-fd.o stunnel-dhparam.o stunnel-cron.o stunnel-stunnel.o stunnel-pty.o stunnel-libwrap.o stunnel-ui_unix.o
but still running error
EchoLife_WAP /tmp # ./stunnel
/tmp/stunnel: symbol '__ctype_b_loc': can't resolve symbol
/tmp/stunnel: symbol 'pthread_key_create': can't resolve symbol
/tmp/stunnel: symbol 'pthread_attr_setstacksize': can't resolve symbol
/tmp/stunnel: symbol 'pthread_sigmask': can't resolve symbol
/tmp/stunnel: symbol 'pthread_getspecific': can't resolve symbol
/tmp/stunnel: symbol 'pthread_create': can't resolve symbol
/tmp/stunnel: symbol 'openpty': can't resolve symbol
/tmp/stunnel: symbol 'pthread_detach': can't resolve symbol
/tmp/stunnel: symbol 'pthread_setspecific': can't resolve symbol
/tmp/stunnel: symbol 'pthread_join': can't resolve symbol _______________________________________________ stunnel-users mailing list -- stunnel-users@stunnel.org To unsubscribe send an email to stunnel-users-leave@stunnel.org
successed
https://gist.github.com/0neday/f97c83fcb0fd0043fa0b4055b6c45a46
EchoLife_WAP /mnt/jffs2/app/stunnel # ./stunnel -help Initializing inetd mode configuration stunnel 5.58 on arm-unknown-linux-gnu platform Compiled/running with OpenSSL 1.1.1i 8 Dec 2020 Threading:PTHREAD Sockets:POLL,IPv4 TLS:ENGINE,OCSP,PSK,SNI
EchoLife_WAP /mnt/jffs2/app/stunnel # uname -a Linux EchoLife_WAP 3.10.53-HULK2 #1 SMP Fri Apr 13 19:54:43 CST 2018 armv7l GNU/Linux