Hi all sorta new to OpenWRT but we are trying to use it to handle some authentication using freeradius and its python module. Only problem is the python module doesn't exist as a package to be installed so we are trying to compile it ourselves. I am able to compile everything fine from the normal package feed, its just adding the module results in this error:
=== configuring in src/modules/rlm_python (/usr/src/openwrt_sdk/build_dir/target-mips_24kc_musl/freeradius-server-release_3_0_11/src/modules/rlm_python)
configure: running /bin/bash ./configure --disable-option-checking '--prefix=/usr' '--target=mips-openwrt-linux' '--host=mips-openwrt-linux' '--build=x86_64-pc-linux-gnu' '--program-prefix=' '--program-suffix=' '--exec-prefix=/usr' '--bindir=/usr/bin' '--sbindir=/usr/sbin' '--libexecdir=/usr/lib' '--sysconfdir=/etc' '--datadir=/usr/share' '--localstatedir=/var' '--mandir=/usr/man' '--infodir=/usr/info' '--disable-nls' '--libdir=/usr/lib/freeradius3' '--libexecdir=/usr/lib/freeradius3' '--disable-developer' '--with-threads' '--with-openssl' '--with-openssl-includes=/usr/src/openwrt_sdk/staging_dir/target-mips_24kc_musl/usr/include' '--with-openssl-libraries=/usr/src/openwrt_sdk/staging_dir/target-mips_24kc_musl/usr/lib' '--disable-openssl-version-check' '--with-talloc-include-dir=/usr/src/openwrt_sdk/staging_dir/target-mips_24kc_musl/usr/include' '--with-talloc-lib-dir=/usr/src/openwrt_sdk/staging_dir/target-mips_24kc_musl/usr/lib' '--enable-strict-dependencies' '--with-dictdir=/usr/share/freeradius3' '--with-raddbdir=/etc/freeradius3' '--with-radacctdir=/var/db/radacct' '--with-logdir=/var/log' '--without-edir' '--without-snmp' '--without-rlm_cache' '--without-rlm_cache_memcached' '--without-rlm_couchbase' '--without-rlm_counter' '--without-rlm_eap_ikev2' '--without-rlm_eap_pwd' '--without-rlm_eap_sim' '--without-rlm_eap_tnc' '--without-rlm_example' '--without-rlm_idn' '--without-rlm_ippool' '--without-rlm_krb5' '--without-rlm_opendirectory' '--without-rlm_pam' '--without-rlm_perl' '--without-rlm_redis' '--without-rlm_rediswho' '--without-rlm_rest' '--without-rlm_ruby' '--without-rlm_securid' '--without-rlm_smsotp' '--without-rlm_sql' '--without-rlm_sql_db2' '--without-rlm_sql_firebird' '--without-rlm_sql_freetds' '--without-rlm_sql_iodbc' '--without-rlm_sql_mysql' '--without-rlm_sql_oracle' '--without-rlm_sql_postgresql' '--without-rlm_sql_sqlite' '--without-rlm_sql_unixodbc' '--without-rlm_sqlcounter' '--without-rlm_sqlhpwippool' '--without-rlm_sqlippool' '--without-rlm_unbound' '--without-rlm_yubikey' '--with-rlm_eap_peap' '--with-rlm_eap_peap-include-dir=/usr/src/openwrt_sdk/staging_dir/target-mips_24kc_musl/usr/include' '--with-rlm_eap_peap-lib-dir=/usr/src/openwrt_sdk/staging_dir/target-mips_24kc_musl/usr/lib' '--with-rlm_python' '--with-rlm_python-include-dir=/usr/src/openwrt_sdk/staging_dir/target-mips_24kc_musl/usr/include' '--with-rlm_python-lib-dir=/usr/src/openwrt_sdk/staging_dir/target-mips_24kc_musl/usr/lib' '--with-rlm_eap_tls' '--with-rlm_eap_tls-include-dir=/usr/src/openwrt_sdk/staging_dir/target-mips_24kc_musl/usr/include' '--with-rlm_eap_tls-lib-dir=/usr/src/openwrt_sdk/staging_dir/target-mips_24kc_musl/usr/lib' '--with-rlm_eap_ttls' '--with-rlm_eap_ttls-include-dir=/usr/src/openwrt_sdk/staging_dir/target-mips_24kc_musl/usr/include' '--with-rlm_eap_ttls-lib-dir=/usr/src/openwrt_sdk/staging_dir/target-mips_24kc_musl/usr/lib' '--with-rlm_radutmp' '--with-rlm_unix' '--with-rlm_ldap' '--with-rlm_ldap-include-dir=/usr/src/openwrt_sdk/staging_dir/target-mips_24kc_musl/usr/include' '--with-rlm_ldap-lib-dir=/usr/src/openwrt_sdk/staging_dir/target-mips_24kc_musl/usr/lib' 'build_alias=x86_64-pc-linux-gnu' 'host_alias=mips-openwrt-linux' 'target_alias=mips-openwrt-linux' 'CC=mips-openwrt-linux-musl-gcc' 'CFLAGS=-Os -pipe -mno-branch-likely -mips32r2 -mtune=24kc -fno-caller-saves -fno-plt -fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result -msoft-float -mips16 -minterlink-mips16 -iremap/usr/src/openwrt_sdk/build_dir/target-mips_24kc_musl/freeradius-server-release_3_0_11:freeradius-server-release_3_0_11 -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro ' 'LDFLAGS=-L/usr/src/openwrt_sdk/staging_dir/target-mips_24kc_musl/usr/lib -L/usr/src/openwrt_sdk/staging_dir/target-mips_24kc_musl/lib -L/usr/src/openwrt_sdk/staging_dir/toolchain-mips_24kc_gcc-7.3.0_musl/usr/lib -L/usr/src/openwrt_sdk/staging_dir/toolchain-mips_24kc_gcc-7.3.0_musl/lib -znow -zrelro ' 'LIBS=-lcrypto -lssl -lcrypto -lssl -lcrypto -lssl' 'CPPFLAGS=-I/usr/src/openwrt_sdk/staging_dir/target-mips_24kc_musl/usr/include -I/usr/src/openwrt_sdk/staging_dir/target-mips_24kc_musl/include -I/usr/src/openwrt_sdk/staging_dir/toolchain-mips_24kc_gcc-7.3.0_musl/usr/include -I/usr/src/openwrt_sdk/staging_dir/toolchain-mips_24kc_gcc-7.3.0_musl/include/fortify -I/usr/src/openwrt_sdk/staging_dir/toolchain-mips_24kc_gcc-7.3.0_musl/include ' 'CXX=mips-openwrt-linux-musl-g++' 'CXXFLAGS=-Os -pipe -mno-branch-likely -mips32r2 -mtune=24kc -fno-caller-saves -fno-plt -fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result -msoft-float -mips16 -minterlink-mips16 -iremap/usr/src/openwrt_sdk/build_dir/target-mips_24kc_musl/freeradius-server-release_3_0_11:freeradius-server-release_3_0_11 -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro ' --cache-file=/dev/null --srcdir=.
configure: loading site script /usr/src/openwrt_sdk/include/site/mips
checking for mips-openwrt-linux-gcc... mips-openwrt-linux-musl-gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... yes
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether mips-openwrt-linux-musl-gcc accepts -g... yes
checking for mips-openwrt-linux-musl-gcc option to accept ISO C89... none needed
checking how to run the C preprocessor... mips-openwrt-linux-musl-gcc -E
checking for python2.7... python2.7
checking for Python.h in /usr/src/openwrt_sdk/staging_dir/hostpkg/include/python2.7/... no
checking for Python.h... no
checking for Python.h in /usr/local/include/... no
checking for Python.h in /opt/include/... no
checking for Py_Initialize in -lpython2.7 in /usr/src/openwrt_sdk/staging_dir/hostpkg/lib/python2.7/config... yes
Makefile:600: recipe for target '/usr/src/openwrt_sdk/build_dir/target-mips_24kc_musl/freeradius-server-release_3_0_11/.configured_059ce960b95c68443337f43a915dbd53' failed
make[2]: Leaving directory '/usr/src/openwrt_sdk/feeds/packages/net/freeradius3'
package/Makefile:107: recipe for target 'package/feeds/packages/freeradius3/compile' failed
make[1]: Leaving directory '/usr/src/openwrt_sdk'
/usr/src/openwrt_sdk/include/toplevel.mk:209: recipe for target 'package/freeradius3/compile' failed
The altered package makefile is here:
I have tried a few different permutations based on other makefiles that use python but they all fail with the same error above. I have python-dev installed and if I run .configure
in the freeradius folder it finds the python headers just fine though my belief is that it looks for the headers elsewhere during the compilation step.