develooper Front page | perl.makemaker | Postings from May 2002

Fwd: [ a MakeMaker question]

Michael G Schwern
May 11, 2002 16:08
Fwd: [ a MakeMaker question]
Message ID:
I got a question sent to me about about MakeMaker & XS magic about which I
know nothing.  Can anyone give this fellow a hand?

----- Forwarded message from Bruce Ravel <> -----

Subject: a MakeMaker question
From: Bruce Ravel <>
X-Attribution: BR

Hi there,

I hope you do not mind my contacting you directly.  I am doing so
because (1) the makemaker mailing list seems to be a place for
developer discussion, not for user questions, (2) your name was all
over the mailing list archives, and (3) nobody has answered the
question I posted on c.l.p.modules.  If it is inappropriate that I
pester you like this, feel free to tell me to buzz off.

Here's my problem with MakeMaker:  I am being foiled by the order of
the linker arguments in the Makefile that gets generated.  In the
dynamic_libs section of the Makefile, the variable $(LDDLFLAGS) comes
before the variable $(LDLOADLIBS).  By my understanding of how the
Makefile is generated, $(LDDLFLAGS) gets the value of
$Config{lddlflags} from perl's  And $(LDLOADLIBS) is set to
whatever is the value of the LIBS argument in WriteMakefile in the

That's all good, except in this case my perl module is being built as
part of a large package with libraries written in C and Fortran and
wrapper writtten in perl and other languages.  If an old version of
the package exists on the machine, then the old version of the library
is found before the newly compiled version when my SWIG wrapper gets
linked.  This is because the location specified in $(LDDLFLAGS) comes
before the location in $(LDLOADLIBS) in the argument list for the

Is there a way to rectify this at the level of writing the
Makefile.PL?  Or would I be best advised to sidestep the problem,
say by installing the perl wrapper after the libraries?

Thanks for your attention,

 Bruce Ravel  -----------------------------------
 U.S. Naval Research Laboratory, Code 6134          phone: (1) 202 767 5947
 Washington DC 20375, USA                             fax: (1) 202 767 1697

 NRL Synchrotron Radiation Consortium (NRL-SRC)
 Beamlines X11a, X11b, X23b, X24c, U4b
 National Synchrotron Light Source
 Brookhaven National Laboratory, Upton, NY 11973

 My homepage: 
 EXAFS software:

----- End forwarded message -----


Michael G. Schwern   <>
Perl Quality Assurance	    <>	       Kwalitee Is Job One
humble abode cries
there is not enough paste here
restock erotica please
	-- imploded Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About