Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 18 May 2020 17:50:37 +0000
From:      bugzilla-noreply@freebsd.org
To:        toolchain@FreeBSD.org
Subject:   [Bug 246488] gcc-built binary crashes in std::ios_base::Init::Init()
Message-ID:  <bug-246488-29464-5JoQF2mL2H@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-246488-29464@https.bugs.freebsd.org/bugzilla/>
References:  <bug-246488-29464@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D246488

Dimitry Andric <dim@FreeBSD.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |dim@FreeBSD.org

--- Comment #4 from Dimitry Andric <dim@FreeBSD.org> ---
I tried with the following diff instead:

Index: Makefile
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- Makefile    (revision 535286)
+++ Makefile    (working copy)
@@ -13,7 +13,7 @@ LICENSE_NAME=3D NASA Open Source Agreement version 1
 LICENSE_FILE=3D  ${WRKSRC}/LICENSE
 LICENSE_PERMS=3D dist-mirror dist-sell pkg-mirror pkg-sell auto-accept

-BROKEN=3D                fails to link
+#BROKEN=3D               fails to link
 BROKEN_aarch64=3D                fails to compile: invokes x86 asm

 LIB_DEPENDS=3D   libdrm.so:graphics/libdrm \
@@ -27,7 +27,7 @@ BUILD_DEPENDS=3D        ${LOCALBASE}/lib/libopenNURBS.a:g=
ra
                ${LOCALBASE}/include/glm/glm.hpp:math/glm \
=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20
${LOCALBASE}/libdata/pkgconfig/pthread-stubs.pc:devel/libpthread-stubs

-USES=3D          compiler:c++11-lang cmake:noninja localbase\
+USES=3D          compiler:gcc-c++11-lib compiler:openmp cmake:noninja loca=
lbase\
                gl gnome jpeg xorg
 USE_GITHUB=3D    yes
 GH_PROJECT=3D    OpenVSP
@@ -57,7 +57,7 @@ USE_GNOME=3D    libxml2
 # See https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D230888
 .if ${OPSYS} =3D=3D FreeBSD
 .if (${OSVERSION} < 1200000 || ${OSVERSION} >=3D1300000)
-BROKEN=3D        undefined reference to __atomic_load
+#BROKEN=3D       undefined reference to __atomic_load
 .endif
 .endif

but it errors out pretty quickly with a gcc error:

[ 18%] Building CXX object
src/cldai/CMakeFiles/stepdai-static.dir/sdaiBinary.cc.o
In file included from /usr/include/c++/v1/__tree:15,
                 from /usr/include/c++/v1/map:479,
                 from
/wrkdirs/share/dim/ports/cad/openvsp/work/.build/Libraries-prefix/src/Libra=
ries-build/STEPCODE-prefix/src/STEPCODE/src/clstepcore/sdaiApplication_inst=
ance.cc:13:
/usr/include/c++/v1/memory: In instantiation of 'constexpr
std::__1::__compressed_pair_elem<_Tp, _Idx,
_CanBeEmptyBase>::__compressed_pair_elem(_Up&&) [with _Up =3D long int;
<template-parameter-2-2> =3D void; _Tp =3D std::__1::basic_string<char,
std::__1::char_traits<char>, std::__1::allocator<char> >*; int _Idx =3D 0; =
bool
_CanBeEmptyBase =3D false]':
/usr/include/c++/v1/memory:2289:72:   required from 'constexpr
std::__1::__compressed_pair<_T1, _T2>::__compressed_pair(_U1&&, _U2&&) [with
_U1 =3D long int; _U2 =3D std::__1::allocator<std::__1::basic_string<char,
std::__1::char_traits<char>, std::__1::allocator<char> > >; _T1 =3D
std::__1::basic_string<char, std::__1::char_traits<char>,
std::__1::allocator<char> >*; _T2 =3D
std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char=
>,
std::__1::allocator<char> > >]'
/usr/include/c++/v1/vector:455:41:   required from
'std::__1::__vector_base<_Tp,
_Allocator>::__vector_base(std::__1::__vector_base<_Tp,
_Allocator>::allocator_type&&) [with _Tp =3D std::__1::basic_string<char,
std::__1::char_traits<char>, std::__1::allocator<char> >; _Allocator =3D
std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char=
>,
std::__1::allocator<char> > >; std::__1::__vector_base<_Tp,
_Allocator>::allocator_type =3D std::__1::allocator<std::__1::basic_string<=
char,
std::__1::char_traits<char>, std::__1::allocator<char> > >]'
/usr/include/c++/v1/vector:1249:82:   required from 'std::__1::vector<_Tp,
_Alloc>::vector(const std::__1::vector<_Tp, _Alloc>&) [with _Tp =3D
std::__1::basic_string<char, std::__1::char_traits<char>,
std::__1::allocator<char> >; _Allocator =3D
std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char=
>,
std::__1::allocator<char> > >]'
/wrkdirs/share/dim/ports/cad/openvsp/work/.build/Libraries-prefix/src/Libra=
ries-build/STEPCODE-prefix/src/STEPCODE/src/clstepcore/dictSchema.h:66:16:
  required from here
