Compiling cantera on Windows10 with mingw64

213 views
Skip to first unread message

ste....@gmail.com

unread,
Jan 15, 2021, 5:03:29 AM1/15/21
to Cantera Users' Group
Hello everyone,

I am trying to compile cantera on Windows 10 using mingw64 with the submodules for the SUNDIALS library.

I use the following command:

scons prefix=/mingw64/ versioned_shared_library=n system_sundials=n

Everything work fine until the generation of the build/lib/msys-cantera_shared.dll when I get the following problem:

C:/Users/Stefano/Documents/ASALI/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: build/ext/sundials/src/sunmatrix/dense/fsunmatrix_dense.os:C:\Users\Stefano\Documents\ASALI\msys64\home\Stefano\NumericalLibraries\cantera/ext/sundials/src/sunmatrix/dense/fsunmatrix_dense.c:29: multiple definition of `F2C_IDA_matrix'; build/ext/sundials/src/sunmatrix/band/fsunmatrix_band.os:C:\Users\Stefano\Documents\ASALI\msys64\home\Stefano\NumericalLibraries\cantera/ext/sundials/src/sunmatrix/band/fsunmatrix_band.c:29: first defined here

and it is related to a multiple definition in sundials library.

Please can anyone help me with this issue?

Best regards,

Stefano


Bryan W. Weber

unread,
Jan 15, 2021, 10:58:42 AM1/15/21
to Cantera Users' Group
Hi Stefano,

How did you get Cantera's source code?

Best,
Bryan

Stefano Rebughini

unread,
Jan 15, 2021, 11:28:16 AM1/15/21
to canter...@googlegroups.com
From github with git clone. Using the master branch 

--
You received this message because you are subscribed to a topic in the Google Groups "Cantera Users' Group" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/cantera-users/p071f3P8Cco/unsubscribe.
To unsubscribe from this group and all its topics, send an email to cantera-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/cantera-users/88a5451e-4360-4f89-8b05-a9987578cf8dn%40googlegroups.com.

ste....@gmail.com

unread,
Feb 4, 2021, 9:52:15 AM2/4/21
to Cantera Users' Group
Hey,

I got the same problem while trying to compile cantera on a docker with alpine. The dockerfile is:

FROM alpine:latest

ENV DEBIAN_FRONTEND=noninteractive

RUN apk add --no-cache g++ \
gfortran \
git \
boost-dev \
gtkmm \
python3 \
cython \
make \
scons \
py3-setuptools \
&& mkdir /app \
&& mkdir /app/cantera \
&& mkdir /app/asali \
&& git clone https://github.com/Cantera/cantera.git /app/cantera/.

WORKDIR /app/cantera
RUN scons build system_sundials=n python_package=minimal cc_flags='-Os -s' matlab_toolbox=n doxygen_docs=n sphinx_docs=n debug=n && scons install

The problem seems related to the _shared libraries (g++ -o build/lib/libcantera_shared.so.2.5.0 ). Can anyone help me?

Cheers,

Stefano

Ingmar Schoegl

unread,
Feb 4, 2021, 12:00:09 PM2/4/21
to Cantera Users' Group
Ciao Stefano,

Interesting to see that you're building on docker (which I myself have been using for the development branch for some time). While I'm basing my toolchain on ubuntu, it works without problems. My Dockerfile is on GitHub (see https://github.com/ischoegl/cantera-docker) ... comments are rudimentary (sorry). Let me know,

-ingmar-

ste....@gmail.com

unread,
Feb 4, 2021, 4:01:26 PM2/4/21
to Cantera Users' Group
Hey,

Yeah I tried to do something similar to your repo by using ubuntu:20.04 as basic image.
I have to check by using ubuntu:toolchain, but with ubuntu:20.04 the final image dimension is around 1GB.
I decided to move to alpine to reduce the size of the image, but I run into the compiling error showed above.

I think that there is some compiler option difference between the standard ubuntu and alpine or mingw64.

Cheers

Ray Speth

unread,
Feb 7, 2021, 5:19:09 PM2/7/21
to Cantera Users' Group
Hi Stefano,

Thanks for reporting this problem. It looks like there was a bug in our process for embedding Sundials within the Cantera library. I pushed a fix for this (https://github.com/Cantera/cantera/pull/973), which is now included in current master branch. I think this fix should resolve a similar issue which I think was reported on macOS as well.

Regards,
Ray

On Friday, January 15, 2021 at 5:03:29 AM UTC-5 ste....@gmail.com wrote:

ste....@gmail.com

unread,
Jun 3, 2021, 7:53:59 AM6/3/21
to Cantera Users' Group
Hello Ray,

thank you so much for fixing that issue. I have found another problem related to Cantera v2.5 on Mingw-w64. I try to compile cantera using the following command:

scons build system_sundials=n python_package=minimal cc_flags='-Os' matlab_toolbox=n doxygen_docs=n sphinx_docs=n debug=n toolchain=mingw VERBOSE=y

and I get the following output:

Propagating environment variable PATH=C:\Users\rebughinis\Documents\myCode\msys64\mingw64\bin;C:\Users\rebughinis\Documents\myCode\msys64\usr\local\bin;C:\Users\rebughinis\Documents\myCode\msys64\usr\bin;C:\Users\rebughinis\Documents\myCode\msys64\usr\bin;C:\Windows\System32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Users\rebughinis\Documents\myCode\msys64\usr\bin\site_perl;C:\Users\rebughinis\Documents\myCode\msys64\usr\bin\vendor_perl;C:\Users\rebughinis\Documents\myCode\msys64\usr\bin\core_perl;C:\Users\rebughinis\Documents\myCode\msys64\mingw64\bin\
Checking for C++ header file cmath... yes
Checking for C++ header file fmt/ostream.h... yes
INFO: Using system installation of fmt library.
".sconf_temp" non è riconosciuto come comando interno o esterno,
 un programma eseguibile o un file batch.
INFO: Could not find version of fmt
Checking for C++ header file yaml-cpp/yaml.h... yes
INFO: Using system installation of yaml-cpp library.
Checking for C++ header file gtest/gtest.h... no
Checking for C++ header file gmock/gmock.h... no
Submodule 'ext/googletest' (https://github.com/google/googletest.git) registered for path 'ext/googletest'
Cloning into '/home/rebughinis/cantera/ext/googletest'...
Percorso del sottomodulo 'ext/googletest': eseguito checkout di '703bd9caab50b139428cea1aaff9974ebee5742e'
INFO: Using Googletest from Git submodule
Checking for C++ header file Eigen/Dense... no
INFO: Using private installation of Eigen.
Submodule 'ext/eigen' (https://gitlab.com/libeigen/eigen.git/) registered for path 'ext/eigen'
Cloning into '/home/rebughinis/cantera/ext/eigen'...
Percorso del sottomodulo 'ext/eigen': eseguito checkout di '21ae2afd4edaa1b69782c67a54182d34efe43f9c'
".sconf_temp" non è riconosciuto come comando interno o esterno,
 un programma eseguibile o un file batch.
INFO: Found Eigen version
Checking whether __GLIBCXX__ is declared... yes
Checking whether __clang__ is declared... no
Checking for C++ library omp... yes
".sconf_temp" non è riconosciuto come comando interno o esterno,
 un programma eseguibile o un file batch.
INFO: Found Boost version
ERROR: Boost could not be found. Install Boost headers or set 'boost_inc_dir' to point to the boost headers.
************************* Contents of config.log: *************************
file C:/Users/rebughinis/Documents/myCode/msys64/home/rebughinis/cantera/SConstruct,line 842:
        Configure(confdir = .sconf_temp)
scons: Configure: Checking for C++ header file cmath...
.sconf_temp/conftest_4501b9bf892a8ba32d6185db437667f6_0.cpp <-
  |
  |#include <cmath>
  |
  |
g++ -o .sconf_temp/conftest_4501b9bf892a8ba32d6185db437667f6_0_d536d66df0703fe3cfe07069f2efbf5e.o -c -std=c++0x -Os -O3 -Wno-inline -DNDEBUG .sconf_temp/conftest_4501b9bf892a8ba32d6185db437667f6_0.cpp
scons: Configure: yes

scons: Configure: Checking for C++ header file fmt/ostream.h...
.sconf_temp/conftest_47a251b1599bba84065578e8b262cbf9_0.cpp <-
  |
  |#include "fmt/ostream.h"
  |
  |
g++ -o .sconf_temp/conftest_47a251b1599bba84065578e8b262cbf9_0_5e9dc881200078683e26d00e37be4bd8.o -c -std=c++0x -Os -O3 -Wno-inline -DNDEBUG .sconf_temp/conftest_47a251b1599bba84065578e8b262cbf9_0.cpp
scons: Configure: yes

.sconf_temp/conftest_3336a521964a4b5296cce0a4165ba292_0.cpp <-
  |#include <fmt/format.h>
  |#define Q(x) #x
  |#define QUOTE(x) Q(x)
  |#include <iostream>
  |#ifndef SUNDIALS_PACKAGE_VERSION
  |#define SUNDIALS_PACKAGE_VERSION SUNDIALS_VERSION
  |#endif
  |int main(int argc, char** argv) {
  |    std::cout << FMT_VERSION << std::endl;
  |    return 0;
  |}
  |
g++ -o .sconf_temp/conftest_3336a521964a4b5296cce0a4165ba292_0.o -c -std=c++0x -Os -O3 -Wno-inline -DNDEBUG .sconf_temp/conftest_3336a521964a4b5296cce0a4165ba292_0.cpp
g++ -o .sconf_temp/conftest_3336a521964a4b5296cce0a4165ba292_0_539d26698c4d2e80d5ee23f19c98f45d.exe -static-libgcc -static-libstdc++ .sconf_temp/conftest_3336a521964a4b5296cce0a4165ba292_0.o
.sconf_temp/conftest_3336a521964a4b5296cce0a4165ba292_0_539d26698c4d2e80d5ee23f19c98f45d.exe > .sconf_temp/conftest_3336a521964a4b5296cce0a4165ba292_0_539d26698c4d2e80d5ee23f19c98f45d.exe.out
scons: Configure: Checking for C++ header file yaml-cpp/yaml.h...
.sconf_temp/conftest_26160a4c996b5fbabcbfc8e0b97de254_0.cpp <-
  |
  |#include "yaml-cpp/yaml.h"
  |
  |
g++ -o .sconf_temp/conftest_26160a4c996b5fbabcbfc8e0b97de254_0_dc7928d3f5861c3e4fcd64f23f73afab.o -c -std=c++0x -Os -O3 -Wno-inline -DNDEBUG .sconf_temp/conftest_26160a4c996b5fbabcbfc8e0b97de254_0.cpp
scons: Configure: yes

scons: Configure: Checking for C++ header file gtest/gtest.h...
.sconf_temp/conftest_56ec5a054fca65531fcaacd0904ff277_0.cpp <-
  |
  |#include "gtest/gtest.h"
  |
  |
g++ -o .sconf_temp/conftest_56ec5a054fca65531fcaacd0904ff277_0_c9114517e258b3728d6077f8a72ff7b7.o -c -std=c++0x -Os -O3 -Wno-inline -DNDEBUG .sconf_temp/conftest_56ec5a054fca65531fcaacd0904ff277_0.cpp
.sconf_temp/conftest_56ec5a054fca65531fcaacd0904ff277_0.cpp:2:10: fatal error: gtest/gtest.h: No such file or directory
    2 | #include "gtest/gtest.h"
      |          ^~~~~~~~~~~~~~~
compilation terminated.
scons: Configure: no

scons: Configure: Checking for C++ header file gmock/gmock.h...
.sconf_temp/conftest_b364a5a11a827ae1c960e92df52823d0_0.cpp <-
  |
  |#include "gmock/gmock.h"
  |
  |
g++ -o .sconf_temp/conftest_b364a5a11a827ae1c960e92df52823d0_0_55f1b24986ac1ed3e48a1f20282b3d79.o -c -std=c++0x -Os -O3 -Wno-inline -DNDEBUG .sconf_temp/conftest_b364a5a11a827ae1c960e92df52823d0_0.cpp
.sconf_temp/conftest_b364a5a11a827ae1c960e92df52823d0_0.cpp:2:10: fatal error: gmock/gmock.h: No such file or directory
    2 | #include "gmock/gmock.h"
      |          ^~~~~~~~~~~~~~~
compilation terminated.
scons: Configure: no

scons: Configure: Checking for C++ header file Eigen/Dense...
.sconf_temp/conftest_376ce791d7e95b4673243658a29bb6d3_0.cpp <-
  |
  |#include <Eigen/Dense>
  |
  |
g++ -o .sconf_temp/conftest_376ce791d7e95b4673243658a29bb6d3_0_d957ee90ef7f4fa2ad2e5aceb07c0932.o -c -std=c++0x -Os -O3 -Wno-inline -DNDEBUG .sconf_temp/conftest_376ce791d7e95b4673243658a29bb6d3_0.cpp
.sconf_temp/conftest_376ce791d7e95b4673243658a29bb6d3_0.cpp:2:10: fatal error: Eigen/Dense: No such file or directory
    2 | #include <Eigen/Dense>
      |          ^~~~~~~~~~~~~
compilation terminated.
scons: Configure: no

.sconf_temp/conftest_81d99d0fd92df2a4ea9de961a124d44d_0.cpp <-
  |#include "../ext/eigen/Eigen/Core"
  |#define Q(x) #x
  |#define QUOTE(x) Q(x)
  |#include <iostream>
  |#ifndef SUNDIALS_PACKAGE_VERSION
  |#define SUNDIALS_PACKAGE_VERSION SUNDIALS_VERSION
  |#endif
  |int main(int argc, char** argv) {
  |    std::cout << QUOTE(EIGEN_WORLD_VERSION) "." QUOTE(EIGEN_MAJOR_VERSION) "." QUOTE(EIGEN_MINOR_VERSION) << std::endl;
  |    return 0;
  |}
  |
g++ -o .sconf_temp/conftest_81d99d0fd92df2a4ea9de961a124d44d_0.o -c -std=c++0x -Os -O3 -Wno-inline -DNDEBUG .sconf_temp/conftest_81d99d0fd92df2a4ea9de961a124d44d_0.cpp
g++ -o .sconf_temp/conftest_81d99d0fd92df2a4ea9de961a124d44d_0_4e3716aeea319afd905a96e43002ecd6.exe -static-libgcc -static-libstdc++ .sconf_temp/conftest_81d99d0fd92df2a4ea9de961a124d44d_0.o
.sconf_temp/conftest_81d99d0fd92df2a4ea9de961a124d44d_0_4e3716aeea319afd905a96e43002ecd6.exe > .sconf_temp/conftest_81d99d0fd92df2a4ea9de961a124d44d_0_4e3716aeea319afd905a96e43002ecd6.exe.out
scons: Configure: Checking whether __GLIBCXX__ is declared...
.sconf_temp/conftest_81157d56164e601ce8cb5ebba5cd37f2_0.cpp <-
  |#include <iostream>
  |int main(void)
  |{
  |#ifndef __GLIBCXX__
  |    (void) __GLIBCXX__;
  |#endif
  |    ;
  |    return 0;
  |}
  |
g++ -o .sconf_temp/conftest_81157d56164e601ce8cb5ebba5cd37f2_0_a5c807cf1699060dc758da48ad6dfc69.o -c -std=c++0x -Os -O3 -Wno-inline -DNDEBUG .sconf_temp/conftest_81157d56164e601ce8cb5ebba5cd37f2_0.cpp
scons: Configure: yes

scons: Configure: Checking whether __clang__ is declared...
.sconf_temp/conftest_3182f6c82f40ab93ba51816404ed6c8a_0.cpp <-
  |
  |int main(void)
  |{
  |#ifndef __clang__
  |    (void) __clang__;
  |#endif
  |    ;
  |    return 0;
  |}
  |
g++ -o .sconf_temp/conftest_3182f6c82f40ab93ba51816404ed6c8a_0_98347dfff46797e5b57fefd854022652.o -c -std=c++0x -Os -O3 -Wno-inline -DNDEBUG .sconf_temp/conftest_3182f6c82f40ab93ba51816404ed6c8a_0.cpp
.sconf_temp/conftest_3182f6c82f40ab93ba51816404ed6c8a_0.cpp: In function 'int main()':
.sconf_temp/conftest_3182f6c82f40ab93ba51816404ed6c8a_0.cpp:5:12: error: '__clang__' was not declared in this scope
    5 |     (void) __clang__;
      |            ^~~~~~~~~
scons: Configure: no

scons: Configure: Checking for C++ library omp...
.sconf_temp/conftest_7dba453c1672532b76c668bea998af51_0.cpp <-
  |
  |
  |#include "omp.h"
  |
  |int
  |main() {
  |
  |return 0;
  |}
  |
g++ -o .sconf_temp/conftest_7dba453c1672532b76c668bea998af51_0.o -c -std=c++0x -Os -O3 -Wno-inline -DNDEBUG .sconf_temp/conftest_7dba453c1672532b76c668bea998af51_0.cpp
g++ -o .sconf_temp/conftest_7dba453c1672532b76c668bea998af51_0_744252e6c7710d75035e36415cb22c49.exe -static-libgcc -static-libstdc++ .sconf_temp/conftest_7dba453c1672532b76c668bea998af51_0.o -lomp
scons: Configure: yes

.sconf_temp/conftest_18bce95123eb43c2d60218b36d10c048_0.cpp <-
  |#include <boost/version.hpp>
  |#define Q(x) #x
  |#define QUOTE(x) Q(x)
  |#include <iostream>
  |#ifndef SUNDIALS_PACKAGE_VERSION
  |#define SUNDIALS_PACKAGE_VERSION SUNDIALS_VERSION
  |#endif
  |int main(int argc, char** argv) {
  |    std::cout << BOOST_LIB_VERSION << std::endl;
  |    return 0;
  |}
  |
g++ -o .sconf_temp/conftest_18bce95123eb43c2d60218b36d10c048_0.o -c -std=c++0x -Os -O3 -Wno-inline -DNDEBUG .sconf_temp/conftest_18bce95123eb43c2d60218b36d10c048_0.cpp
g++ -o .sconf_temp/conftest_18bce95123eb43c2d60218b36d10c048_0_ddb2472d8b119275e29e833a7c0e8807.exe -static-libgcc -static-libstdc++ .sconf_temp/conftest_18bce95123eb43c2d60218b36d10c048_0.o -lomp
.sconf_temp/conftest_18bce95123eb43c2d60218b36d10c048_0_ddb2472d8b119275e29e833a7c0e8807.exe > .sconf_temp/conftest_18bce95123eb43c2d60218b36d10c048_0_ddb2472d8b119275e29e833a7c0e8807.exe.out

**************************** End of config.log ****************************


I've installed the boost libraries and the path for the header files is: /mingw64/include/

I think the problem might be with the enviormental variable PATH, which is generated with the "windows-style paths".

Could you help with this issue too?

Thank you so much,

Bests

Stefano

Bryan Weber

unread,
Jun 3, 2021, 12:58:41 PM6/3/21
to Cantera Users' Group
Hi,

The error message suggests what to do: ERROR: Boost could not be found. Install Boost headers or set 'boost_inc_dir' to point to the boost headers

You need to set the 'boost_inc_dir' variable in cantera.conf to point to the location of the Boost headers.

Best,
Bryan

ste....@gmail.com

unread,
Jun 3, 2021, 5:04:59 PM6/3/21
to Cantera Users' Group
Hi,

I have already tried that and it is not working. I have tried to compile cantera using scons 3.1.2 instead of scons 4.0.1 and here is the output:

# scons build system_sundials=n VERBOSE=y
scons: Reading SConscript files ...
INFO: SCons is using the following Python interpreter: /usr/bin/python.exe
Configuration variables read from 'cantera.conf' and command line:
    system_sundials = 'n'
    VERBOSE = True

Propagating environment variable PATH=/mingw64/bin:/usr/local/bin:/usr/bin:/bin:/c/Windows/System32:/c/Windows:/c/Windows/System32/Wbem:/c/Windows/System32/WindowsPowerShell/v1.0/:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl

Checking for C++ header file cmath... yes
Checking for C++ header file fmt/ostream.h... no
INFO: Using private installation of fmt library.
Submodule 'ext/fmt' (https://github.com/fmtlib/fmt.git) registered for path 'ext/fmt'
Cloning into '/home/Stefano/NumericalLibraries/cantera-v25/ext/fmt'...
Percorso del sottomodulo 'ext/fmt': eseguito checkout di '19bd751020a1f3c3363b2eb67a039852f139a8d3'
INFO: Found fmt version 6.2.1
Checking for C++ header file yaml-cpp/yaml.h... no
INFO: Using private installation of yaml-cpp library.
Submodule 'ext/yaml-cpp' (https://github.com/jbeder/yaml-cpp.git) registered for path 'ext/yaml-cpp'
Cloning into '/home/Stefano/NumericalLibraries/cantera-v25/ext/yaml-cpp'...
Percorso del sottomodulo 'ext/yaml-cpp': eseguito checkout di '012269756149ae99745b6dafefd415843d7420bb'

Checking for C++ header file gtest/gtest.h... no
Checking for C++ header file gmock/gmock.h... no
Submodule 'ext/googletest' (https://github.com/google/googletest.git) registered for path 'ext/googletest'
Cloning into '/home/Stefano/NumericalLibraries/cantera-v25/ext/googletest'...

Percorso del sottomodulo 'ext/googletest': eseguito checkout di '703bd9caab50b139428cea1aaff9974ebee5742e'
INFO: Using Googletest from Git submodule
Checking for C++ header file Eigen/Dense... no
INFO: Using private installation of Eigen.
Submodule 'ext/eigen' (https://gitlab.com/libeigen/eigen.git/) registered for path 'ext/eigen'
Cloning into '/home/Stefano/NumericalLibraries/cantera-v25/ext/eigen'...

Percorso del sottomodulo 'ext/eigen': eseguito checkout di '21ae2afd4edaa1b69782c67a54182d34efe43f9c'
INFO: Found Eigen version 3.3.7

Checking whether __GLIBCXX__ is declared... yes
Checking whether __clang__ is declared... no
Checking for C++ library omp... no
INFO: Found Boost version 1.75
Checking whether boost::core::demangle is declared... yes
Checking for CVodeCreate(CV_BDF, CV_NEWTON) in C++ library sundials_cvodes... no
Checking for CVodeCreate(CV_BDF) in C++ library sundials_cvodes... no
Submodule 'ext/sundials' (https://github.com/LLNL/sundials) registered for path 'ext/sundials'
Cloning into '/home/Stefano/NumericalLibraries/cantera-v25/ext/sundials'...
Percorso del sottomodulo 'ext/sundials': eseguito checkout di '887af4374af2271db9310d31eaa9b5aeff49e829'
Checking for double x; log(x) in C library None... yes
INFO: Using private installation of Sundials version 5.3.
INFO: Using 'gfortran' to build the Fortran 90 interface
-------------------- begin config.log --------------------
file /home/Stefano/NumericalLibraries/cantera-v25/SConstruct,line 842:

        Configure(confdir = .sconf_temp)
scons: Configure: Checking for C++ header file cmath...
.sconf_temp/conftest_0.cpp <-
  |
  |#include <cmath>
  |
  |
g++ -o .sconf_temp/conftest_0.o -c -std=c++0x -pthread -O3 -Wno-inline -g -DNDEBUG .sconf_temp/conftest_0.cpp

scons: Configure: yes

scons: Configure: Checking for C++ header file fmt/ostream.h...
.sconf_temp/conftest_1.cpp <-
  |
  |#include "fmt/ostream.h"
  |
  |
g++ -o .sconf_temp/conftest_1.o -c -std=c++0x -pthread -O3 -Wno-inline -g -DNDEBUG .sconf_temp/conftest_1.cpp
.sconf_temp/conftest_1.cpp:2:10: fatal error: fmt/ostream.h: No such file or directory
    2 | #include "fmt/ostream.h"

      |          ^~~~~~~~~~~~~~~
compilation terminated.
scons: Configure: no

.sconf_temp/conftest_2.cpp <-
  |#include "../ext/fmt/include/fmt/format.h"

  |#define Q(x) #x
  |#define QUOTE(x) Q(x)
  |#include <iostream>
  |#ifndef SUNDIALS_PACKAGE_VERSION
  |#define SUNDIALS_PACKAGE_VERSION SUNDIALS_VERSION
  |#endif
  |int main(int argc, char** argv) {
  |    std::cout << FMT_VERSION << std::endl;
  |    return 0;
  |}
  |
g++ -o .sconf_temp/conftest_2.o -c -std=c++0x -pthread -O3 -Wno-inline -g -DNDEBUG .sconf_temp/conftest_2.cpp
g++ -o .sconf_temp/conftest_2.exe -Wl,-no-undefined -pthread .sconf_temp/conftest_2.o
.sconf_temp/conftest_2.exe > .sconf_temp/conftest_2.exe.out

scons: Configure: Checking for C++ header file yaml-cpp/yaml.h...
.sconf_temp/conftest_3.cpp <-
  |
  |#include "yaml-cpp/yaml.h"
  |
  |
g++ -o .sconf_temp/conftest_3.o -c -std=c++0x -pthread -O3 -Wno-inline -g -DNDEBUG .sconf_temp/conftest_3.cpp
.sconf_temp/conftest_3.cpp:2:10: fatal error: yaml-cpp/yaml.h: No such file or directory
    2 | #include "yaml-cpp/yaml.h"
      |          ^~~~~~~~~~~~~~~~~

compilation terminated.
scons: Configure: no

scons: Configure: Checking for C++ header file gtest/gtest.h...
.sconf_temp/conftest_4.cpp <-
  |
  |#include "gtest/gtest.h"
  |
  |
g++ -o .sconf_temp/conftest_4.o -c -std=c++0x -pthread -O3 -Wno-inline -g -DNDEBUG .sconf_temp/conftest_4.cpp
.sconf_temp/conftest_4.cpp:2:10: fatal error: gtest/gtest.h: No such file or directory

    2 | #include "gtest/gtest.h"
      |          ^~~~~~~~~~~~~~~
compilation terminated.
scons: Configure: no

scons: Configure: Checking for C++ header file gmock/gmock.h...
.sconf_temp/conftest_5.cpp <-
  |
  |#include "gmock/gmock.h"
  |
  |
g++ -o .sconf_temp/conftest_5.o -c -std=c++0x -pthread -O3 -Wno-inline -g -DNDEBUG .sconf_temp/conftest_5.cpp
.sconf_temp/conftest_5.cpp:2:10: fatal error: gmock/gmock.h: No such file or directory

    2 | #include "gmock/gmock.h"
      |          ^~~~~~~~~~~~~~~
compilation terminated.
scons: Configure: no

scons: Configure: Checking for C++ header file Eigen/Dense...
.sconf_temp/conftest_6.cpp <-
  |
  |#include <Eigen/Dense>
  |
  |
g++ -o .sconf_temp/conftest_6.o -c -std=c++0x -pthread -O3 -Wno-inline -g -DNDEBUG .sconf_temp/conftest_6.cpp
.sconf_temp/conftest_6.cpp:2:10: fatal error: Eigen/Dense: No such file or directory

    2 | #include <Eigen/Dense>
      |          ^~~~~~~~~~~~~
compilation terminated.
scons: Configure: no

.sconf_temp/conftest_7.cpp <-

  |#include "../ext/eigen/Eigen/Core"
  |#define Q(x) #x
  |#define QUOTE(x) Q(x)
  |#include <iostream>
  |#ifndef SUNDIALS_PACKAGE_VERSION
  |#define SUNDIALS_PACKAGE_VERSION SUNDIALS_VERSION
  |#endif
  |int main(int argc, char** argv) {
  |    std::cout << QUOTE(EIGEN_WORLD_VERSION) "." QUOTE(EIGEN_MAJOR_VERSION) "." QUOTE(EIGEN_MINOR_VERSION) << std::endl;
  |    return 0;
  |}
  |
g++ -o .sconf_temp/conftest_7.o -c -std=c++0x -pthread -O3 -Wno-inline -g -DNDEBUG .sconf_temp/conftest_7.cpp
g++ -o .sconf_temp/conftest_7.exe -Wl,-no-undefined -pthread .sconf_temp/conftest_7.o
.sconf_temp/conftest_7.exe > .sconf_temp/conftest_7.exe.out

scons: Configure: Checking whether __GLIBCXX__ is declared...
.sconf_temp/conftest_8.cpp <-

  |#include <iostream>
  |int main(void)
  |{
  |#ifndef __GLIBCXX__
  |    (void) __GLIBCXX__;
  |#endif
  |    ;
  |    return 0;
  |}
  |
g++ -o .sconf_temp/conftest_8.o -c -std=c++0x -pthread -O3 -Wno-inline -g -DNDEBUG .sconf_temp/conftest_8.cpp

scons: Configure: yes

scons: Configure: Checking whether __clang__ is declared...
.sconf_temp/conftest_9.cpp <-

  |
  |int main(void)
  |{
  |#ifndef __clang__
  |    (void) __clang__;
  |#endif
  |    ;
  |    return 0;
  |}
  |
g++ -o .sconf_temp/conftest_9.o -c -std=c++0x -pthread -O3 -Wno-inline -g -DNDEBUG .sconf_temp/conftest_9.cpp
.sconf_temp/conftest_9.cpp: In function 'int main()':
.sconf_temp/conftest_9.cpp:5:12: error: '__clang__' was not declared in this scope

    5 |     (void) __clang__;
      |            ^~~~~~~~~
scons: Configure: no

scons: Configure: Checking for C++ library omp...
.sconf_temp/conftest_10.cpp <-

  |
  |
  |#include "omp.h"
  |
  |int
  |main() {
  |
  |return 0;
  |}
  |
g++ -o .sconf_temp/conftest_10.o -c -std=c++0x -pthread -O3 -Wno-inline -g -DNDEBUG .sconf_temp/conftest_10.cpp
g++ -o .sconf_temp/conftest_10.exe -Wl,-no-undefined -pthread .sconf_temp/conftest_10.o -lomp
C:/Users/Stefano/Documents/ASALI/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lomp
collect2.exe: error: ld returned 1 exit status
scons: Configure: no

.sconf_temp/conftest_11.cpp <-

  |#include <boost/version.hpp>
  |#define Q(x) #x
  |#define QUOTE(x) Q(x)
  |#include <iostream>
  |#ifndef SUNDIALS_PACKAGE_VERSION
  |#define SUNDIALS_PACKAGE_VERSION SUNDIALS_VERSION
  |#endif
  |int main(int argc, char** argv) {
  |    std::cout << BOOST_LIB_VERSION << std::endl;
  |    return 0;
  |}
  |
g++ -o .sconf_temp/conftest_11.o -c -std=c++0x -pthread -O3 -Wno-inline -g -DNDEBUG .sconf_temp/conftest_11.cpp
g++ -o .sconf_temp/conftest_11.exe -Wl,-no-undefined -pthread .sconf_temp/conftest_11.o
.sconf_temp/conftest_11.exe > .sconf_temp/conftest_11.exe.out
scons: Configure: Checking whether boost::core::demangle is declared...
.sconf_temp/conftest_12.cpp <-
  |#include <boost/core/demangle.hpp>
  |int main(void)
  |{
  |#ifndef boost::core::demangle
  |    (void) boost::core::demangle;
  |#endif
  |    ;
  |    return 0;
  |}
  |
g++ -o .sconf_temp/conftest_12.o -c -std=c++0x -pthread -O3 -Wno-inline -g -DNDEBUG .sconf_temp/conftest_12.cpp
.sconf_temp/conftest_12.cpp:4:14: warning: extra tokens at end of #ifndef directive
    4 | #ifndef boost::core::demangle
      |              ^~
scons: Configure: yes

scons: Configure: Checking for CVodeCreate(CV_BDF, CV_NEWTON) in C++ library sundials_cvodes...
.sconf_temp/conftest_13.cpp <-
  |
  |
  |#include "cvodes/cvodes.h"
  |int
  |main() {
  |  CVodeCreate(CV_BDF, CV_NEWTON);
  |return 0;
  |}
  |
g++ -o .sconf_temp/conftest_13.o -c -std=c++0x -pthread -O3 -Wno-inline -g -DNDEBUG .sconf_temp/conftest_13.cpp
.sconf_temp/conftest_13.cpp:3:10: fatal error: cvodes/cvodes.h: No such file or directory
    3 | #include "cvodes/cvodes.h"
      |          ^~~~~~~~~~~~~~~~~

compilation terminated.
scons: Configure: no

scons: Configure: Checking for CVodeCreate(CV_BDF) in C++ library sundials_cvodes...
.sconf_temp/conftest_14.cpp <-
  |
  |
  |#include "cvodes/cvodes.h"
  |int
  |main() {
  |  CVodeCreate(CV_BDF);
  |return 0;
  |}
  |
g++ -o .sconf_temp/conftest_14.o -c -std=c++0x -pthread -O3 -Wno-inline -g -DNDEBUG .sconf_temp/conftest_14.cpp
.sconf_temp/conftest_14.cpp:3:10: fatal error: cvodes/cvodes.h: No such file or directory
    3 | #include "cvodes/cvodes.h"
      |          ^~~~~~~~~~~~~~~~~

compilation terminated.
scons: Configure: no

scons: Configure: Checking for double x; log(x) in C library None...
.sconf_temp/conftest_15.c <-
  |
  |
  |#include "math.h"
  |
  |int
  |main() {
  |  double x; log(x);
  |return 0;
  |}
  |
gcc -o .sconf_temp/conftest_15.o -c -pthread -O3 -Wno-inline -g -DNDEBUG .sconf_temp/conftest_15.c
gcc -o .sconf_temp/conftest_15.exe -Wl,-no-undefined -pthread .sconf_temp/conftest_15.o
scons: Configure: yes

.sconf_temp/conftest_16.f90 <-
  |
  |program main
  |   write(*,'(a)') 'Hello, world!'
  |end program main
  |
gfortran -o .sconf_temp/conftest_16.o -c -O3 .sconf_temp/conftest_16.f90
gfortran -o .sconf_temp/conftest_16.exe -Wl,-no-undefined -pthread .sconf_temp/conftest_16.o
.sconf_temp/conftest_16.exe > .sconf_temp/conftest_16.exe.out


--------------------- end config.log ---------------------


As you can see, with this version of scons the path are in "ubuntu-like format" instead of "windows-like" format; everything is working and I'm able to compile cantera. So the problem, might be related to the version of scons? What do you think? Do you have any hint on how to fix the issue?

Best,

Stefano

Bryan Weber

unread,
Jun 3, 2021, 6:53:43 PM6/3/21
to Cantera Users' Group
Hi,

I don't see any error messages in that output, can you include the error message? I doubt the problem is with the path format, SCons is generally able to handle that difference. You say that Cantera is compiling correctly, so I don't understand your question.

Thanks,
Bryan

ste....@gmail.com

unread,
Jun 4, 2021, 2:14:20 AM6/4/21
to Cantera Users' Group
Hi,

I am sorry, I was not able to exaplain the issue properly. Let's see if I can do something better :)

I have 2 different conditions with different behaviours:

1/ Windows 10 with Mingw-w64, scons 3.2.1 and all libraries are installed using mingw package manager: Scons is able to compile cantera and everything is working fine. In this case I do not need to add the flag boost_inc_dir, since scons is automatically able to find the path of boost header files.

2/ Windows 10 with Mingw-w64, scons 4.0.1 and all libraries are installed using mingw package manager: Scons is NOT able to compile cantera and shows the error:  ERROR: Boost could not be found. Install Boost headers or set 'boost_inc_dir' to point to the boost headers.
I have already tried to add boost_inc_dir=/mingw64/include/  but it does not work and the error is still the same.

By adding the flag "VERBOSE=y", the only difference that I was able to notice is the "path format".

Is it more clear now?

Best,

Stefano
Reply all
Reply to author
Forward
0 new messages