Bug 245112

Summary: math/flint2 : Fails to build on FreeBSD 12.1-RELEASE-p1 powerpc 32 bit:tools.h:25:23: error: type_traits: No such file or directory
Product: Ports & Packages Reporter: canardo <canardo909>
Component: Individual Port(s)Assignee: Thierry Thomas <thierry>
Status: Closed FIXED    
Severity: Affects Only Me CC: powerpc
Priority: --- Flags: bugzilla: maintainer-feedback? (yuri)
Version: Latest   
Hardware: powerpc   
OS: Any   
Attachments:
Description Flags
Force a compiler with support for C++11 language features thierry: maintainer-approval+

Description canardo 2020-03-27 19:19:45 UTC
Problem found when building math/flint2 on FreeBSD 12.1-RELEASE-p1 r354992 GENERIC powerpc 32 bit, running on Apple Powerbook 17".



/usr/ports/math/flint2 # make --DBATCH install clean
===>  Building for flint2-g20190210_1
.....
.....
.....
gmake[3]: Entering directory '/usr/ports/math/flint2/work/flint2-2baa9bc'
    CXX   build/interfaces/NTL-interface.lo
In file included from /usr/local/include/NTL/ZZ.h:19,
                 from interfaces/NTL-interface.cpp:16:
/usr/local/include/NTL/tools.h:25:23: error: type_traits: No such file or directory
In file included from /usr/local/include/NTL/SmartPtr.h:7,
                 from /usr/local/include/NTL/ZZ.h:21,
                 from interfaces/NTL-interface.cpp:16:
/usr/local/include/NTL/thread.h:10:18: error: atomic: No such file or directory
/usr/local/include/NTL/thread.h:11:17: error: mutex: No such file or directory
In file included from /usr/local/include/NTL/ZZ.h:19,
                 from interfaces/NTL-interface.cpp:16:
