in reply to [Solved] Error compiling XS code with strawberry-perl 5.8.8-alpha-2

i found the problem! having installed/uninstalled strawberry-perl several times, i had multiple entries in %PATH%, here is how it looked (the relevant snippet):

[...] C:\strawberry-perl\perl\bin;C:\strawberry-perl\dmake\bin;C:\strawberry +-perl\mingw\bin; C:\strawberry-perl\perl\bin;C:\strawberry-perl\dmake\bin;C:\strawberry +-perl\mingw\bin; C:\strawberry-perl\perl\bin;C:\strawberry-perl\dmake\bin;C:\strawberry +-perl\mingw\bin; [...]

it didn't occurred to me to look a the environmental variables of Windows, only after i discovered that running the failing command by hand, with the full path to dlltool, that command didn't fail. i don't understand exactly what happened, but those multiple entries in %PATH% confused the heck out of dlltool and made it "run in circles" :)

well it certainly seems there's a bug in how strawberry-perl manipulates environment variables and i plan to file a bug report about that. i am not complaining about it because i'm aware that that's what someone gets for playing with beta quality (read cutting edge) :)

sorry if i wasted anyones time with this.

:)))))

Replies are listed 'Best First'.
Re^2: Error compiling XS code with strawberry-perl 5.8.8-alpha-2
by xdg (Monsignor) on Oct 17, 2006 at 14:43 UTC
    beta quality

    s/beta/alpha/

    Environment manipulation on install/uninstall leaves a lot to be desired, still. It's the top entry on the Vanilla Perl Feature Backlog.

    -xdg

    Code written by xdg and posted on PerlMonks is public domain. It is provided as is with no warranties, express or implied, of any kind. Posted code may not have been tested. Use of posted code is at your own risk.

Re^2: Error compiling XS code with strawberry-perl 5.8.8-alpha-2
by NetWallah (Canon) on Dec 07, 2006 at 02:18 UTC
    I'm experiencing a problem that seems very close to yours. I am running (rele3ased) Vista 64, and Strawberry Perl Alpha 2.

    Compile attempts fail - see snippets below - I'm trying to install Date::Calc. The pre-req Bit::Vector fails ...

    cp lib/Bit/Vector/String.pod blib\lib\Bit\Vector\String.pod cp lib/Bit/Vector/String.pm blib\lib\Bit\Vector\String.pm gcc -c -s -O2 -DWIN32 -DHAVE_DES_FCRYPT -DPERL_IMPLICIT_CONTE +XT -DPERL_IMPLICIT_S YS -fno-strict-aliasing -DPERL_MSVCRT_READFIX -s -O2 -DVERSION=\" +6.4\" -DXS_VERSI ON=\"6.4\" "-IC:\strawberry-perl\perl\lib\CORE" BitVector.c gcc: installation problem, cannot exec `cc1': No such file or director +y dmake.EXE: Error code 129, while making 'BitVector.o' C:\strawberry-perl\dmake\bin\dmake.EXE -- NOT OK
    Then, Date::Calc compile also fails:
    cp Calc.pm blib\lib\Date\Calc.pm C:\strawberry-perl\perl\bin\perl.exe C:\strawberry-perl\perl\lib\ExtUt +ils\xsubpp -typemap C:\strawberry-perl\perl\lib\ExtUtils\typemap -typemap typemap Calc.x +s > Calc.xsc && C:\s trawberry-perl\perl\bin\perl.exe -MExtUtils::Command -e mv Calc.xsc Ca +lc.c gcc -c -s -O2 -DWIN32 -DHAVE_DES_FCRYPT -DPERL_IMPLICIT_CONTE +XT -DPERL_IMPLICIT_S YS -fno-strict-aliasing -DPERL_MSVCRT_READFIX -s -O2 -DVERSION=\" +5.4\" -DXS_VERSI ON=\"5.4\" "-IC:\strawberry-perl\perl\lib\CORE" Calc.c gcc: installation problem, cannot exec `cc1': No such file or director +y dmake.EXE: Error code 129, while making 'Calc.o' C:\strawberry-perl\dmake\bin\dmake.EXE -- NOT OK Running make test ...
    I removed Activestate because I could not get PPM (64-bit) to work - was hoping for more luck with Strawberry. Sthis is a one-time install, so my ENV is clean.

    Update 1:I made marginal progress on this, by copying cc1.exe from C:\strawberry-perl\mingw\mingw32\bin (which is NOT in the PATH) to C:\strawberry-perl\dmake\bin which IS in the PATH. The process now finds, and runs cc1, but there is a new issue:

    It appears that the INCLUDE path C:\strawberry-perl\mingw\include is being ignored - the compile fails because it cannot find a multitude of header (.h) files. Please help - I am not a C programmer.

    Writing Makefile for Bit::Vector Writing patchlevel.h for C:\strawberry-perl\perl\bin\perl.exe (5.00800 +8) cp lib/Bit/Vector/Overload.pm blib\lib\Bit\Vector\Overload.pm cp Vector.pm blib\lib\Bit\Vector.pm cp Vector.pod blib\lib\Bit\Vector.pod cp lib/Bit/Vector/Overload.pod blib\lib\Bit\Vector\Overload.pod cp lib/Bit/Vector/String.pod blib\lib\Bit\Vector\String.pod cp lib/Bit/Vector/String.pm blib\lib\Bit\Vector\String.pm gcc -c -s -O2 -DWIN32 -DHAVE_DES_FCRYPT -DPERL_IMPLICIT_CONTE +XT -DPERL_IMPLICIT_S YS -fno-strict-aliasing -DPERL_MSVCRT_READFIX -s -O2 -DVERSION=\" +6.4\" -DXS_VERSI ON=\"6.4\" "-IC:\strawberry-perl\perl\lib\CORE" BitVector.c BitVector.c:8:80: stdlib.h: No such file or directory BitVector.c:9:80: limits.h: No such file or directory BitVector.c:10:80: string.h: No such file or directory BitVector.c:11:80: ctype.h: No such file or directory BitVector.c: In function `BitVector_Error': BitVector.c:508: error: `NULL' undeclared (first use in this function) BitVector.c:508: error: (Each undeclared identifier is reported only o +nce BitVector.c:508: error: for each function it appears in.) BitVector.c: In function `BitVector_Boot': BitVector.c:547: error: `size_t' undeclared (first use in this functio +n) BitVector.c:580: error: `NULL' undeclared (first use in this function) ... many more syntax errors because it cannot find .h files ......
    Update 2: SUCCESS!

    Finally got Date::Calc and dependents to compile and install after a few more hacks:

    copy C:\strawberry-perl\mingw\lib\gcc\mingw32\3.4.5\include C:\strawbe +rry-perl\perl\lib\CORE copy /s C:\strawberry-perl\mingw\include C:\strawberry-perl\perl\lib\C +ORE set LIBRARY_PATH=C:\strawberry-perl\mingw\lib;C:\strawberry-perl\mingw +\lib\gcc\mingw32\3.4.5
    Admittedly, these are not good things to do - I'm hoping the Strawberry perl developers will put the right includes in their install process.

    I have never posted a per bug report before, and am a little shy on that - is this an appropriate thing to post on their forum ?

         "A closed mouth gathers no feet." --Unknown

      I installed strawberry-perl-5.8.8-alpha-2.exe, and Bit-Vector-6.4 builds and installs cleanly for me. ('cc1.exe' is not in my path.)

      I don't know what accounts for the difference that you and I are seeing. (Do you ?) Perhaps someone a little closer to the development of Strawbewrry Perl can provide an understanding.

      Cheers,
      Rob

      Sorry I missed this back in December. This looks like a problem with PATH, LIB and INCLUDE being set properly on installation. Were you running with administrator privileges? (If you remember at this point, that is.) Strawberry probably needs to provide a better warning to the user if it is not able to set the PATH appropriately. Thanks for being patient with it.

      -xdg

      Code written by xdg and posted on PerlMonks is public domain. It is provided as is with no warranties, express or implied, of any kind. Posted code may not have been tested. Use of posted code is at your own risk.

      Don't copy/paste files, modify your %PATH%, %INCLUDE% ... on the other hand, install a stable release (vanilla, not strawberry).