Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: ModPerl: ModPerl

mod_perl 1.0 Compilation on Linux Ubuntu

 

 

ModPerl modperl RSS feed   Index | Next | Previous | View Threaded


hans at welinux

Jun 17, 2009, 8:08 AM

Post #1 of 4 (807 views)
Permalink
mod_perl 1.0 Compilation on Linux Ubuntu

Hi,

I'm having trouble compiling mod_perl on latest ubuntu (Jaunty), i've tried the latest version of mod_perl: 1.31 and apache: 1.3.41 without success, then i downgraded to some older versions once i was able to build: mod_perl.1.30 and apache 1.3.39, without success too.

The problem is that after doing perl Makefile.PL DO_HTTPD=1 USE_APACI=1 EVERYTHING=1

I get the following error:

** 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 ..; cc -DLINUX=22 -DMOD_PERL -DUSE_PERL_SSI -D_REENTRANT -DDEBIAN -fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DUSE_HSREGEX -DNO_DL_NEEDED -D_REENTRANT -DDEBIAN -fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 `./apaci` -I. -I/usr/lib/perl/5.10/CORE -o helpers/dummy helpers/dummy.c -lm -Wl,-E -L/usr/local/lib -L/usr/lib/perl/5.10/CORE -lperl -ldl -lm -lpthread -lc -lcrypt
============= End of Error Report =============

Aborting!

The message is not clear (to me at least) to where the problem may be, in any case i've rechecked all the requirements, and they look fine.

I've facing this problem before, and i wrote a little script/tutorial with tips for building from source on Ubuntu:

#!/bin/sh

tar xzf mod_perl-1.0-current.tar.gz
tar xzf apache_1.3.39.tar.gz

cd mod_perl-1.30/
perl Makefile.PL APACHE_SRC=../apache_1.3.39/src NO_HTTPD=1 USE_APACI=1 \
PREP_HTTPD=1 EVERYTHING=1
make

# cd ..

# Ubuntu optional
sudo rm -f /bin/sh;
sudo ln -s /bin/bash /bin/sh
sudo ln -s /usr/lib/libperl.so.5.8.8 /usr/lib/libperl.so
sudo ln -s /usr/lib/libgdbm.so.3.0.0 /usr/lib/libgdbm.so

cd ../apache_1.3.39
./configure --activate-module=src/modules/perl/libperl.a \
--disable-rule=EXPAT

sudo killall -TERM httpd
make && sudo make install

cd ../mod_perl-1.30/
sudo make install


Any help will be appreciated.

Thanks
Hans


--
Hans Poo, WeLinux S.A.
Oficina: 697.25.42, Celular: 09-319.93.05
Bombero Ossa # 1010, Santiago


gozer at ectoplasm

Jun 17, 2009, 9:16 AM

Post #2 of 4 (744 views)
Permalink
Re: mod_perl 1.0 Compilation on Linux Ubuntu [In reply to]

On 17/06/09 11:08 , hans [at] welinux wrote:
> Hi,
>
> I'm having trouble compiling mod_perl on latest ubuntu (Jaunty), i've tried the latest version of mod_perl: 1.31 and apache: 1.3.41 without success, then i downgraded to some older versions once i was able to build: mod_perl.1.30 and apache 1.3.39, without success too.
>
> The problem is that after doing perl Makefile.PL DO_HTTPD=1 USE_APACI=1 EVERYTHING=1
>
> I get the following error:
>
> ** 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 ..; cc -DLINUX=22 -DMOD_PERL -DUSE_PERL_SSI -D_REENTRANT -DDEBIAN -fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DUSE_HSREGEX -DNO_DL_NEEDED -D_REENTRANT -DDEBIAN -fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 `./apaci` -I. -I/usr/lib/perl/5.10/CORE -o helpers/dummy helpers/dummy.c -lm -Wl,-E -L/usr/local/lib -L/usr/lib/perl/5.10/CORE -lperl -ldl -lm -lpthread -lc -lcrypt

Have you tried running that cc command directly and see what happens ?

Sounds like the compiler is failing and we are not capturing the reason somehow.

