usnistgov/REFPROP-cmake

Build Fail on Ubuntu 20.04.6 LTS

Marchonq opened this issue · 5 comments

I am trying to compile on a linux system, but I encounter problems at the last step. The output is

[  3%] About to build the REFPROP.h header file w/ /root/miniconda3/bin/python;-u;/opt/REFPROP-cmake/externals/REFPROP-headers/generate_header.py;--FORTRAN-path;/opt/REFPROP-cmake/build/FORTRAN_temp;--python-exe;/root/miniconda3/bin/python
Writing the .pyf file with numpy.f2py, please be patient...
About to run: /root/miniconda3/bin/python -m numpy.f2py --quiet --no-lower -h REFPROP.pyf /opt/REFPROP-cmake/build/FORTRAN_temp/PASS_FTN.FOR
numpy version: 1.23.5
Traceback (most recent call last):
  File "/opt/REFPROP-cmake/externals/REFPROP-headers/generate_header.py", line 183, in <module>
    generate_interface_file(valid_paths[0], 'REFPROP.pyf', python_exe = args.python_exe[0])
  File "/opt/REFPROP-cmake/externals/REFPROP-headers/generate_header.py", line 26, in generate_interface_file
    raise ValueError('Unable to call f2py successfully: '+str(err))
ValueError: Unable to call f2py successfully: b'Traceback (most recent call last):\n  File "/root/miniconda3/lib/python3.8/runpy.py", line 194, in _run_module_as_main\n    return _run_code(code, main_globals, None,\n  File "/root/miniconda3/lib/python3.8/runpy.py", line 87, in _run_code\n    exec(code, run_globals)\n  File "/root/miniconda3/lib/python3.8/site-packages/numpy/f2py/__main__.py", line 5, in <module>\n    main()\n  File "/root/miniconda3/lib/python3.8/site-packages/numpy/f2py/f2py2e.py", line 704, in main\n    run_main(sys.argv[1:])\n  File "/root/miniconda3/lib/python3.8/site-packages/numpy/f2py/f2py2e.py", line 441, in run_main\n    postlist = callcrackfortran(files, options)\n  File "/root/miniconda3/lib/python3.8/site-packages/numpy/f2py/f2py2e.py", line 342, in callcrackfortran\n    postlist = crackfortran.crackfortran(files)\n  File "/root/miniconda3/lib/python3.8/site-packages/numpy/f2py/crackfortran.py", line 3262, in crackfortran\n    readfortrancode(files, crackline)\n  File "/root/miniconda3/lib/python3.8/site-packages/numpy/f2py/crackfortran.py", line 507, in readfortrancode\n    readfortrancode(fn1, dowithline=dowithline, istop=0)\n  File "/root/miniconda3/lib/python3.8/site-packages/numpy/f2py/crackfortran.py", line 513, in readfortrancode\n    dowithline(finalline)\n  File "/root/miniconda3/lib/python3.8/site-packages/numpy/f2py/crackfortran.py", line 817, in crackline\n    analyzeline(m, pat[1], line)\n  File "/root/miniconda3/lib/python3.8/site-packages/numpy/f2py/crackfortran.py", line 1241, in analyzeline\n    for e in markoutercomma(ll).split(\'@,@\'):\n  File "/root/miniconda3/lib/python3.8/site-packages/numpy/f2py/crackfortran.py", line 854, in markoutercomma\n    assert not f, repr((f, line, l))\nAssertionError: (-1, \'ncmax=20)     !max number of components in mixtur\', \'ncmax=20)     !max number of components in mixtur\')\n'
make[2]: *** [CMakeFiles/REFPROP_H.dir/build.make:61: REFPROP.h.stamp] Error 1
make[1]: *** [CMakeFiles/Makefile2:78: CMakeFiles/REFPROP_H.dir/all] Error 2
make: *** [Makefile:84: all] Error 2

I have no idea about what is going on, maybe versioning problems? I will be happy if someone could help me with this issue.

What version of REFPROP? What version of linux? Etc... Please give us more information so we can help you.

