Marc Slagle wrote:
1. Problem Description:

When compiling  mod_perl-1.99_14 on solaris 9, I get the following errors:

[EMAIL PROTECTED] mod_perl-1.99_14]# perl Makefile.PL MP_AP_PREFIX=/usr/app/cham
Reading Makefile.PL args from @ARGV
  MP_AP_PREFIX = /usr/app/cham
Configuring Apache/2.0.50 mod_perl/1.99_14 Perl/v5.6.1
...

[EMAIL PROTECTED] mod_perl-1.99_14]# make
cd "src/modules/perl" && make -f Makefile.modperl
make[1]: Entering directory `/usr/local/build/mod_perl-1.99_14/src/modules/perl'
cc -I/usr/local/build/mod_perl-1.99_14/src/modules/perl -I/usr/local/build/mod_perl-1.99_14/xs -I/usr/app/cham//include -I/usr/app/cham//include -I/usr/perl5/5.6.1/lib/i86pc-solaris-64int/CORE -DMOD_PERL -DMP_COMPAT_1X -DSOLARIS2=9 -D_POSIX_PTHREAD_SEMANTICS -D_REENTRANT -xO3 -xdepend -KPIC \
-c mod_perl.c && mv mod_perl.o mod_perl.lo
cc: unrecognized option `-KPIC'
cc: language depend not recognized
cc: mod_perl.c: linker input file unused because linking not done
mv: cannot access mod_perl.o
make[1]: *** [mod_perl.lo] Error 2
make[1]: Leaving directory `/usr/local/build/mod_perl-1.99_14/src/modules/perl'
*** Error code 2
make: Fatal error: Command failed for target `modperl_lib'


It would seem that the version of perl that comes with solaris was compiled with the -KPIC flag using the sun compiler (see below). When using gcc to compile mod_perl with the sun compiled version of perl you will get the above errors. Once you compile perl yourself on the server, the problem goes away (as long as you dont have the old sun compiled perl at /usr/bin/perl anymore.)

Why doesn't it use the sun compiler when compilinig mod_perl? where does cc point? How come that it has picked gcc?


 Compiler:
   cc='cc', ccflags ='-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64',

mod_perl simply tries to use the same compiler perl was compiled with, so if perl reports cc and it's not the same compiler it was compiled with it's the problem of your installation.

I realize that most people who compile mod_perl also compile perl themselves, so this isn't something most people would see. But the perl that comes with solaris 9 is version 5.6.1 without 5005threads, which the documentation says is ok.

You also realize that the official 5.6.1 (specified in the docs) and the perl that comes with solaris 9 are not the same thing, as it has a few dozens patches on top of it:


[...]
Characteristics of this binary (from libperl):
 Compile-time options: USE_64_BIT_INT USE_LARGE_FILES
 Locally applied patches:
    9676 Port the OpenBSD glob() security patch
    9678 Addendum to #9676: some missing changes from OpenBSD glob.c
[.. a few dozens lines snipped ...]
   13149 Integrate #13147 from mainline (fixes nit in #10091)
   13261 Integrate #8340,#13260 from mainline

But most likely it's unrelated to this issue.

> I would suggest that the documentation
> reflects this somewhere, since users who are just following the
> instructions at
> http://perl.apache.org/docs/2.0/user/install/install.html would get this
> error while trying to compile on solaris 9.

I think this can and should be fixed on the Makefile.PL level, w/o having any special-case documentation for solaris9 users :) Just help us to figure out what went wrong...

--
__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com

--
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html



Reply via email to