--
Philippe M. Chiasson GPG: F9BFE0C2480E7680 1AE53631CB32A107 88C3A5A5
http://gozer.ectoplasm.org/ m/gozer\@(apache|cpan|ectoplasm)\.org/
Attachments: signature.asc (0.19 KB)


gozer at ectoplasm

Jun 17, 2009, 11:10 AM

Post #3 of 4 (744 views)
Permalink
Re: mod_perl 1.0 Compilation on Linux Ubuntu [In reply to]

On 17/06/09 12:52 , hans [at] welinux wrote:
> Philippe,
>
> I've just did it, and ran gcc on verbose mode and it seems to be fine, the problem may be somewhere else:

Just a hunch, looks like your gcc messages are localized in a non-english language (italian? spanish?)

Can you quickly try and build with LANG=C in your environemnt (or LANG=en_US)

> cd ../apache_1.3.39/src/
>
> apache_1.3.39/src$ gcc --verbose -DLINUX=22 -DMOD_PERL -DUSE_PERL_SSI -D_REENTRANT -DDEBIAN -fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DUSE_HSREGEX -DNO_DL_NEEDED -D_REENTRANT -DDEBIAN -fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 `./apaci` -I. -I/usr/lib/perl/5.10/CORE -o helpers/dummy helpers/dummy.c -lm -Wl,-E -L/usr/local/lib -L/usr/lib/perl/5.10/CORE -lperl -ldl -lm -lpthread -lc -lcrypt
> Usando especificaciones internas.
> Objetivo: i486-linux-gnu
> Configurado con: ../src/configure -v --with-pkgversion='Ubuntu 4.3.3-5ubuntu4' --with-bugurl=file:///usr/share/doc/gcc-4.3/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --enable-shared --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --enable-nls --with-gxx-include-dir=/usr/include/c++/4.3 --program-suffix=-4.3 --enable-clocale=gnu --enable-libstdcxx-debug --enable-objc-gc --enable-mpfr --enable-targets=all --with-tune=generic --enable-checking=release --build=i486-linux-gnu --host=i486-linux-gnu --target=i486-linux-gnu
> Modelo de hilos: posix
> gcc versión 4.3.3 (Ubuntu 4.3.3-5ubuntu4)
> COLLECT_GCC_OPTIONS='-v' '-DLINUX=22' '-DMOD_PERL' '-DUSE_PERL_SSI' '-D_REENTRANT' '-DDEBIAN' '-pipe' '-I/usr/local/include' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-DUSE_HSREGEX' '-DNO_DL_NEEDED' '-D_REENTRANT' '-DDEBIAN' '-fno-strict-aliasing' '-pipe' '-I/usr/local/include' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-DHTTPD_ROOT="/usr/local/apache"' '-DSUEXEC_BIN="/usr/local/apache/bin/suexec"' '-DSHARED_CORE_DIR="/usr/local/apache/libexec"' '-DDEFAULT_PIDLOG="logs/httpd.pid"' '-DDEFAULT_SCOREBOARD="logs/httpd.scoreboard"' '-DDEFAULT_LOCKFILE="logs/httpd.lock"' '-DDEFAULT_ERRORLOG="logs/error_log"' '-DTYPES_CONFIG_FILE="conf/mime.types"' '-DSERVER_CONFIG_FILE="conf/httpd.conf"' '-DACCESS_CONFIG_FILE="conf/access.conf"' '-DRESOURCE_CONFIG_FILE="conf/srm.conf"' '-I.' '-I/usr/lib/perl/5.10/CORE' '-o' 'helpers/dummy' '-L/usr/local/lib' '-L/usr/lib/perl/5.10/CORE' '-mtune=generic'
> /usr/lib/gcc/i486-linux-gnu/4.3.3/cc1 -quiet -v -I/usr/local/include -I/usr/local/include -I. -I/usr/lib/perl/5.10/CORE -DLINUX=22 -DMOD_PERL -DUSE_PERL_SSI -D_REENTRANT -DDEBIAN -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DUSE_HSREGEX -DNO_DL_NEEDED -D_REENTRANT -DDEBIAN -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DHTTPD_ROOT="/usr/local/apache" -DSUEXEC_BIN="/usr/local/apache/bin/suexec" -DSHARED_CORE_DIR="/usr/local/apache/libexec" -DDEFAULT_PIDLOG="logs/httpd.pid" -DDEFAULT_SCOREBOARD="logs/httpd.scoreboard" -DDEFAULT_LOCKFILE="logs/httpd.lock" -DDEFAULT_ERRORLOG="logs/error_log" -DTYPES_CONFIG_FILE="conf/mime.types" -DSERVER_CONFIG_FILE="conf/httpd.conf" -DACCESS_CONFIG_FILE="conf/access.conf" -DRESOURCE_CONFIG_FILE="conf/srm.conf" helpers/dummy.c -D_FORTIFY_SOURCE=2 -quiet -dumpbase dummy.c -mtune=generic -auxbase dummy -version -fno-strict-aliasing -fstack-protector -o - |
> as -V -Qy -o /tmp/ccw05Poa.o -
> GNU assembler version 2.19.1 (i486-linux-gnu) using BFD version (GNU Binutils for Ubuntu) 2.19.1
> se descarta el directorio inexistente "/usr/local/include/i486-linux-gnu"
> se descarta el directorio inexistente "/usr/lib/gcc/i486-linux-gnu/4.3.3/../../../../i486-linux-gnu/include"
> se descarta el directorio inexistente "/usr/include/i486-linux-gnu"
> se descarta el directorio duplicado "/usr/local/include"
> porque es un directorio que no es del sistema que duplica un directorio del sistema
> se descarta el directorio duplicado "/usr/local/include"
> porque es un directorio que no es del sistema que duplica un directorio del sistema
> la búsqueda de #include "..." inicia aquí:
> la búsqueda de #include <...> inicia aquí:
> .
> /usr/lib/perl/5.10/CORE
> /usr/local/include
> /usr/lib/gcc/i486-linux-gnu/4.3.3/include
> /usr/lib/gcc/i486-linux-gnu/4.3.3/include-fixed
> /usr/include
> Fin de la lista de búsqueda.
> GNU C (Ubuntu 4.3.3-5ubuntu4) versión 4.3.3 (i486-linux-gnu)
> compilado por GNU C versión 4.3.3, GMP versión 4.2.4, MPFR versión 2.4.0.
> GGC heurísticas: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
> Compiler executable checksum: 0bf5703b57e064ca90b48f4e2c186f4a
> COMPILER_PATH=/usr/lib/gcc/i486-linux-gnu/4.3.3/:/usr/lib/gcc/i486-linux-gnu/4.3.3/:/usr/lib/gcc/i486-linux-gnu/:/usr/lib/gcc/i486-linux-gnu/4.3.3/:/usr/lib/gcc/i486-linux-gnu/:/usr/lib/gcc/i486-linux-gnu/4.3.3/:/usr/lib/gcc/i486-linux-gnu/
> LIBRARY_PATH=/usr/lib/gcc/i486-linux-gnu/4.3.3/:/usr/lib/gcc/i486-linux-gnu/4.3.3/:/usr/lib/gcc/i486-linux-gnu/4.3.3/../../../../lib/:/lib/../lib/:/usr/lib/../lib/:/usr/lib/gcc/i486-linux-gnu/4.3.3/../../../:/lib/:/usr/lib/
> COLLECT_GCC_OPTIONS='-v' '-DLINUX=22' '-DMOD_PERL' '-DUSE_PERL_SSI' '-D_REENTRANT' '-DDEBIAN' '-pipe' '-I/usr/local/include' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-DUSE_HSREGEX' '-DNO_DL_NEEDED' '-D_REENTRANT' '-DDEBIAN' '-fno-strict-aliasing' '-pipe' '-I/usr/local/include' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-DHTTPD_ROOT="/usr/local/apache"' '-DSUEXEC_BIN="/usr/local/apache/bin/suexec"' '-DSHARED_CORE_DIR="/usr/local/apache/libexec"' '-DDEFAULT_PIDLOG="logs/httpd.pid"' '-DDEFAULT_SCOREBOARD="logs/httpd.scoreboard"' '-DDEFAULT_LOCKFILE="logs/httpd.lock"' '-DDEFAULT_ERRORLOG="logs/error_log"' '-DTYPES_CONFIG_FILE="conf/mime.types"' '-DSERVER_CONFIG_FILE="conf/httpd.conf"' '-DACCESS_CONFIG_FILE="conf/access.conf"' '-DRESOURCE_CONFIG_FILE="conf/srm.conf"' '-I.' '-I/usr/lib/perl/5.10/CORE' '-o' 'helpers/dummy' '-L/usr/local/lib' '-L/usr/lib/perl/5.10/CORE' '-mtune=generic'
> /usr/lib/gcc/i486-linux-gnu/4.3.3/collect2 --eh-frame-hdr -m elf_i386 --hash-style=both -dynamic-linker /lib/ld-linux.so.2 -o helpers/dummy -z relro /usr/lib/gcc/i486-linux-gnu/4.3.3/../../../../lib/crt1.o /usr/lib/gcc/i486-linux-gnu/4.3.3/../../../../lib/crti.o /usr/lib/gcc/i486-linux-gnu/4.3.3/crtbegin.o -L/usr/local/lib -L/usr/lib/perl/5.10/CORE -L/usr/lib/gcc/i486-linux-gnu/4.3.3 -L/usr/lib/gcc/i486-linux-gnu/4.3.3 -L/usr/lib/gcc/i486-linux-gnu/4.3.3/../../../../lib -L/lib/../lib -L/usr/lib/../lib -L/usr/lib/gcc/i486-linux-gnu/4.3.3/../../.. /tmp/ccw05Poa.o -lm -E -lperl -ldl -lm -lpthread -lc -lcrypt -lgcc --as-needed -lgcc_s --no-as-needed -lc -lgcc --as-needed -lgcc_s --no-as-needed /usr/lib/gcc/i486-linux-gnu/4.3.3/crtend.o /usr/lib/gcc/i486-linux-gnu/4.3.3/../../../../lib/crtn.o
> hans [at] energ:~/Desarrollo de Software/apache_1.3.39/src$
>
>
> Thanks
> Hans
>
> ----- "Philippe M. Chiasson" <gozer [at] ectoplasm> escribió:
>
>> On 17/06/09 11:08 , hans [at] welinux wrote:
>>> Hi,
>>>
>>> I'm having trouble compiling mod_perl on latest ubuntu (Jaunty),
>> i've tried the latest version of mod_perl: 1.31 and apache: 1.3.41
>> without success, then i downgraded to some older versions once i was
>> able to build: mod_perl.1.30 and apache 1.3.39, without success too.
>>>
>>> The problem is that after doing perl Makefile.PL DO_HTTPD=1
>> USE_APACI=1 EVERYTHING=1
>>>
>>> I get the following error:
>>>
>>> ** 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 ..; cc -DLINUX=22 -DMOD_PERL -DUSE_PERL_SSI -D_REENTRANT
>> -DDEBIAN -fno-strict-aliasing -pipe -I/usr/local/include
>> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DUSE_HSREGEX
>> -DNO_DL_NEEDED -D_REENTRANT -DDEBIAN -fno-strict-aliasing -pipe
>> -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
>> `./apaci` -I. -I/usr/lib/perl/5.10/CORE -o helpers/dummy
>> helpers/dummy.c -lm -Wl,-E -L/usr/local/lib
>> -L/usr/lib/perl/5.10/CORE -lperl -ldl -lm -lpthread -lc -lcrypt
>>
>> Have you tried running that cc command directly and see what happens
>> ?
>>
>> Sounds like the compiler is failing and we are not capturing the
>> reason somehow.
>>
>> --
>> Philippe M. Chiasson GPG: F9BFE0C2480E7680 1AE53631CB32A107
>> 88C3A5A5
>> http://gozer.ectoplasm.org/
>> m/gozer\@(apache|cpan|ectoplasm)\.org/
>

--
Philippe M. Chiasson GPG: F9BFE0C2480E7680 1AE53631CB32A107 88C3A5A5
http://gozer.ectoplasm.org/ m/gozer\@(apache|cpan|ectoplasm)\.org/
Attachments: signature.asc (0.19 KB)


hans at welinux

Jun 17, 2009, 3:25 PM

Post #4 of 4 (748 views)
Permalink
Re: mod_perl 1.0 Compilation on Linux Ubuntu [In reply to]

Philipe,

Since your response i recheck the build process.

I tried to compile just apache 1.3.39 alone, and it didn't work too. This show me the fact that the problem i was experiencing was apache related and not specific to mod_perl.

The problem where really sneaky because it was caused by the spaces in the name of a parent folder. This impacted in different ways in mod_perl and apache build process.

The instructions of mod_perl site suffice and are fine, sorry for the post (but beware of spaces in folder names).

wget http://perl.apache.org/dist/mod_perl-1.0-current.tar.gz
wget http://apache.freeby.pctools.cl/httpd/apache_1.3.41.tar.gz

tar xzf apache_1.3.41.tar.gz
tar xzf mod_perl-1.0-current.tar.gz

cd mod_perl-1.31/
perl Makefile.PL DO_HTTPD=1 USE_APACI=1 EVERYTHING=1
make && sudo make install

