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

Test failure: unable to find Add #17

Closed
bbrtj opened this issue Jul 15, 2021 · 4 comments
Closed

Test failure: unable to find Add #17

bbrtj opened this issue Jul 15, 2021 · 4 comments

Comments

@bbrtj
Copy link
Contributor

bbrtj commented Jul 15, 2021

The module does not test correctly for me. I did some digging but wasn't able to make it work.
I'm on FreeBSD 13.0-RELEASE with fpc 3.20. I digged into FFI to see the nm command that it uses:

# nm -g -P -D libtest.so
Add T 0000000000010130 0000000000000005
operatingsystem_parameter_argc U
operatingsystem_parameter_argv U
operatingsystem_parameter_envp U

So there seems to be the correct symbol in the package, but I still get this error (with Carp::Always):

# Failed test 'lib'
# at t/ffi_platypus_attach.t line 16.
# Caught exception in subtest: unable to find Add at /root/perl5/perlbrew/perls/perl-5.34.0/lib/site_perl/5.34.0/amd64-freebsd/FFI/Platypus.pm line 320.
#       FFI::Platypus::function(FFI::Platypus=HASH(0x801db0300), "Add", ARRAY(0x801eef168), "Integer", undef) called at /root/perl5/perlbrew/perls/perl-5.34.0/lib/sit5
#       FFI::Platypus::attach(FFI::Platypus=HASH(0x801db0300), "Add", ARRAY(0x801eef168), "Integer") called at t/ffi_platypus_attach.t line 14
#       main::__ANON__() called at /root/perl5/perlbrew/perls/perl-5.34.0/lib/5.34.0/Test2/API.pm line 686
#       eval {...} called at /root/perl5/perlbrew/perls/perl-5.34.0/lib/5.34.0/Test2/API.pm line 686
#       Test2::API::run_subtest("lib", CODE(0x801e86c48), HASH(0x801e85090)) called at /root/perl5/perlbrew/perls/perl-5.34.0/lib/site_perl/5.34.0/Test2/Tools/Subtest4
#       Test2::Tools::Subtest::subtest_buffered("lib", CODE(0x801e86c48)) called at t/ffi_platypus_attach.t line 16
@bbrtj
Copy link
Contributor Author

bbrtj commented Jul 16, 2021

On cpantesters, FreeBSD has no case of passing the tests, so I think this may be FreeBSD specific. Unfortunately, cpantesters has a bug that pervents me from seeing test reports, so I can only guess. I can paste more outputs if you need, just give me the commands to run.

Edit: On the other hand, FFI::Platypus::Lang::C installed without any problems for me, if that helps
Edit2: On the other hand, no wonder it doesn't test well on FreeBSD, since the installation requires manual action, as described in #18

@bbrtj
Copy link
Contributor Author

bbrtj commented Oct 26, 2021

I'm trying to dig into this locally. The shared object library does not seem to load correctly in FFI::Platypus::DL::dlopen with error:

warning: error loading t/ffi/libtest.so: t/ffi/libtest.so: Undefined symbol "operatingsystem_parameter_envp"

@bbrtj
Copy link
Contributor Author

bbrtj commented Nov 1, 2021

This is most likely a FPC bug: zamronypj/mod_pascal#1

@plicease
Copy link
Member

@bbrtj I am going to close assuming this is an issue with FPC. If it turns out to be something that we can do I am happy to re-open.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants