zby has asked for the wisdom of the Perl Monks concerning the following question:

$ perl -V Summary of my perl5 (revision 5.0 version 8 subversion 0) configuratio +n: Platform: osname=cygwin, osvers=1.3.12(0.5432), archname=cygwin-multi-64int uname='cygwin_nt-5.0 kmbestst 1.3.12(0.5432) 2002-07-06 02:16 i686 + unknown '
When running install under CPAN shell I get this (at testing):
A problem was encountered while attempting to compile and install your + Inline C code. The command that failed was: make > out.make 2>&1 The build directory was: /cygdrive/h/.cpan/build/Inline-0.44/C/_Inline_test/build/_04perlapi_t_ +3c76 To debug the problem, cd to the build directory, and inspect the outpu +t files.
So I go there and view the file:
make[2]: Entering directory `/cygdrive/h/.cpan/build/Inline-0.44/C/_In +line_test/build/_04perlapi_t_3c76' /usr/bin/perl.exe /usr/lib/perl5/5.8.0/ExtUtils/xsubpp -typemap /usr/ +lib/perl5/5.8.0/ExtUtils/typemap -typemap /cygdrive/h/.cpan/build/Inl +ine-0.44/C/t/typemap _04perlapi_t_3c76.xs > _04perlapi_t_3c76.xsc & +& mv _04perlapi_t_3c76.xsc _04perlapi_t_3c76.c gcc -c -I/cygdrive/h/.cpan/build/Inline-0.44/C/t -DPERL_USE_SAFE_PUTE +NV -fno-strict-aliasing -DUSEIMPORTLIB -DVERSION=\"0.00\" -DXS_VER +SION=\"0.00\" "-I/usr/lib/perl5/5.8.0/cygwin-multi-64int/CORE" _04 +perlapi_t_3c76.c Running Mkbootstrap for _04perlapi_t_3c76 () chmod 644 _04perlapi_t_3c76.bs rm -f blib/arch/auto/_04perlapi_t_3c76/_04perlapi_t_3c76.dll LD_RUN_PATH="" ld2 -s -L/usr/local/lib _04perlapi_t_3c76.o -o blib/a +rch/auto/_04perlapi_t_3c76/_04perlapi_t_3c76.dll /usr/lib/perl5/5.8. +0/cygwin-multi-64int/CORE/libperl.dll.a gcc -shared -o cygperl5_8_0.dll -Wl,--out-implib=lib_04perlapi_t_3c76 +.dll.a -Wl,--export-all-symbols -Wl,--enable-auto-import -Wl,--stack, +8388608 \ -s -L/usr/local/lib _04perlapi_t_3c76.o /usr/lib/perl5/5.8.0/cygwin-m +ulti-64int/CORE/libperl.dll.a Creating library file: lib_04perlapi_t_3c76.dll.a mv cygperl5_8_0.dll lib_04perlapi_t_3c76.dll.a blib/arch/auto/_04perla +pi_t_3c76/ chmod 755 blib/arch/auto/_04perlapi_t_3c76/_04perlapi_t_3c76.dll chmod: getting attributes of `blib/arch/auto/_04perlapi_t_3c76/_04perl +api_t_3c76.dll': No such file or directory make[2]: *** [blib/arch/auto/_04perlapi_t_3c76/_04perlapi_t_3c76.dll] +Error 1 make[2]: Leaving directory `/cygdrive/h/.cpan/build/Inline-0.44/C/_Inl +ine_test/build/_04perlapi_t_3c76'
I am not that familiar with gcc - but it seems that id did not make the _04perlapi_t_3c76.dll and then it complaints that it is missing.
Any hints?

Replies are listed 'Best First'.
Re: Problem with compiling Inline::C on cygwin
by robartes (Priest) on Mar 05, 2003 at 15:09 UTC
    Hi,

    looking at the output, one thing becomes apparent. First, make does:

    mv cygperl5_8_0.dll lib_04perlapi_t_3c76.dll.a blib/arch/auto/_04perla +pi_t_3c76/
    Then it does:
    chmod 755 blib/arch/auto/_04perlapi_t_3c76/_04perlapi_t_3c76.dll
    Notice the missing .a . You'll probably have to root around in the Makefile as to find out why it does this, but this should give you an idea on what to look for.

    CU
    Robartes-

      ...and the missing "lib".

                      - tye
      I sow that and interpreted it as two different files - but now I think you're right.
      Today I tried to dig it some more and got to this:
      $ LD_RUN_PATH="" ld2 -s -L/usr/local/lib _04perlapi_t_3c76.o -o blib +/arch/auto/_04perlapi_t_3c76/_04perlapi_t_3c76.dll /usr/lib/perl5/5. +8.0/cygwin-multi-64int/CORE/libperl.dll.a gcc -shared -o cygperl5_8_0.dll -Wl,--out-implib=lib_04perlapi_t_3c76 +.dll.a -Wl,--export-all-symbols -Wl,--enable-auto-import -Wl,--stack, +8388608 \ -s -L/usr/local/lib _04perlapi_t_3c76.o /usr/lib/perl5/5.8.0/cygwin-m +ulti-64int/CORE/libperl.dll.a Creating library file: lib_04perlapi_t_3c76.dll.a mv cygperl5_8_0.dll lib_04perlapi_t_3c76.dll.a blib/arch/auto/_04perla +pi_t_3c76/
      This was run for rule to make blib/arch/auto/_04perlapi_t_3c76/_04perlapi_t_3c76.dll - so I believe the problem is with the ld2 script - cause it made lib_04perlapi_t_3c76.dll.a instead.
        Actually, and I missed this in my first reply, the ld2 line does seem to be linking the library correctly (or at least without errors):
        LD_RUN_PATH="" ld2 -s -L/usr/local/lib _04perlapi_t_3c76.o -o blib/a +rch/auto/_04perlapi_t_3c76/_04perlapi_t_3c76.dll /usr/lib/perl5/5.8.0 +/cygwin-multi-64int/CORE/libperl.dll.a
        It does -o blib/arch/auto/_O4perlapi_t_3c76/_04perlapi_t_3c76.dll. This creates the dll in that directory (-o specifies the output file of the linking operation). So the problem occurs somewhere between this line (inclusive) and the chmod line further downstream. What's in blib/arch/auto/_04perlapi_t_c76 after you did the above steps?

        CU
        Robartes-