In any case the usual fixes mentioned in the first email must be ran in ubuntu.

Thank you
Hans


----- hans [at] welinux escribió:

> Hi,
>
> I'm having trouble compiling mod_perl on latest ubuntu (Jaunty), i've
> tried the latest version of mod_perl: 1.31 and apache: 1.3.41 without
> success, then i downgraded to some older versions once i was able to
> build: mod_perl.1.30 and apache 1.3.39, without success too.
>
> The problem is that after doing perl Makefile.PL DO_HTTPD=1
> USE_APACI=1 EVERYTHING=1
>
> I get the following error:
>
> ** 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 ..; cc -DLINUX=22 -DMOD_PERL -DUSE_PERL_SSI -D_REENTRANT -DDEBIAN
> -fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE
> -D_FILE_OFFSET_BITS=64 -DUSE_HSREGEX -DNO_DL_NEEDED -D_REENTRANT
> -DDEBIAN -fno-strict-aliasing -pipe -I/usr/local/include
> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 `./apaci` -I.
> -I/usr/lib/perl/5.10/CORE -o helpers/dummy helpers/dummy.c -lm
> -Wl,-E -L/usr/local/lib -L/usr/lib/perl/5.10/CORE -lperl -ldl -lm
> -lpthread -lc -lcrypt
> ============= End of Error Report =============
>
> Aborting!
>
> The message is not clear (to me at least) to where the problem may be,
> in any case i've rechecked all the requirements, and they look fine.
>
> I've facing this problem before, and i wrote a little script/tutorial
> with tips for building from source on Ubuntu:
>
> #!/bin/sh
>
> tar xzf mod_perl-1.0-current.tar.gz
> tar xzf apache_1.3.39.tar.gz
>
> cd mod_perl-1.30/
> perl Makefile.PL APACHE_SRC=../apache_1.3.39/src NO_HTTPD=1
> USE_APACI=1 \
> PREP_HTTPD=1 EVERYTHING=1
> make
>
> # cd ..
>
> # Ubuntu optional
> sudo rm -f /bin/sh;
> sudo ln -s /bin/bash /bin/sh
> sudo ln -s /usr/lib/libperl.so.5.8.8 /usr/lib/libperl.so
> sudo ln -s /usr/lib/libgdbm.so.3.0.0 /usr/lib/libgdbm.so
>
> cd ../apache_1.3.39
> ./configure --activate-module=src/modules/perl/libperl.a \
> --disable-rule=EXPAT
>
> sudo killall -TERM httpd
> make && sudo make install
>
> cd ../mod_perl-1.30/
> sudo make install
>
>
> Any help will be appreciated.
>
> Thanks
> Hans
>
>
> --
> Hans Poo, WeLinux S.A.
> Oficina: 697.25.42, Celular: 09-319.93.05
> Bombero Ossa # 1010, Santiago

--
Hans Poo, WeLinux S.A.
Oficina: 697.25.42, Celular: 09-319.93.05
Bombero Ossa # 1010, Santiago

ModPerl modperl RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.