Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 29 May 2023 13:53:44 -0600
From:      Pierre Pronchery <pierre@freebsdfoundation.org>
To:        Kyle Evans <kevans@freebsd.org>
Cc:        Enji Cooper <yaneurabeya@gmail.com>, Antoine Brodin <antoine@freebsd.org>, freebsd-arch@freebsd.org
Subject:   Re: OpenSSL 3.0 for 14.0-RELEASE: issues with 1.x/3.x symbol clashing, ports linking against base OpenSSL, ports that don't compile/link against OpenSSL 3, etc
Message-ID:  <CAAA5UuDV-EatresGFW_zfFMQYsP2MY-iHU_RzHnPnf=kbfHpLg@mail.gmail.com>
In-Reply-To: <CACNAnaEYx9VUeMwVeZ=wN2yjUVmLxT-n_Kjk1wFW_O94SH09rg@mail.gmail.com>
References:  <CAALwa8=-3cej2YDF5FpGMNWhgQ4SoTKUQH9aArNNqxdWN8ptJA@mail.gmail.com> <CEFF2332-CC06-4F5E-9618-ABBD5949BFDE@gmail.com> <CACNAnaEYx9VUeMwVeZ=wN2yjUVmLxT-n_Kjk1wFW_O94SH09rg@mail.gmail.com>

index | next in thread | previous in thread | raw e-mail

