Bug 216315 - [maintainer-update] Update science/tfel to version 3.0.2
Summary: [maintainer-update] Update science/tfel to version 3.0.2
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Thierry Thomas
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-01-20 15:22 UTC by Pedro F. Giffuni
Modified: 2017-11-25 10:45 UTC (History)
1 user (show)

See Also:


Attachments
science/tfel port update patch to version 3.00 (76.07 KB, patch)
2017-01-20 15:22 UTC, Pedro F. Giffuni
no flags Details | Diff
enhance tfel-2.0.4 (771 bytes, patch)
2017-05-03 05:14 UTC, Pedro F. Giffuni
no flags Details | Diff
updated patch for science/tfel 3.00 (75.65 KB, patch)
2017-05-04 22:01 UTC, Pedro F. Giffuni
no flags Details | Diff
Update to tfel-3.0.2 (50.82 KB, patch)
2017-11-14 21:53 UTC, Pedro F. Giffuni
no flags Details | Diff
Update to version 3.0.2 (50.84 KB, patch)
2017-11-19 01:40 UTC, Pedro F. Giffuni
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Pedro F. Giffuni freebsd_committer freebsd_triage 2017-01-20 15:22:32 UTC
Created attachment 179138 [details]
science/tfel port update patch to version 3.00

I have been working with the author, who wants to support FreeBSD at the same level as linux. As a result the PYTHON option will now add all the bindings, and a bug where the package was using machine arch optimizations (and core dumping on others) is now fixed. Both patches in files/ have been upstreamed and can be removed in a future update.

The new version brings important support for Abaqus(TM) and will be supported in a future release of CalculiX.
Comment 1 Thierry Thomas freebsd_committer freebsd_triage 2017-01-21 16:23:07 UTC
Note:french/aster is strongly tied with science/tfel, and for example the latest update to 2.0.4 broke french/aster.

It was building fine with tfel-mfront-2.0.3, but with tfel-mfront-2.0.4, it produces the following error:

/usr/local/bin/ld: bibcxx/mfront/MFrontBehaviour.cxx.1.o: undefined reference to symbol '_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6__initEPKcm'
//usr/local/lib/libc++.so.1: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status

and I'm still investigating how I could fix it.

Besides that, I am working on upgrading Code_Aster to 12.7.0-1, but it is also breaking, caused by the same kind of errors related to MFrontBehaviour.