/usr/local/include/NTL/tools.h:663: error: expected identifier before '...' token
/usr/local/include/NTL/tools.h:663: error: expected '>' before '...' token
/usr/local/include/NTL/tools.h:664: error: expected `)' before '&&' token
/usr/local/include/NTL/tools.h:668: error: expected initializer before 'noexcept'
/usr/local/include/NTL/tools.h: In function 'void NTL::details_pthread::delete_list(void*)':
/usr/local/include/NTL/tools.h:679: error: 'delete_node' was not declared in this scope
/usr/local/include/NTL/tools.h: In function 'void NTL::details_pthread::push_node(NTL::details_pthread::Node*)':
/usr/local/include/NTL/tools.h:715: error: 'delete_node' was not declared in this scope
/usr/local/include/NTL/tools.h: At global scope:
/usr/local/include/NTL/tools.h:1064: error: expected constructor, destructor, or type conversion before 'bool'
/usr/local/include/NTL/tools.h:1072: error: expected constructor, destructor, or type conversion before 'bool'
/usr/local/include/NTL/tools.h:1140: error: expected constructor, destructor, or type conversion before 'bool'
In file included from /usr/local/include/NTL/ZZ.h:20,
                 from interfaces/NTL-interface.cpp:16:
/usr/local/include/NTL/vector.h:211: error: ISO C++ forbids declaration of 'constexpr' with no type
/usr/local/include/NTL/vector.h:211: error: expected ';' before 'bool'
/usr/local/include/NTL/vector.h:212: error: ISO C++ forbids declaration of 'constexpr' with no type
/usr/local/include/NTL/vector.h:212: error: expected ';' before 'bool'
/usr/local/include/NTL/vector.h:248: error: expected ',' or '...' before '&&' token
/usr/local/include/NTL/vector.h:248: error: invalid constructor; you probably meant 'NTL::Vec<T> (const NTL::Vec<T>&)'
/usr/local/include/NTL/vector.h:248: error: expected ';' before 'noexcept'
interfaces/NTL-interface.cpp:445: error: expected `;' at end of input
interfaces/NTL-interface.cpp:445: error: expected `}' at end of input
/usr/local/include/NTL/vector.h: In static member function 'static void NTL::Vec<T>::BlockDestroy(T*, long int)':
/usr/local/include/NTL/vector.h:195: error: 'relocatable' was not declared in this scope
/usr/local/include/NTL/vector.h:195: error: template argument 1 is invalid
/usr/local/include/NTL/vector.h:195: error: invalid type in declaration before '(' token
/usr/local/include/NTL/vector.h: In static member function 'static void NTL::Vec<T>::BlockConstruct(T*, long int)':
/usr/local/include/NTL/vector.h:198: error: 'relocatable' was not declared in this scope
/usr/local/include/NTL/vector.h:198: error: template argument 1 is invalid
/usr/local/include/NTL/vector.h:198: error: invalid type in declaration before '(' token
/usr/local/include/NTL/vector.h: In static member function 'static void NTL::Vec<T>::BlockConstructFromVec(T*, long int, const T*)':
/usr/local/include/NTL/vector.h:201: error: 'relocatable' was not declared in this scope
/usr/local/include/NTL/vector.h:201: error: template argument 1 is invalid
/usr/local/include/NTL/vector.h:201: error: invalid type in declaration before '(' token
/usr/local/include/NTL/vector.h: In static member function 'static void NTL::Vec<T>::BlockConstructFromObj(T*, long int, const T&)':
/usr/local/include/NTL/vector.h:204: error: 'relocatable' was not declared in this scope
/usr/local/include/NTL/vector.h:204: error: template argument 1 is invalid
/usr/local/include/NTL/vector.h:204: error: invalid type in declaration before '(' token
/usr/local/include/NTL/vector.h: In constructor 'NTL::Vec<T>::Vec(const NTL::INIT_SIZE_STRUCT&, long int)':
/usr/local/include/NTL/vector.h:230: error: there are no arguments to 'SetLength' that depend on a template parameter, so a declaration of 'SetLength' must be available
/usr/local/include/NTL/vector.h:230: error: (if you use '-fpermissive', G++ will accept your code, but allowing the use of an undeclared name is deprecated)
/usr/local/include/NTL/vector.h: In copy constructor 'NTL::Vec<T>::Vec(const NTL::Vec<T>&)':
/usr/local/include/NTL/vector.h:239: error: there are no arguments to 'AllocateTo' that depend on a template parameter, so a declaration of 'AllocateTo' must be available
/usr/local/include/NTL/vector.h:241: error: there are no arguments to 'AdjustLength' that depend on a template parameter, so a declaration of 'AdjustLength' must be available
/usr/local/include/NTL/vector.h: At global scope:
/usr/local/include/NTL/vector.h:242: error: expected unqualified-id at end of input
/usr/local/include/NTL/vector.h:242: error: expected `}' at end of input
gmake[3]: *** [Makefile:276: build/interfaces/NTL-interface.lo] Error 1
gmake[3]: Leaving directory '/usr/ports/math/flint2/work/flint2-2baa9bc'
c++: build/interfaces/NTL-interface.lo: No such file or directory
gmake[2]: *** [Makefile:142: libflint.so.13.5.2] Error 1
gmake[2]: Leaving directory '/usr/ports/math/flint2/work/flint2-2baa9bc'
gmake[1]: *** [Makefile:172: library] Error 2
gmake[1]: Leaving directory '/usr/ports/math/flint2/work/flint2-2baa9bc'
===> Compilation failed unexpectedly.
Try to set MAKE_JOBS_UNSAFE=yes and rebuild before reporting the failure to
the maintainer.
*** Error code 1

Stop.
make: stopped in /usr/ports/math/flint2
Comment 1 Yuri Victorovich freebsd_committer freebsd_triage 2020-03-27 19:30:35 UTC
Assigning to Thierry Thomas because this seems to be related to his yesterday's commit r529225.
Comment 2 Thierry Thomas freebsd_committer freebsd_triage 2020-03-27 21:13:27 UTC
Created attachment 212769 [details]
Force a compiler with support for C++11 language features
Comment 3 Thierry Thomas freebsd_committer freebsd_triage 2020-03-27 21:15:20 UTC
I have no powerpc 32 bits to test, but could you please check the proposed patch?
Comment 4 Thierry Thomas freebsd_committer freebsd_triage 2020-03-28 10:40:27 UTC
To patch:
- detach the proposed patch as e.g. /tmp/245112.diff
- cd /usr/ports/math/flint2
- patch < /tmp/245112.diff

Or maybe easier in this case:
- open the Makefile in your $EDITOR
- replace the line
  USES=          gmake
 by
  USES=          compiler:c++11-lang gmake
Comment 5 canardo 2020-03-28 20:23:01 UTC
(In reply to Thierry Thomas from comment #4)

Following Makefile update, flint2 has been successfully installed
Comment 6 Thierry Thomas freebsd_committer freebsd_triage 2020-03-28 21:05:12 UTC
Committed, thanks for your feedback!
Comment 7 commit-hook freebsd_committer freebsd_triage 2020-03-28 21:41:52 UTC
A commit references this bug:

Author: thierry
Date: Sat Mar 28 21:05:11 UTC 2020
New revision: 529763
URL: https://svnweb.freebsd.org/changeset/ports/529763

Log:
  C++11 language features are needed.

  PR:		245112
  Submitted by:	canardo909 (at) gmx.com

Changes:
  head/math/flint2/Makefile