Welcome to the forums. Please post in English or French.

You are not logged in.

#1 2020-09-15 14:28:08

will.logie
Member
From: Canberra
Registered: 2017-09-23
Posts: 15

[SOLVED] CA14.4: Python 3.8.2 (Ubuntu 20.04LTS) python-config fails

Dear All,

Has anyone else had issues installing CA 14.4 with Python 3.8.2 (Linux Mint 20, Ubuntu 20.04 under the bonnet):

./waf configure   --use-config=aster_full_config   --install-tests --prefix=/opt/aster/14.4
checking environment... no found
executing: ./waf.engine configure --use-config=aster_full_config --install-tests --prefix=/opt/aster/14.4 --out=build/std --jobs=4
Setting top to                           : /tmp/install_aster.180118/aster-14.4.0 
Setting out to                           : /tmp/install_aster.180118/aster-14.4.0/build/std 
Setting prefix to                        : /opt/aster/14.4 
Searching configuration 'aster_full_config'... 
Checking for configuration               : aster_full_config 
Checking for 'gcc' (C compiler)          : /usr/bin/gcc 
Checking for 'g++' (C++ compiler)        : /usr/bin/g++ 
Checking for 'gfortran' (Fortran compiler) : /usr/bin/gfortran 
Checking for C compiler version          : gcc 9.3.0 
Checking for Fortran compiler version    : gfortran 9.3.0 
fortran link verbose flag                : -v 
Checking for OpenMP flag -fopenmp        : yes 
Getting fortran runtime link flags       : ok (-L/opt/aster/public/hdf5-1.10.3/lib -L/opt/aster/public/med-4.0.0/lib -L/lib -L/opt/aster/public/metis-5.1.0/lib -L/opt/aster/public/tfel-3.2.1/lib -L/opt/aster/public/scotch-6.0.4/lib -L/opt/aster/public/hdf5-1.10.3/lib64 -L/opt/aster/public/med-4.0.0/lib64 -L/opt/aster/public/hdf5-1.10.3/lib -L/opt/aster/public/med-4.0.0/lib -L/lib -L/opt/aster/public/metis-5.1.0/lib -L/opt/aster/public/tfel-3.2.1/lib -L/opt/aster/public/scotch-6.0.4/lib -L/opt/aster/public/hdf5-1.10.3/lib64 -L/opt/aster/public/med-4.0.0/lib64 -Lnow -Lrelro -L/opt/aster/public/hdf5-1.10.3/lib -L/opt/aster/public/med-4.0.0/lib -L/lib -L/opt/aster/public/metis-5.1.0/lib -L/opt/aster/public/tfel-3.2.1/lib -L/opt/aster/public/scotch-6.0.4/lib -L/opt/aster/public/hdf5-1.10.3/lib64 -L/opt/aster/public/med-4.0.0/lib64 -L/usr/lib/gcc/x86_64-linux-gnu/9 -L/usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu -L/usr/lib/gcc/x86_64-linux-gnu/9/../../../../lib -L/lib/x86_64-linux-gnu -L/lib/../lib -L/usr/lib/x86_64-linux-gnu -L/usr/lib/../lib -L/usr/lib/gcc/x86_64-linux-gnu/9/../../.. -lgfortran -lm -lquadmath -lm -L/opt/aster/public/hdf5-1.10.3/lib -L/opt/aster/public/med-4.0.0/lib -L/lib -L/opt/aster/public/metis-5.1.0/lib -L/opt/aster/public/tfel-3.2.1/lib -L/opt/aster/public/scotch-6.0.4/lib -L/opt/aster/public/hdf5-1.10.3/lib64 -L/opt/aster/public/med-4.0.0/lib64) 
Checking for library pthread             : yes 
Checking for library dl                  : yes 
Checking for library util                : yes 
Checking for program 'python'            : /usr/bin/python3 
Checking for python version >= 3.5.0     : 3.8.2 
python-config                            : /usr/bin/python3-config 
Asking python-config for pyembed '--cflags --libs --ldflags' flags : yes 
Testing pyembed configuration            : Could not build a python embedded interpreter 
Testing pyembed configuration            : Could not build a python embedded interpreter 

It would seem the failure is occurring in a "test.cpp" compilation (excerpt from config.log):

Could not build a python embedded interpreter
from /tmp/install_aster.180118/aster-14.4.0: The configuration failed
----------------------------------------
Testing pyembed configuration
==>

#include <Python.h>
#ifdef __cplusplus
extern "C" {
#endif
	void Py_Initialize(void);
	void Py_Finalize(void);
#ifdef __cplusplus
}
#endif
int main(int argc, char **argv)
{
   (void)argc; (void)argv;
   Py_Initialize();
   Py_Finalize();
   return 0;
}

<==
[1/2] Compiling build/std/.conf_check_5a2e8e23e9eb38c2491426ec1eaa1291/test.cpp

Any tips most appreciated.

Kind regards,
Will.

Last edited by will.logie (2020-09-15 23:18:30)


Solar Thermal Group
Research School of Engineering
Australian National University
http://stg.anu.edu.au/

Offline

#2 2020-09-15 21:53:53

will.logie
Member
From: Canberra
Registered: 2017-09-23
Posts: 15

Re: [SOLVED] CA14.4: Python 3.8.2 (Ubuntu 20.04LTS) python-config fails

Presumably it has something to do with the new python3-config --embed flag post Python 3.8:

Python3.6.12:

$ python3-config --cflags --libs --ldflags
-I/usr/include/python3.6m -I/usr/include/python3.6m  -Wno-unused-result -Wsign-compare  -DNDEBUG -g -fwrapv -O3 -Wall
-lpython3.6m -lpthread -ldl  -lutil -lm 
 -L/usr/lib -lpython3.6m -lpthread -ldl  -lutil -lm  -Xlinker -export-dynamic

Python3.8.2:

$ python3.8-config --cflags --libs --ldflags --embed
-I/usr/include/python3.8 -I/usr/include/python3.8  -Wno-unused-result -Wsign-compare -g -fdebug-prefix-map=/build/python3.8-fKk4GY/python3.8-3.8.2=. -specs=/usr/share/dpkg/no-pie-compile.specs -fstack-protector -Wformat -Werror=format-security  -DNDEBUG -g -fwrapv -O3 -Wall
-lpython3.8 -lcrypt -lpthread -ldl  -lutil -lm -lm 
-L/usr/lib/python3.8/config-3.8-x86_64-linux-gnu -L/usr/lib -lpython3.8 -lcrypt -lpthread -ldl  -lutil -lm -lm 

I will fall back to Python 3.6 for now.

Last edited by will.logie (2020-09-16 08:30:26)


Solar Thermal Group
Research School of Engineering
Australian National University
http://stg.anu.edu.au/

Offline