Bug 247085 - devel/simgear compilation failure
Summary: devel/simgear compilation failure
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: Ganael LAPLANCHE
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-06-08 15:23 UTC by russo
Modified: 2020-06-22 15:48 UTC (History)
0 users

See Also:
bugzilla: maintainer-feedback? (martymac)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description russo 2020-06-08 15:23:28 UTC
On Freebsd 11.3

FreeBSD yyyy.zzz 11.3-STABLE FreeBSD 11.3-STABLE #1 r354399: Wed Nov  6 11:58:48 MST 2019     xxxx@yyyy.zzz:/usr/obj/usr/src/sys/GENERIC  amd64


Simgear 2020.1.2 fails to compile with:

FAILED: simgear/nasal/cppbind/CMakeFiles/test-simgear_nasal_cppbind-cppbind_misc.dir/test/cppbind_test.cxx.o 
/usr/bin/c++  -DHAVE_CONFIG_H -DHAVE_INTTYPES_H -Isimgear -I. -I/usr/ports/devel/simgear/work/simgear-2020.1.2/3rdparty/udns -I/usr/local/include -I/usr/ports/devel/simgear/work/simgear-2020.1.2 -O2 -pipe -fstack-protector-strong -fno-strict-aliasing -stdlib=libc++  -Wall -fPIC -Wno-overloaded-virtual -Wno-redeclared-class-member -Wno-unused-local-typedefs  -DBOOST_BIMAP_DISABLE_SERIALIZATION -O3 -msse2 -mfpmath=sse -ftree-vectorize -ftree-slp-vectorize   -std=gnu++11 -MD -MT simgear/nasal/cppbind/CMakeFiles/test-simgear_nasal_cppbind-cppbind_misc.dir/test/cppbind_test.cxx.o -MF simgear/nasal/cppbind/CMakeFiles/test-simgear_nasal_cppbind-cppbind_misc.dir/test/cppbind_test.cxx.o.d -o simgear/nasal/cppbind/CMakeFiles/test-simgear_nasal_cppbind-cppbind_misc.dir/test/cppbind_test.cxx.o -c /usr/ports/devel/simgear/work/simgear-2020.1.2/simgear/nasal/cppbind/test/cppbind_test.cxx
In file included from /usr/ports/devel/simgear/work/simgear-2020.1.2/simgear/nasal/cppbind/test/cppbind_test.cxx:6:
/usr/local/include/simgear/nasal/cppbind/Ghost.hxx:173:7: error: static_assert failed due to requirement 'is_strong_ref<std::__1::shared_ptr<Base> >::value' "Ghost can only wrap shared pointer!"
      static_assert(
      ^


This is only the first of many error messages.



Here's the whole failure:

In file included from /usr/ports/devel/simgear/work/simgear-2020.1.2/simgear/nasal/cppbind/test/cppbind_test.cxx:6:
/usr/local/include/simgear/nasal/cppbind/Ghost.hxx:173:7: error: static_assert failed due to requirement 'is_strong_ref<std::__1::shared_ptr<Base> >::value' "Ghost can only wrap shared pointer!"
      static_assert(
      ^
/usr/ports/devel/simgear/work/simgear-2020.1.2/simgear/nasal/cppbind/test/cppbind_test.cxx:269:3: note: in instantiation of template class 'nasal::Ghost<std::__1::shared_ptr<Base>, void>' requested here
  Ghost<BasePtr>::init("BasePtr")
  ^
/usr/ports/devel/simgear/work/simgear-2020.1.2/simgear/nasal/cppbind/test/cppbind_test.cxx:269:19: error: use of undeclared identifier 'init'; did you mean 'int'?
  Ghost<BasePtr>::init("BasePtr")
                  ^
In file included from /usr/ports/devel/simgear/work/simgear-2020.1.2/simgear/nasal/cppbind/test/cppbind_test.cxx:6:
/usr/local/include/simgear/nasal/cppbind/Ghost.hxx:173:7: error: static_assert failed due to requirement 'is_strong_ref<std::__1::shared_ptr<Derived> >::value' "Ghost can only wrap shared pointer!"
      static_assert(
      ^
/usr/ports/devel/simgear/work/simgear-2020.1.2/simgear/nasal/cppbind/test/cppbind_test.cxx:286:3: note: in instantiation of template class 'nasal::Ghost<std::__1::shared_ptr<Derived>, void>' requested here
  Ghost<DerivedPtr>::init("DerivedPtr")
  ^
/usr/ports/devel/simgear/work/simgear-2020.1.2/simgear/nasal/cppbind/test/cppbind_test.cxx:286:22: error: use of undeclared identifier 'init'; did you mean 'int'?
  Ghost<DerivedPtr>::init("DerivedPtr")
                     ^
/usr/ports/devel/simgear/work/simgear-2020.1.2/simgear/nasal/cppbind/test/cppbind_test.cxx:287:12: error: unexpected type name 'BasePtr': expected expression
    .bases<BasePtr>()
           ^
/usr/ports/devel/simgear/work/simgear-2020.1.2/simgear/nasal/cppbind/test/cppbind_test.cxx:287:21: error: expected expression
    .bases<BasePtr>()
                    ^
In file included from /usr/ports/devel/simgear/work/simgear-2020.1.2/simgear/nasal/cppbind/test/cppbind_test.cxx:6:
/usr/local/include/simgear/nasal/cppbind/Ghost.hxx:173:7: error: static_assert failed due to requirement 'is_strong_ref<std::__1::shared_ptr<DoubleDerived> >::value' "Ghost can only wrap shared pointer!"
      static_assert(
      ^
/usr/ports/devel/simgear/work/simgear-2020.1.2/simgear/nasal/cppbind/test/cppbind_test.cxx:296:3: note: in instantiation of template class 'nasal::Ghost<std::__1::shared_ptr<DoubleDerived>, void>' requested here
  Ghost<DoubleDerivedPtr>::init("DoubleDerivedPtr")
  ^
/usr/ports/devel/simgear/work/simgear-2020.1.2/simgear/nasal/cppbind/test/cppbind_test.cxx:296:28: error: use of undeclared identifier 'init'; did you mean 'int'?
  Ghost<DoubleDerivedPtr>::init("DoubleDerivedPtr")
                           ^
/usr/ports/devel/simgear/work/simgear-2020.1.2/simgear/nasal/cppbind/test/cppbind_test.cxx:297:12: error: unexpected type name 'DerivedPtr': expected expression
    .bases<DerivedPtr>();
           ^
/usr/ports/devel/simgear/work/simgear-2020.1.2/simgear/nasal/cppbind/test/cppbind_test.cxx:297:24: error: expected expression
    .bases<DerivedPtr>();
                       ^
In file included from /usr/ports/devel/simgear/work/simgear-2020.1.2/simgear/nasal/cppbind/test/cppbind_test.cxx:6:
/usr/local/include/simgear/nasal/cppbind/Ghost.hxx:173:7: error: static_assert failed due to requirement 'is_strong_ref<std::__1::shared_ptr<DoubleDerived2> >::value' "Ghost can only wrap shared pointer!"
      static_assert(
      ^
/usr/ports/devel/simgear/work/simgear-2020.1.2/simgear/nasal/cppbind/test/cppbind_test.cxx:298:3: note: in instantiation of template class 'nasal::Ghost<std::__1::shared_ptr<DoubleDerived2>, void>' requested here
  Ghost<DoubleDerived2Ptr>::init("DoubleDerived2Ptr")
  ^
/usr/ports/devel/simgear/work/simgear-2020.1.2/simgear/nasal/cppbind/test/cppbind_test.cxx:298:29: error: use of undeclared identifier 'init'; did you mean 'int'?
  Ghost<DoubleDerived2Ptr>::init("DoubleDerived2Ptr")
                            ^
/usr/ports/devel/simgear/work/simgear-2020.1.2/simgear/nasal/cppbind/test/cppbind_test.cxx:299:31: error: expected '(' for function-style cast or type construction
    .bases< Ghost<DerivedPtr> >()
            ~~~~~~~~~~~~~~~~~ ^
/usr/ports/devel/simgear/work/simgear-2020.1.2/simgear/nasal/cppbind/test/cppbind_test.cxx:299:33: error: expected expression
    .bases< Ghost<DerivedPtr> >()
                                ^
/usr/ports/devel/simgear/work/simgear-2020.1.2/simgear/nasal/cppbind/test/cppbind_test.cxx:320:34: error: no member named 'isInit' in 'nasal::Ghost<std::__1::shared_ptr<Base>, void>'
  BOOST_REQUIRE( Ghost<BasePtr>::isInit() );
                 ~~~~~~~~~~~~~~~~^
/usr/local/include/boost/test/tools/old/interface.hpp:85:6: note: expanded from macro 'BOOST_REQUIRE'
    (P), BOOST_TEST_STRINGIZE( P ), REQUIRE, CHECK_PRED, _ )
     ^
/usr/local/include/boost/test/tools/old/interface.hpp:68:61: note: expanded from macro 'BOOST_TEST_TOOL_IMPL'
        BOOST_JOIN( BOOST_TEST_TOOL_PASS_PRED, frwd_type )( P, ARGS ),          \
                                                            ^
/usr/local/include/boost/test/tools/old/interface.hpp:51:47: note: expanded from macro 'BOOST_TEST_TOOL_PASS_PRED2'
#define BOOST_TEST_TOOL_PASS_PRED2( P, ARGS ) P
                                              ^
/usr/ports/devel/simgear/work/simgear-2020.1.2/simgear/nasal/cppbind/test/cppbind_test.cxx:403:44: error: no member named 'makeGhost' in 'nasal::Ghost<std::__1::shared_ptr<Base>, void>'
  nasal_objects.push_back( Ghost<BasePtr>::makeGhost(c, d) );
                           ~~~~~~~~~~~~~~~~^
/usr/ports/devel/simgear/work/simgear-2020.1.2/simgear/nasal/cppbind/test/cppbind_test.cxx:404:44: error: no member named 'makeGhost' in 'nasal::Ghost<std::__1::shared_ptr<Base>, void>'
  nasal_objects.push_back( Ghost<BasePtr>::makeGhost(c, d2) );
                           ~~~~~~~~~~~~~~~~^
/usr/ports/devel/simgear/work/simgear-2020.1.2/simgear/nasal/cppbind/test/cppbind_test.cxx:405:44: error: no member named 'makeGhost' in 'nasal::Ghost<std::__1::shared_ptr<Base>, void>'
  nasal_objects.push_back( Ghost<BasePtr>::makeGhost(c, d3) );
                           ~~~~~~~~~~~~~~~~^
In file included from /usr/ports/devel/simgear/work/simgear-2020.1.2/simgear/nasal/cppbind/test/cppbind_test.cxx:4:
In file included from /usr/ports/devel/simgear/work/simgear-2020.1.2/simgear/nasal/cppbind/test/TestContext.hxx:23:
In file included from /usr/local/include/simgear/nasal/cppbind/NasalContext.hxx:125:
/usr/local/include/simgear/nasal/cppbind/from_nasal.hxx:46:12: error: no viable conversion from returned value of type 'void' to function return type 'std::__1::function<void (int)>'
    return from_nasal_helper(c, ref, static_cast<T*>(0));
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/include/simgear/nasal/cppbind/NasalHash.hxx:119:16: note: in instantiation of function template specialization 'nasal::from_nasal<std::__1::function<void (int)> >' requested here
        return from_nasal<T>(_context, get(name));
               ^
/usr/ports/devel/simgear/work/simgear-2020.1.2/simgear/nasal/cppbind/test/cppbind_test.cxx:243:26: note: in instantiation of function template specialization 'nasal::Hash::get<std::__1::function<void (int)>, char [5]>' requested here
  FuncVoidInt fvi = hash.get<FuncVoidInt>("func");
                         ^
/usr/include/c++/v1/functional:2203:5: note: candidate constructor not viable: cannot convert argument of incomplete type 'void' to 'std::nullptr_t' (aka 'nullptr_t') for 1st argument
    function(nullptr_t) _NOEXCEPT {}
    ^
/usr/include/c++/v1/functional:2204:5: note: candidate constructor not viable: cannot convert argument of incomplete type 'void' to 'const std::__1::function<void (int)> &' for 1st argument
    function(const function&);
    ^
/usr/include/c++/v1/functional:2205:5: note: candidate constructor not viable: cannot convert argument of incomplete type 'void' to 'std::__1::function<void (int)> &&' for 1st argument
    function(function&&) _NOEXCEPT;
    ^
/usr/include/c++/v1/functional:2207:5: note: candidate template ignored: substitution failure [with _Fp = void]: cannot form a reference to 'void'
    function(_Fp);
    ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
Comment 1 Ganael LAPLANCHE freebsd_committer 2020-06-08 16:22:44 UTC
Hello russo,

Thanks for your report.

Latest poudriere build ran fine here :

http://beefy9.nyi.freebsd.org/data/113amd64-default/537518/logs/simgear-2020.1.2.log

I presume you are building Simgear by hand. If you have a previous version of Simgear installed, can you try to uninstall it before re-building the new version ?
Comment 2 russo 2020-06-08 16:27:29 UTC
I was trying to portupgrade, and the upgrade of simgear was failing to build.

Indeed, if I pkg delete simgear and then install from scratch, it works fine.

So it's just the upgrade that is broken.


Previous attempt:
   portupgrade simgear flightgear

Simgear failed to build.

Now:
   pkg delete simgear (also deletes flightgear)
   cd /usr/ports/games/flightgear
   make install clean

This makes simgear install, and it works fine.  Clearly, the previous install interferes with the build.

Thank you.

Probably should be noted in /usr/ports/UPDATING somehow.
Comment 3 Ganael LAPLANCHE freebsd_committer 2020-06-11 20:46:32 UTC
Hello,

Thanks for your feedback. I am a bit busy right now but I'll fix the port ASAP to enable proper update (that kind of situation already happened before, with previous versions of Simgear).

Best regards,

Ganael.
Comment 4 commit-hook freebsd_committer 2020-06-22 15:48:20 UTC
A commit references this bug:

Author: martymac
Date: Mon Jun 22 15:48:16 UTC 2020
New revision: 539814
URL: https://svnweb.freebsd.org/changeset/ports/539814

Log:
  Disable building test applications

  Some tests fail to compile and prevent Simgear update.

  PR:		247085
  Submitted by:	russo@bogodyn.org

Changes:
  head/devel/simgear/Makefile
  head/devel/simgear/files/patch-simgear-nasal-cppbind-CMakeLists.txt