[-- Attachment #1 --]
Hi Kyle, everyone,

Thanks for the hints!

Unfortunately I am still not able to make your solution work. With
"SUBDIR_DEPEND_modules= libcrypto" (no "S") and "SUBDIR_PARALLEL=" the
build fails with:
"make[4]: make[4]: don't know how to make
all_subdir_secure/lib/libcrypto/libcrypto. Stop"

I'm looking at other places in the source tree to try to reproduce the
behaviour we want.

In the meantime what I did is to remove LIBADD=crypto in
modules/Makefile.inc, but I am not sure yet if this is going to work or not.

Cheers,
-- Pierre

On Thu, May 11, 2023 at 9:45 AM Kyle Evans <kevans@freebsd.org> wrote:

> On Thu, May 11, 2023 at 9:54 AM Enji Cooper <yaneurabeya@gmail.com> wrote:
> >
> >
> > > On May 11, 2023, at 00:23, Antoine Brodin <antoine@freebsd.org> wrote:
> > >
> > > On Thu, May 11, 2023 at 6:31 AM Pierre Pronchery
> > > <pierre@freebsdfoundation.org> wrote:
> > >>
> > >>                Hi everyone,
> > >>
> > >> It's been a long and tough fight, but I finally managed to complete a
> > >> `make buildworld` on amd64 with the latest state of my work on OpenSSL
> > >> 3; see https://github.com/freebsd/freebsd-src/pull/740 for a first
> draft
> > >> of a pull-request via GitHub.
> > >>
> > >> I will probably not be able to work on this again until the DevSummit
> at
> > >> BSDCan, so feel free to take it from there until then.
> > >>
> > >> HTH!
> > >> -- khorben
> > >
> > > Thanks,  I have this error during buildworld:
> > >
> > > ===> secure/lib/libcrypto/modules/fips (all)
> > > make[6]:
> /usr/obj/poudriere/data/src-openssl3/amd64.amd64/secure/lib/libcrypto/modules/fips/.depend,
> > > 1: ignoring stale .depend for
> > >
> /usr/obj/poudriere/data/src-openssl3/amd64.amd64/tmp/usr/lib/libcrypto.a
> > > building shared library fips.so
> > > cc -target x86_64-unknown-freebsd14.0
> > > --sysroot=/usr/obj/poudriere/data/src-openssl3/amd64.amd64/tmp
> > > -B/usr/obj/poudriere/data/src-openssl3/amd64.amd64/tmp/usr/bin
> > > -Wl,-zrelro   -fstack-protector-strong -shared -Wl,-x
> > > -Wl,--fatal-warnings -Wl,--warn-shared-textrel  -o fips.so.full
> > > -Wl,-soname,fips.so fips_entry.pico fipsprov.pico self_test.pico
> > > self_test_kats.pico  -lcrypto
> > > ld: error: unable to find library -lcrypto
> > > cc: error: linker command failed with exit code 1 (use -v to see
> invocation)
> > > *** Error code 1
> >
> > Good find!
> >
> > The modules directory will likely need to be built in a later stage of
> world (after libcrypto has been installed). That, or LDFLAGS needs to be
> adjusted to find libcrypto in the build tree.
> >
>
> I suspect it's a fairly simple one, actually: move all of the parts
> that actually build libcrypto into a subdir of secure/lib/libcrypto
> and make sure there's a proper SUBDIR_DEPENDS_modules= libcrypto. The
> module is built in secure/lib/libcrypto/Makefile, but I would guess
> either it's racing the build of modules/ (SUBDIR) against the build of
> the module in the parent Makefile, or it's just going to build the
> SUBDIR first every time. I don't recall the exact behavior of make
> here.
>
> libcrypto is in _prebuild_libs, but I don't think we have any way you
> can actually tell we're in the prebuild phase to avoid SUBDIR'ing in
> the modules/ while we're doing the earlier build. If we did, the later
> all pass should descend back into libcrypto/ and do nothing for the
> lib itself but build the modules.
>
> Thanks,
>
> Kyle Evans
>

[-- Attachment #2 --]
<div dir="ltr"><div>Hi Kyle, everyone,</div><div><br></div>Thanks for the hints!<div><br></div><div>Unfortunately I am still not able to make your solution work. With &quot;SUBDIR_DEPEND_modules= libcrypto&quot; (no &quot;S&quot;) and &quot;SUBDIR_PARALLEL=&quot; the build fails with:</div><div>&quot;make[4]: make[4]: don&#39;t know how to make all_subdir_secure/lib/libcrypto/libcrypto. Stop&quot;</div><div><br></div><div>I&#39;m looking at other places in the source tree to try to reproduce the behaviour we want.</div><div><br></div><div>In the meantime what I did is to remove LIBADD=crypto in modules/Makefile.inc, but I am not sure yet if this is going to work or not.</div><div><br></div><div>Cheers,</div><div>-- Pierre</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, May 11, 2023 at 9:45 AM Kyle Evans &lt;<a href="mailto:kevans@freebsd.org" target="_blank">kevans@freebsd.org</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">On Thu, May 11, 2023 at 9:54 AM Enji Cooper &lt;<a href="mailto:yaneurabeya@gmail.com" target="_blank">yaneurabeya@gmail.com</a>&gt; wrote:<br>
&gt;<br>
&gt;<br>
&gt; &gt; On May 11, 2023, at 00:23, Antoine Brodin &lt;<a href="mailto:antoine@freebsd.org" target="_blank">antoine@freebsd.org</a>&gt; wrote:<br>
&gt; &gt;<br>
&gt; &gt; On Thu, May 11, 2023 at 6:31 AM Pierre Pronchery<br>
&gt; &gt; &lt;<a href="mailto:pierre@freebsdfoundation.org" target="_blank">pierre@freebsdfoundation.org</a>&gt; wrote:<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt;                Hi everyone,<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; It&#39;s been a long and tough fight, but I finally managed to complete a<br>
&gt; &gt;&gt; `make buildworld` on amd64 with the latest state of my work on OpenSSL<br>
&gt; &gt;&gt; 3; see <a href="https://github.com/freebsd/freebsd-src/pull/740" rel="noreferrer" target="_blank">https://github.com/freebsd/freebsd-src/pull/740</a>; for a first draft<br>
&gt; &gt;&gt; of a pull-request via GitHub.<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; I will probably not be able to work on this again until the DevSummit at<br>
&gt; &gt;&gt; BSDCan, so feel free to take it from there until then.<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; HTH!<br>
&gt; &gt;&gt; -- khorben<br>
&gt; &gt;<br>
&gt; &gt; Thanks,  I have this error during buildworld:<br>
&gt; &gt;<br>
&gt; &gt; ===&gt; secure/lib/libcrypto/modules/fips (all)<br>
&gt; &gt; make[6]: /usr/obj/poudriere/data/src-openssl3/amd64.amd64/secure/lib/libcrypto/modules/fips/.depend,<br>
&gt; &gt; 1: ignoring stale .depend for<br>
&gt; &gt; /usr/obj/poudriere/data/src-openssl3/amd64.amd64/tmp/usr/lib/libcrypto.a<br>
&gt; &gt; building shared library fips.so<br>
&gt; &gt; cc -target x86_64-unknown-freebsd14.0<br>
&gt; &gt; --sysroot=/usr/obj/poudriere/data/src-openssl3/amd64.amd64/tmp<br>
&gt; &gt; -B/usr/obj/poudriere/data/src-openssl3/amd64.amd64/tmp/usr/bin<br>
&gt; &gt; -Wl,-zrelro   -fstack-protector-strong -shared -Wl,-x<br>
&gt; &gt; -Wl,--fatal-warnings -Wl,--warn-shared-textrel  -o fips.so.full<br>
&gt; &gt; -Wl,-soname,fips.so fips_entry.pico fipsprov.pico self_test.pico<br>
&gt; &gt; self_test_kats.pico  -lcrypto<br>
&gt; &gt; ld: error: unable to find library -lcrypto<br>
&gt; &gt; cc: error: linker command failed with exit code 1 (use -v to see invocation)<br>
&gt; &gt; *** Error code 1<br>
&gt;<br>
&gt; Good find!<br>
&gt;<br>
&gt; The modules directory will likely need to be built in a later stage of world (after libcrypto has been installed). That, or LDFLAGS needs to be adjusted to find libcrypto in the build tree.<br>
&gt;<br>
<br>
I suspect it&#39;s a fairly simple one, actually: move all of the parts<br>
that actually build libcrypto into a subdir of secure/lib/libcrypto<br>
and make sure there&#39;s a proper SUBDIR_DEPENDS_modules= libcrypto. The<br>
module is built in secure/lib/libcrypto/Makefile, but I would guess<br>
either it&#39;s racing the build of modules/ (SUBDIR) against the build of<br>
the module in the parent Makefile, or it&#39;s just going to build the<br>
SUBDIR first every time. I don&#39;t recall the exact behavior of make<br>
here.<br>
<br>
libcrypto is in _prebuild_libs, but I don&#39;t think we have any way you<br>
can actually tell we&#39;re in the prebuild phase to avoid SUBDIR&#39;ing in<br>
the modules/ while we&#39;re doing the earlier build. If we did, the later<br>
all pass should descend back into libcrypto/ and do nothing for the<br>
lib itself but build the modules.<br>
<br>
Thanks,<br>
<br>
Kyle Evans<br>
</blockquote></div>
help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAAA5UuDV-EatresGFW_zfFMQYsP2MY-iHU_RzHnPnf=kbfHpLg>