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

You are not logged in.

#1 2017-05-11 07:45:21

bhattarai
Member
Registered: 2014-01-31
Posts: 103

Waf fails on Ubuntu 16.04 for CA12.7

Dear CA experts,

Installing the development version of CA12.7 on Ubuntu 16.04 leads to a waf failure of:

biomech1@biomech1-Lenovo-Invalid-entry-length-16-Fixed-up-to-11:~/dev/codeaster/src$ sudo ./waf install -p
checking environment... no found
Waf: Entering directory `/home/biomech1/dev/codeaster/src/build/release'
[7910/9143][86%][|][=====================================================================================================================================>                      ][8.854s]bibfor/echange/as_mfdfin.F90.1.o: In function `as_mfdfin_':
as_mfdfin.F90:(.text+0x57): undefined reference to `mfioex_'
bibfor/echange/as_mfdonp.F90.1.o: In function `as_mfdonp_':
as_mfdonp.F90:(.text+0x149): undefined reference to `mfioex_'
collect2: error: ld returned 1 exit status

[1/1][100%][/][===============================================================================================================================================================>][11.071s]
Waf: Leaving directory `/home/biomech1/dev/codeaster/src/build/release'
Build failed
-> task in 'asterexec' failed (exit status 1):
    task details in: /home/biomech1/dev/codeaster/src/build/release/asterexec.log


asterexc.log is not easy to analyze. Previously, I had successfully installed the same CA12.7 version on Ubuntu 12.04. I am not sure if the installation procedure is similar for higher version, at least 12.7 gave me the error above. Do I need to modify something for Ubuntu 16.04? Can anyone please provide me any hint on the solution for this problem?

Many thanks in advance.
Bhattarai

Offline

#2 2017-05-12 15:33:31

bhattarai
Member
Registered: 2014-01-31
Posts: 103

Re: Waf fails on Ubuntu 16.04 for CA12.7

Hi again,

After a look into the config.log file, I got a strange error on python check:

Checking for program 'python'
/usr/bin/python
find program=['python'] paths=['/usr/local/sbin', '/usr/local/bin', '/usr/sbin', '/usr/bin', '/sbin', '/bin', '/snap/bin'] var='PYTHON' -> ['/usr/bin/python']
['/usr/bin/python', '-c', 'import imp;print(imp.get_tag())']
err: Traceback (most recent call last):
  File "<string>", line 1, in <module>
AttributeError: 'module' object has no attribute 'get_tag'

It is comparable to the previous successful installation where other output looks similar. I googled about this message but find nothing. Is this the reason for the error on waf? If not, where, in the CA files can I look to solve the problem?

Thanks in advance.

Best regards,
Bhattarai

Offline

#3 2017-06-02 11:46:26

mathieu.courtois
Administrator
From: France
Registered: 2007-11-21
Posts: 1,122

Re: Waf fails on Ubuntu 16.04 for CA12.7

Hello,

First message: med version changed in last stable-updates (12.7.x).

Second: imp.get_tag only exist in python3, used by waf to check the python installation. It will use sys module for python2.

MC


Code_Aster release : last unstable on Ubuntu 16.04 64 bits - GNU Compilers

Please do not forget to tag your first post as *SOLVED* when it is!

Offline

#4 2017-06-14 16:22:47

bhattarai
Member
Registered: 2014-01-31
Posts: 103

Re: Waf fails on Ubuntu 16.04 for CA12.7

Hi MC,

I think I understand your reference to the python error as:

Checking for program 'python'
/usr/bin/python
find program=['python'] paths=['/home/biomech/dev/codeaster/devtools/bin', '/usr/local/sbin', '/usr/local/bin', '/usr/sbin', '/usr/bin', '/sbin', '/bin'] var='PYTHON' -> ['/usr/bin/python']
['/usr/bin/python', '-c', 'import imp;print(imp.get_tag())']
err: Traceback (most recent call last):
  File "<string>", line 1, in <module>
AttributeError: 'module' object has no attribute 'get_tag'
out: 2
7
3
final
0

that should have been something like:

Checking for program python
/usr/bin/python
find program=['python'] paths=['/usr/local/sbin', '/usr/local/bin', '/usr/sbin', '/usr/bin', '/sbin', '/bin'] var='PYTHON' -> '/usr/bin/python'
['/usr/bin/python', '-c', 'import sys\nfor x in sys.version_info: print(str(x))']
out: 2
7
3
final
0

The second is from a successful installation of older code aster which used python 2.7.3. For code aster 12.7, I installed python 2.7.10 using Anaconda and using python --version it gives me Python 2.7.10 :: Anaconda custom (64-bit).

But when I compile the sequential code aster using ''python setup.py install --prefix=/opt/aster'' it automatically uses python 2.7.3. Though, the sequential aster compilation using python 2.7.3 is successful, but waf build for development version gives me the python error.

I am sure linking python to version 2.7.10 might be easy and not an interesting question. Also, installing using python 2.7.10 might solve the checking python error, but how can I link the code aster to use desired python version 2.7.10?

Thank you in advance.

Best regards,
Bhattarai

Offline

#5 2017-06-19 12:31:21

bhattarai
Member
Registered: 2014-01-31
Posts: 103

Re: Waf fails on Ubuntu 16.04 for CA12.7

Hello again,

Update of fresh installation of CA 12.7 on Ubuntu 16.04 (default python version = 2.7.12). The error pattern is the same:

~/dev/codeaster/src$ sudo ./waf configure --use-config-dir=/opt/aster127/12.7/share/aster --use-config=aster_full_config --prefix=../install/std
checking environment... loading /home/biomech/dev/codeaster/devtools/etc/env_unstable.sh
Setting top to                           : /home/biomech/dev/codeaster/src 
Setting out to                           : /home/biomech/dev/codeaster/src/build 
Setting prefix to                        : /home/biomech/dev/codeaster/install/std 
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 5.4.0 
Checking for Fortran compiler version    : gfortran 5.4.0 
fortran link verbose flag                : -v 
Checking for OpenMP flag -fopenmp        : yes 
Getting fortran runtime link flags       : ok (-L/opt/aster127/public/hdf5-1.8.14/lib -L/opt/aster127/public/med-3.2.0/lib -L/opt/aster127/public/mumps-4.10.0/lib -L/opt/aster127/public/metis-4.0.3/lib -L/opt/aster127/public/mfront-2.0.3/lib -L/opt/aster127/public/scotch-5.1.11/lib -L/opt/aster127/public/hdf5-1.8.14/lib64 -L/opt/aster127/public/med-3.2.0/lib64 -L/opt/aster127/public/hdf5-1.8.14/lib -L/opt/aster127/public/med-3.2.0/lib -L/opt/aster127/public/mumps-4.10.0/lib -L/opt/aster127/public/metis-4.0.3/lib -L/opt/aster127/public/mfront-2.0.3/lib -L/opt/aster127/public/scotch-5.1.11/lib -L/opt/aster127/public/hdf5-1.8.14/lib64 -L/opt/aster127/public/med-3.2.0/lib64 -Lrelro -L/opt/aster127/public/hdf5-1.8.14/lib -L/opt/aster127/public/med-3.2.0/lib -L/opt/aster127/public/mumps-4.10.0/lib -L/opt/aster127/public/metis-4.0.3/lib -L/opt/aster127/public/mfront-2.0.3/lib -L/opt/aster127/public/scotch-5.1.11/lib -L/opt/aster127/public/hdf5-1.8.14/lib64 -L/opt/aster127/public/med-3.2.0/lib64 -L/usr/lib/gcc/x86_64-linux-gnu/5 -L/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu -L/usr/lib/gcc/x86_64-linux-gnu/5/../../../../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/5/../../.. -lgfortran -lm -lquadmath -lm) 
Checking for library pthread             : yes 
Checking for library dl                  : yes 
Checking for library util                : yes 
Checking for program 'python'            : /usr/bin/python 
Checking for python version              : (2, 7, 12, 'final', 0) 
python-config                            : /usr/bin/python-config 
Asking python-config for pyembed '--cflags --libs --ldflags' flags : yes 
Testing pyembed configuration            : yes 
Asking python-config for pyext '--cflags --libs --ldflags' flags : yes 
Testing pyext configuration              : yes 
Checking for numpy                       : yes 
Checking for numpy version               : 1.11.0 
Checking for numpy include               : ['/usr/lib/python2.7/dist-packages/numpy/core/include'] 
Getting platform                         : LINUX64 
Checking for library pthread             : yes 
Checking for library m                   : yes 
Checking for number of cores             : 8 
Setting libm after files                 : yes ("-lm" removed from LINKFLAGS_CLIB) 
Checking for a program using blas/lapack : yes 
Checking for a program using omp thread  : yes (on 8 threads) 
Checking for library hdf5                : yes 
Checking for header hdf5.h               : yes 
Checking hdf5 version                    : 1.8.14 
Checking for API hdf5 v18                : default v18 
Checking for library med                 : yes 
Checking for header med.h                : yes 
Checking size of med_int integers        : 4 
Checking med version                     : 3.2.0 
Checking for library metis               : yes 
Checking for header metis.h              : yes 
Checking metis version                   : unsupported metis version: 4.0.3 
Checking for code snippet                : yes 
Checking for code snippet                : yes 
Checking for code snippet                : yes 
Checking for code snippet                : yes 
Checking for code snippet                : yes 
Checking for code snippet                : yes 
Checking for header stdio.h stdlib.h sys/types.h scotch.h : yes 
Checking for code snippet                : yes 
Checking for code snippet                : no 
Checking for code snippet                : no 
Checking for code snippet                : no 
Checking for code snippet                : no 
Checking for code snippet                : no 
Checking for code snippet                : no 
Checking for code snippet                : no 
Checking for code snippet                : no 
Checking for code snippet                : no 
Checking for code snippet                : yes 
Checking for code snippet                : yes 
Checking for code snippet                : yes 
Checking for code snippet                : yes 
Checking for code snippet                : yes 
Checking for code snippet                : yes 
nomsg                                    : yes 
Checking for code snippet                : yes 
Checking for code snippet                : yes 
Checking for code snippet                : yes 
Checking for code snippet                : yes 
Checking for code snippet                : yes 
Checking for code snippet                : yes 
Checking for code snippet                : yes 
Checking for code snippet                : yes 
Checking for code snippet                : yes 
Checking for code snippet                : yes 
Checking for code snippet                : no 
Checking for code snippet                : yes 
Checking for code snippet                : yes 
Checking for code snippet                : no 
not trusting file /home/biomech/dev/codeaster/src/.hg/hgrc from untrusted user biomech, group biomech
not trusting file /home/biomech/dev/codeaster/src/.hg/hgrc from untrusted user biomech, group biomech
not trusting file /home/biomech/dev/codeaster/src/.hg/hgrc from untrusted user biomech, group biomech
not trusting file /home/biomech/dev/codeaster/src/.hg/hgrc from untrusted user biomech, group biomech
Traceback (most recent call last):
  File "/home/biomech/dev/codeaster/src/.waf-1.8.22-5fa41dedfc4a80e01a7ca1d1c9d570c0/waflib/Scripting.py", line 114, in waf_entry_point
    run_commands()
  File "/home/biomech/dev/codeaster/src/.waf-1.8.22-5fa41dedfc4a80e01a7ca1d1c9d570c0/waflib/Scripting.py", line 175, in run_commands
    ctx=run_command(cmd_name)
  File "/home/biomech/dev/codeaster/src/.waf-1.8.22-5fa41dedfc4a80e01a7ca1d1c9d570c0/waflib/Scripting.py", line 166, in run_command
    ctx.execute()
  File "/home/biomech/dev/codeaster/src/.waf-1.8.22-5fa41dedfc4a80e01a7ca1d1c9d570c0/waflib/Configure.py", line 87, in execute
    super(ConfigurationContext,self).execute()
  File "/home/biomech/dev/codeaster/src/.waf-1.8.22-5fa41dedfc4a80e01a7ca1d1c9d570c0/waflib/Context.py", line 93, in execute
    self.recurse([os.path.dirname(g_module.root_path)])
  File "/home/biomech/dev/codeaster/src/.waf-1.8.22-5fa41dedfc4a80e01a7ca1d1c9d570c0/waflib/Context.py", line 134, in recurse
    user_function(self)
  File "/home/biomech/dev/codeaster/src/wscript", line 202, in configure
    self.recurse('mfront')
  File "/home/biomech/dev/codeaster/src/.waf-1.8.22-5fa41dedfc4a80e01a7ca1d1c9d570c0/waflib/Context.py", line 134, in recurse
    user_function(self)
  File "/home/biomech/dev/codeaster/src/mfront/wscript", line 44, in configure
    self.check_mfront()
  File "/home/biomech/dev/codeaster/src/.waf-1.8.22-5fa41dedfc4a80e01a7ca1d1c9d570c0/waflib/Configure.py", line 184, in fun
    return f(*k,**kw)
  File "/home/biomech/dev/codeaster/src/mfront/wscript", line 122, in check_mfront
    os.environ['TFELHOME'] = tfelhome[0]
IndexError: list index out of range

The config.log file is attached. Many thanks in advance.

Best regards,
Bhattarai


Attachments:
config.log, Size: 227.49 KiB, Downloads: 6

Offline

Board footer