Bug 274507 - security/lastpass-cli: ld: error: undefined symbol: EVP_MD_get_size
Summary: security/lastpass-cli: ld: error: undefined symbol: EVP_MD_get_size
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Robert Clausecker
URL:
Keywords:
Depends on: 273961
Blocks:
  Show dependency treegraph
 
Reported: 2023-10-15 22:12 UTC by John W. O'Brien
Modified: 2023-10-19 20:43 UTC (History)
2 users (show)

See Also:
fuz: merge-quarterly+


Attachments
security/lastpass-cli: Pass OPENSSL_ROOT_DIR hint to CMake (489 bytes, text/plain)
2023-10-15 22:12 UTC, John W. O'Brien
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description John W. O'Brien 2023-10-15 22:12:08 UTC
Created attachment 245659 [details]
security/lastpass-cli: Pass OPENSSL_ROOT_DIR hint to CMake

The recent change, switching security/openssl from 1.1.1w to 3.0.11 uncovered a latent bug in security/lastpass-cli, which always uses OpenSSL from base regardless of the ssl setting in DEFAULT_VERSIONS. With DEFAULT_VERSIONS+=ssl=openssl, the configure phase reports "Installing openssl-3.0.11,1" and subsequently

    -- Found OpenSSL: /usr/lib/libcrypto.so (found version "1.1.1t")

The build phase then terminates after

====
ld: error: undefined symbol: EVP_MD_get_size
>>> referenced by pbkdf2.c
>>>               CMakeFiles/lpass.dir/pbkdf2.c.o:(fallback_pkcs5_pbkdf2_hmac)
cc: error: linker command failed with exit code 1 (use -v to see invocation)
*** Error code 1

Stop.
====

because OpenSSL 3.0 renamed EVP_MD_size to EVP_MD_get_size, retaining the former as a non-deprecated alias implemented as a preprocessor macro.
Comment 1 Robert Clausecker freebsd_committer freebsd_triage 2023-10-16 05:34:36 UTC
Thank you for your submission.
I'll merge this fix into the quarterly branch.
Comment 2 commit-hook freebsd_committer freebsd_triage 2023-10-19 07:09:20 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=76da322580253a6aaad9c9ec0fdc6a5427242865

commit 76da322580253a6aaad9c9ec0fdc6a5427242865
Author:     John W. O'Brien <john@saltant.com>
AuthorDate: 2023-10-16 05:33:26 +0000
Commit:     Robert Clausecker <fuz@FreeBSD.org>
CommitDate: 2023-10-19 07:07:27 +0000

    security/lastpass-cli: ensure consistent OpenSSL usage

    The recent change, switching security/openssl from 1.1.1w to 3.0.11
    uncovered a latent bug in security/lastpass-cli, which always uses
    OpenSSL from base regardless of the ssl setting in DEFAULT_VERSIONS.
    With DEFAULT_VERSIONS+=ssl=openssl, the configure phase reports
    "Installing openssl-3.0.11,1" and subsequently

        -- Found OpenSSL: /usr/lib/libcrypto.so (found version "1.1.1t")

    This patch fixes the bug and ensures the same OpenSSL version is used
    throughout.

    PR:             274507
    MFH:            2023Q4

 security/lastpass-cli/Makefile | 2 ++
 1 file changed, 2 insertions(+)
Comment 3 commit-hook freebsd_committer freebsd_triage 2023-10-19 07:11:46 UTC
A commit in branch 2023Q4 references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=762e37327837dbc4ea55c0c22620fc05907e0c28

commit 762e37327837dbc4ea55c0c22620fc05907e0c28
Author:     John W. O'Brien <john@saltant.com>
AuthorDate: 2023-10-16 05:33:26 +0000
Commit:     Robert Clausecker <fuz@FreeBSD.org>
CommitDate: 2023-10-19 07:10:08 +0000

    security/lastpass-cli: ensure consistent OpenSSL usage

    The recent change, switching security/openssl from 1.1.1w to 3.0.11
    uncovered a latent bug in security/lastpass-cli, which always uses
    OpenSSL from base regardless of the ssl setting in DEFAULT_VERSIONS.
    With DEFAULT_VERSIONS+=ssl=openssl, the configure phase reports
    "Installing openssl-3.0.11,1" and subsequently

        -- Found OpenSSL: /usr/lib/libcrypto.so (found version "1.1.1t")

    This patch fixes the bug and ensures the same OpenSSL version is used
    throughout.

    PR:             274507
    MFH:            2023Q4
    (cherry picked from commit 76da322580253a6aaad9c9ec0fdc6a5427242865)

 security/lastpass-cli/Makefile | 2 ++
 1 file changed, 2 insertions(+)
Comment 4 Robert Clausecker freebsd_committer freebsd_triage 2023-10-19 07:16:44 UTC
Thank you for your contribution.
Comment 5 Charlie Li freebsd_committer freebsd_triage 2023-10-19 20:43:02 UTC
This needs to be reverted once the linked bug fix lands.