CoolProp - Octave 5.1

81 views
Skip to first unread message

Jeferson Avila Souza

unread,
May 11, 2020, 12:35:06 PM5/11/20
to coolprop-users
Dear all,

I'm trying to compile CoolProps wrapper for octave.

My system is:
Operating System: Linux
Distribution: CentOS 7
Octave version: 5.1 compiled from source on my system.

when I run the command "cmake .. -DCOOLPROP_OCTAVE_MODULE=ON -DBUILD_TESTING=ON -DCMAKE_CXX_STANDARD=11" the following error occurs


-------------------------------------------------------------------------------------------------------------------------------------------------------
-- OCTAVE_LIBRARIES=OCTAVE_OCTAVE_LIBRARY-NOTFOUND;OCTAVE_OCTINTERP_LIBRARY-NOTFOUND
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
OCTAVE_OCTAVE_LIBRARY
    linked by target "CoolProp" in directory /localHome2/compilations/CoolProp
OCTAVE_OCTINTERP_LIBRARY
    linked by target "CoolProp" in directory /localHome2/compilations/CoolProp

-- Configuring incomplete, errors occurred!

-------------------------------------------------------------------------------------------------------------------------------------------------------

I have also attached the CMakeOutput.log and CMakeError.log files,

Thanks.
CMakeOutput.log
CMakeError.log

Ian Bell

unread,
May 11, 2020, 8:31:46 PM5/11/20
to coolpro...@googlegroups.com
On octave 5.1, on OSX, build works fine without the C+11 flag:   http://www.coolprop.dreamhosters.com:8010/builders/Octave-OSX/builds/2502 

Maybe the issue is your compiled version of Octave? I would recommend to start with the pre-built binaries of octave before throwing another level of complexity in there with compilation from source.  

Ian

--
You received this message because you are subscribed to the Google Groups "coolprop-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to coolprop-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/coolprop-users/66619b2e-304b-4c39-880f-3b5ce84afca4%40googlegroups.com.

Ian Bell

unread,
May 11, 2020, 8:33:10 PM5/11/20
to coolpro...@googlegroups.com
What version of compiler are you using?  Hopefully something relatively modern, so that it has the shared_ptr in the std namespace.

Jeferson Avila Souza

unread,
May 11, 2020, 10:15:55 PM5/11/20
to coolpro...@googlegroups.com
Hi,

I'm using

gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-39) and cmake version 2.8.12.2.

I've checked on the web and it seams to give support to shared_ptr under the compilation instruction -std=c++11.

Should I upgrade the compiler? It compiles CoolProps with no  problems with the octave 3.8 installed from epel repository.

Thanks for the quick response.



--
*****************************************************************
Prof. Jeferson Avila Souza

Escola de Engenharia
FURG - Universidade Federal do Rio Grande
Av. Italia, km 08 S/N
CEP 96203-900 - Campus Carreiros
Rio Grande - RS - Brasil
Tel: + 55 53 3233-6883
http://lattes.cnpq.br/5324300115339036
http://www.researcherid.com/rid/B-6398-2008
*****************************************************************

Ian Bell

unread,
May 11, 2020, 11:04:54 PM5/11/20
to coolpro...@googlegroups.com
Yes, I would upgrade your g++ to something newer to avoid this shared_ptr issue.

Jeferson Avila Souza

unread,
May 12, 2020, 3:22:22 PM5/12/20
to coolpro...@googlegroups.com
Hy,

I have upgrade gcc to version 10.1. My system recognizes it as the default compiler, however CoolProp does not.

...
-- COOLPROP_INSTALL_PREFIX=/localHome2/compilations/CoolProp/install_root
-- The C compiler identification is GNU 4.8.5
-- The CXX compiler identification is GNU 4.8.5
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
...

How can I specify the compiler in CooProp compilation instructions?

Thanks,

Jeferson Avila Souza

unread,
May 12, 2020, 6:46:16 PM5/12/20
to coolpro...@googlegroups.com
Hi Ian,

I solved the problem with gcc, however same error occurs

