PDA

View Full Version : Perl and Make Problems


saltydog4791
01-30-2002, 06:54 PM
Hello all,

I am relatively new to both OS X and UNIX. Anyways I was trying to install a perl script and was having lots of problems. I think I completely thrashed perl but I am not sure. I did install Dev Tools but can't do a make or a make install because apparently there is some stuff missing in certain paths. Anyways, I guess my question is how can I start from scratch with both perl and Dev Tools without having to completely nuke my setup? I was trying to install a perl module for backing up so it would be kind of ironic if I had to blow away my volume just to get it working. Thanks to all who can help.

Salty

pmccann
01-30-2002, 08:39 PM
Hi SaltyDog,

could you post the message about what's missing? It's really difficult to tell whether it's just a dependency on another third party module or something intrinsic to your installation without seeing the output. [[Obviously if it goes on for screen after screen edited highlights would be appreciated!]]

Could be something really straightforward, so don't do anything drastic until you've given us a chance to see the output. Just for the sake of completeness: it is the *10.1* developer tools that you have installed?

Cheers,
Paul

mervTormel
01-30-2002, 08:56 PM
does installing the developer's tools touch anything outside of /Developer ?

it was my understanding that it is self-contained, but it might have some links to external tools.

obviously, i needed to look thru the files on install, but i dint.

is there a .bom browser? something to browse the package.bom (bill of materials) file in the /library/receipts/package... dir ?

TIA

pmccann
01-30-2002, 09:18 PM
Hi again,

Developer tools installs a whole slew of stuff in your main system, together with the obvious bits and pieces in /Developer. Notably, in this context, gnumake (to which "/usr/bin/make" is a symlink), but also other bits and pieces in

/usr/bin
/usr/include
/usr/lib
/usr/libexec
/usr/sbin
/usr/share

Some stuff in /System/Library

One file in /etc (gdb.conf)

and some documentation in /Library

How do I know this? Courtesy of the wonderful "Pacifist", which I'd not yet broken out of its invisible wrapper until you asked the above. I just chucked the 10.1 dev tools CD in the drive, opened Pacifist, went to "File/Open", navigated to the DevTools.pkg on the CD and shazam, contents visible for pleasure and profit.

Very nice indeed if you want to see what's going on behind the scenes with these "brown box" installers.

Cheers,
Paul

mervTormel
01-30-2002, 09:40 PM
beauty, paul. thanks, i o u a coke-beer.

hmmm, could fink installs of somesuch get us out of whack with the intended results of /Developer efforts? or vicy-vercy?

i'm not clear on how the two co-exist peacefully.

pmccann
01-30-2002, 10:02 PM
Hi,

Fink seems to be created so that any fink packages get what they need above and beyond the standard system from the /sw directories. That is, fink packages are compiled to look for extra stuff in /sw/lib /sw/include etc etc. If you compile stuff by hand, or use --say-- gnu-darwin bits and pieces you've potentially got two different sources for materials, and might (for example) have to instruct the configure script that your ncurses library is in /sw/lib. That example came up when I was compiling mutt a while ago, and only had ncurses 5.2 in the fink tree. Nothing too bad about that.

I suppose you could keep things strictly separated (ie anything not *part of* fink should not dip into those directories for resources), but I don't really see the point unless you're planning on not keeping fink stuff long term. Just means that you might have to double up on some libraries, which is more work than I can be bothered with.

Anyway, the only potential trouble I can see with mixing and matching this way is that gnu-darwin (or *you* by hand for that matter) might install a new version of some libraries on top of the existing system versions, and fink might expect to see the originals sitting in that position, possibly kicking up a conflict. I haven't run into this, but then again I've barely used fink. I'm not sure "how much" of your standard system is ever overwritten in this way, but suspect that it's a tiny amount.

For what it's worth I've never had a problem; more noxious is something like solaris, which comes with certain binaries compiled using Sun's compiler, but a compiler that (a) doesn't come with the OS, but requires $$'s, and (b) doesn't work for compiling some packages. This would be OK, but the killer is that if you use gcc to compile stuff that needs to have intimate relations with the out-of-the-box stuff you are often out of luck. Perl xs modules being prime examples: it pretty much means you have to have "system perl" and "your perl" as separate entities.

If my breath is stinking a little here (from talking out of my lower orifice about fink or gnu-darwin, with which my familiarity is fleeting) please let me know!

Cheers,
Paul

saltydog4791
01-31-2002, 02:29 PM
make: *** No rule to make target '/System/Library/Perl/darwin/CORE/config.h' , needed by 'Makefile'. Stop.