Thanks for timely reply, my environment versions are:

  • Refprop DLL version 10.0
  • Ubuntu 20.04.6 LTS (GNU/Linux 5.4.0-126-generic x86_64)
  • python 3.8.10
  • numpy 1.22.4
  • cmake version 3.16.3
  • GNU Fortran (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0

Please show the commands you ran at the command line and the shell output you received

These are the command line output:

/opt/REFPROP-cmake# cd build

/opt/REFPROP-cmake/build# cmake .. -DCMAKE_BUILD_TYPE=Release -DPYTHON_EXECUTABLE:FILEPATH=/root/miniconda3/bin/python
-- The C compiler identification is GNU 9.4.0
-- The CXX compiler identification is GNU 9.4.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- The Fortran compiler identification is GNU 9.4.0
-- Check for working Fortran compiler: /usr/bin/gfortran
-- Check for working Fortran compiler: /usr/bin/gfortran  -- works
-- Detecting Fortran compiler ABI info
-- Detecting Fortran compiler ABI info - done
-- Checking whether /usr/bin/gfortran supports Fortran 90
-- Checking whether /usr/bin/gfortran supports Fortran 90 -- yes
-- Found PythonInterp: /root/miniconda3/bin/python (found version "3.8.10") 
-- DEFSYM_FLAG: --using-defsym
-- REFPROP version <= 9.1 identified by presence of include "'commons.for'"; copying locally and fixing include statement
-- Fixing of FORTRAN files complete. Compilation ready.
-- Set REFPROP_FORTRAN_ABS_PATH to /opt/REFPROP-cmake/build/FORTRAN_temp
-- Configuring done
-- Generating done
-- Build files have been written to: /opt/REFPROP-cmake/build

/opt/REFPROP-cmake/build# cmake --build .
Scanning dependencies of target REFPROP_H
[  3%] About to build the REFPROP.h header file w/ /root/miniconda3/bin/python;-u;/opt/REFPROP-cmake/externals/REFPROP-headers/generate_header.py;--FORTRAN-path;/opt/REFPROP-cmake/build/FORTRAN_temp;--python-exe;/root/miniconda3/bin/python
Writing the .pyf file with numpy.f2py, please be patient...
About to run: /root/miniconda3/bin/python -m numpy.f2py --quiet --no-lower -h REFPROP.pyf /opt/REFPROP-cmake/build/FORTRAN_temp/PASS_FTN.FOR
numpy version: 1.23.5
Traceback (most recent call last):
  File "/opt/REFPROP-cmake/externals/REFPROP-headers/generate_header.py", line 183, in <module>
    generate_interface_file(valid_paths[0], 'REFPROP.pyf', python_exe = args.python_exe[0])
  File "/opt/REFPROP-cmake/externals/REFPROP-headers/generate_header.py", line 26, in generate_interface_file
    raise ValueError('Unable to call f2py successfully: '+str(err))
ValueError: Unable to call f2py successfully: b'Traceback (most recent call last):\n  File "/root/miniconda3/lib/python3.8/runpy.py", line 194, in _run_module_as_main\n    return _run_code(code, main_globals, None,\n  File "/root/miniconda3/lib/python3.8/runpy.py", line 87, in _run_code\n    exec(code, run_globals)\n  File "/root/miniconda3/lib/python3.8/site-packages/numpy/f2py/__main__.py", line 5, in <module>\n    main()\n  File "/root/miniconda3/lib/python3.8/site-packages/numpy/f2py/f2py2e.py", line 704, in main\n    run_main(sys.argv[1:])\n  File "/root/miniconda3/lib/python3.8/site-packages/numpy/f2py/f2py2e.py", line 441, in run_main\n    postlist = callcrackfortran(files, options)\n  File "/root/miniconda3/lib/python3.8/site-packages/numpy/f2py/f2py2e.py", line 342, in callcrackfortran\n    postlist = crackfortran.crackfortran(files)\n  File "/root/miniconda3/lib/python3.8/site-packages/numpy/f2py/crackfortran.py", line 3262, in crackfortran\n    readfortrancode(files, crackline)\n  File "/root/miniconda3/lib/python3.8/site-packages/numpy/f2py/crackfortran.py", line 507, in readfortrancode\n    readfortrancode(fn1, dowithline=dowithline, istop=0)\n  File "/root/miniconda3/lib/python3.8/site-packages/numpy/f2py/crackfortran.py", line 513, in readfortrancode\n    dowithline(finalline)\n  File "/root/miniconda3/lib/python3.8/site-packages/numpy/f2py/crackfortran.py", line 817, in crackline\n    analyzeline(m, pat[1], line)\n  File "/root/miniconda3/lib/python3.8/site-packages/numpy/f2py/crackfortran.py", line 1241, in analyzeline\n    for e in markoutercomma(ll).split(\'@,@\'):\n  File "/root/miniconda3/lib/python3.8/site-packages/numpy/f2py/crackfortran.py", line 854, in markoutercomma\n    assert not f, repr((f, line, l))\nAssertionError: (-1, \'ncmax=20)     !max number of components in mixtur\', \'ncmax=20)     !max number of components in mixtur\')\n'
make[2]: *** [CMakeFiles/REFPROP_H.dir/build.make:61: REFPROP.h.stamp] Error 1
make[1]: *** [CMakeFiles/Makefile2:78: CMakeFiles/REFPROP_H.dir/all] Error 2
make: *** [Makefile:84: all] Error 2