Subject: | Error running Makefile.PL with gmp included via $LD_LIBRARY_PATH environment variable |
OS: Redhat EL 5.x
Kernel: 2.6.18-194.3.1.el5xen
Perl version: v5.8.8
Math::GMP version: 2.06
gmp version: 5.0.1
Perl was configured with the following command to dynamically link
necessary external libraries:
Configure -Dprefix=$(INST_DIR)/perl -Dcc=gcc -des
-Dlocincpth="$(INST_DIR)/include" -Dloclibpth="$(INST_DIR)/lib"
-Dlibs='-lnsl -ldl -lm -lcrypt -lutil -lc -lgmp -lpari'
-Dotherlibdirs="$(INST_DIR)/perl/lib/perl5"
where $(INST_DIR) is a valid directory which has the given gmp version
already installed, as well as other modules mentioned. The environment
variable $LD_LIBRARY_PATH includes $(INST_DIR)/lib.
When I go to build Math::GMP (via CPAN or directly with the source tarball):
$(INST_DIR)/perl/bin/perl Makefile.PL
|Checking if your kit is complete...
|Looks good
|Writing Makefile for Math::GMP
|
|==========================================================
|
|WARNING! No GMP libraries were detected!
|
|Please see the INSTALL file.
|
|===========================================================
|
|
|Removing (Makefile)
This issue does not occur with Math::BigInt::GMP (which also depends on
the gmp libraries), which led me to believe that this is a bug with the
Math::GMP module packaging/build process.
The solution I devised for this issue is included in the attached patch
file. I noticed that in the generated Makefile (before being deleted),
-lgmp is included in LDLOADLIBS rather than EXTRALIBS as Makefile.PL
expects. If there is something I can change within my build environment
to correct this issue please let me know, however I believe the attached
patch resolves the issue in the most flexible manner. Thank you.
David
Subject: | Math-GMP-2.06-patch.p0 |
Message body not shown because it is not plain text.