The macosxhints Forums

The macosxhints Forums (http://hintsforums.macworld.com/index.php)
-   UNIX - Newcomers (http://hintsforums.macworld.com/forumdisplay.php?f=15)
-   -   Perl and Make Problems (http://hintsforums.macworld.com/showthread.php?t=530)

saltydog4791 01-30-2002 06:54 PM

Perl and Make Problems
 
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

Developer Tools contents
 
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

(Throws hands in air!)
 
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

Make problem...
 
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

MacOSX::File Installation
 
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...

Code:

% 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

MacOSX::File
 
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


All times are GMT -5. The time now is 10:12 PM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.
Site design © IDG Consumer & SMB; individuals retain copyright of their postings
but consent to the possible use of their material in other areas of IDG Consumer & SMB.