Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
General
GeneralPortable MacsHardwareNetworking
Applications
Mac ApplicationsEudoraFirefox / MozillaInternet ExplorerOutlook ExpressMS OfficeEntourageExcelPowerPointWordVirtual PCMedia PlayerOther MS Products
Programming
Mac ProgrammingCodeWarriorPerl
Country Specific
Australian Mac GroupUK Mac Group

Mac Forum / Programming / Perl / October 2004



Tip: Looking for answers? Try searching our database.

CPAN problem: cant find header

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Michel JORDA - 08 Oct 2004 22:20 GMT
Hi all
Im a newbie in perl, so dont blame....
It seems I have a common problem. I just upgrade from jaguar to panther.
I would like to reinstall a perl proxy, and to use it, I need to install

LWP Net::Server Unicode::String IO::Select

with CPAN. The result is:

------
Error: Unable to locate installed Perl libraries or Perl source code.

It is recommended that you install perl in a standard location before
building extensions. Some precompiled versions of perl do not contain
these header files, so you cannot build extensions. In such a case,
please build and install your perl from a fresh perl distribution. It
usually solves this kind of problem.

(You get this message, because MakeMaker could not find
"/System/Library/Perl/5.8.1/darwin-thread-multi-2level/CORE/perl.h")
-----

Perl -V replies me:
-----
Summary of my perl5 (revision 5.0 version 8 subversion 1 RC3)
configuration:
 Platform:
   osname=darwin, osvers=7.0, archname=darwin-thread-multi-2level
   uname='darwin hampsten 7.0 darwin kernel version 6.0: fri jul 25
16:58:41 pdt 2003;
root:xnu-344.frankd.rootsxnu-344.frankd~objrelease_ppc power macintosh
powerpc '
   config_args='-ds -e -Dprefix=/usr -Dccflags=-g  -pipe
-Dldflags=-Dman3ext=3pm -Duseithreads -Duseshrplib'
   hint=recommended, useposix=true, d_sigaction=define
   usethreads=define use5005threads=undef useithreads=define
usemultiplicity=define
   useperlio=define d_sfio=undef uselargefiles=define usesocks=undef
   use64bitint=undef use64bitall=undef uselongdouble=undef
   usemymalloc=n, bincompat5005=undef
 Compiler:
   cc='cc', ccflags ='-g -pipe -pipe -fno-common -DPERL_DARWIN
-no-cpp-precomp -fno-strict-aliasing -I/usr/local/include',
   optimize='-Os',
   cppflags='-no-cpp-precomp -g -pipe -pipe -fno-common -DPERL_DARWIN
-no-cpp-precomp -fno-strict-aliasing -I/usr/local/include'
   ccversion='', gccversion='3.3 20030304 (Apple Computer, Inc. build
1495)', gccosandvers=''
   intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=4321
   d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=8
   ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t',
lseeksize=8
   alignbytes=8, prototype=define
 Linker and Libraries:
   ld='MACOSX_DEPLOYMENT_TARGET=10.3 cc', ldflags ='-L/usr/local/lib'
   libpth=/usr/local/lib /usr/lib
   libs=-ldbm -ldl -lm -lc
   perllibs=-ldl -lm -lc
   libc=/usr/lib/libc.dylib, so=dylib, useshrplib=true,
libperl=libperl.dylib
   gnulibc_version=''
 Dynamic Linking:
   dlsrc=dl_dyld.xs, dlext=bundle, d_dlsymun=undef, ccdlflags=' '
   cccdlflags=' ', lddlflags='-bundle -undefined dynamic_lookup
-L/usr/local/lib'

Characteristics of this binary (from libperl):
 Compile-time options: MULTIPLICITY USE_ITHREADS USE_LARGE_FILES
PERL_IMPLICIT_CONTEXT
 Locally applied patches:
       RC3
 Built under darwin
 Compiled at Sep 12 2003 19:50:49
 %ENV:
   PERL5LIB="/sw/lib/perl5"
 @INC:
   /sw/lib/perl5
   /System/Library/Perl/5.8.1/darwin-thread-multi-2level
   /System/Library/Perl/5.8.1
   /Library/Perl/5.8.1/darwin-thread-multi-2level
   /Library/Perl/5.8.1
   /Library/Perl
   /Network/Library/Perl/5.8.1/darwin-thread-multi-2level
   /Network/Library/Perl/5.8.1
   /Network/Library/Perl
   .
-----

I suspect i have to change the @INC, since the headers are located in
System/LibraryPerl/darwin/CORE
But I just dont know how to do that.....
Any idea ?
Thanks
Michel
John Delacour - 08 Oct 2004 23:01 GMT
>It seems I have a common problem. I just upgrade from jaguar to panther.
>I would like to reinstall a perl proxy, and to use it, I need to install
[quoted text clipped - 5 lines]
>     /sw/lib/perl5
>     /System/Library/Perl/5.8.1/darwin-thread-multi-2level...