-------------------------------------------------------------------------------------------------------
-- COOLPROP_INSTALL_PREFIX=/localHome2/compilations/CoolProp/install_root
-- The C compiler identification is GNU 10.1.0
-- The CXX compiler identification is GNU 10.1.0
-- Check for working C compiler: /usr/local/bin/gcc
-- Check for working C compiler: /usr/local/bin/gcc -- works

-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/local/bin/c++
-- Check for working CXX compiler: /usr/local/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- CoolProp version: 6.4.0
-- Found PythonInterp: /usr/bin/python2.7 (found suitable version "2.7.5", minimum required is "2.7")
-- Found LibDL: /usr/lib64/libdl.so  
-- Looking for C++ include memory
-- Looking for C++ include memory - found
-- Performing Test HAVE_SHARED_PTR_IN_STD_NAMESPACE
-- Performing Test HAVE_SHARED_PTR_IN_STD_NAMESPACE - Success
-- Found shared_ptr in std namespace using <memory> header.
-- Found SWIG: /usr/bin/swig (found version "2.0.10")
-- Found mkoctfile executable
warning: LFLAGS is deprecated and will be removed in a future version of Octave, use LDFLAGS instead
-- Found octave-config executable
-- OCTAVE_VERSION=5.1.0
-- OCTAVE_OCTAVE_LIBRARY=OCTAVE_OCTAVE_LIBRARY-NOTFOUND
-- OCTAVE_OCTINTERP_LIBRARY=OCTAVE_OCTINTERP_LIBRARY-NOTFOUND
-- OCTAVE_CXXFLAGS=-I/usr/local/OCTAVE/5.1.0/include/octave-5.1.0/octave/.. -I/usr/local/OCTAVE/5.1.0/include/octave-5.1.0/octave -I/usr/local/OCTAVE/5.1.0/include  -pthread -fopenmp -g -O2
-- OCTAVE_LINK_FLAGS= -fPIC  
-- OCTAVE_INCLUDE_DIRS=;/usr/local/OCTAVE/5.1.0/include/octave-5.1.0/octave/..;;/usr/local/OCTAVE/5.1.0/include/octave-5.1.0/octave;;/usr/local/OCTAVE/5.1.0/include;
-- OCTAVE_LINK_DIRS=;/usr/local/OCTAVE/5.1.0/lib;
-- OCTAVE_LIBRARY=util;m;octinterp;octave
-- OCTAVE_LIBRARY_RELEASE=util;m;octinterp;octave
-- OCTAVE_LIBRARY_DEBUG=util;m;octinterp;octave
-- OCTAVE_LIBRARIES=OCTAVE_OCTAVE_LIBRARY-NOTFOUND;OCTAVE_OCTINTERP_LIBRARY-NOTFOUND
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
OCTAVE_OCTAVE_LIBRARY
    linked by target "CoolProp" in directory /localHome2/compilations/CoolProp
OCTAVE_OCTINTERP_LIBRARY
    linked by target "CoolProp" in directory /localHome2/compilations/CoolProp

-- Configuring incomplete, errors occurred!
See also "/localHome2/compilations/CoolProp/build/CMakeFiles/CMakeOutput.log".
---------------------------------------------------------------------------------------------------------------------------------

Any ideas?

On Tue, May 12, 2020 at 12:04 AM Ian Bell <ian.h...@gmail.com> wrote:

Ian Bell

unread,
May 13, 2020, 7:18:24 PM5/13/20
to coolpro...@googlegroups.com
Can you please confirm that build is successful with the standard octave first?  The failure you have suggests a misconfiguration of your octave installation, or at least a configuration that confuses the CMake code that tries to locate the libraries associated with octave, which is the failure you see there.  These things are all quite fragile, and sometimes CMake need some additional handholding for even very small changes.


Ian Bell

unread,
May 13, 2020, 7:41:21 PM5/13/20
to coolpro...@googlegroups.com
I just confirmed that build is fine with ubuntu 20.04, octave 5.2.  Inside a docker container:

apt-get update && apt-get install octave cmake git g++ swig liboctave-dev
git clone --recursive --shallow-submodules https://github.com/coolprop/coolprop
cd coolprop/
mkdir bld
cd bld
cmake .. -DCOOLPROP_OCTAVE_MODULE=ON -DPYTHON_EXECUTABLE=/usr/bin/python3
cmake --build .

