View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0007898CMakeModulespublic2008-10-30 06:042010-09-01 00:12
ReporterAndreas Schneider. 
Assigned ToPhilip Lowman 
PrioritynormalSeveritytweakReproducibilityN/A
StatusclosedResolutionfixed 
PlatformOSOS Version
Product VersionCMake-2-6 
Target VersionFixed in Version 
Summary0007898: Improved FindPerl.cmake
DescriptionI've written a better FindPerlLibs.cmake module some time ago. I've polished it and here is the latest version. It uses the perl executable to determine each needed variable.
Additional InformationThis is the output of my CMakeLists.txt. Note: perl 5.10.0 has no libperl.so

-- >>> PERL_EXECUTABLE /usr/bin/perl
-- >>> PERL_VERSION 5.10.0
-- >>> PERL_ARCHNAME x86_64-linux-thread-multi
--
-- > Module directories:
-- >>> PERL_SITESEARCH UNKNOWN
-- >>> PERL_SITELIB /usr/lib/perl5/site_perl/5.10.0
-- >>> PERL_VENDORARCH /usr/lib/perl5/vendor_perl/5.10.0/x86_64-linux-thread-multi
-- >>> PERL_VENDORLIB /usr/lib/perl5/vendor_perl/5.10.0
-- >>> PERL_PRIVLIB /usr/lib/perl5/5.10.0
--
-- > Flags:
-- >>> PERL_EXTRA_C_FLAGS -D_REENTRANT -D_GNU_SOURCE -DPERL_USE_SAFE_PUTENV -DDEBUGGING -fno-strict-aliasing -pipe
-- >>> Include directory:
-- >>> PERL_POSSIBLE_INCLUDE_PATHS /usr/lib/perl5/5.10.0/x86_64-linux-thread-multi/CORE;/usr/lib/perl/5.10.0/x86_64-linux-thread-multi/CORE;/usr/lib/perl/5.8/CORE;/usr/lib/perl5/5.8/CORE
-- >>> PERL_INCLUDE_PATH /usr/lib/perl5/5.10.0/x86_64-linux-thread-multi/CORE
--
-- > Library:
-- >>> PERL_POSSIBLE_LIBRARY_NAME /usr/lib/libperl.so

-- >>> PERL_LIBRARY PERL_LIBRARY-NOTFOUND
TagsNo tags attached.
Attached Files? file icon FindPerlLibs.cmake [^] (5,975 bytes) 2008-10-30 06:04
? file icon FindPerlLibs.cmake.20081104 [^] (6,134 bytes) 2008-11-04 08:18

 Relationships

  Notes
(0014023)
Andreas Schneider. (developer)
2008-11-04 07:18

You're right. Updated file uploaded.
(0014022)
Robert Haines (reporter)
2008-11-04 07:31

Are you sure there's no libperl?

On Fedora Core 9 it's moved:
/usr/lib/perl5/5.10.0/i386-linux-thread-multi/CORE/libperl.so

Also on macports (5.8 I know, but there's a pattern showing):
/opt/local/lib/perl5/5.8.8/darwin-thread-multi-2level/CORE/libperl.dylib

I suggest adding $Config{installarchlib}/CORE to the library search path.

Cheers,
Rob
(0016872)
Andreas Schneider. (developer)
2009-07-15 04:13

Bill will this be included in the next CMake release.
(0016873)
Philip Lowman (developer)
2009-07-15 08:49

The dynamic search for this patch looked like a good thing to merge. I was put off by the discussion regarding whether perl 5.10 has libperl.so or not. Did this ever get resolved? It would be nice to merge something that works across all perl versions. Rhaines' suggestion looked promising.
(0016874)
Andreas Schneider. (developer)
2009-07-15 09:19

Yes, this was fixed. I've uploaded a new version of the file.

There was a time problem on the server an my reply got posted before the first comment.

FindPerlLibs.cmake.20081104 [^] (6,134 bytes) 2008-11-04 08:18

This is the fixed file.
(0016897)
Philip Lowman (developer)
2009-07-17 23:52

Thanks for the patch. I checked it in with some minor changes.

* added PERL_ARCHLIB/CORE to library & include search paths, so it would find the libraries on my system (also should help with macports and other systems where perl isn't in /usr/lib/perl5)
* merged some minor things from the existing FindPerlLibs.cmake into it (e.g. calling include(FindPerl) to find perl executable & FindPackageHandleStandardArgs)
* made search for include directory & library conditional on having PERL_EXECUTABLE
* mark_as_advanced() isn't needed for non-cache variables.

Committer: Philip Lowman <philip@yhbt.com>
/cvsroot/CMake/CMake/Modules/FindPerlLibs.cmake,v <-- FindPerlLibs.cmake
new revision: 1.10; previous revision: 1.9
Committer: Philip Lowman <philip@yhbt.com>
/cvsroot/CMake/CMake/Modules/FindPerlLibs.cmake,v <-- FindPerlLibs.cmake
new revision: 1.11; previous revision: 1.10

 Issue History
Date Modified Username Field Change
2008-10-30 06:04 Andreas Schneider. New Issue
2008-10-30 06:04 Andreas Schneider. File Added: FindPerlLibs.cmake
2008-11-04 07:18 Andreas Schneider. Note Added: 0014023
2008-11-04 07:31 Robert Haines Note Added: 0014022
2008-11-04 08:18 Andreas Schneider. File Added: FindPerlLibs.cmake.20081104
2009-01-15 13:01 Bill Hoffman Status new => assigned
2009-01-15 13:01 Bill Hoffman Assigned To => Philip Lowman
2009-07-15 04:13 Andreas Schneider. Note Added: 0016872
2009-07-15 08:49 Philip Lowman Note Added: 0016873
2009-07-15 09:19 Andreas Schneider. Note Added: 0016874
2009-07-17 23:52 Philip Lowman Note Added: 0016897
2009-07-17 23:52 Philip Lowman Status assigned => resolved
2009-07-17 23:52 Philip Lowman Resolution open => fixed
2010-09-01 00:12 Philip Lowman Status resolved => closed


Copyright © 2000 - 2018 MantisBT Team