Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re^2: Can't compile XS code

by nglenn (Beadle)
on Oct 26, 2012 at 23:26 UTC ( #1001143=note: print w/ replies, xml ) Need Help??


in reply to Re: Can't compile XS code
in thread Can't compile XS code

objdump gives me a whole bunch of:

objdump: dknisxxxxx.o: File format not recognized

perl -V gives me:

Summary of my perl5 (revision 5 version 16 subversion 1) configuration +: Platform: osname=MSWin32, osvers=4.0, archname=MSWin32-x64-multi-thread uname='Win32 strawberry-perl 5.16.1.1 #1 Thu Aug 9 07:49:27 2012 +x64' config_args='undef' hint=recommended, useposix=true, d_sigaction=undef useithreads=define, usemultiplicity=define useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=und +ef use64bitint=define, use64bitall=undef, uselongdouble=undef usemymalloc=n, bincompat5005=undef Compiler: cc='gcc', ccflags =' -s -O2 -DWIN32 -DWIN64 -DCONSERVATIVE -DPERL +_TEXTMODE_ SCRIPTS -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -fno-strict-aliasi +ng -mms-bi tfields', optimize='-s -O2', cppflags='-DWIN32' ccversion='', gccversion='4.6.3', gccosandvers='' intsize=4, longsize=4, ptrsize=8, doublesize=8, byteorder=12345678 d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=1 +2 ivtype='long long', ivsize=8, nvtype='double', nvsize=8, Off_t='lo +ng long', lseeksize=8 alignbytes=8, prototype=define Linker and Libraries: ld='g++', ldflags ='-s -L"C:\strawberry\perl\lib\CORE" -L"C:\straw +berry\c\li b"' libpth=C:\strawberry\c\lib C:\strawberry\c\x86_64-w64-mingw32\lib libs=-lmoldname -lkernel32 -luser32 -lgdi32 -lwinspool -lcomdlg32 +-ladvapi32 -lshell32 -lole32 -loleaut32 -lnetapi32 -luuid -lws2_32 -lmpr -lwinmm + -lversion -lodbc32 -lodbccp32 -lcomctl32 perllibs=-lmoldname -lkernel32 -luser32 -lgdi32 -lwinspool -lcomdl +g32 -ladva pi32 -lshell32 -lole32 -loleaut32 -lnetapi32 -luuid -lws2_32 -lmpr -lw +inmm -lver sion -lodbc32 -lodbccp32 -lcomctl32 libc=, so=dll, useshrplib=true, libperl=libperl516.a gnulibc_version='' Dynamic Linking: dlsrc=dl_win32.xs, dlext=dll, d_dlsymun=undef, ccdlflags=' ' cccdlflags=' ', lddlflags='-mdll -s -L"C:\strawberry\perl\lib\CORE +" -L"C:\st rawberry\c\lib"' Characteristics of this binary (from libperl): Compile-time options: HAS_TIMES HAVE_INTERP_INTERN MULTIPLICITY PERLIO_LAYERS PERL_DONT_CREATE_GVSV PERL_IMPLICIT_CONTEXT PERL_IMPLICIT_SYS PERL_MALLOC_WRAP PERL_PRESERVE_IVUV PL_OP_SLAB +_ALLOC USE_64_BIT_INT USE_ITHREADS USE_LARGE_FILES USE_LOCALE USE_LOCALE_COLLATE USE_LOCALE_CTYPE USE_LOCALE_NUMERIC USE_PERLIO USE_PERL_ATOF Built under MSWin32 Compiled at Aug 9 2012 07:55:51 @INC: C:/strawberry/perl/site/lib/MSWin32-x64-multi-thread C:/strawberry/perl/site/lib C:/strawberry/perl/vendor/lib C:/strawberry/perl/lib .


Comment on Re^2: Can't compile XS code
Select or Download Code
Re^3: Can't compile XS code
by syphilis (Canon) on Oct 26, 2012 at 23:37 UTC
    objdump: dknisxxxxx.o: File format not recognized

    Then that's your problem ... or at least *one* problem that needs to be fixed.

    Could that libperl516.a that's being found be a 32-bit version of libperl516.a ? The error messages from objdump would fit such a scenario.
    Compare it to the libperl516.a that's on the other machine you mentioned. They should be identical (obviously), right down to the Digest::MD5 signatures, if they're the same builds of Strawberry Perl.

    Afterthought: If that libperl516.a is 64-bit, then another possibility is that you've just run a 32-bit version of objdump on it. That would also fit the objdump errors you reported.

    Cheers,
    Rob
      I just removed and reinstalled the whole distribution. I still get the exact same errors.
        Are you using the "MSI Installer" version of that distro ? According to this page, it's SHA1 digest should be:
        e67728ddd89777815271ac7416cff32653d387bf
        Is that what you have ? (I get that SHA1 digest for the distro that I just downloaded - so that part looks fine to me.)
        If you get a different SHA1 digest for the distro you downloaded then, either you've grabbed a different distro, or you've got a corrupted distro.

        When I install that distro and run:
        objdump -t C:/strawberry/perl/lib/CORE/libperl516.a >dump.txt
        I get no errors ... so I'm thinking that you must be running a different objdump. Where is it coming from ? You need to run the objdump that's in C:/strawberry/c/bin ... so try:
        C:/strawberry/c/bin/objdump -t C:/strawberry/perl/lib/CORE/libperl516. +a >dump.txt
        Does that make any difference for you ?
        Finally, the various digests I get for libperl516.a are:
        Enter the filename (full path): C:/strawberry/perl/lib/CORE/libperl516 +.a MD5: e53826b93afd80de2e44038da93e63ba SHA1: 68737f9536907c5a37833b94e26685a10d9c5ce0 SHA256: c66d4ad43a583304b800e22966de0ab5baa6000ccb956643559b8e76f62e84 +dc
        Does that match what you get ? (No need to check all 3 - any one will do.)

        Cheers,
        Rob

      On a 64-bit os these seem odd -lkernel32 -luser32 -lgdi32 -lshell32 -lole32 -loleaut32 -lnetapi32

      Maybe the compiler chain knows to ignore that and link shell64 etc, maybe it doesn't

        That's ok. Although it's a 64-bit OS, the library names still retain their '32' suffix.

        Cheers,
        Rob

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1001143]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (7)
As of 2014-08-29 06:11 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (275 votes), past polls