-Wl,-E

2002-08-15 Thread Ihor Bilyy

Hello!

I can't build apache 1.3.26 with mod_perl 1.27 on Solaris 2.8
I use:
perl Makefile.pl APACHE_SRC=../apache1/src \
NO_HTTPD=1 USE_APACI=1 PREP_HTTPD \
EVERYTHING=1

and in apache directory:
./configure --activate-module=src/modules/perl/libperl.a

here is the output:
Configuring for Apache, Version 1.3.26
 + using installation path layout: Apache (config.layout)
 + activated perl module (modules/perl/libperl.a)
Creating Makefile
Creating Configuration.apaci in src
Creating Makefile in src
 + configured for Solaris 280 platform
 + setting C compiler to gcc
 + setting C pre-processor to gcc -E
 + checking for system header files
 + adding selected modules
o perl_module uses ConfigStart/End
  + mod_perl build type: OBJ
  + id: mod_perl/1.27
  + id: Perl/v5.6.1 (solaris) [perl]
  + setting up mod_perl build environment
  + adjusting Apache build environment
  + enabling Perl support for SSI (mod_include)
 + using builtin Expat
 + checking sizeof various data types
 + doing sanity check on compiler and options
** A test compilation with your Makefile configuration
** failed.  The below error output from the compilation
** test will give you an idea what is failing. Note that
** Apache requires an ANSI C Compiler, such as gcc.

 Error Output for sanity check 
cd ..; gcc  -DSOLARIS2=280 -DMOD_PERL -DUSE_PERL_SSI 
-fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FI
LE_OFFSET_BITS=64 -DUSE_EXPAT -I./lib/expat-lite 
-DNO_DL_NEEDED `./apaci` -I. -I/usr/local//lib/perl5/5.6.1/sun4-solaris
/CORE-o helpers/dummy helpers/dummy.c   -lsocket -lnsl -lpthread  
-Wl,-E  -L/usr/local/lib  
/usr/local/lib/perl5/5.6.1/sun4-solaris/auto/DynaLoader/DynaLoader.a 
-L/usr/local/lib/perl5/5.6.1/sun4-solaris/CORE 
-lperl -lsocket -lnsl -ldl -lm -lc

/usr/ccs/bin/ld: illegal option -- E
usage: ld [-abc:d:e:f:h:il:mo:p:rstu:z:B:D:F:GI:L:M:N:P:Q:R:S:VY:] file(s)

Does anybody know how to fix it? 
I tried MP_LD=gcc but with the same effect.

thanks
-i-





Re: -Wl,-E

2002-08-14 Thread David McCabe

Ihor Bilyy wrote:
 
 After applying that patches error message is the same.
 ld -V:
 ld: Software Generation Utilities - Solaris Link Editors: 5.8-1.275

This is OK. The Configure script for perl looks for ld: Software Generation
Utilities, so it should find it.

 btw gcc --version 2.95.2, maybe problem is with gcc ?

I use 2.95.3, from the package at sunfreeware.com.

What does perl -V show? It should show you a bunch of info, with a section that
looks something like this:

  Linker and Libraries:
ld='gcc', ldflags ='-R/opt/BerkeleyDB/lib:/opt/lib -L/opt/BerkeleyDB/lib '
libpth=/opt/BerkeleyDB/lib /usr/lib /usr/ccs/lib /usr/local/lib
libs=-lsocket -lnsl -lgdbm -ldb -ldl -lm -lc
perllibs=-lsocket -lnsl -ldl -lm -lc
libc=/lib/libc.so, so=so, useshrplib=false, libperl=libperl.a

Anything you try to build to add to your perl which has C code (like mod_perl)
will try to use the same compiler and linker options that were used to build
perl. So if you used the Gnu ld, (which you would see in the ldflags of the
Linker section above), then mod_perl will try to build with that linker. 

(FYI, the ldflags that I use above are so I do not ever have to set
LD_LIBRARY_PATH in the environment)

Did you build perl on the same box, with the same compiler?? If it was built
somewhere else, and transfered over, you will have to either rebuild perl from
source, or build mod_perl with the original perl, and then transfer it over,
made much easier if you use a prefix to build and install perl into one dir. I
do this with a prefix of /opt/perl5. Then I can just xfer that whole sub-dir
(using rsync and ssh) to any other box with the same OS version.

