Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 8 Feb 2024 07:40:17 +0000
From:      Nuno Teixeira <eduardo@freebsd.org>
To:        Mark Millard <marklmi@yahoo.com>
Cc:        FreeBSD Toolchain <freebsd-toolchain@freebsd.org>,  FreeBSD Mailing List <freebsd-ports@freebsd.org>, "salvadore@freebsd.org" <salvadore@freebsd.org>
Subject:   Re: Why lang/gcc14-devel builds are failing on the build servers: needs USES= compiler:c++14-lang (or higher) instead of compiler:c++11-lang
Message-ID:  <CAFDf7UKhVxXH-SmW%2BS1k0a1kOoGtyZmEQvN0zX4Etucy3pAsjA@mail.gmail.com>
In-Reply-To: <62C8F08E-8D73-4918-A91F-4FC01E94FD8A@yahoo.com>
References:  <62C8F08E-8D73-4918-A91F-4FC01E94FD8A.ref@yahoo.com> <62C8F08E-8D73-4918-A91F-4FC01E94FD8A@yahoo.com>

next in thread | previous in thread | raw e-mail | index | archive | help
--000000000000e596e60610d9ecb3
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

USES compiler is somehow deprecated as clang and gcc on base and ports
supports capable compiler described in handbook:
https://docs.freebsd.org/en/books/porters-handbook/book/#uses-compiler

Mark Millard <marklmi@yahoo.com> escreveu (quinta, 8/02/2024 =C3=A0(s) 05:5=
2):

> The error on the FreeBSD build servers:
>
> QUOTE
> /wrkdirs/usr/ports/lang/gcc14-devel/work/gcc-14-20240114/gcc/config/aarch=
64/aarch64.cc:13095:50:
> error: constexpr variable 'tiles' must be initialized by a constant
> expression
> 13095 | static constexpr std::pair<unsigned int, char> tiles[] =3D {
> | ^ ~
> 13096 | { 0xff, 'b' },
> | ~~~~~~~~~~~~~~
> 13097 | { 0x55, 'h' },
> | ~~~~~~~~~~~~~~
> 13098 | { 0x11, 's' },
> | ~~~~~~~~~~~~~~
> 13099 | { 0x01, 'd' }
> | ~~~~~~~~~~~~~
> 13100 | };
> | ~
> /wrkdirs/usr/ports/lang/gcc14-devel/work/gcc-14-20240114/gcc/config/aarch=
64/aarch64.cc:13096:5:
> note: non-constexpr constructor 'pair<int, char, nullptr>' cannot be used
> in a constant expression
> 13096 | { 0xff, 'b' },
> | ^
> /usr/include/c++/v1/__utility/pair.h:225:5: note: declared here
> 225 | pair(_U1&& __u1, _U2&& __u2)
> END QUOTE
>
> is because C++11 did not have pair constructors being constexpr.
> C++14 (and later) does. Yet lang/gcc14-devel 's Makefile says:
>
> USES=3D           compiler:c++11-lang cpe gmake iconv libtool makeinfo pe=
rl5
> tar:xz
>
>
> =3D=3D=3D
> Mark Millard
> marklmi at yahoo.com
>
>
>

--=20
Nuno Teixeira
FreeBSD Committer (ports)

--000000000000e596e60610d9ecb3
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div>USES compiler is somehow deprecated as clang and gcc =
on base and ports supports capable compiler described in handbook:</div><di=
v><a href=3D"https://docs.freebsd.org/en/books/porters-handbook/book/#uses-=
compiler">https://docs.freebsd.org/en/books/porters-handbook/book/#uses-com=
piler</a></div></div><br><div class=3D"gmail_quote"><div dir=3D"ltr" class=
=3D"gmail_attr">Mark Millard &lt;<a href=3D"mailto:marklmi@yahoo.com">markl=
mi@yahoo.com</a>&gt; escreveu (quinta, 8/02/2024 =C3=A0(s) 05:52):<br></div=
><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border=
-left:1px solid rgb(204,204,204);padding-left:1ex">The error on the FreeBSD=
 build servers:<br>
<br>
QUOTE<br>
/wrkdirs/usr/ports/lang/gcc14-devel/work/gcc-14-20240114/gcc/config/aarch64=
/aarch64.cc:13095:50: error: constexpr variable &#39;tiles&#39; must be ini=
tialized by a constant expression<br>
13095 | static constexpr std::pair&lt;unsigned int, char&gt; tiles[] =3D {<=
br>
| ^ ~<br>
13096 | { 0xff, &#39;b&#39; },<br>
| ~~~~~~~~~~~~~~<br>
13097 | { 0x55, &#39;h&#39; },<br>
| ~~~~~~~~~~~~~~<br>
13098 | { 0x11, &#39;s&#39; },<br>
| ~~~~~~~~~~~~~~<br>
13099 | { 0x01, &#39;d&#39; }<br>
| ~~~~~~~~~~~~~<br>
13100 | };<br>
| ~<br>
/wrkdirs/usr/ports/lang/gcc14-devel/work/gcc-14-20240114/gcc/config/aarch64=
/aarch64.cc:13096:5: note: non-constexpr constructor &#39;pair&lt;int, char=
, nullptr&gt;&#39; cannot be used in a constant expression<br>
13096 | { 0xff, &#39;b&#39; },<br>
| ^<br>
/usr/include/c++/v1/__utility/pair.h:225:5: note: declared here<br>
225 | pair(_U1&amp;&amp; __u1, _U2&amp;&amp; __u2)<br>
END QUOTE<br>
<br>
is because C++11 did not have pair constructors being constexpr.<br>
C++14 (and later) does. Yet lang/gcc14-devel &#39;s Makefile says:<br>
<br>
USES=3D=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0compiler:c++11-lang cpe gma=
ke iconv libtool makeinfo perl5 tar:xz<br>
<br>
<br>
=3D=3D=3D<br>
Mark Millard<br>
marklmi at <a href=3D"http://yahoo.com" rel=3D"noreferrer" target=3D"_blank=
">yahoo.com</a><br>
<br>
<br>
</blockquote></div><br clear=3D"all"><br><span class=3D"gmail_signature_pre=
fix">-- </span><br><div dir=3D"ltr" class=3D"gmail_signature"><div dir=3D"l=
tr"><span style=3D"color:rgb(102,102,102)">Nuno Teixeira<br>FreeBSD Committ=
er (ports)</span></div></div>

--000000000000e596e60610d9ecb3--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAFDf7UKhVxXH-SmW%2BS1k0a1kOoGtyZmEQvN0zX4Etucy3pAsjA>