If I had just "upgraded" and had such a configuration then I might
upgrade again in a different way, but if I were you I would download
Perl 5.8.5 and install it in the standard location.

At this page:

<http://developer.apple.com/internet/opensource/perl.html>

and in the Install file that comes with the Perl download you will
find out how to do this.  Eg.

# you want to install Perl the same way Apple did:
./Configure -de -Dprefix=/usr -Dperladmin=email@addr.com
-Dcf_email=email@addr.com

It's worth reading the file carefully to make sure.

Others may have better suggestions but that's what has always worked for me.

You @INC will then look like this (non-threaded):

  @INC:
    /System/Library/Perl/5.8.5/darwin-2level
    /System/Library/Perl/5.8.5
    /Library/Perl/5.8.5/darwin-2level
    /Library/Perl/5.8.5
    /Library/Perl
    /Network/Library/Perl/5.8.5/darwin-2level
    /Network/Library/Perl/5.8.5
    /Network/Library/Perl
    .

JD
Michel JORDA - 09 Oct 2004 00:10 GMT
Thanks for your help !
Did try that, John but the make stops saying :
-----
LD_RUN_PATH="" MACOSX_DEPLOYMENT_TARGET=10.3 cc  -bundle -undefined
dynamic_lookup -L/usr/local/lib C.o  -o ../../../lib/auto/B/C/C.bundle
ld: -undefined: unknown argument: dynamic_lookup
----

Caught again !
Michel

> >It seems I have a common problem. I just upgrade from jaguar to panther.
> >I would like to reinstall a perl proxy, and to use it, I need to install
[quoted text clipped - 39 lines]
>
> JD
Sherm Pendley - 09 Oct 2004 03:09 GMT
> If I had just "upgraded" and had such a configuration then I might
> upgrade again in a different way, but if I were you I would download
> Perl 5.8.5 and install it in the standard location.

Imagine if advice like that were given to a student driver...

Student Driver: I'm having trouble using a clutch, can someone help?

John: If I were you I'd install an automatic transmission.

Seriously - installing a new Perl is not a trivial task. Suggesting
that a self-described "newbie" should be required to attempt it is
ridiculous.

> At this page:
>
> <http://developer.apple.com/internet/opensource/perl.html>

At that page, you'll find some old out-of-date instructions that were
once relevant to updating Jaguar's Perl. They're of interest to
historians perhaps, but of no use now. Perl's default directory layout
is now the traditional layout under /usr/local, not the badly broken
layout under /Library/Perl that used to give people nightmares.

> # you want to install Perl the same way Apple did:
> ./Configure -de -Dprefix=/usr -Dperladmin=email@addr.com
> -Dcf_email=email@addr.com

Another way to describe that is "if you want to overwrite the Perl that
Apple supplied, and make it difficult to revert to the
factory-installed Perl, do this."

Don't do that. Install Perl the safe way, using a different -Dprefix
option to install it in a completely separate location, or omit that
option entirely to install in the default /usr/local. You can rename
/usr/bin/perl, and replace it with a symbolic link that points to your
new one. That way, if something goes badly wrong with the new Perl, you
can easily delete the entire directory you specified in -Dprefix,
delete the /usr/bin/perl symlink, and move the factory Perl back into
place with no lasting harm done.

> It's worth reading the file carefully to make sure.

You might do well to follow your own advice, and read the readme.macosx
carefully yourself. One of the pieces of advice you'll find there is to
think twice before overwriting Apple's Perl.

sherm--
Sherm Pendley - 09 Oct 2004 02:42 GMT
> It seems I have a common problem. I just upgrade from jaguar to
> panther.
[quoted text clipped - 7 lines]
> ------
> Error: Unable to locate installed Perl libraries or Perl source code.

A common problem indeed - with a common solution. Have you tried
searching the archives?

You need to upgrade your developer's tools as well. In other words,
install Xcode.

Also from the archives, be sure to also apply the simple patch
described here:

<http://www.mail-archive.com/macosx@perl.org/msg05736.html>

> I suspect i have to change the @INC, since the headers are located in
> System/LibraryPerl/darwin/CORE
> But I just dont know how to do that.....

Sorry to shout, but DON'T DO THAT. The Panther Perl is looking for its
components and modules in a different place for a VERY GOOD REASON -
Panther ships with a multi-threaded build of Perl 5.8.1, while Jaguar
ships with a single-threaded build of Perl 5.6.0. Neither the headers
nor any CPAN modules that have been installed for the older version are
compatible with the newer one.

sherm--
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.