You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Marc Gràcia Galobart <mg...@oasyssoft.com> on 2005/10/27 12:21:10 UTC

static mod_perl compilation failed...

Hi everybody,
Since now we were using a "normal" installation of mod_perl, with dso
apache and a dynamic loading enabled perl.
Due to some problems with lib versions when trying to install our app in
different linux distributions, we're now trying to go as "static" as
possible.
We distribute a precompiled perl versions with all the modules
preinstalled, this time with non dynamic loader enabled. Also, as we
only use a small amount of apache modules that are always in use, so
we're using now an Apache server without dso (by now with the default
module set + ssl). 

When I try to compile mod_perl with MP_USE_STATIC=1 ... , the
compilation stops with:

cc -I/usr/eBDASN/builder/mod_perl-2.0.2/src/modules/perl
-I/usr/eBDASN/builder/mod_perl-2.0.2/xs
-I/usr/eBDASN/builder/mod_perl-2.0.2/../httpd-2.0.55/include
-I/usr/eBDASN/builder/mod_perl-2.0.2/../httpd-2.0.55/srclib/apr/include
-I/usr/eBDASN/builder/mod_perl-2.0.2/../httpd-2.0.55/srclib/apr-util/include -I/usr/eBDASN/builder/mod_perl-2.0.2/../httpd-2.0.55/os/unix -D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -fno-strict-aliasing -pipe -I/usr/eBDASN/system-1.1/include/ -I/usr/eBDASN/system-1.1/lib/perl5/5.8.7/i686-linux-thread-multi/CORE -DMOD_PERL -DMP_COMPAT_1X -O3 -march=pentium4 -fomit-frame-pointer -c modperl_sys.c

modperl_sys.c:65:2: error: #error "modperl_sys_dlclose not defined on
this platform"

The "dl" of "dlclose" are making me suspect that maybe a "Dynamic
Loading" perl is needed....  Is this possible? I did'nt saw it in the
prerequisites. If not, please 
some help !!

Environmental data follows:
==================================

- mod_perl 2.0.2 

- Makefile.PL call:
perl Makefile.PL MP_USE_STATIC=1 MP_AP_PREFIX=../httpd-$eBDApacheVersion
MP_AP_CONFIGURE="--prefix=$BuildPrefix --sysconfdir=$InstallBase/conf
--enable-ssl --with-ssl=$BuildPrefix --with-mpm=worker
--enable-module=most --enable-shared=none --with-berkeley-db=
$BuildPrefix --with-gdbm=$BuildPrefix"

- Perl -V output:

Summary of my perl5 (revision 5 version 8 subversion 7) configuration:
  Platform:
    osname=linux, osvers=2.6.12-1.1447_fc4,
archname=i686-linux-thread-multi
    uname='linux aragorn.oasys.es 2.6.12-1.1447_fc4 #1 fri aug 26
20:29:51 edt 2005 i686 i686 i386 gnulinux '
    config_args='-Dprefix=/usr/eBDASN/system-1.1
-Dlocincpth=/usr/eBDASN/system-1.1/include/
-Dloclibpth=/usr/eBDASN/system-1.1/lib/ -Dusethreads -Doptimize=-O3
-march=pentium4 -fomit-frame-pointer -Uusedl -Dusemymalloc -des'
    hint=recommended, useposix=true, d_sigaction=define
    usethreads=define use5005threads=undef useithreads=define
usemultiplicity=define
    useperlio=define d_sfio=undef uselargefiles=define usesocks=undef
    use64bitint=undef use64bitall=undef uselongdouble=undef
    usemymalloc=y, bincompat5005=undef
  Compiler:
    cc='cc', ccflags ='-D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS
-fno-strict-aliasing -pipe -I/usr/eBDASN/system-1.1/include/
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64',
    optimize='-O3 -march=pentium4 -fomit-frame-pointer',
    cppflags='-D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS
-fno-strict-aliasing -pipe -I/usr/eBDASN/system-1.1/include/'
    ccversion='', gccversion='4.0.1 20050727 (Red Hat 4.0.1-5)',
gccosandvers=''
    intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234
    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
    ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t',
lseeksize=8
    alignbytes=4, prototype=define
  Linker and Libraries:
    ld='ld', ldflags =' -L/usr/eBDASN/system-1.1/lib/'
    libpth=/usr/eBDASN/system-1.1/lib/ /lib /usr/lib /usr/local/lib
    libs=-lnsl -lgdbm -ldb -ldl -lm -lcrypt -lutil -lpthread -lc
    perllibs=-lnsl -lgdbm -ldb -ldl -lm -lcrypt -lutil -lpthread -lc
    libc=/lib/libc-2.3.5.so, so=so, useshrplib=false, libperl=libperl.a
    gnulibc_version='2.3.5'
  Dynamic Linking:
    dlsrc=dl_none.xs, dlext=none, d_dlsymun=undef, ccdlflags=''
    cccdlflags='', lddlflags=''


Characteristics of this binary (from libperl):
  Compile-time options: MULTIPLICITY USE_ITHREADS USE_LARGE_FILES
                        PERL_IMPLICIT_CONTEXT
  Built under linux
  Compiled at Oct 26 2005 17:58:52
  @INC:
    /usr/eBDASN/system-1.1/lib/perl5/5.8.7/i686-linux-thread-multi
    /usr/eBDASN/system-1.1/lib/perl5/5.8.7
    /usr/eBDASN/system-1.1/lib/perl5/site_perl/5.8.7/i686-linux-thread-multi
    /usr/eBDASN/system-1.1/lib/perl5/site_perl/5.8.7
    /usr/eBDASN/system-1.1/lib/perl5/site_perl
    .




