Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Perl] Static linker fix on Linux #3642

Merged
merged 14 commits into from Oct 20, 2023
Merged

[Perl] Static linker fix on Linux #3642

merged 14 commits into from Oct 20, 2023

Conversation

Akkadius
Copy link
Member

Perl wasn't fully linking in static binaries. We use these in our release binaries (portable)

Before

image

After

-- * Perl:                                    FOUND *
-- * libsodium:                               FOUND *

Problem(s)

Perl Cmake module does not know where to find the .a (static archive) so PERL_LIBRARY is used to supply to the FindPerlLibs cmake module to look for the perl module instead of the /usr/lib paths

Afterwards, we have a linker error because the archive does not have a symbol to a libcrypt function, thus we link to the static archive of libcrypt

/usr/bin/ld: /usr/lib/x86_64-linux-gnu/libperl.a(pp.o): in function `Perl_pp_crypt':
(.text+0xb364): undefined reference to `crypt_r'
collect2: error: ld returned 1 exit status

@Akkadius Akkadius merged commit 9959070 into master Oct 20, 2023
2 checks passed
@Akkadius Akkadius deleted the akkadius/perl-sl-test branch October 20, 2023 22:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants