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

Cannot locate symbol 'sk_num' in native library 'libssl.so' #34

Closed
robertlemmen opened this issue Jun 6, 2018 · 10 comments
Closed

Cannot locate symbol 'sk_num' in native library 'libssl.so' #34

robertlemmen opened this issue Jun 6, 2018 · 10 comments

Comments

@robertlemmen
Copy link

https://www.reddit.com/r/perl6/comments/8oxlvk/unable_to_install_a_library/

@donpdonp
Copy link

building IO::Socket::Async::SSL in Ubuntu 18.04 / openssl 1.1.0g gives:

===> Testing [OK] for OpenSSL:ver<0.1.19>:auth<github:sergot>
===> Testing: IO::Socket::Async::SSL:ver<0.7.0>
Cannot locate symbol 'sk_num' in native library 'libssl.so'
  in method setup at /home/donp/.rakudobrew/moar-2018.06/install/share/perl6/sources/24DD121B5B4774C04A7084827BFAD92199756E03 (NativeCall) line 283
  in method CALL-ME at /home/donp/.rakudobrew/moar-2018.06/install/share/perl6/sources/24DD121B5B4774C04A7084827BFAD92199756E03 (NativeCall) line 570
  in block  at /home/donp/.zef/store/IO-Socket-Async-SSL-0.7.0.tar.gz/IO-Socket-Async-SSL-0.7.0/lib/IO/Socket/Async/SSL.pm6 (IO::Socket::Async::SSL) line 436
  in block  at /home/donp/.zef/store/IO-Socket-Async-SSL-0.7.0.tar.gz/IO-Socket-Async-SSL-0.7.0/lib/IO/Socket/Async/SSL.pm6 (IO::Socket::Async::SSL) line 401
  in block <unit> at t/client-server.t line 171

@jnthn
Copy link
Collaborator

jnthn commented Jul 16, 2018

Yes, unfortunately that symbol went missing in 1.1, so for the moment this module requires a 1.0 library. It had used to work with 1.1 also, so will either need to find how sk_num is spelled in 1.1 or make whatever code was added conditional on version.

@donpdonp
Copy link

donpdonp commented Jul 17, 2018

The OpenSSL module has a patch in the issue comments. For anyone needing a temporary fix, go to the openssl issue listed above for instructions. As far as Socket::Async, I think the only thing to do is wait on OpenSSL for a release with a fix.

@kensanata
Copy link

I've run into this problem as well, on a Debian server. There, I have 1.1.0f-3+deb9u2 installed. On a laptop running PureOS (derived from Debian), I have 1.1.0h-4 installed and I'm no longer seeing the problem. I guess it was fixed somewhere in between?

===> Testing: IO::Socket::Async::SSL:ver<0.7.0>
Cannot locate symbol 'sk_num' in native library 'libssl.so'
  in method setup at /home/alex/rakudo/share/perl6/sources/24DD121B5B4774C04A7084827BFAD92199756E03 (NativeCall) line 283
  in method CALL-ME at /home/alex/rakudo/share/perl6/sources/24DD121B5B4774C04A7084827BFAD92199756E03 (NativeCall) line 570
  in block  at /home/alex/.zef/store/IO-Socket-Async-SSL-0.7.0.tar.gz/IO-Socket-Async-SSL-0.7.0/lib/IO/Socket/Async/SSL.pm6 (IO::Socket::Async::SSL) line 436
  in block  at /home/alex/.zef/store/IO-Socket-Async-SSL-0.7.0.tar.gz/IO-Socket-Async-SSL-0.7.0/lib/IO/Socket/Async/SSL.pm6 (IO::Socket::Async::SSL) line 401
  in block <unit> at t/client-server.t line 171

@rbt
Copy link

rbt commented Oct 8, 2018

I'm seeing this too with the rakudo-star:latest image.

Using --force seems to work around the problem (for installing Cro).

==> DockerFile
FROM rakudo-star:latest

RUN apt-get -y install uuid-dev libssl-dev make gcc
&& zef install IO::Socket::Async::SSL

===> Searching for: IO::Socket::Async::SSL
===> Updated cpan mirror: https://raw.githubusercontent.com/ugexe/Perl6-ecosystems/master/cpan1.json
Cannot locate symbol 'sk_num' in native library 'libssl.so'
in method setup at /usr/share/perl6/sources/24DD121B5B4774C04A7084827BFAD92199756E03 (NativeCall) line 291
in method CALL-ME at /usr/share/perl6/sources/24DD121B5B4774C04A7084827BFAD92199756E03 (NativeCall) line 570
in block at /root/.zef/store/IO-Socket-Async-SSL-0.7.0.tar.gz/IO-Socket-Async-SSL-0.7.0/lib/IO/Socket/Async/SSL.pm6 (IO::Socket::Async::SSL) line 436
in block at /root/.zef/store/IO-Socket-Async-SSL-0.7.0.tar.gz/IO-Socket-Async-SSL-0.7.0/lib/IO/Socket/Async/SSL.pm6 (IO::Socket::Async::SSL) line 401
in block at t/client-server.t line 171

@Tyil
Copy link

Tyil commented Dec 5, 2018

@rbt It seems that you can install libssl1.0-dev in the rakudo-star:latest Docker image, this should work around the issue for now. Forcing past the test stage can result in issues during actual use of the module, and is not something I would recommend.

@usev6
Copy link

usev6 commented Jul 18, 2021

I think this problem should no longer happen. At least I was able to install IO::Socket::Async::SSL on Debian 10 and Ubuntu 20.04.2 LTS (both coming with OpenSSL 1.1.1).

If I'm not mistaken, the following changes made things work:

Please note: The second change was only necessary if the libssl.so was not already present when attempting to install OpenSSL the first time.

However, I think (hope) that this issue could be closed now. It would be great if someone else double checks.

@jnthn
Copy link
Collaborator

jnthn commented Jul 19, 2021

It would be great if someone else double checks.

I also recently installed it on Ubuntu 20.04 without problem, and the changes make sense to me, so I'll close this.

@jnthn jnthn closed this as completed Jul 19, 2021
@melezhik
Copy link

still the issue on Debian 11

sparrow@sparrow01:~/projects/sparky$ zef install "IO::Socket::Async::SSL:ver<0.7.14>:auth<zef:jnthn>"
===> Searching for: IO::Socket::Async::SSL:ver<0.7.14>:auth<zef:jnthn>
===> Testing: IO::Socket::Async::SSL:ver<0.7.14>:auth<zef:jnthn>
[IO::Socket::Async::SSL] Cannot locate symbol 'sk_num' in native library 'libssl.so'
[IO::Socket::Async::SSL]   in method setup at /home/sparrow/.rakubrew/versions/moar-2022.12/share/perl6/core/sources/7B8DEDA2F7DE2BC68AFBCDDDCCD18DA2262416F3 (NativeCall) line 319
[IO::Socket::Async::SSL]   in method setup at /home/sparrow/.rakubrew/versions/moar-2022.12/share/perl6/core/sources/7B8DEDA2F7DE2BC68AFBCDDDCCD18DA2262416F3 (NativeCall) line 366
[IO::Socket::Async::SSL]   in sub raku-nativecall at /home/sparrow/.rakubrew/versions/moar-2022.12/share/perl6/core/sources/71DDCBA5C5EBFAE6A17BAC4C253AA782EA5EBFD3 (NativeCall::Dispatcher) line 46
[IO::Socket::Async::SSL]   in block  at /tmp/.zef/7e3b511ac023a2e1f28acfa71e8cf7a9aa585128.tar.gz/dist/lib/IO/Socket/Async/SSL.pm6 (IO::Socket::Async::SSL) line 540
[IO::Socket::Async::SSL]   in block  at /tmp/.zef/7e3b511ac023a2e1f28acfa71e8cf7a9aa585128.tar.gz/dist/lib/IO/Socket/Async/SSL.pm6 (IO::Socket::Async::SSL) line 500
[IO::Socket::Async::SSL]   in block <unit> at t/client-server.t line 171
===> Testing [FAIL]: IO::Socket::Async::SSL:ver<0.7.14>:auth<zef:jnthn>
Aborting due to test failure: IO::Socket::Async::SSL:ver<0.7.14>:auth<zef:jnthn> (use --force-test to override)
ot@sparrow01:~# apt list --installed|grep ssl

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

libssl-dev/stable,stable-security,stable,stable-security,now 1.1.1n-0+deb11u3 amd64 [installed]
libssl1.1/stable,stable-security,stable,stable-security,now 1.1.1n-0+deb11u3 amd64 [installed]
openssl/stable,stable-security,stable,stable-security,now 1.1.1n-0+deb11u3 amd64 [installed]

@usev6
Copy link

usev6 commented Jan 18, 2023

I just tried and didn't see any problem.

debian11$ zef install "IO::Socket::Async::SSL:ver<0.7.14>:auth<zef:jnthn>"
===> Searching for: IO::Socket::Async::SSL:ver<0.7.14>:auth<zef:jnthn>
===> Searching for missing dependencies: OpenSSL
===> Searching for missing dependencies: PathTools, JSON::Fast
===> Building: OpenSSL:ver<0.2.0>
===> Building [OK] for OpenSSL:ver<0.2.0>
===> Testing: PathTools:ver<0.2.0>:auth<github:ugexe>
===> Testing [OK] for PathTools:ver<0.2.0>:auth<github:ugexe>
===> Testing: JSON::Fast:ver<0.17>:auth<cpan:TIMOTIMO>
===> Testing [OK] for JSON::Fast:ver<0.17>:auth<cpan:TIMOTIMO>
===> Testing: OpenSSL:ver<0.2.0>
[PathTools] # NETWORK_TESTING was not set
[JSON::Fast] # NETWORK_TESTING was not set
[OpenSSL] # NETWORK_TESTING was not set
[PathTools] # NETWORK_TESTING was not set
[JSON::Fast] # NETWORK_TESTING was not set
[OpenSSL] # NETWORK_TESTING was not set
===> Testing [OK] for OpenSSL:ver<0.2.0>
===> Testing: IO::Socket::Async::SSL:ver<0.7.14>:auth<zef:jnthn>
===> Testing [OK] for IO::Socket::Async::SSL:ver<0.7.14>:auth<zef:jnthn>
===> Installing: PathTools:ver<0.2.0>:auth<github:ugexe>
===> Installing: JSON::Fast:ver<0.17>:auth<cpan:TIMOTIMO>
===> Installing: OpenSSL:ver<0.2.0>
===> Installing: IO::Socket::Async::SSL:ver<0.7.14>:auth<zef:jnthn>

In your output it looks like OpenSSL is already installed. Maybe that's an older version, that still has the problem?
(Please note, that the underlying problem was in OpenSSL, cmp. sergot/openssl#82.)

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

No branches or pull requests

8 participants