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

You are not logged in.

#1 2019-06-16 02:56:48

oncoskun
Member
Registered: 2019-06-13
Posts: 12

[SOLVED] Code_aster installation on Ubuntu 18.04

I am having difficulties when installing code_aster. I am not sure if it is because of cmake and python version.

Here is the summary of installation and I also added the log file in attachment.

Error 1

configure: error: in `/tmp/install_med.3232/med-3.3.1':
configure: error:
Could not link test program to Python. Maybe the main Python library has been
installed in some non-standard library path. If so, pass it to configure,
via the LDFLAGS environment variable.
Example: ./configure LDFLAGS="-L/usr/non-standard-path/python/lib"
============================================================================
  ERROR!
  You probably have to install the development version of the Python package
  for your distribution.  The exact name of this package varies among them.
============================================================================

Error 2

CMake Error at CMakeLists.txt:261 (find_package):
find_package called with invalid argument "2.7.15+"

and

--------------------------------------------------------------------------------
     SUMMARY OF INSTALLATION
--------------------------------------------------------------------------------

Installation of   : hdf5 1.8.14
Destination       : /home/onur/code_aster_dev/public/hdf5-1.8.14
Elapsed time      : 86.39 s
                                                                      [  OK  ]
Installation of   : med 3.3.1
Destination       : /home/onur/code_aster_dev/public/med-3.3.1
Elapsed time      : 10.09 s
                                                                     
*** Exception <class 'as_setup.SetupConfigureError'> raised : error during configure
See detailed traceback in the logfile
                                                                       [FAILED]
Exit code : 4
Installation of   : gmsh 3.0.6
Destination       : /home/onur/code_aster_dev/public/gmsh-3.0.6-Linux
Elapsed time      : 0.77 s
                                                                      [  OK  ]
Installation of   : scotch 6.0.4
Destination       : /home/onur/code_aster_dev/public/scotch-6.0.4
Elapsed time      : 30.21 s
                                                                      [  OK  ]
Installation of   : astk 2018.0
Destination       : /home/onur/code_aster_dev/lib/python2.7/site-packages
Elapsed time      : 0.76 s
                                                                      [  OK  ]
Installation of   : metis 5.1.0
Destination       : /home/onur/code_aster_dev/public/metis-5.1.0
Elapsed time      : 30.48 s
                                                                      [  OK  ]
Installation of   : tfel 3.1.1
Destination       : /home/onur/code_aster_dev/public/tfel-3.1.1
Elapsed time      : 48.95 s
                                                                     
*** Exception <class 'as_setup.SetupConfigureError'> raised : error during configure
See detailed traceback in the logfile
                                                                       [FAILED]
Exit code : 4
Installation of   : mumps 5.1.2
Destination       : /home/onur/code_aster_dev/public/mumps-5.1.2
Elapsed time      : 0.80 s
                                                                     
*** Exception <class 'as_setup.SetupConfigureError'> raised : error during configure
See detailed traceback in the logfile
                                                                       [FAILED]
Exit code : 4
Installation of   : homard 11.10
Destination       : /home/onur/code_aster_dev/public/homard-11.10
Elapsed time      : 2.25 s
                                                                      [  OK  ]
Installation of   : aster 14.2.0
Destination       : /home/onur/code_aster_dev
Elapsed time      : 13.92 s
                                                                     
*** Exception <class 'as_setup.SetupConfigureError'> raised : error during configure
See detailed traceback in the logfile
                                                                       [FAILED]
Exit code : 4
Installation of   : Code_Aster + 10 of its prerequisites
Destination       : /home/onur/code_aster_dev
Elapsed time      : 335.81 s
                                                                      [  OK  ]

Last edited by oncoskun (2019-06-17 22:17:20)


Attachments:
setup.log, Size: 64.37 KiB, Downloads: 34

Offline

#2 2019-06-16 11:09:45

oncoskun
Member
Registered: 2019-06-13
Posts: 12

Re: [SOLVED] Code_aster installation on Ubuntu 18.04

Anaconda environment with python 3 was causing some of the errors, here is the working solution,
*********************************
Create a new conda environment for Python 2

"conda create --name py2 python=2"

This will create a conda environment with Python 2.7.

Install Python 2 as a new conda environment as follows

"source activate python2"
**********************************
Unsolved errors are given below,

-- aster support enabled
-- cyrano support enabled
-- Could NOT find Gnuplot (missing: GNUPLOT_EXECUTABLE)
-- Found PythonLibs: /usr/lib/x86_64-linux-gnu/libpython2.7.so (found version "2.7.15+")
-- found python          2.7.15+
-- python include path   /usr/include/python2.7
-- python libraries path /usr/lib/x86_64-linux-gnu
-- python library        python2.7
CMake Error at CMakeLists.txt:261 (find_package):
find_package called with invalid argument "2.7.15+"

-- Could NOT find Boost
-- Trying to find libboost_python
-- Boost version: 1.65.1
-- Found the following Boost libraries:
--   python
--   numpy
--   numpy found
-- Boost library python found (/usr/lib/x86_64-linux-gnu/libboost_python.so).
-- doxygen documentation is not enabled
-- Generation of the reference documentation disabled
-- Configuring incomplete, errors occurred!
See also "/tmp/install_tfel.27328/tfel-3.1.1/build/CMakeFiles/CMakeOutput.log".
See also "/tmp/install_tfel.27328/tfel-3.1.1/build/CMakeFiles/CMakeError.log".
EXIT_COMMAND_27328_00000095=1

*** Exception raised : error during configure

--------------------------------------------------------------------------------
     SUMMARY OF INSTALLATION
--------------------------------------------------------------------------------

Installation of   : hdf5 1.8.14
Destination       : /home/onur/code_aster_dev/public/hdf5-1.8.14
Elapsed time      : 84.78 s
                                                                      [  OK  ]
Installation of   : med 3.3.1
Destination       : /home/onur/code_aster_dev/public/med-3.3.1
Elapsed time      : 97.60 s
                                                                      [  OK  ]
Installation of   : gmsh 3.0.6
Destination       : /home/onur/code_aster_dev/public/gmsh-3.0.6-Linux
Elapsed time      : 0.70 s
                                                                      [  OK  ]
Installation of   : scotch 6.0.4
Destination       : /home/onur/code_aster_dev/public/scotch-6.0.4
Elapsed time      : 28.82 s
                                                                      [  OK  ]
Installation of   : astk 2018.0
Destination       : /home/onur/code_aster_dev/lib/python2.7/site-packages
Elapsed time      : 0.68 s
                                                                      [  OK  ]
Installation of   : metis 5.1.0
Destination       : /home/onur/code_aster_dev/public/metis-5.1.0
Elapsed time      : 31.12 s
                                                                      [  OK  ]
Installation of   : tfel 3.1.1
Destination       : /home/onur/code_aster_dev/public/tfel-3.1.1
Elapsed time      : 48.67 s
                                                                     
*** Exception <class 'as_setup.SetupConfigureError'> raised : error during configure
See detailed traceback in the logfile
                                                                       [FAILED]
Exit code : 4
Installation of   : mumps 5.1.2
Destination       : /home/onur/code_aster_dev/public/mumps-5.1.2
Elapsed time      : 110.56 s
                                                                      [  OK  ]
Installation of   : homard 11.10
Destination       : /home/onur/code_aster_dev/public/homard-11.10
Elapsed time      : 2.19 s
                                                                      [  OK  ]
Installation of   : aster 14.2.0
Destination       : /home/onur/code_aster_dev
Elapsed time      : 13.43 s
                                                                     
*** Exception <class 'as_setup.SetupConfigureError'> raised : error during configure
See detailed traceback in the logfile
                                                                       [FAILED]
Exit code : 4
Installation of   : Code_Aster + 10 of its prerequisites
Destination       : /home/onur/code_aster_dev
Elapsed time      : 437.51 s
                                                                      [  OK  ]

Last edited by oncoskun (2019-06-16 11:11:12)


Attachments:
setup.log, Size: 52.71 KiB, Downloads: 34

Offline

#3 2019-06-16 16:12:44

oncoskun
Member
Registered: 2019-06-13
Posts: 12

Re: [SOLVED] Code_aster installation on Ubuntu 18.04

Deleting the "Anaconda3 2018.12 installer" inputs from the ~/.bashrc and downgrading python to 2.7.15 solved the remaining problems.

But I have a problem at the compiling stage of tfel-3.1.1, and I couldnt understand why it occurs?

[  9%] Built target TFELUtilities
[  9%] Building CXX object bindings/python/tfel/CMakeFiles/py_tfel__tfel.dir/PhysicalConstants.o
/usr/local/lib/libpython2.7.a(posixmodule.o): `posix_tmpnam' fonksiyonunda:
/home/onur/İndirilenler/Python-2.7.15/./Modules/posixmodule.c:7648: uyarı: the use of `tmpnam_r' is dangerous, better use `mkstemp'
/usr/local/lib/libpython2.7.a(posixmodule.o): `posix_tempnam' fonksiyonunda:
/home/onur/İndirilenler/Python-2.7.15/./Modules/posixmodule.c:7595: uyarı: the use of `tempnam' is dangerous, better use `mkstemp'
/usr/bin/ld: /usr/local/lib/libpython2.7.a(ceval.o): relocation R_X86_64_PC32 against symbol `PyFunction_Type' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: son bağlama başarısız: Geçersiz değer
collect2: error: ld returned 1 exit status
/usr/local/lib/libpython2.7.a(posixmodule.o): `posix_tmpnam' fonksiyonunda:
/home/onur/İndirilenler/Python-2.7.15/./Modules/posixmodule.c:7648: uyarı: the use of `tmpnam_r' is dangerous, better use `mkstemp'
/usr/local/lib/libpython2.7.a(posixmodule.o): `posix_tempnam' fonksiyonunda:
/home/onur/İndirilenler/Python-2.7.15/./Modules/posixmodule.c:7595: uyarı: the use of `tempnam' is dangerous, better use `mkstemp'
/usr/bin/ld: /usr/local/lib/libpython2.7.a(ceval.o): relocation R_X86_64_PC32 against symbol `PyFunction_Type' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: son bağlama başarısız: Geçersiz değer
collect2: error: ld returned 1 exit status
bindings/python/std/CMakeFiles/py_std__stl_map.dir/build.make:96: recipe for target 'bindings/python/std/_stl_map.so' failed
make[2]: *** [bindings/python/std/_stl_map.so] Error 1
bindings/python/std/CMakeFiles/py_std__stl_pair.dir/build.make:96: recipe for target 'bindings/python/std/_stl_pair.so' failed
make[2]: *** [bindings/python/std/_stl_pair.so] Error 1
CMakeFiles/Makefile2:1177: recipe for target 'bindings/python/std/CMakeFiles/py_std__stl_map.dir/all' failed
make[1]: *** [bindings/python/std/CMakeFiles/py_std__stl_map.dir/all] Error 2
make[1]: *** Bitmemiş işler için bekliyor....
CMakeFiles/Makefile2:1214: recipe for target 'bindings/python/std/CMakeFiles/py_std__stl_pair.dir/all' failed
make[1]: *** [bindings/python/std/CMakeFiles/py_std__stl_pair.dir/all] Error 2
[  9%] Building CXX object bindings/python/tfel/CMakeFiles/py_tfel_material.dir/OutOfBoundsPolicy.o
[  9%] Building CXX object bindings/python/tfel/CMakeFiles/py_tfel_material.dir/CrystalStructure.o
[  9%] Linking CXX shared library libTFELNUMODIS.so
[  9%] Built target TFELNUMODIS
[  9%] Linking CXX shared module _stl_vector.so
/usr/local/lib/libpython2.7.a(posixmodule.o): `posix_tmpnam' fonksiyonunda:
/home/onur/İndirilenler/Python-2.7.15/./Modules/posixmodule.c:7648: uyarı: the use of `tmpnam_r' is dangerous, better use `mkstemp'
/usr/local/lib/libpython2.7.a(posixmodule.o): `posix_tempnam' fonksiyonunda:
/home/onur/İndirilenler/Python-2.7.15/./Modules/posixmodule.c:7595: uyarı: the use of `tempnam' is dangerous, better use `mkstemp'
/usr/bin/ld: /usr/local/lib/libpython2.7.a(ceval.o): relocation R_X86_64_PC32 against symbol `PyFunction_Type' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: son bağlama başarısız: Geçersiz değer
collect2: error: ld returned 1 exit status
bindings/python/std/CMakeFiles/py_std__stl_vector.dir/build.make:96: recipe for target 'bindings/python/std/_stl_vector.so' failed
make[2]: *** [bindings/python/std/_stl_vector.so] Error 1
CMakeFiles/Makefile2:1251: recipe for target 'bindings/python/std/CMakeFiles/py_std__stl_vector.dir/all' failed
make[1]: *** [bindings/python/std/CMakeFiles/py_std__stl_vector.dir/all] Error 2
[  9%] Linking CXX shared module _tfel.so
/usr/local/lib/libpython2.7.a(posixmodule.o): `posix_tmpnam' fonksiyonunda:
/home/onur/İndirilenler/Python-2.7.15/./Modules/posixmodule.c:7648: uyarı: the use of `tmpnam_r' is dangerous, better use `mkstemp'
/usr/local/lib/libpython2.7.a(posixmodule.o): `posix_tempnam' fonksiyonunda:
/home/onur/İndirilenler/Python-2.7.15/./Modules/posixmodule.c:7595: uyarı: the use of `tempnam' is dangerous, better use `mkstemp'
/usr/bin/ld: /usr/local/lib/libpython2.7.a(ceval.o): relocation R_X86_64_PC32 against symbol `PyFunction_Type' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: son bağlama başarısız: Geçersiz değer
collect2: error: ld returned 1 exit status
bindings/python/tfel/CMakeFiles/py_tfel__tfel.dir/build.make:122: recipe for target 'bindings/python/tfel/_tfel.so' failed
make[2]: *** [bindings/python/tfel/_tfel.so] Error 1
CMakeFiles/Makefile2:1430: recipe for target 'bindings/python/tfel/CMakeFiles/py_tfel__tfel.dir/all' failed
make[1]: *** [bindings/python/tfel/CMakeFiles/py_tfel__tfel.dir/all] Error 2
[  9%] Linking CXX shared module material.so
/usr/local/lib/libpython2.7.a(posixmodule.o): `posix_tmpnam' fonksiyonunda:
/home/onur/İndirilenler/Python-2.7.15/./Modules/posixmodule.c:7648: uyarı: the use of `tmpnam_r' is dangerous, better use `mkstemp'
/usr/local/lib/libpython2.7.a(posixmodule.o): `posix_tempnam' fonksiyonunda:
/home/onur/İndirilenler/Python-2.7.15/./Modules/posixmodule.c:7595: uyarı: the use of `tempnam' is dangerous, better use `mkstemp'
/usr/bin/ld: /usr/local/lib/libpython2.7.a(ceval.o): relocation R_X86_64_PC32 against symbol `PyFunction_Type' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: son bağlama başarısız: Geçersiz değer
collect2: error: ld returned 1 exit status
bindings/python/tfel/CMakeFiles/py_tfel_material.dir/build.make:174: recipe for target 'bindings/python/tfel/material.so' failed
make[2]: *** [bindings/python/tfel/material.so] Error 1
CMakeFiles/Makefile2:1393: recipe for target 'bindings/python/tfel/CMakeFiles/py_tfel_material.dir/all' failed
make[1]: *** [bindings/python/tfel/CMakeFiles/py_tfel_material.dir/all] Error 2
Makefile:162: recipe for target 'all' failed
make: *** [all] Error 2
EXIT_COMMAND_25637_00000096=2

*** Exception raised : error during compilation


Attachments:
setup.log, Size: 57.79 KiB, Downloads: 30

Offline

#4 2019-06-17 22:15:58

oncoskun
Member
Registered: 2019-06-13
Posts: 12

Re: [SOLVED] Code_aster installation on Ubuntu 18.04

I found the problems by the way.

The first problem is Anaconda3 2018.12, one needs to delete inputs from ~/.bashrc.

The another problem is cmake, I think it is buggy and the version of the python is recognized as "2.7.15+",  and "+" gives an error. My solution was to install python 2.7.15 manually and alias it in ~/.bashrc. But with that numpy would be missing and what I did is tricky. I opened the terminal when ~/.bashrc has 2.7.15 defined, and then modified the ~/.bashrc to its original state with python-minimal, as I didn't close the terminal alias had stored the version as 2.7.15 although version 2.7.15+ was working backwards.

Thanks...

Offline