This is the message I get after creating the makefile. Any thoughts, suggestions, ideas, cures....

Thanks a lot,

Salty

pmccann
02-01-2002, 07:00 AM
But not with glee unfortunately. More from mystification. I haven't run into this one before, and while I'm happy to pretend to know about some things, there are other times I'd prefer to just shut the hell up (makefile errors being one of them)!

Just so that we can be clear what's going on here: you get a perl module, un-tar/gzip it, go into that directory, enter "perl Makefile.PL", which goes without a hitch, and then you try entering "make", which dies with the above error. And *only* the above error, no other warning signs during either phase? If there's any other info it would help a lot.

In any case, a few questions so we can try and tell if you really do have a "unique" system.

(0) Does this happen for any module, or just one in particular

(1) You wouldn't have modified/copied-from-elsewhere/kept the makefile in question by any chance? ie, it *was* generated by "perl Makefile.PL"?

(2) What is the module that you're trying to install, so that someone (OK, me) can verify that it "makes" fine on a working installation.

Cheers,
Paul

saltydog4791
02-01-2002, 12:38 PM
The name of the module is MacOSX-File which is used for backups. The link is http://search.cpan.org/search?dist=MacOSX-File. The perl makefile.pl seems to generate the makefile without a problem as far as I can tell, although I still don't know if I have a valid perl install. There is perl and perl5.6.0. I don't know if I am supposed to have both. All I know is I am completely confused about this whole thing. I have worked on some redhat and mandrake distros before and all this stuff was working right off the bat. I just want to be able to start from scratch with both perl and gcc, or whatever the compiler is, from scratch. Is that possible. Uninstalling perl/dev tools? Thanks to all who have helped so far. I am at work right now on a windoze box but hopefully if someone has an answer during the day, I can ssh to my box at home.

Peace, Love, & Understanding,

Salty

pmccann
02-02-2002, 03:11 AM
Hi SaltyDog,

I half suspected it was MacOSXFile that you were trying to install, and yes, it works without a problem on my machine (and several others have reported similar results). So you've definitely got something funky goin' on.

Much as I hate to simply bounce back questions at you, the only other obvious thing I can think to suggest here (and if you feel like shouting after reading it I can understand) is to check the dev tools version: **are you SURE that the Developer Tools you have installed are the December 2001 version?**. The earliest developer tools were for MacOSX 10.0.x only, and won't work with the 10.1.x at all.

This could explain the behaviour that you're seeing, but it's a bit of a long shot. Getting the latest developer tools (if you can find a fastish net connection) and splatting them on top would definitely be worth a shot.

Best of luck,
Paul

sao
02-02-2002, 03:29 AM
Please SaltyDog,

Check this, maybe it helps:

-------------------------
<<1) Make sure you don't have fink's make installed - run "fink remove
make" if you are not sure. There is a reason why our version of make
is only in unstable.

2) Run "which make". It should say "/usr/bin/make". And "make
--version" should output something that starts with "GNU Make version
3.79"

If you instead get an error like "make: no target to make.", you have
a bad version of make (possibly left by GNU-Darwin).

In this case, remove /usr/local/bin/make. >>
--------------------------

Though, I agree with pmccam, I think you don't have installed the December Developer Tools, which are needed to install MacOSXFile.

Cheers...

saltydog4791
02-02-2002, 06:28 PM
I reinstalled the dec. dev tools and now it works, although I still think there is something funny with my perl install. I just did my first backup using psync and it seems to work quite well. Hopefully there will continue to be further development on this handy little command. Thanks to everyone for their help. It is nice to be a part of a community, and not a herd, if you know what I mean.

Peace,

Salty

saltydog4791
02-02-2002, 06:35 PM
I reinstalled the dec. dev tools and now it works, although I still think there is something funny with my perl install. I just did my first backup using psync and it seems to work quite well. Hopefully there will continue to be further development on this handy little command. Thanks to everyone for their help. It is nice to be a part of a community, and not a herd, if you know what I mean.

Peace,

Salty

thatch
02-10-2002, 03:56 PM
I had the same problems noted here by saltydog4791 where after attempting to install MacOSX::File, I would get this at the bottom of terminal:

Checking if your kit is complete...
Looks good

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/darwin/CORE/perl.h")
Running make test
Make had some problems, maybe interrupted? Won't test
Running make install
Make had some problems, maybe interrupted? Won't install
....

But as salty had found, reinstalling the December dev tools did the trick and the install went without a hitch. I have no idea what had happened to the dev tools to make them unusable at least for this case. I don't have any fink install either.

Also, with regard to sao's post above...

