nglenn has asked for the wisdom of the Perl Monks concerning the following question:
I am using Windows 7 64 bit, Strawberry Perl 5.16.1. I have another computer with seemingly the same configuration that does not have the same problem.
I was trying to compile a module with XS code and it spat all sorts of compilation errors at me. Since I had heard that 5.16 had shipped with the developer release of MakeMaker, I thought that might be the problem, so I did tried to install the last release of MakeMaker (6.62). However, I got the same errors during the testing. Can anyone help me figure out why I have the errors given below during testing of MakeMaker, more specifically during any XS compilation?
t/VERSION_FROM.t .......... ok t/WriteEmptyMakefile.t .... ok t/writemakefile_args.t .... ok t/xs.t .................... 3/5 t/xs.t .................... 4/5 # Failed test ' make exited normall +y' # at t/xs.t line 53. # got: '65280' # expected: '0' # cp lib/XS/Test.pm blib\lib\XS\Test.pm # C:\strawberry\perl\bin\perl.exe C:\strawberry\perl\lib\ExtUtils\xsub +pp -typem ap C:\strawberry\perl\lib\ExtUtils\typemap Test.xs > Test.xsc && C:\s +trawberry\ perl\bin\perl.exe -MExtUtils::Command -e mv -- Test.xsc Test.c # gcc -c -s -O2 -DWIN32 -DWIN64 -DCONSERVATIVE -DPERL_TEXTMODE_ +SCRIPTS -D PERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -fno-strict-aliasing -mms-bi +tfields -s -O2 -DVERSION=\"1.01\" -DXS_VERSION=\"1.01\" "-IC:\strawberr +y\perl\lib \CORE" Test.c # Running Mkbootstrap for XS::Test () # C:\strawberry\perl\bin\perl.exe -MExtUtils::Command -e chmod -- 644 +Test.bs # C:\strawberry\perl\bin\perl.exe -MExtUtils::Mksymlists \ # -e "Mksymlists('NAME'=>\"XS::Test\", 'DLBASE' => 'Test', 'DL_FU +NCS' => { }, 'FUNCLIST' => [], 'IMPORTS' => { }, 'DL_VARS' => []);" # dlltool --def Test.def --output-exp dll.exp # g++ -o blib\arch\auto\XS\Test\Test.dll -Wl,--base-file -Wl,dll.base +-mdll -s - L"C:\strawberry\perl\lib\CORE" -L"C:\strawberry\c\lib" Test.o C:\str +awberry\pe rl\lib\CORE\libperl516.a -lmoldname -lkernel32 -luser32 -lgdi32 -lwins +pool -lcom dlg32 -ladvapi32 -lshell32 -lole32 -loleaut32 -lnetapi32 -luuid -lws2_ +32 -lmpr - lwinmm -lversion -lodbc32 -lodbccp32 -lcomctl32 dll.exp # Test.o:Test.c:(.text+0x9): undefined reference to `_imp__Perl_get_co +ntext' # Test.o:Test.c:(.text+0x6f): undefined reference to `_imp__Perl_sv_2i +v_flags' # Test.o:Test.c:(.text+0xc4): undefined reference to `_imp__Perl_sv_se +tiv' # Test.o:Test.c:(.text+0xd9): undefined reference to `_imp__Perl_mg_se +t' # Test.o:Test.c:(.text+0x11a): undefined reference to `_imp__Perl_sv_n +ewmortal' # Test.o:Test.c:(.text+0x13c): undefined reference to `_imp__Perl_croa +k_xs_usage ' # Test.o:Test.c:(.text+0x149): undefined reference to `_imp__Perl_get_ +context' # Test.o:Test.c:(.text+0x1a4): undefined reference to `_imp__Perl_xs_a +piversion_ bootcheck' # Test.o:Test.c:(.text+0x1c7): undefined reference to `_imp__Perl_xs_v +ersion_boo tcheck' # Test.o:Test.c:(.text+0x1ea): undefined reference to `_imp__Perl_newX +S' # Test.o:Test.c:(.text+0x216): undefined reference to `_imp__Perl_call +_list' # collect2: ld returned 1 exit status # dmake: Error code 129, while making 'blib\arch\auto\XS\Test\Test.dl +l' t/xs.t .................... 5/5 # Failed test ' make test exited no +rmally' # at t/xs.t line 57. # got: '65280' # expected: '0' # dlltool --def Test.def --output-exp dll.exp # g++ -o blib\arch\auto\XS\Test\Test.dll -Wl,--base-file -Wl,dll.base +-mdll -s - L"C:\strawberry\perl\lib\CORE" -L"C:\strawberry\c\lib" Test.o C:\str +awberry\pe rl\lib\CORE\libperl516.a -lmoldname -lkernel32 -luser32 -lgdi32 -lwins +pool -lcom dlg32 -ladvapi32 -lshell32 -lole32 -loleaut32 -lnetapi32 -luuid -lws2_ +32 -lmpr - lwinmm -lversion -lodbc32 -lodbccp32 -lcomctl32 dll.exp # Test.o:Test.c:(.text+0x9): undefined reference to `_imp__Perl_get_co +ntext' # Test.o:Test.c:(.text+0x6f): undefined reference to `_imp__Perl_sv_2i +v_flags' # Test.o:Test.c:(.text+0xc4): undefined reference to `_imp__Perl_sv_se +tiv' # Test.o:Test.c:(.text+0xd9): undefined reference to `_imp__Perl_mg_se +t' # Test.o:Test.c:(.text+0x11a): undefined reference to `_imp__Perl_sv_n +ewmortal' # Test.o:Test.c:(.text+0x13c): undefined reference to `_imp__Perl_croa +k_xs_usage ' # Test.o:Test.c:(.text+0x149): undefined reference to `_imp__Perl_get_ +context' # Test.o:Test.c:(.text+0x1a4): undefined reference to `_imp__Perl_xs_a +piversion_ bootcheck' # Test.o:Test.c:(.text+0x1c7): undefined reference to `_imp__Perl_xs_v +ersion_boo tcheck' # Test.o:Test.c:(.text+0x1ea): undefined reference to `_imp__Perl_newX +S' # Test.o:Test.c:(.text+0x216): undefined reference to `_imp__Perl_call +_list' # collect2: ld returned 1 exit status # dmake: Error code 129, while making 'blib\arch\auto\XS\Test\Test.dl +l' # Looks like you failed 2 tests of 5. t/xs.t .................... Dubious, test returned 2 (wstat 512, 0x200 +) Failed 2/5 subtests
EDIT: The problem was that I had another distribution of MINGW on my path. Once that was removed, everything worked smoothly.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Can't compile XS code
by syphilis (Archbishop) on Oct 26, 2012 at 22:57 UTC | |
by nglenn (Beadle) on Oct 26, 2012 at 23:26 UTC | |
by syphilis (Archbishop) on Oct 26, 2012 at 23:37 UTC | |
by nglenn (Beadle) on Oct 27, 2012 at 01:39 UTC | |
by syphilis (Archbishop) on Oct 27, 2012 at 05:18 UTC | |
| |
by Anonymous Monk on Oct 27, 2012 at 02:13 UTC | |
by syphilis (Archbishop) on Oct 27, 2012 at 05:25 UTC | |
Re: Can't compile XS code
by syphilis (Archbishop) on Oct 27, 2012 at 07:05 UTC |