Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 11 May 2023 10:45:18 -0500
From:      Kyle Evans <kevans@freebsd.org>
To:        Enji Cooper <yaneurabeya@gmail.com>
Cc:        Antoine Brodin <antoine@freebsd.org>, Pierre Pronchery <pierre@freebsdfoundation.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:  <CACNAnaEYx9VUeMwVeZ=wN2yjUVmLxT-n_Kjk1wFW_O94SH09rg@mail.gmail.com>
In-Reply-To: <CEFF2332-CC06-4F5E-9618-ABBD5949BFDE@gmail.com>
References:  <CAALwa8=-3cej2YDF5FpGMNWhgQ4SoTKUQH9aArNNqxdWN8ptJA@mail.gmail.com> <CEFF2332-CC06-4F5E-9618-ABBD5949BFDE@gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, May 11, 2023 at 9:54=E2=80=AFAM Enji Cooper <yaneurabeya@gmail.com>=
 wrote:
>
>
> > On May 11, 2023, at 00:23, Antoine Brodin <antoine@freebsd.org> wrote:
> >
> > =EF=BB=BFOn Thu, May 11, 2023 at 6:31=E2=80=AFAM 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 dra=
ft
> >> 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:
> >
> > =3D=3D=3D> secure/lib/libcrypto/modules/fips (all)
> > make[6]: /usr/obj/poudriere/data/src-openssl3/amd64.amd64/secure/lib/li=
bcrypto/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=3D/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 invoca=
tion)
> > *** Error code 1
>
> Good find!
>
> The modules directory will likely need to be built in a later stage of wo=
rld (after libcrypto has been installed). That, or LDFLAGS needs to be adju=
sted 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=3D 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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CACNAnaEYx9VUeMwVeZ=wN2yjUVmLxT-n_Kjk1wFW_O94SH09rg>