-- 
David McCabe  Network and Communications Services, McGill University
Montreal, Quebec, Canada  [EMAIL PROTECTED]
In theory there is no difference between theory and practice.
In practice there is.  -Yogi Berra



-Wl,-E

2002-08-13 Thread Ihor Bilyy

Hello!

I can't build apache 1.3.26 with mod_perl 1.27 on Solaris 2.8
I use:
perl Makefile.pl APACHE_SRC=../apache1/src \
NO_HTTPD=1 USE_APACI=1 PREP_HTTPD \
EVERYTHING=1

and in apache directory:
./configure --activate-module=src/modules/perl/libperl.a

here is the output:
Configuring for Apache, Version 1.3.26
 + using installation path layout: Apache (config.layout)
 + activated perl module (modules/perl/libperl.a)
Creating Makefile
Creating Configuration.apaci in src
Creating Makefile in src
 + configured for Solaris 280 platform
 + setting C compiler to gcc
 + setting C pre-processor to gcc -E
 + checking for system header files
 + adding selected modules
o perl_module uses ConfigStart/End
  + mod_perl build type: OBJ
  + id: mod_perl/1.27
  + id: Perl/v5.6.1 (solaris) [perl]
  + setting up mod_perl build environment
  + adjusting Apache build environment
  + enabling Perl support for SSI (mod_include)
 + using builtin Expat
 + checking sizeof various data types
 + doing sanity check on compiler and options
** A test compilation with your Makefile configuration
** failed.  The below error output from the compilation
** test will give you an idea what is failing. Note that
** Apache requires an ANSI C Compiler, such as gcc.

 Error Output for sanity check 
cd ..; gcc  -DSOLARIS2=280 -DMOD_PERL -DUSE_PERL_SSI 
-fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FI
LE_OFFSET_BITS=64 -DUSE_EXPAT -I./lib/expat-lite 
-DNO_DL_NEEDED `./apaci` -I. -I/usr/local//lib/perl5/5.6.1/sun4-solaris
/CORE-o helpers/dummy helpers/dummy.c   -lsocket -lnsl -lpthread  
-Wl,-E  -L/usr/local/lib  
/usr/local/lib/perl5/5.6.1/sun4-solaris/auto/DynaLoader/DynaLoader.a 
-L/usr/local/lib/perl5/5.6.1/sun4-solaris/CORE 
-lperl -lsocket -lnsl -ldl -lm -lc

/usr/ccs/bin/ld: illegal option -- E
usage: ld [-abc:d:e:f:h:il:mo:p:rstu:z:B:D:F:GI:L:M:N:P:Q:R:S:VY:] file(s)

Does anybody know how to fix it? 
I tried MP_LD=gcc but with the same effect.

thanks
-i-






Re: -Wl,-E

2002-08-13 Thread David McCabe

Ihor Bilyy wrote:
 
 Hello!
 
 I can't build apache 1.3.26 with mod_perl 1.27 on Solaris 2.8
 I use:

 /usr/ccs/bin/ld: illegal option -- E
 usage: ld [-abc:d:e:f:h:il:mo:p:rstu:z:B:D:F:GI:L:M:N:P:Q:R:S:VY:] file(s)

Sun put out a patch to their linker (ld) that breaks the Configure script for
perl. It checks for a specific info string output from the ld command, and
decides from that if you are using Sun's ld, or the Gnu ld. Since that patch
changes the output of the ld command's info string, Configure thinks you are
using Gnu's ld, and hence sets up the Gnu ld options to pass to Sun's ld.
Obviously, this doesn't work. Sun has since fixed it, by another patch that puts
back the old info string in their ld. 

The patch to ld that broke this is 109147-14. The 109147-16 patch fixes it
again.

Update these Solaris patches and your problem should go away. :)

-- 
David McCabe  Network and Communications Services, McGill University
Montreal, Quebec, Canada  [EMAIL PROTECTED]
In theory there is no difference between theory and practice.
In practice there is.  -Yogi Berra

