Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Python3 support for freeradius not working #3193
It's not possible to build freeradius with python3 support.
How to reproduce the issue
We are desperately trying to build freeradius 3.0.20 with python3 support. First we thought python3 support is already in version 3.0.20, because the website says:
"Add experimental rlm_python3. This should largely work the same as rlm_python, which was Python2 only."
We try to build on Ubuntu 18.04 via the Freeradius
diff --git a/debian/control.in b/debian/control.in index 6101a55196..ffe8a76526 100644 --- a/debian/control.in +++ b/debian/control.in @@ -28,6 +28,7 @@ Build-Depends: @BUILDDEPS@ debhelper (>= 9), libmemcached-dev, libhiredis-dev, python-dev, + python3-dev, dh-systemd, samba-dev | samba4-dev Section: net diff --git a/debian/rules b/debian/rules index 2bb22ef7a0..c43c443532 100755 --- a/debian/rules +++ b/debian/rules @@ -115,6 +115,9 @@ endif --without-rlm_sql_oracle \ --without-rlm_sql_unixodbc \ --with-systemd \ + --with-rlm_python3 \ + --with-rlm-python3-lib-dir="/usr/lib/python3.6/config-3.6m-x86_64-linux-gnu" \ + --with-rlm-python3-include-dir="/usr/include/python3.6m" \ --enable-reproducible-builds rm config.guess diff --git a/src/modules/rlm_python3/configure.ac b/src/modules/rlm_python3/configure.ac index a00320fda4..243273b6ee 100644 --- a/src/modules/rlm_python3/configure.ac +++ b/src/modules/rlm_python3/configure.ac @@ -95,7 +95,7 @@ if test x$with_modname != xno; then old_CFLAGS=$CFLAGS CFLAGS="$CFLAGS $PY_CFLAGS" - smart_try_dir="$PY_PREFIX/include/python$PY_SYS_VERSION" + smart_try_dir=$PY_INC_DIR FR_SMART_CHECK_INCLUDE(Python.h) CFLAGS=$old_CFLAGS diff --git a/src/modules/stable b/src/modules/stable index 0fa9ba7950..afec8ec6a6 100644 --- a/src/modules/stable +++ b/src/modules/stable @@ -25,6 +25,7 @@ rlm_passwd rlm_perl rlm_preprocess rlm_python +rlm_python3 rlm_radutmp rlm_realm rlm_rest
Most of the changes are copied by @cipherboy. Thanks a lot btw :)
Freeradius gets build successful, but when I try to actually use python3, I get the following error:
I have an
I suggest we have a look on it, because EOL for python2 is 2020-01-01. If you need any help regarding building debian packages or debugging this issue, let me know.
@shibumi The mentioned patches were integrated into
e.g: if you want to execute
There is very likely to not be a FR release before 2020. We have pre-releases available on our web site at:
You can download packages for 3.0.21 from that site. The code will become 3.0.21 at some point in the new year.