Before I had done the reinstall of the dev tools, I had used sao's recommendation to run "make" which turned up the usual /usr/bin/make. And "make--version" did put out the described error: "make: no target to make.", you have a bad version of make (possibly left by GNU-Darwin).

But strangely, after the reinstall of the dev tools and completed compile of MacOSX::File, the command "make--version" would not return the output expected, but rather this: "make--version: Command not found." So, I can't seem to find my make version for /usr/bin/make.

And also, even if I had wanted to use sao's instruction to delete /usr/local/bin/make, I had no bin in /usr/local anyway. But since the reinstall, I now do have bin but no make there:

[localhost:/usr/local/bin] thatch% ll
total 72
drwxr-xr-x 7 root wheel 194 Feb 10 12:11 .
drwxr-xr-x 4 root wheel 264 Feb 10 12:11 ..
-r-xr-xr-x 1 root wheel 5709 Feb 10 12:11 pcpmac
-r-xr-xr-x 1 root wheel 3002 Feb 10 12:11 pgetfinfo
-r-xr-xr-x 1 root wheel 3398 Feb 10 12:11 pmvmac
-r-xr-xr-x 1 root wheel 3806 Feb 10 12:11 psetfinfo
-r-xr-xr-x 1 root wheel 12818 Feb 10 12:11 psync
....

Just thought it worth noting. Please excuse my lengthiness.

mervTormel
02-10-2002, 04:02 PM
thatch, i think you need to fix your space-bar...


% make--version
make--version: Command not found.

% make --version
GNU Make version 3.79, by Richard Stallman and Roland McGrath.
Built for powerpc-apple-darwin1.4
Copyright (C) 1988, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99
Free Software Foundation, Inc.
...

thatch
02-10-2002, 04:15 PM
Thanks Merv. I hadn't tried that. I think where the line wrapped on sao's post was is how I got that wrong. Works like a charm now. :)

sao
02-10-2002, 11:58 PM
Hi thatch,

Sorry about that.

Cheers...

thatch
02-11-2002, 02:37 AM
Hi Sao,

There's really nothing to be sorry about. Your post(s) are always informative and very helpful. Thank you for them.

thatch
02-11-2002, 02:54 AM
I forgot to mention that when I had reinstalled the Developer Tools, I did so right over the top of my initial Dev install, both were from the December release.

Then, once I got the MacOSX::File compiled and installed, I looked at my partition when I went to optimize it and it had gained a whopping 800 MB, from 1.8 GB to now 2.6 GB used and was severely fragmented according to Norton Speed Disk.

So, I'm wondering if that is all from the MacOSX::File since I already had the complete Dev package on the partition. I'm guessing it must be.

Anybody else experience that kind of gain with this install? saltydog4791?

Never the less, or more, it is way worth it for the great tools and documentation (man pages) that come with MacOSX::File.

pmccann
02-11-2002, 08:06 AM
Err, no way!

MacOSX::File might increase your disk usage by a handful of megabytes, but most of those are in the "blib" directory where you build the module. And all that *could* be deleted, but of course it's a drop in an 800MB ocean!

the /Developer directory is something like 700MB, but it would have been comparably sized beforehand, so that also appears unlikely. Hmm. Swap files? Log files? I've really got no idea!

Cheers,
Paul

thatch
02-11-2002, 03:16 PM
Thanks for the reply, Paul. I guess I have some investigating to do on what has suddenly taken up all that space. I have 896 MB of ram so I doubt swap files would be a problem. Log files... since they are mostly text, I can't imagine they would grow that much over one install on one day.

When I first attempted installation, I used the CPAN method described on Dan's web site, "/backup-volume.html". It asks a lot of questions about network stuff, so he says, but many of them are unknown to me and it will tell you to just hit enter on most of those. And that's what I did except for the ones about proxies because I don't have a proxy set up. Could that whole procedure have downloaded other stuff I wasn't aware of? Hmmm. Is there anyway I can use terminal to check what was most recently installed? TIA.

Tom

mervTormel
02-11-2002, 03:48 PM
to get a quick peek at the largest consumers on your disk, i suggest omnidisksweeper at this juncture...

http://www.omnigroup.com/applications/omnidisksweeper/

by no means does the report indicate that you should start excising large portions of /System, /Developer, /usr or /sw off of your disk, just because they show up as the owners of the most aluminum substrate, right?

but this might give you an idea of what could have ballooned beyond your expectations, depending on what your expectations are...

pmccann
02-11-2002, 04:53 PM
No, the CPAN install won't have done this. (You must have a faster connection than me Gunga Din; getting, say, 200MB would take me more than 12 hours! I'd certainly notice as it was happening...)