*** perl-5.6.1/hints/solaris_2.sh   Thu Jan 31 13:55:18 2002
--- perl-5.6.1/hints/solaris_2.sh.orig  Fri Jan 25 19:56:05 2002
***
*** 199,209 
  #  egcs-1.0.3, GNU as 2.9.1 and GNU ld 2.9.1
  # --Andy Dougherty  [EMAIL PROTECTED]
  # Tue Apr 13 17:19:43 EDT 1999
- #  Patch 109147-14 for Solaris 8 (and probably same patch on other
- #  versions, the Link Patch) changes a string that is output by ld and
- #  checked for here. I added another elsif block to test for the new string.
- #  David McCabe [EMAIL PROTECTED]
- #  Friday Jan 25 20:02:00 EDT 2002
  
  # Get gcc to share its secrets.
  echo 'main() { return 0; }'  try.c
--- 199,204 
***
*** 244,252 
# All Solaris versions of ld I've seen contain the magic
# string used in the grep.
:
- # NEW BLOCK FOR SOLARIS LINK PATCH - exception to above comment :)
- elif echo $verbose | grep ld: Solaris Link Editors: /dev/null 21; then
- :
else
# No evidence yet of /usr/ccs/bin/ld.  Some versions
# of egcs's ld wrapper call /usr/ccs/bin/ld in turn but
--- 239,244 



Re: -Wl,-E

2002-08-13 Thread Ihor Bilyy

After applying that patches error message is the same.
ld -V:
ld: Software Generation Utilities - Solaris Link Editors: 5.8-1.275

btw gcc --version 2.95.2, maybe problem is with gcc ?

-i-

- Original Message -
From: David McCabe [EMAIL PROTECTED]
To: Ihor Bilyy [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Tuesday, August 13, 2002 3:11 PM
Subject: Re: -Wl,-E


 Ihor Bilyy wrote:
 
  Hello!
 
  I can't build apache 1.3.26 with mod_perl 1.27 on Solaris 2.8
  I use:

  /usr/ccs/bin/ld: illegal option -- E
  usage: ld [-abc:d:e:f:h:il:mo:p:rstu:z:B:D:F:GI:L:M:N:P:Q:R:S:VY:]
file(s)

 Sun put out a patch to their linker (ld) that breaks the Configure script
for
 perl. It checks for a specific info string output from the ld command, and
 decides from that if you are using Sun's ld, or the Gnu ld. Since that
patch
 changes the output of the ld command's info string, Configure thinks you
are
 using Gnu's ld, and hence sets up the Gnu ld options to pass to Sun's ld.
 Obviously, this doesn't work. Sun has since fixed it, by another patch
that puts
 back the old info string in their ld.

 The patch to ld that broke this is 109147-14. The 109147-16 patch fixes it
 again.

 Update these Solaris patches and your problem should go away. :)

 --
 David McCabe  Network and Communications Services, McGill University
 Montreal, Quebec, Canada  [EMAIL PROTECTED]
 In theory there is no difference between theory and practice.
 In practice there is.  -Yogi Berra






 *** perl-5.6.1/hints/solaris_2.sh Thu Jan 31 13:55:18 2002
 --- perl-5.6.1/hints/solaris_2.sh.orig Fri Jan 25 19:56:05 2002
 ***
 *** 199,209 
   #  egcs-1.0.3, GNU as 2.9.1 and GNU ld 2.9.1
   # --Andy Dougherty  [EMAIL PROTECTED]
   # Tue Apr 13 17:19:43 EDT 1999
 - #  Patch 109147-14 for Solaris 8 (and probably same patch on other
 - #  versions, the Link Patch) changes a string that is output by ld and
 - #  checked for here. I added another elsif block to test for the new
string.
 - #  David McCabe [EMAIL PROTECTED]
 - #  Friday Jan 25 20:02:00 EDT 2002

   # Get gcc to share its secrets.
   echo 'main() { return 0; }'  try.c
 --- 199,204 
 ***
 *** 244,252 
   # All Solaris versions of ld I've seen contain the magic
   # string used in the grep.
   :
 - # NEW BLOCK FOR SOLARIS LINK PATCH - exception to above comment :)
 - elif echo $verbose | grep ld: Solaris Link Editors: /dev/null
21; then
 - :
   else
   # No evidence yet of /usr/ccs/bin/ld.  Some versions
   # of egcs's ld wrapper call /usr/ccs/bin/ld in turn but
 --- 239,244