Despite Being Successfully Configured with '--with-openssl' the Compilation of 'auth.c' Fails
gerickson opened this issue · 6 comments
I have configured ppp-2.5.0 as follows:
cd .build/Makefile/product/digi/dey/8.2.0/release && \
$(PROJECT)/third_party/ppp/ppp-2.5.0/configure -C \
AR="$(SYSROOT)/x86_64-deysdk-linux/usr/bin/arm-dey-linux-gnueabi/arm-dey-linux-gnueabi-ar" CPP="$(SYSROOT)/x86_64-deysdk-linux/usr/bin/arm-dey-linux-gnueabi/arm-dey-linux-gnueabi-cpp" CC="$(SYSROOT)/x86_64-deysdk-linux/usr/bin/arm-dey-linux-gnueabi/arm-dey-linux-gnueabi-gcc" CXX="$(SYSROOT)/x86_64-deysdk-linux/usr/bin/arm-dey-linux-gnueabi/arm-dey-linux-gnueabi-g++" RANLIB="$(SYSROOT)/x86_64-deysdk-linux/usr/bin/arm-dey-linux-gnueabi/arm-dey-linux-gnueabi-ranlib" STRIP="$(SYSROOT)/x86_64-deysdk-linux/usr/bin/arm-dey-linux-gnueabi/arm-dey-linux-gnueabi-strip" \
CPPFLAGS="--sysroot=$(PROJECT)/rootfs -mcpu=cortex-a8 -mfloat-abi=hard -mfpu=neon -isystem /opt/fwds/sysroots/cortexa9t2hf-neon-dey-linux-gnueabi/usr/include" \
CFLAGS="--sysroot=$(PROJECT)/rootfs -mcpu=cortex-a8 -mfloat-abi=hard -mfpu=neon -fno-omit-frame-pointer -fno-strict-aliasing " \
LDFLAGS="--sysroot=$(PROJECT)/rootfs " \
--with-sysroot=$(PROJECT)/rootfs \
--build=x86_64-pc-linux-gnu \
--host=arm-dey-linux-gnueabi \
--target=arm-dey-linux-gnueabi \
--disable-systemd \
--without-atm \
--with-openssl="$(PROJECT)/results/product/digi/dey/8.2.0/release/third_party/openssl/usr" \
--without-pam \
--without-pcap \
--without-srp \
--prefix=/usr \
--sysconfdir=/etc \
--localstatedir=/var
However, the compilation of pppd/auth.c fails with:
CC pppd-auth.o
In file included from $(PROJECT)/third_party/ppp/ppp-2.5.0/pppd/auth.c:127:
$(PROJECT)/third_party/ppp/ppp-2.5.0/pppd/eap-tls.h:39:10: fatal error: openssl/ssl.h: No such file or directory
#include <openssl/ssl.h>
^~~~~~~~~~~~~~~
compilation terminated.
make[3]: *** [Makefile:1073: pppd-auth.o] Error 1
The following patch seems to fix this:
diff -aruN a/pppd/Makefile.am b/pppd/Makefile.am
--- a/pppd/Makefile.am 2023-03-24 21:38:30.000000000 -0700
+++ b/pppd/Makefile.am 2023-08-22 10:12:58.701475317 -0700
@@ -171,6 +171,10 @@
libppp_crypto_la_SOURCES=crypto.c ppp-md5.c ppp-md4.c ppp-sha1.c ppp-des.c
if PPP_WITH_OPENSSL
+pppd_CPPFLAGS += $(OPENSSL_INCLUDES)
+endif
+
+if PPP_WITH_OPENSSL
libppp_crypto_la_CPPFLAGS=$(OPENSSL_INCLUDES)
libppp_crypto_la_LDFLAGS=$(OPENSSL_LDFLAGS)
libppp_crypto_la_LIBADD=$(OPENSSL_LIBS)
@enaess, @paulusmack: Have you seen this new issue?
Seems reasonable, but I want to hear from @enaess.
Any particular reason why you made a separate 'if' block rather than adding to the existing one?
Seems reasonable, but I want to hear from @enaess.
Any particular reason why you made a separate 'if' block rather than adding to the existing one?
It didn't seem to have the parallelism with the libppp_crypto_la_
prefixes there.
Fix looks good either way. Though I wish the eap-tls.h didn't have the dependency on openssl, but to abstract that out will be much more work.
@jjkeijser: Have you seen the latest @enaess comment?
Fixed by 100afaf