v3.2.x - installing rlm_python3 attempts to install rlm_python
Dave Macias
davama at gmail.com
Tue Jul 19 12:48:46 UTC 2022
Thank you Alan and Jorge for your responses.
Still getting errors, unfortunately... using docker image
* python:3.9-alpine3.15 *
Ran:
./configure .... --with-experimental-modules
--with-rlm-python3-config-bin=$(which python3-config)
CC src/modules/rlm_python3/rlm_python3.c
src/modules/rlm_python3/rlm_python3.c:1033:1: warning: 'visibility'
attribute ignored [-Wattributes]
1033 | {
| ^
src/modules/rlm_python3/rlm_python3.c: In function
'python_interpreter_init':
src/modules/rlm_python3/rlm_python3.c:1136:3: warning: 'PyEval_InitThreads'
is deprecated [-Wdeprecated-declarations]
1136 | PyEval_InitThreads(); /* This also grabs a lock (which we then
need to release) */
| ^~~~~~~~~~~~~~~~~~
In file included from /usr/local/include/python3.9/Python.h:140,
from src/modules/rlm_python3/rlm_python3.c:37:
/usr/local/include/python3.9/ceval.h:130:37: note: declared here
130 | Py_DEPRECATED(3.9) PyAPI_FUNC(void) PyEval_InitThreads(void);
| ^~~~~~~~~~~~~~~~~~
LINK build/lib/rlm_python3.la
Here is my env output:
bash-5.1# python3 -V
Python 3.9.13
bash-5.1# apk info python3-dev
python3-dev-3.9.7-r4 installed
bash-5.1# git log -1
commit db3ad0c4663030d4248118e1539eb91b4e7257c8 (grafted, HEAD -> v3.2.x,
origin/v3.2.x)
Author: Alan T. DeKok <aland at freeradius.org>
Date: Mon Jul 18 16:35:49 2022 -0400
python3 should be stable
bash-5.1# cd src/modules/rlm_python3/
bash-5.1# ls
all.mk all.mk.in config.h config.h.in config.log
config.status configure configure.ac example.py prepaid.py
prepaid.sql radiusd.py rlm_python3.c rlm_python3.h
bash-5.1# ./configure
checking for gcc... 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... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking how to run the C preprocessor... gcc -E
checking for a Python interpreter with version >= 3.0... python
checking for python... /usr/local/bin/python
checking for python version... 3.9
checking for python platform... linux
checking for python script directory...
${prefix}/lib/python3.9/site-packages
checking for python extension module directory...
${exec_prefix}/lib/python3.9/site-packages
checking for python3-config... python3-config
configure: python3-config's cflags were "-I/usr/local/include/python3.9
-I/usr/local/include/python3.9 -Wno-unused-result -Wsign-compare -DNDEBUG
-g -fwrapv -O3 -Wall"
configure: Sanitized cflags were " -isystem/usr/local/include/python3.9
-isystem/usr/local/include/python3.9 -fwrapv "
checking for gawk... gawk
configure: python3-config's ldflags were " -L/usr/local/lib -lpython3.9
-ldl -lm -lm }"
configure: Sanitized ldflags were "-L/usr/local/lib -lpython3.9 -ldl -lm
-lm"
checking for dl_iterate_phdr... yes
configure: creating ./config.status
config.status: creating all.mk
config.status: creating config.h
config.status: config.h is unchanged
Hope this covers it.
Please let me know if im missing anything
Thank you networkradius for you awesome support!
Best,
Dave
On Mon, Jul 18, 2022 at 10:30 PM Jorge Pereira <jpereira at freeradius.org>
wrote:
> Which is the Python3 version? e.g: share the “python3 —version”
>
> As Alan said, we have the CI building all targets successfully. Other than
> that, I did a simple test locally and the rim_python3 was generated as well.
>
> 1. Using latest v3.2.x/HEAD
>
> [jpereira at jorge-sugarloaf:freeradius-server-v3.2.x.git]$ git log -1
> commit db3ad0c4663030d4248118e1539eb91b4e7257c8 (HEAD -> v3.2.x,
> upstream/v3.2.x)
> Author: Alan T. DeKok <aland at freeradius.org>
> Date: Mon Jul 18 16:35:49 2022 -0400
>
> python3 should be stable
> [jpereira at jorge-sugarloaf:freeradius-server-v3.2.x.git]$
>
> 2. Simple build
>
> [jpereira at jorge-sugarloaf:freeradius-server-v3.2.x.git]$ ./configure
> --with-rlm-python3-config-bin=$(which python3-config); make
>
> 3. The rlm_python3
>
> [jpereira at jorge-sugarloaf:freeradius-server-v3.2.x.git]$ find build/
> -iname rlm_python3* -type f
> build//objs/src/modules/rlm_python3/rlm_python3.o
> build//objs/src/modules/rlm_python3/rlm_python3.lo
> build//make/src/src/modules/rlm_python3/rlm_python3.mk
> build//lib/rlm_python3.la
> build//lib/local/rlm_python3.la
> build//lib/local/.libs/rlm_python3.a
> build//lib/local/.libs/rlm_python3.dylib
> build//lib/.libs/rlm_python3.a
> build//lib/.libs/rlm_python3.dylib
> [jpereira at jorge-sugarloaf:freeradius-server-v3.2.x.git]$
>
> i.e: If you get any error again. Please go to src/modules/rlm_python3 and
> execute ./configure, then copy/paste the output with us.
>
> —
> Jorge
>
>
> > On 18 Jul 2022, at 15:22, Dave Macias <davama at gmail.com> wrote:
> >
> > Thank you Alan
> >
> > $ rm -rf src/modules/rlm_python
> >> $ ./configure ...
> >> $ make
> >> $ make install
> >>
> >
> > Unfortunately, that didnt install rlm_pytohn3 (with flags
> > --with-rlm_python3
> > --with-rlm-python3-config-bin=/usr/local/bin/psython3-config )
> >
> > bash-5.1# ls -al /usr/lib/freeradius/rlm_python*
> > ls: /usr/lib/freeradius/rlm_python*: No such file or directory
> >
> > Adding --with-rlm_python didnt work either, im guessing because the
> > rlm_python directory didnt exist.
> > But doing this got rlm_python3 installed but with some errors:
> >
> > $ rm -rf src/modules/rlm_python \
> > $ cp -r src/modules/rlm_python3 src/modules/rlm_python \
> > $ ./configure ... \
> > --with-rlm_python3
> > ...
> > ...
> > CC src/modules/rlm_python/rlm_python3.c
> > src/modules/rlm_python/rlm_python3.c:1033:1: warning: 'visibility'
> > attribute ignored [-Wattributes]
> > 1033 | {
> > | ^
> > src/modules/rlm_python/rlm_python3.c: In function
> 'python_interpreter_init':
> > src/modules/rlm_python/rlm_python3.c:1136:17: warning:
> 'PyEval_InitThreads'
> > is deprecated [-Wdeprecated-declarations]
> > 1136 | PyEval_InitThreads(); /* This
> > also grabs a lock (which we then need to release) */
> > | ^~~~~~~~~~~~~~~~~~
> > In file included from /usr/local/include/python3.9/Python.h:140,
> > from src/modules/rlm_python/rlm_python3.c:37:
> > /usr/local/include/python3.9/ceval.h:130:37: note: declared here
> > 130 | Py_DEPRECATED(3.9) PyAPI_FUNC(void) PyEval_InitThreads(void);
> > | ^~~~~~~~~~~~~~~~~~
> > LINK build/lib/rlm_python3.la
> >
> >
> > What could I be doing wrong?
> > -
> > List info/subscribe/unsubscribe? See
> http://www.freeradius.org/list/users.html
>
> Jorge Pereira
> jpereira at networkradius.com
>
>
>
> -
> List info/subscribe/unsubscribe? See
> http://www.freeradius.org/list/users.html
>
More information about the Freeradius-Users
mailing list