Just a thought (which will probably make you roll your eyes): you wouldn't by any chance have backed up your /Users/thatch directory as a test of the new software? Similarly truly silly suggestion: there's not a whole heap of old stuff sitting in your trash waiting for you to push the big button? Doesn't seem likely, but if you're talking about that sort of disk usage it's *way* out of CPAN's league. I've installed dozens upon dozens of modules, and the combined /System/Library/Perl and /Library/Perl directories weigh in at about 40MB.

If neither of these earth-shattering suggestions bear fruit you can get a listing of everything modified more recently than any given file on your system (say /Users/thatch/.cpan) by using something like:

% sudo -s
Password: ******
# find / -newer /Users/thatch/.cpan -ls > ~/todayonly

Oh yeah: this will take a minute or two to complete. Then sort the output on file size by using:

# sort -n -k 7 ~/todayonly
# exit

That *should* show you the biggest files at the tail of the output from the sort command. Not very neat, and a long, long way from lovely, but if there are any monsters hiding in your directories you stand a good chance of flushing them out.

Or (as mT just suggested), have a look at DiskSweeper from www.omnigroup.com

Best of luck,
Paul (ready for bed: again...)

thatch
02-11-2002, 05:10 PM
Thanks MT. Great recommendation.

I have found that installing the dev tools right over the top of itself has more than doubled its size although I don't see two of every file or directory in the finder. It's now 405.6 MB. Yikes! I thought it was supposed to be around 185 MB.

So, I don't know what to do about that other than to remove the whole thing and reinstall it from scratch. And that might mean that I would have to reinstall MacOSX::File again after that since it needs the dev tools to work. Uuuuf! I may have other things that require the dev tools installed too and thereby would be broken by an uninstall. My sendmail would have to be redone which isn't too bad. I don't know if the dev tools has an uninstaller on it.

My system directory is also questionable. It is 827.8 MB. That seems too much to me considering a default install of X in its entirety was around 1.1 GB. And I really have no idea how to alleviate that problem without a complete reformat and reinstall. Geez.

So those two added together would account for around 600 MB of my sudden 800 MB ballooning. So, I look further at what I've got and I come up with:

Applications -- 372.9
Library -- 310.2
Users -- 258.8
usr -- 165.3
private -- 107.6
TheFindByContentFolder -- 69.2
...

Everything after that seems tolerable by size, I think. But those all seem a bit heavy to me. When I last looked at the size of my Apps directory it was around 300 MB, my Library around 220 ... wow. :eek:

mervTormel
02-11-2002, 05:16 PM
thanks, paul. g'nite.

for this find to work, make sure your using the vanilla /usr/bin/find because fink's GNU /sw/bin/find -ls reports everything as zero bytes, not very informative in this case.

pmccann
02-11-2002, 05:25 PM
Rumors of my sleeping have been greatly exaggerated (mainly by me). thatch, I don't think your /Developer directory is oversized: nor your System.

For the record, my

/System size is ~ 900MB
/Developer size is ~ 700MB

I would guess that your 200ish MB guess was the *download* size. It'll puff up a bit upon installation, due to decompression. If you really have just lost 800MB I think the search is still on.

Cheers,
Paul (Drowning not Waving)

thatch
02-11-2002, 05:26 PM
Paul,

It does seem unlikely that CPAN would have caused this, I agree. When I downloaded the dev tools in December, it took about 35 minutes for 185 MB, I think.

No, I hadn't backed up using the new software yet. But I do have other backups from very recently. If I had one from the new ballooning, it wouldn't be right anyway. And I don't have anything in my trash in my $HOME. I doubt that I would have any significant trash elsewhere on my drive, like /.

Thanks for the command line ideas to find recent large file stuff. I already used OmniDiskSweeper but may run those commands to verify.

Re: ready for bed, again... I can relate.

mervTormel
02-11-2002, 05:35 PM
tom,

you are not nominal to profile, re: +100 MB in /system and +200 MB in
/library. the december dev tools ballooned to 403 MB.


my mostly vanilla OSX reports in, in MB:

/system - 737
/developer - 403
/usr - 396 - contains Xfree86
/private - 155
/application - a sveldt 120
/library - 92


if you were to wipe /developer and reinstall, i don't think it would affect your other 3party installs. but your /developer is spot on target in size.

your /library seems rotund; i wonder what's stuck in there? install receipts? a thousand printer definitions? the history of fonts thru the ages? 1600 dpi resolution images from the guggenheim collection in desktop pictures?

thatch
02-11-2002, 05:37 PM
Thanks Paul. Your figures are comforting. But I know I had the 800 MB gain immediately after yesterday's install of both:

1) the reinstall of Dec. dev tools

2) MacOSX::File

... because I went to optimize and noticed it went from 1.8 GB used on the partition to now 2.6 GB.

So, yup, the search may still be on.

thatch
02-11-2002, 05:53 PM
mT, you crack me up with your excellent terminology, like rotund... LOL. Haven't heard that one in a while.

I do have some pictures in my Library file. Leme see, about 131.5 MB worth. I used to get those from RandomBackGround on auto to MacDesktop. Then they weren't as good anymore so I stopped that a while ago but still keep them rotating for every logout/login and boot/reboot.

I don't have any extra fonts, just what comes in AppleWorks and the system. I don't have any printer stuff other than for my HP All-in-One, except system installed stuff. My receipt folder is only 13 MB.

I even had removed all foreign language stuff a while back with Bombich's 'Localize this'. I think it saved quite a bit of space. (180 MB)

On to the next message....

pmccann
02-11-2002, 06:03 PM
Hmm, and now the focus turns to the issue of *my* /Developer directory's obesity. But thankfully a quick

% cd /Developer
% du -k . | sort -n | tail -20

shows the likely culprits: and the winner seems to be JBuilder6 (which is present in that directory branch, in addition to the similarly rotund JBuilder5. Perhaps the latter comes with the D/T download?). She's a big'un, and contains enough to explain the discrepancy. Installed relatively recently in a fit of "one day I'll have a look at...". Ho ho. Hum hum. Ho hum. Pa Rumpa Pum Pum. (Obmusic: Low.)

Cheers,
Paul

thatch
02-11-2002, 06:18 PM
I ran that command line and came up with:

10744 ./Documentation/Carbon/text
11296 ./Documentation/Essentials/AquaHIGuidelines
11804 ./Documentation/Carbon/graphics
12704 ./Documentation/QuickTime/REF
12836 ./Documentation/QuickTime/INMAC
12984 ./Documentation/Carbon/HumanInterfaceToolbox
13256 ./Documentation/Darwin
13488 ./Documentation/CoreTechnologies
13940 ./Examples/Java
18452 ./Documentation/DeveloperTools
19784 ./Documentation/Essentials
19876 ./Applications
20648 ./Documentation/Cocoa
27860 ./Documentation/QuickTime/APIREF
30308 ./Examples
83032 ./Documentation/Carbon
91312 ./Documentation/QuickTime/PDF
163348 ./Documentation/QuickTime
358568 ./Documentation
415284 .
...

Looks normal to me but what do I know? I don't see any JBuilder though.

It's certainly not a problem that this has happened to me, I mean as far as disk space and all. Everything is working splendidly. It was just a very noticeable increase that I didn't expect. The partition is now about half full which is fine 'cause it's gonna grow over time. Anyway, thanks for the great command Paul, and supplied music too!

mervTormel
02-11-2002, 06:22 PM
paul, i wasn't going to say anything about that unsightly protruberence in mixed company.

no jbuilder in my d/t dl. i think you gotta pay for that. and i don't mean money.

(ObMusic: The Beasts of Bourbon: Good Times)

pmccann
02-11-2002, 06:33 PM
Oh my! Looks like I've had *two* bright ideas about learning Java then!

I've tried to like it, and I "get it", it's just that I really dislike it. So those expansive JBuilders were obviously downloaded in order to ease my descent into hell; maybe they will, given that my new place of occupation uses Java extensively. You *will* like Java. We *all* like Java.

Hmm, possibly; but as that world-renowned philosopher Rachel Hunter would put it: "it won't happen overnight, but it will happen". Or, more phonetically, since she's stuhl got a but of thuh New Zilland eksent.

"Uht won't heppen overnight, but ut wull heppen".

Cheers,
Paul

xchanyazy
02-12-2002, 06:10 PM
You say you noticed this huge drop-off in space after you reinstalled the developer tools/etc? If you did it through internet explorer, check your ~/Library/Preferences/Explorer/Download Cache. I posted a hint to macosxhints about this, apparently it caches the actual downloads as well as the links to them (sometimes). It might be worth it, I regained several hundred MB of space when I deleted it the first time, with no ill-effects.

thatch
02-12-2002, 08:16 PM
xchanyazy,

Thanks for the reply. When I got the December Dev Tools download, I put it on a CD to have it in case I would need it again. So, that is where I got the reinstall from. But just for yucks and since I hadn't checked my IE Download Cache file recently, I looked at it and found it is only 788 KB. I really wish that it was 800 MB so I could have rm'd it and got that amount back. Oh well. Thanks for the idea though.