Jeferson Avila Souza

unread,
May 14, 2020, 7:14:44 PM5/14/20
to coolpro...@googlegroups.com
Hi Ian,

yes, it compiles well with octave 3.8  installed from the centos repository.

I manage to solve the problem with the configuration step fixing the PATHS at "dev/cmake/Modules/FindOctave.cmake".

I was happy, but... Something went wrong on the compilation step. I'm sending attached the log file.

I yet did not have time to try the docker option.

Thanks,

coolProf.log

Ian Bell

unread,
May 14, 2020, 9:31:09 PM5/14/20
to coolpro...@googlegroups.com
Again, something seems to be up with your home-built octave, I would upgrade to the distro-provided one.  Is there a particular reason you built it yourself other than curiosity?



Jeferson Avila Souza

unread,
May 18, 2020, 7:37:59 PM5/18/20
to coolpro...@googlegroups.com
Hi Ian,

i've been kind of busy. I did not have time to try anything else with CoolProps.

I use CentOS, which is really, really stable. Besides, its long term life is 10 years, so it is easy to keep my lab working without continuous upgrades.

Bad thing about CentOS is that some packages ares old (very old).  Newest version of octave for CentOS 7 is 3.8.

CoolProp works fine with octave 3.8, however some of my student need a new version of octave. This is the reason I have compiled it from source. I've tried the flatHub distribution, however I got same CoolProps compilation errors.

Best wishes,

Ian Bell

unread,
May 18, 2020, 8:20:03 PM5/18/20
to coolpro...@googlegroups.com
But new distros of Ubuntu, for instance, are also really very stable.  And don't lock you into ancient versions of things.  Can you install docker into centos 7?  If so then your can get the best of both worlds, either centOS in ubuntu, or vice versa.

Jeferson Avila Souza

unread,
May 18, 2020, 8:27:16 PM5/18/20
to coolpro...@googlegroups.com
Yes, I can install docker. However this is the first time a need it. I'll do it and try again with octave and CoolProp.

Ian Bell

unread,
May 18, 2020, 9:00:37 PM5/18/20
to coolpro...@googlegroups.com
Please do - I think that might be your best bet. Or something similar.

Jeferson Avila Souza

unread,
May 27, 2020, 8:09:43 PM5/27/20
to coolpro...@googlegroups.com
Hi Ian,

it is me again.

Docker is installed and working, octave is installed and working, but now I got another error. I think I need development libraries (liboctave-dev in ubuntu) and I could not install them in docker. Current error is:

cmake .. -DCOOLPROP_OCTAVE_MODULE=ON -DBUILD_TESTING=ON -DCMAKE_CXX_STANDARD=11
-- COOLPROP_INSTALL_PREFIX=/localHome2/compilations/CoolProp/install_root
-- The C compiler identification is GNU 10.1.0
-- The CXX compiler identification is GNU 10.1.0
-- Check for working C compiler: /usr/local/bin/gcc
-- Check for working C compiler: /usr/local/bin/gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/local/bin/c++
-- Check for working CXX compiler: /usr/local/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- CoolProp version: 6.4.1dev

-- Found PythonInterp: /usr/bin/python2.7 (found suitable version "2.7.5", minimum required is "2.7")
-- Found LibDL: /usr/lib64/libdl.so  
-- Looking for C++ include memory
-- Looking for C++ include memory - found
-- Performing Test HAVE_SHARED_PTR_IN_STD_NAMESPACE
-- Performing Test HAVE_SHARED_PTR_IN_STD_NAMESPACE - Success
-- Found shared_ptr in std namespace using <memory> header.
-- Found SWIG: /usr/bin/swig (found version "2.0.10")
CMake Error at dev/cmake/Modules/FindOctave.cmake:130 (message):
  Unable to find mkoctfile executable
Call Stack (most recent call first):
  CMakeLists.txt:891 (FIND_PACKAGE)



-- Configuring incomplete, errors occurred!

Ian Bell

unread,
May 27, 2020, 11:20:53 PM5/27/20
to coolpro...@googlegroups.com
What's wrong with installing liboctave-dev inside your container?  Are you using Ubuntu 18.04?

Reply all
Reply to author
Forward
0 new messages