Bug 274512 - devel/cmake-core: Fails to link with non-base SSL
Summary: devel/cmake-core: Fails to link with non-base SSL
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: freebsd-kde (group)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-10-16 12:13 UTC by Dean E. Weimer
Modified: 2023-10-17 01:27 UTC (History)
2 users (show)

See Also:
jhale: maintainer-feedback+


Attachments
Poudriere Build Log (233.56 KB, text/plain)
2023-10-16 12:13 UTC, Dean E. Weimer
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Dean E. Weimer 2023-10-16 12:13:23 UTC
Created attachment 245672 [details]
Poudriere Build Log

Fails to Build with OpenSSL from ports since switch to OpenSSL 3.0.11


[ 31%] Building C object Utilities/cmcurl/lib/CMakeFiles/cmcurl.dir/vquic/vquic.c.o
[ 31%] Building C object Utilities/cmcurl/lib/CMakeFiles/cmcurl.dir/vssh/libssh.c.o
[ 31%] Building C object Utilities/cmcurl/lib/CMakeFiles/cmcurl.dir/vssh/libssh2.c.o
[ 32%] Building C object Utilities/cmcurl/lib/CMakeFiles/cmcurl.dir/vssh/wolfssh.c.o
[ 32%] Linking C static library libcmcurl.a
[ 32%] Built target cmcurl
[ 32%] Building C object Utilities/cmcurl/CMakeFiles/curltest.dir/curltest.c.o
[ 33%] Linking C executable curltest
ld: error: undefined symbol: EVP_PKEY_id
>>> referenced by openssl.c
>>>               openssl.c.o:(Curl_ossl_certchain) in archive lib/libcmcurl.a
>>> referenced by openssl.c
>>>               openssl.c.o:(cert_stuff) in archive lib/libcmcurl.a

ld: error: undefined symbol: SSL_get_peer_certificate
>>> referenced by openssl.c
>>>               openssl.c.o:(ossl_connect_common) in archive lib/libcmcurl.a
>>> referenced by openssl.c
>>>               openssl.c.o:(ossl_connect_common) in archive lib/libcmcurl.a
cc: error: linker command failed with exit code 1 (use -v to see invocation)
*** Error code 1

Stop.
make[3]: stopped in /wrkdirs/usr/ports/devel/cmake-core/work/cmake-3.26.1
*** Error code 1

Stop.
make[2]: stopped in /wrkdirs/usr/ports/devel/cmake-core/work/cmake-3.26.1
*** Error code 1

Stop.
make[1]: stopped in /wrkdirs/usr/ports/devel/cmake-core/work/cmake-3.26.1
*** Error code 1

Stop.
make: stopped in /usr/ports/devel/cmake-core
=>> Cleaning up wrkdir
===>  Cleaning for cmake-core-3.26.1_3
build of devel/cmake-core | cmake-core-3.26.1_3 ended at Sun Oct 15 07:49:10 CDT 2023
build time: 00:02:06
!!! build failure encountered !!!
Comment 1 Jason E. Hale freebsd_committer freebsd_triage 2023-10-16 15:11:15 UTC
I was also seeing errors with LibreSSL when it was linking curltest, but since I don’t normally use it and nobody else had raised the issue, I thought it was just a configuration error on my part.

Since my goal was testing another port, I didn’t look too deeply into it, just needed CMake up and running ASAP. My hotfix was to add the following to devel/cmake-core/Makefile:

CFLAGS+=        -I${OPENSSLINC}
LDFLAGS+=       -L${OPENSSLLIB}

I’ll look into a better fix since I know it’s not just me now, but could you try the above and report back? Sorry I can’t make a proper patch ATM…AFK.
Comment 2 Dean E. Weimer 2023-10-16 15:57:46 UTC
(In reply to Jason E. Hale from comment #1)

Adding those worked.
Comment 3 commit-hook freebsd_committer freebsd_triage 2023-10-17 00:30:02 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=90b6cf74484bcd5a922d85210f71b1bc4c849b0c

commit 90b6cf74484bcd5a922d85210f71b1bc4c849b0c
Author:     Jason E. Hale <jhale@FreeBSD.org>
AuthorDate: 2023-10-17 00:06:37 +0000
Commit:     Jason E. Hale <jhale@FreeBSD.org>
CommitDate: 2023-10-17 00:14:15 +0000

    devel/cmake-core: Fix build with non-base SSL

    This is a just a hotfix to keep things building, but more investigation
    is certaintly warranted.

    PR:             274512
    Reported by:    Dean E. Weimer <dweimer@dweimer.net>

 devel/cmake-core/Makefile | 4 ++++
 1 file changed, 4 insertions(+)
Comment 4 Jason E. Hale freebsd_committer freebsd_triage 2023-10-17 00:33:59 UTC
Quick fix committed, but I'll try to look for a better solution for the CMake update.
Comment 5 Charlie Li freebsd_committer freebsd_triage 2023-10-17 01:27:47 UTC
This smells like another devel/pkgconf victim, as in bug 273961.