[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: zxid 0.53 Net::SAML undefined symbols
Eric Rybski wrote:
> When compiling Net::SAML module in the zxid 0.53 release, the resulting
> object has three undefined zxid_* symbols which causes Net::SAML bootstrap
> to fail:
> $ make samlmod
> $ cd Net; make test
> PERL_DL_NONLAZY=1 /usr/bin/perl "-Iblib/lib" "-Iblib/arch" test.pl
> Can't load 'blib/arch/auto/Net/SAML/SAML.so' for module Net::SAML:
> blib/arch/auto/Net/SAML/SAML.so: undefined symbol: zxid_idp_soap_dispatch
> /usr/lib/perl5/5.8.8/i686-linux/DynaLoader.pm line 230.
> at blib/lib/Net/SAML.pm line 11
> Compilation failed in require at test.pl line 5.
> BEGIN failed--compilation aborted at test.pl line 5.
> $ nm -gC Net/blib/arch/auto/Net/SAML/SAML.so | grep " U " | grep zxid
> U zxid_idp_soap_dispatch
> U zxid_idp_soap_parse
> U zxid_sha1_file
> Reviewing the zxid source, I see that these functions (or code where each
> might be called) are currently disabled in compiler directives (#if
> 0...endif); thus, gcc excluded these symbols when bulding libzxid. It
> appears the SAML_wrap.c SWIG wrapper may be out of sync with the zxid lib.
> I tried rebuilding SAML_wrap.c with:
> make cleaner; make dep ENA_GEN=1 && make cleany && make genwrap
> && make all ENA_GEN=1
> but it didn't exclude the three functions. So I just manually commented
> them out in SAML_wrap.c. This appears to have resolved the issue.
> Is there a simpler way to specify zxid symbols to skip when (re)generating
> SWIG wrappers?
SWIG is driven by the header, i.e. zxid.h. Since those functions clearly
are not (currently) used, it is appropriate to deprecate them by
deleting them from zxid.h (done for 0.54). This will prevent SWIG
from generating any wrapper code. Other alternative would be to
condition the header with SWIG specific ifdefs.
Thanks for reporting this.