This is the mail archive of the cygwin@sourceware.cygnus.com mailing list for the Cygwin project. See the Cygwin home page for more information.
[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index] [Subject Index] [Author Index] [Thread Index]

Re: Compiling Perl under b20.1



Sebastien wrote:

> New interesting problems :
>
> -------------------------------
> 1) I was unable to install !! (what about you ?)

I had no problems -- BUT I had renamed /usr/bin/install to cyg-install, and copied
Pierre Humblet's install script from
ftp://ftp.franken.de/pub/win32/develop/gnuwin32/cygwin/porters/Humblet_Pierre_A/install-cygwin-b20-sh
to /usr/bin/install. This probably doesn't affect the problem you describe below,
but I figured I should include the information.

> > make install
> [...]
> ./perl installperl
> /usr/local/bin is not writable by you
> make: *** [install.perl] Error 2
>
> The error message is located at this line in installperl :
> -w $installbin          || $nonono || die "$installbin is not writable by you\n"
>
> But I'm using 'ntea' and made some unsuccessful 'chmod a+w /usr/local/bin'
> !! This is driving me crazy !!

Call me crazy, but could this be another one of those Adminstrators group NTisms?
(I sound like a broken record, I know, but I've been bitten by this thing many
times)

> I removed the line, and was able to install the perl binaries, libs and
> headers (that also what I did before starting this whole discussion with you).
>
> administrateur [545] /usr/local/src/perl5.005_02$ cd /usr/local/
> administrateur [546] /usr/local$ ll
> total 0
> drwxr-xr-x   2 administ Aucun           0 Mar  7 22:54 bin/
> [...]
>

Look here - you're running as Administrator. Adds a little credence to my theory.
Why don't you try as a normal user? Nope - see below.

> My perl.exe is 966464 bytes long.

Mine is 973294 bytes (unstripped). I just noticed that my perl.exe is owned by
Administrator. Hmmm....it looks like I was running as Admin when I built and
installed. Rats. Another beautiful theory slain by an cold ugly fact.

Administrator: /usr/local/ : ls -l
total 0
drwxr-xr-x   2 administ None            0 Mar  7 00:08 bin

However, the "group" id is None (which in NTspeak really means everybody - no group
restrictions applied). Is that what "Aucun" means (I don't speak French)? I'm just
trying to eliminate variables here...


> -------------------------------
> 2) Perl Modules
>
> Still using binary mount but no 'binmode' in CYGWIN, I tried to build (did
> you too ?) some Perl modules (like DB_File, String-CRC) in /usr/local/src
> (which is binary mounted). These modules produce libraries (CRC.a from
> CRC.xs -> CRC.c for example) and have to be statically linked to perl.exe,
> thus producing a new perl.exe (this is handled automatically by issuing :
> make -f Makefile.aperl inst_perl MAP_TARGET=perl.exe).
>
>   - build fails, with that kind of messages :
> /usr/local/lib/perl5/5.00502/cygwin32/CORE/cw32imp.h:343: warning: this is
> the location of the previous definition
>

Nope, I didn't try this. I just wanted a basic build.

>
> meaning that cw32imp.h is included twice or more. Therefore, I disabled the
> cw32imp.h inclusion from /usr/local/lib/perl5/00502/cygwin32/CORE/perl.h,
> line 1242, and that fixed the problem.
>
> /* Work around some cygwin32 problems with importing global symbols */
> #if defined(CYGWIN32) && defined(DLLIMPORT)
> /*
> #   include "cw32imp.h"
> */
> #endif
>
> I know, this is really a dirty hack, did you notice the same problem, do
> you think that it's worth a patch ? Let's investigate that problem.

The Right Thing is to define a global in cw32imp.h that says "You already included
me, skip the rest of this file" eg

#ifndef CW32IMP
#define CW32IMP
---rest of file
#endif

Cool! I got to say "The Right Thing". I've always wanted to say that.

>  <snip>
>
> administrateur [527] /usr/local/src/String-CRC-1.0$ cat
> blib/arch/auto/String/CRC/extralibs.all
> => it contains (34 bytes) the text '-L/usr/local/lib -ldb' surrounded by a
> blank line and followed by many others.
>
> administrateur [526] /usr/local/src/String-CRC-1.0$ od -x
> blib/arch/auto/String/CRC/extralibs.all
> 0000000 2d0a 2f4c 7375 2f72 6f6c 6163 2f6c 696c
> 0000020 2062 6c2d 6264 0a0d 0a0a 0a0a 0a0a 0a0a
> 0000040 0a0a
> 0000042
>
> Notice the '0a0d' !! But I was using both 'binmode' AND binary mount that
> time, where the hell is this '0a0d' coming from ? ((
>

I don't know. But I suspect one of the scripts in lib/extutils/ is doing the work
of creating the extralibs.ld files when you invoke make -f Makefile.aperl....
Unfortunately these scripts are way beyond my limited perl abilities.

IF you accept that the 0d will be inserted into the file no matter what (I don't,
but you gotta start somewhere) THEN in makes sense that switching to text mounts
will help the linker ignore its presence. The real issue is where is it coming from
in the first place. That, I can't answer. Maybe somebody else??

--Chuck



--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com