Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: XS, MakeMaker, and all those other dreaded words

by mpeppler (Vicar)
on Mar 01, 2002 at 17:04 UTC ( [id://148607]=note: print w/replies, xml ) Need Help??


in reply to XS, MakeMaker, and all those other dreaded words

Did you start with h2xs to create the XS .pm and Makefile.PL stubs?

Michael

  • Comment on Re: XS, MakeMaker, and all those other dreaded words

Replies are listed 'Best First'.
Re: Re: XS, MakeMaker, and all those other dreaded words
by BrentDax (Hermit) on Mar 01, 2002 at 19:52 UTC
    My initial command was h2xs -n Parrot::Interp. It generated the .xs file for me. However, when I ran the command again with a different module name, the generated Makefile.PL looked the same.

    =cut
    --Brent Dax
    There is no sig.

      What does your Makefile.PL look like?

      Like the other poster here I just tried it with h2xs -n MP::Test which created the necessary stubs. Running perl Makefile.PL;make; did invoke the compiler on Test.xs for me...

      Michael

        OK, little session where I try all three copies of Perl and both of my make programs. Using the Cygwin toolkit does get it to build, but trying to use the module crashes.

        The three Perls I have are ActivePerl 5.6.1, Perl 5.7.2 (patched to @13686), and Perl 5.6.1 as built for Cygwin.

        C:\Brent\Visual Studio Projects\Perl 6\parrot\parrot\lib\Parrot-Interp +-0.000_003>cat Makefile.PL use ExtUtils::MakeMaker; # See lib/ExtUtils/MakeMaker.pm for details of how to influence # the contents of the Makefile that is written. WriteMakefile( NAME => 'Parrot::Interp', VERSION_FROM => 'Interp.pm', PREREQ_PM => {}, ABSTRACT_FROM => 'Interp.pm', AUTHOR => 'The Parrot Team <perl6-internals@perl.org> +', LIBS => [''], # e.g., '-lm', DEFINE => '', # e.g., '-DHAVE_SOMETHING', INC => '-I../../include', # e.g., '-I/usr/include/ +other', OBJECT => '../../libparrot.lib' ); C:\Brent\Visual Studio Projects\Perl 6\parrot\parrot\lib\Parrot-Interp +-0.000_003>perl -v This is perl, v5.6.1 built for MSWin32-x86-multi-thread (with 1 registered patch, see perl -V for more detail) Copyright 1987-2001, Larry Wall Binary build 631 provided by ActiveState Tool Corp. http://www.ActiveS +tate.com Built 17:16:22 Jan 2 2002 Perl may be copied only under the terms of either the Artistic License + or the GNU General Public License, which may be found in the Perl 5 source ki +t. Complete documentation for Perl, including FAQ lists, should be found +on this system using `man perl' or `perldoc perl'. If you have access to + the Internet, point your browser at http://www.perl.com/, the Perl Home Pa +ge. C:\Brent\Visual Studio Projects\Perl 6\parrot\parrot\lib\Parrot-Interp +-0.000_003>perl Makefile.PL Writing Makefile for Parrot::Interp C:\Brent\Visual Studio Projects\Perl 6\parrot\parrot\lib\Parrot-Interp +-0.000_003 >nmake Microsoft (R) Program Maintenance Utility Version 7.00.9254 Copyright (C) Microsoft Corporation. All rights reserved. "Running Mkbootstrap for Parrot::Interp ()" C:\Perl\active\bin\perl.exe -IC:\Perl\active\lib -IC:\Perl\act +ive\lib -M ExtUtils::Command -e chmod 644 Interp.bs C:\Perl\active\bin\perl.exe "-IC:\Perl\active\lib" "-IC:\Perl\ +active\lib " -MExtUtils::Mksymlists -e "Mksymlists('NAME' => 'Parrot::Interp', ' +DLBASE' => 'Interp', 'DL_FUNCS' => { }, 'FUNCLIST' => [], 'IMPORTS' => { }, 'D +L_VARS' => []);" link -out:blib\arch\auto\Parrot\Interp\Interp.dll -dll -nologo + -nodefaul tlib -release -libpath:"C:\Perl\active\lib\CORE" -machine:x86 ../../ +libparrot. lib C:\Perl\active\lib\CORE\perl56.lib oldnames.lib kernel32.lib use +r32.lib gd i32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib +oleaut32.l ib netapi32.lib uuid.lib wsock32.lib mpr.lib winmm.lib version.lib o +dbc32.lib odbccp32.lib msvcrt.lib -def:Interp.def LINK : warning LNK4001: no object files specified; libraries used LINK : warning LNK4001: no object files specified; libraries used Interp.def : error LNK2001: unresolved external symbol boot_Parrot__In +terp Interp.def : error LNK2001: unresolved external symbol boot_Parrot__In +terp blib\arch\auto\Parrot\Interp\Interp.lib : fatal error LNK1120: 2 unres +olved exte rnals LINK : fatal error LNK1141: failure during build of exports file NMAKE : fatal error U1077: 'link' : return code '0x475' Stop. C:\Brent\Visual Studio Projects\Perl 6\parrot\parrot\lib\Parrot-Interp +-0.000_003>make Makefile:775: *** missing separator. Stop. C:\Brent\Visual Studio Projects\Perl 6\parrot\parrot\lib\Parrot-Interp +-0.000_003>bperl -v This is perl, v5.7.2 built for MSWin32-x86-multi-thread (with 1 registered patch, see perl -V for more detail) Copyright 1987-2001, Larry Wall Perl may be copied only under the terms of either the Artistic License + or the GNU General Public License, which may be found in the Perl 5 source ki +t. Complete documentation for Perl, including FAQ lists, should be found +on this system using `man perl' or `perldoc perl'. If you have access to + the Internet, point your browser at http://www.perl.com/, the Perl Home Pa +ge. C:\Brent\Visual Studio Projects\Perl 6\parrot\parrot\lib\Parrot-Interp +-0.000_003>bperl Makefile.PL Writing Makefile for Parrot::Interp C:\Brent\Visual Studio Projects\Perl 6\parrot\parrot\lib\Parrot-Interp +-0.000_003 >nmake Microsoft (R) Program Maintenance Utility Version 7.00.9254 Copyright (C) Microsoft Corporation. All rights reserved. makefile(802) : fatal error U1001: syntax error : illegal character ', +' in macro Stop. C:\Brent\Visual Studio Projects\Perl 6\parrot\parrot\lib\Parrot-Interp +-0.000_003>make make: C:Perlbleadbinbperl.exe: Command not found make: *** [blib\lib\Parrot\.exists] Error 127 C:\Brent\Visual Studio Projects\Perl 6\parrot\parrot\lib\Parrot-Interp +-0.000_003>\cygwin\bin\perl -v This is perl, v5.6.1 built for cygwin-multi Copyright 1987-2001, Larry Wall Perl may be copied only under the terms of either the Artistic License + or the GNU General Public License, which may be found in the Perl 5 source ki +t. Complete documentation for Perl, including FAQ lists, should be found +on this system using `man perl' or `perldoc perl'. If you have access to + the Internet, point your browser at http://www.perl.com/, the Perl Home Pa +ge. C:\Brent\Visual Studio Projects\Perl 6\parrot\parrot\lib\Parrot-Interp +-0.000_003>\cygwin\bin\perl Makefile.PL Writing Makefile for Parrot::Interp C:\Brent\Visual Studio Projects\Perl 6\parrot\parrot\lib\Parrot-Interp +-0.000_003 >nmake Microsoft (R) Program Maintenance Utility Version 7.00.9254 Copyright (C) Microsoft Corporation. All rights reserved. NMAKE : fatal error U1073: don't know how to make '/usr/lib/perl5/5.6. +1/cygwin-m ulti/Config.pm' Stop. C:\Brent\Visual Studio Projects\Perl 6\parrot\parrot\lib\Parrot-Interp +-0.000_003>make Running Mkbootstrap for Parrot::Interp () chmod 644 Interp.bs rm -f blib/arch/auto/Parrot/Interp/Interp.dll LD_RUN_PATH="" ld2 -s -L/usr/local/lib ../../libparrot.lib -o blib/a +rch/auto/P arrot/Interp/Interp.dll /usr/lib/perl5/5.6.1/cygwin-multi/CORE/libper +l5_6_1.a dllwrap --dllname Interp.dll --driver-name gcc --dlltool dlltool --exp +ort-all-sy mbols --as as --output-def libInterp.def --output-lib libInterp.a \ -s -L/usr/local/lib ../../libparrot.lib /usr/lib/perl5/5.6.1/cygwin-m +ulti/CORE/ libperl5_6_1.a dllwrap: no export definition file provided dllwrap: creating one, but that may not be what you want mv Interp.dll libInterp.a blib/arch/auto/Parrot/Interp/ chmod 755 blib/arch/auto/Parrot/Interp/Interp.dll cp Interp.bs blib/arch/auto/Parrot/Interp/Interp.bs chmod 644 blib/arch/auto/Parrot/Interp/Interp.bs Manifying blib/man3/Parrot.Interp.3 C:\Brent\Visual Studio Projects\Perl 6\parrot\parrot\lib\Parrot-Interp +-0.000_003>make test PERL_DL_NONLAZY=1 /usr/bin/perl -Iblib/arch -Iblib/lib -I/usr/lib/perl +5/5.6.1/cy gwin-multi -I/usr/lib/perl5/5.6.1 test.pl 1..5 not ok 1 - use Parrot::Interp; # Failed test (test.pl at line 6) # Tried to use 'Parrot::Interp'. # Error: Can't find 'boot_Parrot__Interp' symbol in blib/arch/aut +o/Parrot/I nterp/Interp.dll at (eval 1) line 2 Compilation failed in require at (eval 1) line 2. & not defined at test.pl line 12 # Looks like you planned 5 tests but only ran 1. # Looks like your test died just after 1. make: *** [test_dynamic] Error 255 C:\Brent\Visual Studio Projects\Perl 6\parrot\parrot\lib\Parrot-Interp +-0.000_003>

        =cut
        --Brent Dax
        There is no sig.

      Is that all there was to the command, no other flags? I ran that exact command just now, and the resultant Makefile.PL doesn't appear to reference the XS file, but when I ran "perl Makefile.PL", the resulting Makefile did in fact have all the rules and references to compile and line Interp.xs.

      --rjray

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (5)
As of 2024-04-23 18:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found