8000 Interface.so: undefined symbol: sv_nv · Issue #303 · PerlGameDev/SDL · GitHub
[go: up one dir, main page]

Skip to content

Interface.so: undefined symbol: sv_nv #303

Open

Description

@jplesnik

The tests are failing because the deprecated C functions were removed in Perl 5.37.1.
More information could be found on perl5371delta.pod#Deprecations

#   Failed test 'use SDLx::App;'
#   at t/00-load.t line 88.
#     Tried to use 'SDLx::App'.
#     Error:  Can't load '/home/cpansand/.cpan/build/2022100913/SDL-2.548-0/blib/arch/auto/SDLx/Controller/Interface/Interface.so' for module SDLx::Controller::Interface: /home/cpansand/.cpan/build/2022100913/SDL-2.548-0/blib/arch/auto/SDLx/Controller/Interface/Interface.so: undefined symbol: sv_nv at /opt/perl-5.37.4/lib/5.37.4/x86_64-linux/DynaLoader.pm line 206.
#  at /home/cpansand/.cpan/build/2022100913/SDL-2.548-0/blib/lib/SDLx/Controller.pm line 10.
# Compilation failed in require at /home/cpansand/.cpan/build/2022100913/SDL-2.548-0/blib/lib/SDLx/Controller.pm line 10.
# BEGIN failed--compilation aborted at /home/cpansand/.cpan/build/2022100913/SDL-2.548-0/blib/lib/SDLx/Controller.pm line 10.
# Compilation failed in require at /opt/perl-5.37.4/lib/5.37.4/base.pm line 137.
# 	...propagated at /opt/perl-5.37.4/lib/5.37.4/base.pm line 159.
# BEGIN failed--compilation aborted at /home/cpansand/.cpan/build/2022100913/SDL-2.548-0/blib/lib/SDLx/App.pm line 23.
# Compilation failed in require at t/00-load.t line 88.
# BEGIN failed--compilation aborted at t/00-load.t line 88.
Bailout called.  Further testing stopped:  Test failed.  BAIL OUT!.
t/00-load.t ..................... 
Dubious, test returned 255 (wstat 65280, 0xff00)
Failed 1/43 subtests 

Activity

  1. jplesnik commented on Jun 13, 2023

    @jplesnik
    Author

    The definition of sv_nv in mathoms.c (Perl 5.36) is:

    =for apidoc_section $SV
    =for apidoc sv_nv
    
    A private implementation of the C<SvNVx> macro for compilers which can't
    cope with complex macro expressions.  Always use the macro instead.
    
    =cut
    */
    
    NV
    Perl_sv_nv(pTHX_ SV *sv)
    {
        PERL_ARGS_ASSERT_SV_NV;
    
        if (SvNOK(sv))
            return SvNVX(sv);
        return sv_2nv(sv);
    }  
    

    I tried to use SvNVX instead of sv_nv and it worked for me.

  2. ppisar commented on Jul 12, 2023

    @ppisar
    Contributor

    Indeed. Perl removed sv_nv macro from embed.h in:

    commit 7008caa915ad99e650acf2aea40612b5e48b7ba2
    Author: Karl Williamson <khw@cpan.org>
    Date:   Sat May 28 15:30:19 2022 -0600
    
        Remove deprecated functions
        
        Most of these have been deprecated for a long time; and we've never
        bothered to follow through in removing them.  This commit does that.
    

    Which happened between Perl v5.37.0 and v5.37.1.

  3. added a commit that references this issue on Jul 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      0