Re: static mod_perl compilation failed...

Posted by Marc Gràcia Galobart <mg...@oasyssoft.com>.
Sorry... so? What I have to do?

I just commented the #error line... and everything just compiled OK. I
think its a very risky business, but well. 
That are my thoughts knowing nothing about perl inner works:
-I thought dlclose is related to loading libraries. I don't use
libraries.
-There were any "dlopen" error. So, if nothing is "dlopened" i suppose
nothing must be "dlclosed".
SO:
dlclose just have to do nothing... 

I'm completely silly about this?

El dj 27 de 10 del 2005 a les 14:40 -0400, en/na Philip M. Gollucci va
escriure:
> Marc Gràcia Galobart wrote:
> > modperl_sys.c:65:2: error: #error "modperl_sys_dlclose not defined on 
> > this platform"
> > - Makefile.PL call:
> > perl Makefile.PL MP_USE_STATIC=1 MP_AP_PREFIX=../httpd-$eBDApacheVersion 
> > MP_AP_CONFIGURE="--prefix=$BuildPrefix --sysconfdir=$InstallBase/conf 
> > --enable-ssl --with-ssl=$BuildPrefix --with-mpm=worker 
> > --enable-module=most --enable-shared=none 
> > --with-berkeley-db=$BuildPrefix --with-gdbm=$BuildPrefix"
> /*
>   * Perl does not provide this abstraction.
>   * APR does, but requires a pool.  efforts to expose this area of apr
>   * failed.  so we roll our own.  *sigh*
>   */
> int modperl_sys_dlclose(void *handle)
> {
> #if defined(MP_SYS_DL_DLOPEN)
> #ifdef I_DLFCN
> #include <dlfcn.h>
> #else
> #include <nlist.h>
> #include <link.h>
> #endif
>      return dlclose(handle) == 0;
> #elif defined(MP_SYS_DL_DYLD)
>      return NSUnLinkModule(handle, FALSE);
> #elif defined(MP_SYS_DL_HPUX)
> #include <dl.h>
>      shl_unload((shl_t)handle);
>      return 1;
> #elif defined(MP_SYS_DL_WIN32)
>      return FreeLibrary(handle);
> #elif defined(MP_SYS_DL_BEOS)
>      return unload_add_on(handle) < B_NO_ERROR;
> #elif defined(MP_SYS_DL_DLLLOAD)
>      return dllfree(handle) == 0;
> #elif defined(MP_SYS_DL_AIX)
>      return dlclose(handle) == 0;
> #else
> #error "modperl_sys_dlclose not defined on this platform"
>      return 0;
> #endif
> }
> 
> 
> END
> ------------------------------------------------------------
>      What doesn't kill us can only make us stronger.
>                  Nothing is impossible.
> 				
> Philip M. Gollucci (pgollucci@p6m7g8.com) 301.254.5198
> Consultant / http://p6m7g8.net/Resume/
> Senior Developer / Liquidity Services, Inc.
>    http://www.liquidityservicesinc.com
>         http://www.liquidation.com
>         http://www.uksurplus.com
>         http://www.govliquidation.com
>         http://www.gowholesale.com
> 
> 


Re: static mod_perl compilation failed...

Posted by "Philip M. Gollucci" <pg...@p6m7g8.com>.
Marc Gràcia Galobart wrote:
> modperl_sys.c:65:2: error: #error "modperl_sys_dlclose not defined on 
> this platform"
> - Makefile.PL call:
> perl Makefile.PL MP_USE_STATIC=1 MP_AP_PREFIX=../httpd-$eBDApacheVersion 
> MP_AP_CONFIGURE="--prefix=$BuildPrefix --sysconfdir=$InstallBase/conf 
> --enable-ssl --with-ssl=$BuildPrefix --with-mpm=worker 
> --enable-module=most --enable-shared=none 
> --with-berkeley-db=$BuildPrefix --with-gdbm=$BuildPrefix"
/*
  * Perl does not provide this abstraction.
  * APR does, but requires a pool.  efforts to expose this area of apr
  * failed.  so we roll our own.  *sigh*
  */
int modperl_sys_dlclose(void *handle)
{
#if defined(MP_SYS_DL_DLOPEN)
#ifdef I_DLFCN
#include <dlfcn.h>
#else
#include <nlist.h>
#include <link.h>
#endif
     return dlclose(handle) == 0;
#elif defined(MP_SYS_DL_DYLD)
     return NSUnLinkModule(handle, FALSE);
#elif defined(MP_SYS_DL_HPUX)
#include <dl.h>
     shl_unload((shl_t)handle);
     return 1;
#elif defined(MP_SYS_DL_WIN32)
     return FreeLibrary(handle);
#elif defined(MP_SYS_DL_BEOS)
     return unload_add_on(handle) < B_NO_ERROR;
#elif defined(MP_SYS_DL_DLLLOAD)
     return dllfree(handle) == 0;
#elif defined(MP_SYS_DL_AIX)
     return dlclose(handle) == 0;
#else
#error "modperl_sys_dlclose not defined on this platform"
     return 0;
#endif
}


END
------------------------------------------------------------
     What doesn't kill us can only make us stronger.
                 Nothing is impossible.
				
Philip M. Gollucci (pgollucci@p6m7g8.com) 301.254.5198
Consultant / http://p6m7g8.net/Resume/
Senior Developer / Liquidity Services, Inc.
   http://www.liquidityservicesinc.com
        http://www.liquidation.com
        http://www.uksurplus.com
        http://www.govliquidation.com
        http://www.gowholesale.com