Hello all.

I am trying to build Perl 5.8.3 with -DPERL_IMPLICIT_SYS and it's
failing. First error is :

`sh  cflags "optimize='-O3'" miniperlmain.o`  miniperlmain.c
          CCCMD =  cc -DPERL_CORE -c -D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS 
-fno-strict-aliasing -I/usr/local/include -DPERL_IMPLICIT_SYS -D_LARGEFILE_SOURCE 
-D_FILE_OFFSET_BITS=64 -O3  -Wall
In file included from perl.h:2334,
                 from miniperlmain.c:27:
iperlsys.h:462: warning: `struct utsname' declared inside parameter list
iperlsys.h:462: warning: its scope is only this definition or declaration, which is 
probably not what you want.
iperlsys.h:631: warning: `struct utimbuf' declared inside parameter list
iperlsys.h:1132: parse error before `*'
iperlsys.h:1132: parse error before `SOCKET'
iperlsys.h:1133: warning: type defaults to `int' in declaration of `SOCKET'
iperlsys.h:1133: `SOCKET' declared as function returning a function
iperlsys.h:1183: `LPSocket' declared as function returning a function
iperlsys.h:1196: parse error before `LPAccept'
iperlsys.h:1196: warning: no semicolon at end of struct or union
iperlsys.h:1238: parse error before `}'
iperlsys.h:1243: field `perlSockList' has incomplete type
make: *** [miniperlmain.o] Error 1

I have fixed this by adding the following to perl.h :

#ifndef WIN32
#include <stdio.h>
typedef int SOCKET;
#endif    

This is a quick hack to get arround the problem and it seems to work (I
remember needing this same fix with Perl 5.6.1 back then).

But then it also errors when linking miniperl :

rm -f libperl.a
/usr/bin/ar rcu libperl.a perl.o  gv.o toke.o perly.o op.o pad.o regcomp.o dump.o 
util.o mg.o reentr.o hv.o av.o run.o pp_hot.o sv.o pp.o scope.o pp_ctl.o pp_sys.o 
doop.o doio.o regexec.o utf8.o taint.o deb.o universal.o xsutils.o globals.o perlio.o 
perlapi.o numeric.o locale.o pp_pack.o pp_sort.o 
cc -L/usr/local/lib -o miniperl \
    miniperlmain.o opmini.o libperl.a -lnsl -ldl -lm -lcrypt -lutil -lpthread -lc 
miniperlmain.o: In function `main':
miniperlmain.o(.text+0x3c): undefined reference to `perl_alloc'
libperl.a(sv.o): In function `perl_clone':
sv.o(.text+0x12053): undefined reference to `perl_clone_host'

This is happening both on Linux and AIX. Here's how I have run Configure:

./Configure -Dusethreads -Uuse5005threads -Duseithreads -Dusemultiplicity 
-Duselargefiles -Uusesocks -Uusemymalloc -Ubincompat5005

I have used defaults for all the questions, except for ccflags, where I
copied the suggested line and added -DPERL_IMPLICIT_SYS.

I know that PERL_IMPLICIT_SYS is supposed to go away, but we needed it
with Perl 5.6.1, otherwise interpreter kept core dumping when running it
in several threads.

Can someone please explain what to do ? I have looked at perl.c and
perl_alloc() is available only if PERL_IMPLICIT_SYS is not defined, yet
there's no such ifdef at the place where perl_alloc() is called in
miniperlmain.c. The same goes for perl_clone_host() - it's only
available for Windows and Netware, but the code in sv.c calls it.

Documentation in perlguts suggests this is only available for Windows,
but we managed to compile it for Unix too with Perl 5.6.1.

Thank you and best regards,
    Goran

-- 

Writing about music is like dancing about architecture.
    -- Frank Zappa 
_______________________________________________
Perl-Unix-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to