Skip Menu |
Report information
Id: 1792
Status: resolved
Priority: 0/
Queue: perl5

Owner: Nobody
Requestors: mlevine [at] reshape.com
Cc:
AdminCc:

Operating System: generic
PatchStatus: (no value)
Severity: fatal
Type: utilities
Perl Version: (no value)
Fixed In: (no value)



From: Margie Levine <mlevine [...] reshape.com>
To: "'perlbug [...] perl.com'" <perlbug [...] perl.com>
Cc: "'ml [...] reshape.com'" <ml [...] reshape.com>
Subject: question about Configure options for perl-only extensions
Date: Wed, 17 Nov 1999 13:33:19 -0800
Download (untitled) / with headers
text/plain 2.1k
question about Configure options for perl-only extensions

Hi,

I am building perl with a number of extensions statically linked in.  Everything is working fine with my extensions that have C code associated with them, but the extensions that are perl code only, such as DateManip, GIFgraph, and DProf are giving me problems because they seem to not install correctly.

I'm confused at the intended usage of -Dextensions versus -Dstatic_ext and -Ddynamic_ext.

If I put all of DateManip, GifGraph, and DProf in both -Dextensions and -Dstatic_extensions, like this:

  ./Configure -de -Dprefix='/home/mlevine/reshape/bin/perl' \
  -Dlibs='-Wl,-Bstatic -lm -lstdc++ -Wl,-Bdynamic -ldl -Wl,-Bstatic ' \
  -Dlibpth='-L/home/mlevine/reshape/blib  ' -Dldflags=' ' -Dso='none' \
  ... some other unrelated stuff for setting gcc, make, etc \
  -Dextensions='Reshape POSIX Fcntl IO GD DProf GIFgraph DateManip '
  -Ddynamic_ext=' '
  -Dstatic_ext='Reshape POSIX Fcntl IO GD DProf GIFgraph DateManip '

I get the following errors when I link perl

  /home2/mlevine/reshape_tools/bin/gcc -o perl perlmain.o \
  lib/auto/DynaLoader/DynaLoader.a lib/auto/Reshape/Reshape.a \
  lib/auto/POSIX/POSIX.a lib/auto/Fcntl/Fcntl.a lib/auto/IO/IO.a \
  lib/auto/GD/GD.a lib/auto/DProf/DProf.a lib/auto/GIFgraph/GIFgraph.a \
  lib/auto/DateManip/DateManip.a libperl.a \
  `cat ext.libs` -Wl,-Bstatic -lm -lstdc++ -Wl,-Bdynamic -ldl -Wl,-Bstatic \
  gcc: lib/auto/DProf/DProf.a: No such file or directory \
  gcc: lib/auto/GIFgraph/GIFgraph.a: No such file or directory \
  gcc: lib/auto/DateManip/DateManip.a: No such file or directory

However, if I put DProf, GIFgraph, and DateManip in -Dextensions, but remove it from -Dstatic_ext, like this:

  -Dextensions='Reshape POSIX Fcntl IO GD DProf GIFgraph DateManip ' \
  -Ddynamic_ext=' '
  -Dstatic_ext='Reshape POSIX Fcntl IO GD

then when I make, I don't DProf, GIFgraph, and DateManip don't get made.  Where on the Configure line should these extensions that aren't really dynamic or static go?  If I cd into the actual extension directory and do the standard 'perl Makefile.pl; make install', then of course, it does get installed.  But I know there must be some way for this to happen automatically based on my arguments to Configure ...

Thanks!

 - Margie Levine

Date: Wed, 17 Nov 1999 21:52:10 -0500 (EST)
From: Andy Dougherty <doughera [...] lafayette.edu>
To: Margie Levine <mlevine [...] reshape.com>
Cc: perl5-porters [...] perl.org, "'ml [...] reshape.com'" <ml [...] reshape.com>
Subject: Re: [ID 19991117.003] question about Configure options for perl-only extensions
Download (untitled) / with headers
text/plain 3.1k
On Wed, 17 Nov 1999, Margie Levine wrote: Show quoted text
> I am building perl with a number of extensions statically linked in. > Everything is working fine with my extensions that have C code associated > with them, but the extensions that are perl code only, such as DateManip, > GIFgraph, and DProf are giving me problems because they seem to not install > correctly. > > I'm confused at the intended usage of -Dextensions versus -Dstatic_ext and > -Ddynamic_ext.
That's not surprising, since they weren't really designed to be manipulated from the Configure command line. The intended use (which I see isn't actually documented -- Hmm -- I thought I had documented that) is that you just plop your extensions down in the ext/ directory and Configure automatically adds them in. You don't have to do -D anything. If that doesn't work, your best bet is to either run Configure interactively and specify them when prompted, or to use a config.over file to set the appropriate Configure variables. There are actually 5 relevant Configure variables. Here are their definitions (from Porting/Glossary) known_extensions: This variable holds a list of all XS extensions included in the package. dynamic_ext: This variable holds a list of XS extension files we want to link dynamically into the package. It is used by Makefile. static_ext: This variable holds a list of XS extension files we want to link statically into the package. It is used by Makefile. nonxs_ext: This variable holds a list of all non-xs extensions included in the package. All of them will be built. extensions: This variable holds a list of all extension files (both XS and non-xs linked into the package. It is propagated to Config.pm and is typically used to test whether a particular extesion is available. You want your non-XS extensions to appear in $nonxs_ext. They should automatically. The $extensions variable is effectively set to extensions="$dynamic_ext $static_ext $nonxs_ext" so setting it from the command line is not what I would recommend (and I don't think it will even work). Show quoted text
> ./Configure -de -Dprefix='/home/mlevine/reshape/bin/perl' \ > -Dlibs='-Wl,-Bstatic -lm -lstdc++ -Wl,-Bdynamic -ldl -Wl,-Bstatic ' \ > -Dlibpth='-L/home/mlevine/reshape/blib ' -Dldflags=' ' -Dso='none' \ > ... some other unrelated stuff for setting gcc, make, etc \ > -Dextensions='Reshape POSIX Fcntl IO GD DProf GIFgraph DateManip ' > -Ddynamic_ext=' ' > -Dstatic_ext='Reshape POSIX Fcntl IO GD DProf GIFgraph DateManip '
Incidentally, if you add in a -Uusedl, then dynamic_ext will automatically get set to ' ', and static_ext will automatically get set to pick up all of your XS extensions, and nonxs_ext will automatically pick up all of your non-XS extensions. In short, adding in -Uusedl ought to remove the need to specify anything else about any of the extensions. If you want to exclude specific extensions included in the core perl distribution, then there are individual flags you can set for each one. These are documented in the INSTALL file. (e.g. -Uuseposix will tell perl not to build the POSIX extension.) Hope this helps, Andy Dougherty doughera@lafayette.edu Dept. of Physics Lafayette College, Easton PA 18042
Download (untitled) / with headers
text/plain 688b
It's in INSTALL: If you unpack any additional extensions in the ext/ directory before running Configure, then Configure will offer to build those additional extensions as well. Most users probably shouldn't have to do this -- it is usually easier to build additional extensions later after perl has been installed. However, if you wish to have those additional extensions statically linked into the perl binary, then this offers a convenient way to do that in one step. (It is not necessary, however; you can build and install extensions just fine even if you don't have dynamic loading. See lib/ExtUtils/MakeMaker.pm for more details.)


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

For issues related to this RT instance (aka "perlbug"), please contact perlbug-admin at perl.org