Would it be possible to repocopy this port, with a stable version known to be working with Code_Aster, and another one to follow the new releases?
Comment 2 Thierry Thomas freebsd_committer freebsd_triage 2017-01-21 16:57:48 UTC
(In reply to Thierry Thomas from comment #1)

To be more precise, here is the error message without an interference with /usr/local/lib/libc++.so.1:

/usr/local/bin/ld: bibcxx/mfront/MFrontBehaviour.cxx.1.o: undefined reference to symbol '_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6__initEPKcm'
//usr/lib/libc++.so.1: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status

(same problem)
Comment 3 Pedro F. Giffuni freebsd_committer freebsd_triage 2017-01-21 17:27:11 UTC
(In reply to Thierry Thomas from comment #1)

I cc'd privately the author. I would like to get some feedback from him first but if needed we can revert the port and I can enhance the port options there.
The PACKAGE_BUILDING change should be particularly important.

I don't like the idea of introducing two different ports but I would like to have tfel 3.0.0 for the next CalculiX version: if for some reason it doesn't work with code Aster, we can have a tfel-calculix and a tfel-aster.
Comment 4 Thierry Thomas freebsd_committer freebsd_triage 2017-01-22 20:39:14 UTC
Seem with Thomas Helfer: the problem was not caused by the upgrade of tfel from 2.0.3 to 2.0.4, but caused by the upgrade of Gcc / gfortran from 4.8 to 4.9.

A work-around is to link explicitly with libc++ (committed in r432159).
Comment 5 Thierry Thomas freebsd_committer freebsd_triage 2017-04-12 20:55:55 UTC
This version seems OK, but unfortunately, it breaks french/aster:

In file included from mfront/AnisoLemaitre/src/AnisoLemaitre.cxx:15:
In file included from /usr/ports/french/aster/work/install_aster.95211/aster-12.6.0/build/release/mfront/AnisoLemaitre/include/TFEL/Material/AnisoLemaitreBehaviourData.hxx:20:
In file included from /usr/local/include/TFEL/Config/TFELTypes.hxx:24:
/usr/local/include/TFEL/Math/Stensor/StensorSizeToDime.hxx:59:14: error: unknown type name 'constexpr'
      static constexpr unsigned short value = 3u;
             ^
/usr/local/include/TFEL/Math/Stensor/StensorSizeToDime.hxx:59:24: error: expected member name or ';' after declaration specifiers
      static constexpr unsigned short value = 3u;
      ~~~~~~~~~~~~~~~~ ^
/usr/local/include/TFEL/Math/Stensor/StensorSizeToDime.hxx:68:14: error: unknown type name 'constexpr'
      static constexpr unsigned short value = 4u;
             ^
/usr/local/include/TFEL/Math/Stensor/StensorSizeToDime.hxx:68:24: error: expected member name or ';' after declaration specifiers
      static constexpr unsigned short value = 4u;
      ~~~~~~~~~~~~~~~~ ^
/usr/local/include/TFEL/Math/Stensor/StensorSizeToDime.hxx:77:14: error: unknown type name 'constexpr'
      static constexpr unsigned short value = 6u;
             ^
/usr/local/include/TFEL/Math/Stensor/StensorSizeToDime.hxx:77:24: error: expected member name or ';' after declaration specifiers
      static constexpr unsigned short value = 6u;
      ~~~~~~~~~~~~~~~~ ^
/usr/local/include/TFEL/Math/Stensor/StensorSizeToDime.hxx:86:14: error: unknown type name 'constexpr'
      static constexpr unsigned short value = 1u;
             ^
/usr/local/include/TFEL/Math/Stensor/StensorSizeToDime.hxx:86:24: error: expected member name or ';' after declaration specifiers
      static constexpr unsigned short value = 1u;
      ~~~~~~~~~~~~~~~~ ^
/usr/local/include/TFEL/Math/Stensor/StensorSizeToDime.hxx:95:14: error: unknown type name 'constexpr'
      static constexpr unsigned short value = 2u;
             ^
/usr/local/include/TFEL/Math/Stensor/StensorSizeToDime.hxx:95:24: error: expected member name or ';' after declaration specifiers
      static constexpr unsigned short value = 2u;
      ~~~~~~~~~~~~~~~~ ^
/usr/local/include/TFEL/Math/Stensor/StensorSizeToDime.hxx:104:14: error: unknown type name 'constexpr'
      static constexpr unsigned short value = 3u;
             ^
/usr/local/include/TFEL/Math/Stensor/StensorSizeToDime.hxx:104:24: error: expected member name or ';' after declaration specifiers
      static constexpr unsigned short value = 3u;
      ~~~~~~~~~~~~~~~~ ^
In file included from mfront/AnisoLemaitre/src/AnisoLemaitre.cxx:15:
In file included from /usr/ports/french/aster/work/install_aster.95211/aster-12.6.0/build/release/mfront/AnisoLemaitre/include/TFEL/Material/AnisoLemaitreBehaviourData.hxx:20:
In file included from /usr/local/include/TFEL/Config/TFELTypes.hxx:25:
/usr/local/include/TFEL/Math/Tensor/TensorSizeToDime.hxx:59:14: error: unknown type name 'constexpr'
      static constexpr unsigned short value = 3u;
             ^
/usr/local/include/TFEL/Math/Tensor/TensorSizeToDime.hxx:59:24: error: expected member name or ';' after declaration specifiers
      static constexpr unsigned short value = 3u;
      ~~~~~~~~~~~~~~~~ ^
/usr/local/include/TFEL/Math/Tensor/TensorSizeToDime.hxx:68:14: error: unknown type name 'constexpr'
      static constexpr unsigned short value = 5u;
             ^
/usr/local/include/TFEL/Math/Tensor/TensorSizeToDime.hxx:68:24: error: expected member name or ';' after declaration specifiers
      static constexpr unsigned short value = 5u;
      ~~~~~~~~~~~~~~~~ ^
/usr/local/include/TFEL/Math/Tensor/TensorSizeToDime.hxx:77:14: error: unknown type name 'constexpr'
      static constexpr unsigned short value = 9u;
             ^
/usr/local/include/TFEL/Math/Tensor/TensorSizeToDime.hxx:77:24: error: expected member name or ';' after declaration specifiers
      static constexpr unsigned short value = 9u;
      ~~~~~~~~~~~~~~~~ ^
/usr/local/include/TFEL/Math/Tensor/TensorSizeToDime.hxx:86:14: error: unknown type name 'constexpr'
      static constexpr unsigned short value = 1u;
             ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]

The problem could be that the version of Code_Aster in the tree is too old, and I have to upgrade it first.
Comment 6 Pedro F. Giffuni freebsd_committer freebsd_triage 2017-04-12 21:49:05 UTC
(In reply to Thierry Thomas from comment #5)
Thanks for looking.

I am looking at updating CalculiX but it appears they haven't added support for this yet so I can wait.

Adding this part of the patch to the existing port Makefile is a good idea though:

+.ifdef PACKAGE_BUILDING
+CONFIGURE_ARGS+=	--enable-portable-build
+.endif

The tfel author reported that without it packages built on processors different than the packaging machines are broken.
Comment 7 Thierry Thomas freebsd_committer freebsd_triage 2017-04-13 17:06:23 UTC
This part `--enable-portable-build' is already in the Makefile, and I've just rebuilt tfel-mfront-3.0.0 with -DPACKAGE_BUILDING, but french/aster still fails with the same error.
Comment 8 Pedro F. Giffuni freebsd_committer freebsd_triage 2017-04-13 17:41:27 UTC
(In reply to Thierry Thomas from comment #7)
Egh ... yes, I meant we should backport the "--enable-portable-build" to the tfel-2.0.4 port. I can wait for 3.0.0: it was not needed for the new Calculix.

The aster build issue seems GCC5 related: it is probably solved by specifying C++11 to the compiler.
Comment 9 Thierry Thomas freebsd_committer freebsd_triage 2017-04-13 17:58:58 UTC
Ah, sorry! But there is no problem with tfel-2.0.4, Code_Aster (at least the version in the tree, 12.6.0.4), builds fine with it.

BTW, why do you restrict this portable-build to PACKAGE_BUILDING and not for the port?
Comment 10 Pedro F. Giffuni freebsd_committer freebsd_triage 2017-04-13 18:11:53 UTC
(In reply to Thierry Thomas from comment #9)
> BTW, why do you restrict this portable-build to PACKAGE_BUILDING and not for the port?

Because I am fine with the port doing architecture-specific optimizations when *I* build the port.

I think the build machines are Intel Xeon machines and the binaries may not work on AMD or perhaps even on Core2 or nocona. OTOH people having older CPUs have more need of the arch-specific optimizations. This way things work well for both.
Comment 11 Thierry Thomas freebsd_committer freebsd_triage 2017-04-13 19:09:52 UTC
OK, these are good reasons!
Comment 12 Pedro F. Giffuni freebsd_committer freebsd_triage 2017-05-03 05:14:21 UTC
Created attachment 182263 [details]
enhance tfel-2.0.4

May I suggest we apply this small cleanup patch to the existing 2.0.4 ...
it should reduce the size of the diff for 3.00, and it fixes the packaging issue.
Comment 13 commit-hook freebsd_committer freebsd_triage 2017-05-04 20:31:15 UTC
A commit references this bug:

Author: thierry
Date: Thu May  4 20:30:48 UTC 2017
New revision: 440115
URL: https://svnweb.freebsd.org/changeset/ports/440115

Log:
  Cleanup.

  PR:		216315
  Submitted by:	pfg

Changes:
  head/science/tfel/Makefile
Comment 14 Thierry Thomas freebsd_committer freebsd_triage 2017-05-04 20:32:07 UTC
Committed thanks!
Comment 15 Pedro F. Giffuni freebsd_committer freebsd_triage 2017-05-04 22:01:25 UTC
Created attachment 182309 [details]
updated patch for science/tfel 3.00

Now that the older tfel-2.0.4 has been cleaned up, the 3.00 patch looks better.

Still we have to hold until code aster can handle it.
Comment 16 Pedro F. Giffuni freebsd_committer freebsd_triage 2017-05-04 22:16:54 UTC
(In reply to Pedro F. Giffuni from comment #15)
BTW ... note that the tfel configure.ac patch has this line:

COMPILER_CXXFLAGS="-std=c++11"

Code Aster will likely need something like that.
Comment 17 Thierry Thomas freebsd_committer freebsd_triage 2017-11-14 20:33:37 UTC
Pedro,
Finally, I've just upgraded Code_Aster to the latest stable version, but I have not been able to enable MFront, neither form this port nor from the one bundled with aster. Then, it's now possible to do what you want with this PR.

Do you have a patch ready for 3.0?
Comment 18 Pedro F. Giffuni freebsd_committer freebsd_triage 2017-11-14 21:08:48 UTC
(In reply to Thierry Thomas from comment #17)
This attachment in this PR is/was meant for 3.0.0.

I just noticed it needs to be updated to 3.0.2 (I will look at updating it).
Comment 19 Pedro F. Giffuni freebsd_committer freebsd_triage 2017-11-14 21:53:44 UTC
Created attachment 188002 [details]
Update to tfel-3.0.2

Only lightly tested... may need plist tweaking.
Comment 20 Pedro F. Giffuni freebsd_committer freebsd_triage 2017-11-19 01:40:30 UTC
Created attachment 188104 [details]
Update to version 3.0.2

Oops .. some cleanup to the python option
Comment 21 Thierry Thomas freebsd_committer freebsd_triage 2017-11-25 10:43:59 UTC
Committed, thanks!
Comment 22 commit-hook freebsd_committer freebsd_triage 2017-11-25 10:45:02 UTC
A commit references this bug:

Author: thierry
Date: Sat Nov 25 10:43:57 UTC 2017
New revision: 454878
URL: https://svnweb.freebsd.org/changeset/ports/454878

Log:
  Upgrade to 3.0.2.

  The new version brings important support for Abaqus(TM) and will be supported
  in a future release of CalculiX.

  PR:		216315
  Submitted by:	Pedro F. Giffuni

Changes:
  head/science/tfel/Makefile
  head/science/tfel/distinfo
  head/science/tfel/files/
  head/science/tfel/pkg-plist