You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Timothy Chi <tc...@blackboard.com> on 2000/06/05 23:42:48 UTC

compiling mod_perl with PERL_STATIC_EXTS

Hi all-

I'm trying to build mod_perl 1.21_02 (w/ apache 1.3.12) with GD statically
linked.

I've tried running 
	perl Makefile.PL PERL_STATIC_EXTS='GD' EVERYTHING=1 USE_APACI=1
APACI_ARGS='--prefix=/usr/local/bb/httpd, --enable-module=proxy'

and I get:

gcc  -DLINUX=2 -DMOD_PERL -DUSE_PERL_SSI -Dbool=char -DHAS_BOOL
-DUSE_HSREGEX -DUSE_EXPAT -I./lib/expat-lite -DNO_DL_NEEDED `./apaci`    \
      -o httpd buildmark.o modules.o modules/standard/libstandard.a
modules/proxy/libproxy.a modules/perl/libperl.a main/libmain.a
./os/unix/libos.a ap/libap.a regex/libregex.a lib/expat-lite/libexpat.a  -lm
-lcrypt -rdynamic  -L/usr/local/lib
/usr/local/bb/perl/lib/5.00503/i686-linux/auto/DynaLoader/DynaLoader.a
-L/usr/local/bb/perl/lib/5.00503/i686-linux/CORE -lperl -lnsl -lndbm -lgdbm
-ldb -ldl -lm -lc -lposix -lcrypt 
modules/perl/libperl.a(perlxsi.o): In function `xs_init':
perlxsi.o(.text+0xb4): undefined reference to `boot_GD'
collect2: ld returned 1 exit status
make[3]: *** [target_static] Error 1

The version of Perl is 5.005_03.  I have built GD and statically linked it
to Perl.

When I run:

# perl -MExtUtils::Embed -e ldopts -- -std GD
-rdynamic  -L/usr/local/lib
/usr/local/bb/perl/lib/site_perl/5.005/i686-linux/auto/GD/GD.a
/usr/local/bb/perl/lib/5.00503/i686-linux/auto/DynaLoader/DynaLoader.a
-L/usr/local/bb/perl/lib/5.00503/i686-linux/CORE -lperl -lnsl -lndbm -lgdbm
-ldb -ldl -lm -lc -lposix -lcrypt -L/usr/lib/X11 -L/usr/X11R6/lib
-L/usr/local/lib -lgd -lpng -lttf -lz -ljpeg -lm -lX11 -lXpm	

Running this command (this was pulled from one of Doug M. earlier posts):
# perl -MExtUtiles::Embed -e xsinit -- -std GD
# cat perlxsi.c
EXTERN_C void xs_init _((void));

EXTERN_C void boot_GD _((CV* cv));
EXTERN_C void boot_DynaLoader _((CV* cv));

EXTERN_C void
xs_init(void)
{
        char *file = __FILE__;
        dXSUB_SYS;

        newXS("GD::bootstrap", boot_GD, file);
        /* DynaLoader is a special case */
        newXS("DynaLoader::boot_DynaLoader", boot_DynaLoader, file);
}

It seems like the GD.a library can't be located by the linker for some
reason.  I've set my LD_LIBRARY_PATH, LD_RUN_PATH environment variables, and
I've tried modifying the Makefile to include the path to the GD.a
(/usr/local/bb/perl/lib/site_perl/5.005/i686-linux/auto/GD)

Any suggestions?  Sorry, I'm kinda new at all of this.

Thanks in advance.

--Tim