<div dir="ltr">Hi!<div><br></div><div>Have you tried the script from <a href="https://stage.build2.org/0/0.17.0-a.0/">https://stage.build2.org/0/0.17.0-a.0/</a>?</div><div><br></div><div><div><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div>// Ryan</div></div></div></div></div></div></div></div><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div style="color:rgb(34,34,34)"><div dir="ltr"><div dir="ltr"><div dir="ltr"></div></div></div></div></div></div></div><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Apr 10, 2024 at 6:45 PM Michael Martin Moro via users <<a href="mailto:users@build2.org">users@build2.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><u></u>
<div>
<p>Greetings !</p>
<p>I have a Dockerfile that I use to build projects with build2. Up
until recently, I've been using ubuntu:22.04 with this Dockerfile.
Today, I tried to update to 24.04.</p>
<p>The good thing is that the setup is very easy to reproduce.
Here's the Dockerfile, up until the point of failure:</p>
<blockquote>
<p><span style="font-family:monospace"><span style="background-color:rgb(255,255,255)">FROM</span><span style="background-color:rgb(255,255,255)"> ubuntu:22.04
</span><br>
<br>
<span style="background-color:rgb(255,255,255)">WORKDIR</span><span style="background-color:rgb(255,255,255)"> /tmp
</span><br>
<span style="background-color:rgb(255,255,255)">ENV</span><span style="background-color:rgb(255,255,255)">
LD_LIBRARY_PATH /usr/local/lib
</span><br>
<span style="background-color:rgb(255,255,255)">ENV</span><span style="background-color:rgb(255,255,255)">
DEBIAN_FRONTEND </span><span style="background-color:rgb(255,255,255)">"noninteractive"</span><span style="background-color:rgb(255,255,255)">
</span><br>
<span style="background-color:rgb(255,255,255)">ENV</span><span style="background-color:rgb(255,255,255)"> TZ </span><span style="background-color:rgb(255,255,255)">"Europe/London"</span><span style="background-color:rgb(255,255,255)">
</span><br>
<br>
<span style="background-color:rgb(255,255,255)">RUN</span><span style="background-color:rgb(255,255,255)"> apt-get </span><span style="background-color:rgb(255,255,255)">-y</span><span style="background-color:rgb(255,255,255)"> </span><span style="background-color:rgb(255,255,255)">--allow-unauthenticated</span><span style="background-color:rgb(255,255,255)"> update </span><span style="background-color:rgb(255,255,255)">&&</span><span style="background-color:rgb(255,255,255)"> </span><span style="background-color:rgb(255,255,255)">\</span><span style="background-color:rgb(255,255,255)">
</span><br>
apt-get <span style="background-color:rgb(255,255,255)">-y</span><span style="background-color:rgb(255,255,255)"> </span><span style="background-color:rgb(255,255,255)">--allow-unauthenticated</span><span style="background-color:rgb(255,255,255)"> upgrade </span><span style="background-color:rgb(255,255,255)">&&</span><span style="background-color:rgb(255,255,255)"> </span><span style="background-color:rgb(255,255,255)">\</span><span style="background-color:rgb(255,255,255)">
</span><br>
apt-get <span style="background-color:rgb(255,255,255)">-y</span><span style="background-color:rgb(255,255,255)"> install curl
</span><span style="background-color:rgb(255,255,255)">\</span><span style="background-color:rgb(255,255,255)">
</span><br>
cmake <span style="background-color:rgb(255,255,255)">\</span><span style="background-color:rgb(255,255,255)">
</span><br>
pkg-config <span style="background-color:rgb(255,255,255)">\</span><span style="background-color:rgb(255,255,255)">
</span><br>
build-essential <span style="background-color:rgb(255,255,255)">\</span><span style="background-color:rgb(255,255,255)">
</span><br>
libbz2-dev <span style="background-color:rgb(255,255,255)">\</span><span style="background-color:rgb(255,255,255)">
</span><br>
libssl-dev <span style="background-color:rgb(255,255,255)">\</span><span style="background-color:rgb(255,255,255)">
</span><br>
git
<br>
<br>
<span style="background-color:rgb(255,255,255)">COPY</span><span style="background-color:rgb(255,255,255)">
build-build2.sh build-build2.sh<br>
RUN bash build-build2.sh<br>
</span></span></p>
</blockquote>
<p>
</p>
<p>And here's the build-build2.sh script:</p>
<blockquote>
<p><span style="font-family:monospace"><span style="background-color:rgb(255,255,255)">#!/bin/sh -ex</span><span style="background-color:rgb(255,255,255)">
</span><br>
<br>
<span style="background-color:rgb(255,255,255)">export</span><span style="background-color:rgb(255,255,255)"> </span><span style="font-weight:bold;background-color:rgb(255,255,255)">BUILD2_VERSION</span><span style="background-color:rgb(255,255,255)">=</span><span style="background-color:rgb(255,255,255)">"</span><span style="background-color:rgb(255,255,255)">0.16.0</span><span style="background-color:rgb(255,255,255)">"</span><span style="background-color:rgb(255,255,255)">
</span><br>
<span style="background-color:rgb(255,255,255)">export</span><span style="background-color:rgb(255,255,255)"> </span><span style="font-weight:bold;background-color:rgb(255,255,255)">BUILD2_FINGERPRINT</span><span style="background-color:rgb(255,255,255)">=</span><span style="background-color:rgb(255,255,255)">"</span><span style="background-color:rgb(255,255,255)">70:64:FE:E4:E0:F3:60:F1:B4:51:E1:FA:12:5C:E0:B3:DB:DF:96:33:39:B9:2E:E5:C2:68:63:4C:A6:47:39:43</span><span style="background-color:rgb(255,255,255)">"</span><span style="background-color:rgb(255,255,255)">
</span><br>
<br>
curl <span style="background-color:rgb(255,255,255)">-sSfO</span><span style="background-color:rgb(255,255,255)">
<a href="https://download.build2.org/" target="_blank">https://download.build2.org/</a></span><span style="background-color:rgb(255,255,255)">$BUILD2_VERSION</span><span style="background-color:rgb(255,255,255)">/build2-install-</span><span style="background-color:rgb(255,255,255)">$BUILD2_VERSION</span><span style="background-color:rgb(255,255,255)">.sh
</span><br>
<span style="background-color:rgb(255,255,255)">chmod</span><span style="background-color:rgb(255,255,255)"> </span><span style="background-color:rgb(255,255,255)">+x</span><span style="background-color:rgb(255,255,255)">
build2-install-</span><span style="background-color:rgb(255,255,255)">$BUILD2_VERSION</span><span style="background-color:rgb(255,255,255)">.sh
</span><br>
sh build2-install-<span style="background-color:rgb(255,255,255)">$BUILD2_VERSION</span><span style="background-color:rgb(255,255,255)">.sh </span><span style="background-color:rgb(255,255,255)">--yes</span><span style="background-color:rgb(255,255,255)"> </span><span style="background-color:rgb(255,255,255)">--trust</span><span style="background-color:rgb(255,255,255)"> </span><span style="background-color:rgb(255,255,255)">"</span><span style="background-color:rgb(255,255,255)">$BUILD2_FINGERPRINT</span><span style="background-color:rgb(255,255,255)">"</span><br>
</span></p>
</blockquote>
<p>Using these 2 files as they are, you should be able to build a
functional ubuntu 22.04 with build2 installed.</p>
<p>However, changing the first line of the Dockerfile to `FROM
ubuntu:24.04` will cause the build2 install script to fail with
the following errors:</p>
<blockquote>
<p><span style="font-family:monospace"><span style="font-weight:bold;color:rgb(0,0,0);background-color:rgb(255,255,255)">/tmp/build2-toolchain-0.16.0/libpkg-config/libpkg-config/bsdstubs.c:29:1:</span><span style="color:rgb(0,0,0);background-color:rgb(255,255,255)"> </span><span style="font-weight:bold;color:rgb(255,84,84);background-color:rgb(255,255,255)">error:
</span><span style="color:rgb(0,0,0);background-color:rgb(255,255,255)">static
declaration of '</span><span style="font-weight:bold;color:rgb(0,0,0);background-color:rgb(255,255,255)">strlcpy</span><span style="color:rgb(0,0,0);background-color:rgb(255,255,255)">' follows
non-static declaration
</span><br>
29 | <span style="font-weight:bold;color:rgb(255,84,84);background-color:rgb(255,255,255)">strlcpy</span><span style="color:rgb(0,0,0);background-color:rgb(255,255,255)"> (char* dst,
const char* src, size_t siz)
</span><br>
| <span style="font-weight:bold;color:rgb(255,84,84);background-color:rgb(255,255,255)">^~~~~~~</span><span style="color:rgb(0,0,0);background-color:rgb(255,255,255)">
</span><br>
In file included from <span style="font-weight:bold;color:rgb(0,0,0);background-color:rgb(255,255,255)">/tmp/build2-toolchain-0.16.0/libpkg-config/libpkg-config/stdinc.h:35</span><span style="color:rgb(0,0,0);background-color:rgb(255,255,255)">,
</span><br>
from <span style="font-weight:bold;color:rgb(0,0,0);background-color:rgb(255,255,255)">/tmp/build2-toolchain-0.16.0/libpkg-config/libpkg-config/bsdstubs.c:17</span><span style="color:rgb(0,0,0);background-color:rgb(255,255,255)">:
</span><br>
<span style="font-weight:bold;color:rgb(0,0,0);background-color:rgb(255,255,255)">/usr/include/string.h:506:15:</span><span style="color:rgb(0,0,0);background-color:rgb(255,255,255)"> </span><span style="font-weight:bold;color:rgb(84,255,255);background-color:rgb(255,255,255)">note: </span><span style="color:rgb(0,0,0);background-color:rgb(255,255,255)">previous
declaration of '</span><span style="font-weight:bold;color:rgb(0,0,0);background-color:rgb(255,255,255)">strlcpy</span><span style="color:rgb(0,0,0);background-color:rgb(255,255,255)">' with type
'</span><span style="font-weight:bold;color:rgb(0,0,0);background-color:rgb(255,255,255)">size_t(char
* restrict, const char * restrict, size_t)</span><span style="color:rgb(0,0,0);background-color:rgb(255,255,255)">' {aka '</span><span style="font-weight:bold;color:rgb(0,0,0);background-color:rgb(255,255,255)">long
unsigned int(char * restrict, const char * restrict, long
unsigned int)</span><span style="color:rgb(0,0,0);background-color:rgb(255,255,255)">'}
</span><br>
506 | extern size_t <span style="font-weight:bold;color:rgb(84,255,255);background-color:rgb(255,255,255)">strlcpy</span><span style="color:rgb(0,0,0);background-color:rgb(255,255,255)"> (char
*__restrict __dest,
</span><br>
| <span style="font-weight:bold;color:rgb(84,255,255);background-color:rgb(255,255,255)">^~~~~~~</span><span style="color:rgb(0,0,0);background-color:rgb(255,255,255)">
</span><br>
<span style="font-weight:bold;color:rgb(0,0,0);background-color:rgb(255,255,255)">/tmp/build2-toolchain-0.16.0/libpkg-config/libpkg-config/bsdstubs.c:67:1:</span><span style="color:rgb(0,0,0);background-color:rgb(255,255,255)"> </span><span style="font-weight:bold;color:rgb(255,84,84);background-color:rgb(255,255,255)">error:
</span><span style="color:rgb(0,0,0);background-color:rgb(255,255,255)">static
declaration of '</span><span style="font-weight:bold;color:rgb(0,0,0);background-color:rgb(255,255,255)">strlcat</span><span style="color:rgb(0,0,0);background-color:rgb(255,255,255)">' follows
non-static declaration
</span><br>
67 | <span style="font-weight:bold;color:rgb(255,84,84);background-color:rgb(255,255,255)">strlcat</span><span style="color:rgb(0,0,0);background-color:rgb(255,255,255)"> (char* dst,
const char* src, size_t siz)
</span><br>
| <span style="font-weight:bold;color:rgb(255,84,84);background-color:rgb(255,255,255)">^~~~~~~</span><span style="color:rgb(0,0,0);background-color:rgb(255,255,255)">
</span><br>
<span style="font-weight:bold;color:rgb(0,0,0);background-color:rgb(255,255,255)">/usr/include/string.h:512:15:</span><span style="color:rgb(0,0,0);background-color:rgb(255,255,255)"> </span><span style="font-weight:bold;color:rgb(84,255,255);background-color:rgb(255,255,255)">note: </span><span style="color:rgb(0,0,0);background-color:rgb(255,255,255)">previous
declaration of '</span><span style="font-weight:bold;color:rgb(0,0,0);background-color:rgb(255,255,255)">strlcat</span><span style="color:rgb(0,0,0);background-color:rgb(255,255,255)">' with type
'</span><span style="font-weight:bold;color:rgb(0,0,0);background-color:rgb(255,255,255)">size_t(char
* restrict, const char * restrict, size_t)</span><span style="color:rgb(0,0,0);background-color:rgb(255,255,255)">' {aka '</span><span style="font-weight:bold;color:rgb(0,0,0);background-color:rgb(255,255,255)">long
unsigned int(char * restrict, const char * restrict, long
unsigned int)</span><span style="color:rgb(0,0,0);background-color:rgb(255,255,255)">'}
</span><br>
512 | extern size_t <span style="font-weight:bold;color:rgb(84,255,255);background-color:rgb(255,255,255)">strlcat</span><span style="color:rgb(0,0,0);background-color:rgb(255,255,255)"> (char
*__restrict __dest,
</span><br>
| <span style="font-weight:bold;color:rgb(84,255,255);background-color:rgb(255,255,255)">^~~~~~~</span><br>
</span></p>
</blockquote>
<p>I have no clear idea what's going on. Ubuntu 24.04 ships g++13,
which I have already used countless times on Fedora to build
build2 using the same script.<br>
</p>
<p>I'm guessing <span style="font-family:monospace"><span style="color:rgb(0,0,0);background-color:rgb(255,255,255)">HAVE_STRLCPY</span>
</span>and <span style="font-family:monospace"><span style="color:rgb(0,0,0);background-color:rgb(255,255,255)">HAVE_STRLCAT</span>
</span>should've been defined, and weren't. Seems like the
documentation for libbuild2-autoconf may contain the relevant
information to fix the issue... I might look into it again at a
later time, but for now I'm hoping this message will be helpful !</p>
<p>Bye !<br>
</p>
</div>
</blockquote></div>