/usr/include/c++/v1/memory:2204:42: error: invalid conversion from 'long in=
t'
to 'std::__1::basic_string<char, std::__1::char_traits<char>,
std::__1::allocator<char> >*' [-fpermissive]
 2204 |       : __value_(_VSTD::forward<_Up>(__u))
      |                                          ^
      |                                          |
      |                                          long int
/usr/include/c++/v1/memory: In instantiation of 'constexpr
std::__1::__compressed_pair_elem<_Tp, _Idx,
_CanBeEmptyBase>::__compressed_pair_elem(_Up&&) [with _Up =3D long int;
<template-parameter-2-2> =3D void; _Tp =3D
recursiveEntDescripIterator::queue_pair**; int _Idx =3D 0; bool _CanBeEmpty=
Base =3D
false]':
/usr/include/c++/v1/memory:2289:72:   required from 'constexpr
std::__1::__compressed_pair<_T1, _T2>::__compressed_pair(_U1&&, _U2&&) [with
_U1 =3D long int; _U2 =3D
std::__1::allocator<recursiveEntDescripIterator::queue_pair*>&; _T1 =3D
recursiveEntDescripIterator::queue_pair**; _T2 =3D
std::__1::allocator<recursiveEntDescripIterator::queue_pair*>&]'
/usr/include/c++/v1/__split_buffer:316:30:   required from
'std::__1::__split_buffer<_Tp,
_Allocator>::__split_buffer(std::__1::__split_buffer<_Tp,
_Allocator>::size_type, std::__1::__split_buffer<_Tp, _Allocator>::size_typ=
e,
std::__1::__split_buffer<_Tp, _Allocator>::__alloc_rr&) [with _Tp =3D
recursiveEntDescripIterator::queue_pair*; _Allocator =3D
std::__1::allocator<recursiveEntDescripIterator::queue_pair*>&;
std::__1::__split_buffer<_Tp, _Allocator>::size_type =3D long unsigned int;
std::__1::__split_buffer<_Tp, _Allocator>::__alloc_rr =3D
std::__1::allocator<recursiveEntDescripIterator::queue_pair*>]'
/usr/include/c++/v1/deque:2596:13:   required from 'void std::__1::deque<_T=
p,
_Allocator>::__add_back_capacity() [with _Tp =3D
recursiveEntDescripIterator::queue_pair; _Allocator =3D
std::__1::allocator<recursiveEntDescripIterator::queue_pair>]'
/usr/include/c++/v1/deque:1928:9:   required from 'void std::__1::deque<_Tp,
_Allocator>::push_back(const value_type&) [with _Tp =3D
recursiveEntDescripIterator::queue_pair; _Allocator =3D
std::__1::allocator<recursiveEntDescripIterator::queue_pair>;
std::__1::deque<_Tp, _Allocator>::value_type =3D
recursiveEntDescripIterator::queue_pair]'
/wrkdirs/share/dim/ports/cad/openvsp/work/.build/Libraries-prefix/src/Libra=
ries-build/STEPCODE-prefix/src/STEPCODE/src/clstepcore/SubSuperIterators.h:=
30:34:
  required from here
/usr/include/c++/v1/memory:2204:42: error: invalid conversion from 'long in=
t'
to 'recursiveEntDescripIterator::queue_pair**' [-fpermissive]
[ 19%] Building CXX object src/clutils/CMakeFiles/steputils.dir/dirobj.cc.o
/wrkdirs/share/dim/ports/cad/openvsp/work/.build/Libraries-prefix/src/Libra=
ries-build/STEPCODE-prefix/src/STEPCODE/src/clstepcore/sdaiApplication_inst=
ance.cc:
In function 'SDAI_Application_instance* ReadEntityRef(std::__1::istream&,
ErrorDescriptor*, const char*, InstMgrBase*, int)':
/wrkdirs/share/dim/ports/cad/openvsp/work/.build/Libraries-prefix/src/Libra=
ries-build/STEPCODE-prefix/src/STEPCODE/src/clstepcore/sdaiApplication_inst=
ance.cc:680:33:
warning: this statement may fall through [-Wimplicit-fallthrough=3D]
  680 |             err->GreaterSeverity( SEVERITY_WARNING );
      |             ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
/wrkdirs/share/dim/ports/cad/openvsp/work/.build/Libraries-prefix/src/Libra=
ries-build/STEPCODE-prefix/src/STEPCODE/src/clstepcore/sdaiApplication_inst=
ance.cc:682:9:
note: here
  682 |         case '#': {
      |         ^~~~

As gcc's error messages are very hard to read, and clang does not produce t=
hese
particular errors, it will be interesting to debug :)

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-246488-29464-5JoQF2mL2H>