Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#55300 closed defect (fixed)

cantera @2.2.0: ERROR: Sundials version '2.7' is not supported

Reported by: dershow Owned by: macports@…
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc: seanfarley (Sean Farley), MarcusCalhoun-Lopez (Marcus Calhoun-Lopez)
Port: cantera

Description

I had cantera installed, with the default variant (+sundials). The sundials port just updated from 2.6.2_1, 2.7.0_0. This forced a rebuild of cantera which fails now fails. The last part of the log file seems to indicate that sundials 2.7 is not supported:

:info:build ERROR: Sundials version '2.7' is not supported.
:info:build Command failed:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_science_cantera/cantera/work/cantera-2.2.0" && /opt/local/bin/scons install -j8 prefix=/opt/local CC=/usr/bin/clang CXX=/usr/bin/clang++ f90_interface=n python_prefix=/opt/local/Library/Frameworks/Python.framework/Versions/2.7 stage_dir=/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_science_cantera/cantera/work/destroot use_sundials=y sundials_include=/opt/local/include sundials_libdir=/opt/local/lib 
:info:build Exit code: 1
:error:build Failed to build cantera: command execution failed
:debug:build Error code: CHILDSTATUS 99094 1
:debug:build Backtrace: command execution failed
:debug:build     while executing
:debug:build "system {*}$notty {*}$nice $fullcmdstring"
:debug:build     invoked from within
:debug:build "command_exec build"
:debug:build     (procedure "portbuild::build_main" line 8)
:debug:build     invoked from within
:debug:build "$procedure $targetname"
:error:build See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_science_cantera/cantera/main.log for details.

But, that is now the only version in Macports.

Attachments (1)

Portfile-cantera2.3.diff (2.3 KB) - added by thomasfiala (Thomas Fiala) 7 years ago.
diff file to upgrade cantera 2.2 -> cantera 2.3. Doesn't work apparently because of linking error to fmtlib, but I cannot find the mistake.

Download all attachments as: .zip

Change History (13)

comment:1 Changed 7 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: seanfarley added; macports@… sean@… removed
Owner: set to macports@…
Status: newassigned
Summary: Cantera fails to buildcantera @2.2.0: ERROR: Sundials version '2.7' is not supported

cantera 2.3.0 exists. Maybe it would help if we updated the port to that version.

comment:2 Changed 7 years ago by thomasfiala (Thomas Fiala)

I tried to update the port to version 2.3.0. Unfortunately, 2.3.0 depends on fmt, for which there currently is no macports Portfile. Scons could also download fmt automatically using a github submodule, but, apparently, there seems to be no macports support for github submodules.

Also, there seems to be no way to force an old version of sundials to go with Cantera 2.2.0.

Please correct me if any of the above statements are wrong. Until then, I guess we'll need to install Cantera from source.

comment:3 Changed 7 years ago by dershow

It doesn't seem that it should be that hard to make a port for fmt, but I just tried to build it, as a test, and it failed. So, I did create a ticket: #55363

Last edited 7 years ago by ryandesign (Ryan Carsten Schmidt) (previous) (diff)

comment:4 Changed 7 years ago by dershow

There is now an fmt Portfile #55363 will 2.3.0 now build? Should the port be updated?

Last edited 7 years ago by ryandesign (Ryan Carsten Schmidt) (previous) (diff)

Changed 7 years ago by thomasfiala (Thomas Fiala)

Attachment: Portfile-cantera2.3.diff added

diff file to upgrade cantera 2.2 -> cantera 2.3. Doesn't work apparently because of linking error to fmtlib, but I cannot find the mistake.

comment:5 Changed 7 years ago by thomasfiala (Thomas Fiala)

Thank you for providing an fmt Portfile!

I tried modifying the Cantera portfile to upgrade it to version 2.3. I attached the diff file above.

Unfortunately, it doesn't work for me, but I didn't find the mistake. Apparently, when compiling cantera seems to include a wrong fmt include file or something. It doesn't find the functions that should be in fmt::. However, when compiling Cantera 2.3 from github using fmt from Macports works perfectly, and I couldn't find any differences. I guess that there is a tiny mistake in the order of including files or something.

Any help is appreciated. I'm sorry, but currently I cannot invest more hours in troubleshooting.

comment:6 Changed 7 years ago by dershow

I'm not sure, but I have an observation/question: I'm surprised that you set: system_fmt=y when it is not a system version. Perhaps that has it looking in the wrong place instead of the port fmt?

comment:7 Changed 7 years ago by thomasfiala (Thomas Fiala)

The flag 'system_fmt' indicates that fmt is present on the system, and doesn't need to be installed from a Git submodule.

Cantera/scons help:

system_fmt: [ default | y | n ]

Select whether to use the fmt library from a system installation ('y'), from a Git submodule ('n'), or to decide automatically ('default').

When building Cantera in a different folder, the flag does work: Setting it to 'y' causes Scons to not fetch fmt from the Git submodule. Since I don't have fmt installed in any other location than in Macports, it uses it and builds just fine. When compiling it in the Macports build directory, it doesn't.

comment:8 Changed 7 years ago by dershow

I just tried removing that flag and building, and didn't have any luck. Further, I've run into what looks like a different problem that I'm a bit confused about. I already have sundials installed, and this port says that sundials conflicts with sundials2. If I look on the macports web site for available ports, I just see sundials listed (as version 2.7) but if I try to look at the Portfile it seems to be for version 3.1. The web site also doesn't list sundials2 as a port, but I do have that as an possible port locally.

comment:9 Changed 7 years ago by MarcusCalhoun-Lopez (Marcus Calhoun-Lopez)

Cc: MarcusCalhoun-Lopez added

comment:10 in reply to:  8 Changed 7 years ago by ryandesign (Ryan Carsten Schmidt)

Replying to dershow:

I just tried removing that flag and building, and didn't have any luck. Further, I've run into what looks like a different problem that I'm a bit confused about. I already have sundials installed, and this port says that sundials conflicts with sundials2. If I look on the macports web site for available ports, I just see sundials listed (as version 2.7) but if I try to look at the Portfile it seems to be for version 3.1. The web site also doesn't list sundials2 as a port, but I do have that as an possible port locally.

The list of ports on the web site is not updated automatically, and is therefore usually out of date.

comment:11 Changed 7 years ago by ryandesign (Ryan Carsten Schmidt)

Resolution: fixed
Status: assignedclosed

In 210a0fde4fc4569de60c94a285a3c559dbbfbf9c/macports-ports:

cantera: Update to 2.3.0

cantera-devel: Update to 2.3.0b1

Add patch to fix build with Cython 0.26.

Add patch to fix build with fmt 4.

Use sundials2 in sundials variant; cantera is not compatible with
sundials 3.

Disable universal variant which never built universal software.

Don't rename shared library because nobody wants that.

Fix install_name of shared library.

No longer install setup_cantera with the execute bit because its
intended use is to be sourced into your current shell environment,
not run as a standalone script.

Move destroot commands out of the build phase and into the destroot
phase where they belong.

Closes: #55300
Closes: #55540

comment:12 Changed 7 years ago by dershow

These changes don't actually allow a fix to the problem. Because I already have sundials installed, I will get an error about installing sundials2, so I still will not be able to install cantera. It does help narrow the problem down, but we would need a change to sundials2 to allow it to be installed along with sundials. Because now cantera conflicts with sundials being installed.

Note: See TracTickets for help on using tickets.