help with installing gcc in os x please.

Andrea 'Fyre Wyzard' Bocci fwyzard@inwind.it
Tue Dec 31 07:17:00 GMT 2002


At 22:58 30/12/2002 (GMT +0000), Ben Dougall wrote:
>fwyzard: i've done all that, successfully (apart from the search path), i 
>think!

Glad to hear it !

>about the make install/password issue - the solution is:
>sudo make install
>this makes it ask for a password first. and then goes ahead without the 
>permission denied error.

Good solution. I didn't know MacOS X had that :-)

>[...]
>
>back to my fixation. where/what is this?:
>./../lib/gcc-lib/powerpc-apple-darwin6.2/3.2.1/specs

It's in /usr/opt/gcc/libgcc-lib/powerpc-apple-darwin6.2/3.2.1/specs.
OK, I know this is not the answer you wanted :-)

BTW, this is getting off topic for the GCC (help) mailing list, so I'm not 
forwarding it there.

I must say I have exactly the opposite fixation : I don't trust "icons" and 
menus, if I can't find *where* on my disk they are. But I grew up with 
MS-DOS, that had actually no idea of icons. Under Unix, it's the same: 
icons and menus are more an afterouch - graphical file managers are seldom 
used, if at all.
With a Mac, I guess it's the opposite.

The only Macs I used were rather old - still in black and white ! - but I 
remember having on desktop the Hard Disk, and the Floppy when I inserted 
it. The finder was used to give a faster access to the most used things...
That approach (I think this was usued up to MacOS 9) is quite similar to 
what is now used win Windows (guess why...): each "physical" medium (HD, 
floppy, CD, etc...) is represented individually, with folders and files in 
it appearing as browsable icons. This is, in fact, quite "user friendly", 
and creates a strong association between the "virtual" file and its 
physical presence on the medium.

Under Unix, things are a bit different.
Every physical medium corresponds to a "device". These are special files, 
that usually only the administrator and the system have access to, which 
give access to the medium itself in a low level fashion. These files are 
usually "kept" in the /dev folder. I put kept among " because what is there 
is not (obviously) a regular file, but more a pointer, an interface to the 
object that it represents (eg., a hard drive).
For example, under Linux, the file /dev/hda is an interface to the content 
of the 1st EIDE Hard Drive, while /dev/hda1, /dev/hda2, etc. represent the 
partitions 1, 2, etc.. on that hard disk. If you read those files, you are 
actually reading the hard disk byte after byte, with no consideration of 
files, folders, permissions, etc...
At home, I have 2 HDs, so my Linux OS sees them as /dev/hda and /dev/hdb 
(1st and 2nd disk), while my DVD and CR-RW are /dev/hdc and /dev/hdd, and 
the floppy is (usually) accessed via /dev/floppy.

As it would be ather painfull to use these special files directly, they are 
then "mounted" under a directory tree. The File Sytem on the devices is 
read and connected to a "tree" of directories starting from the system 
root: the "/" folder.
The device that corresponds to this starting directory is mapped when first 
loading the OS, while all the other can be, and are, added after.
So, the directory tree starts at "/", and has all the files and folders 
that the system can access mounted under it. For axample, a Linux machine 
here at my University has this structure:
/               is /dev/hda7
/boot           is /dev/hda1
/home           is /dev/hda8
/var            is /dev/hda5

All the other folders are "normal" folders:
/bin, /mnt, /usr, /usr/local, ... are in the "/" partition and thus in the 
/dev/hda7 partition.
/home/fwyzard, /home/ciccio, ... are in the "/home" folder, and thus in the 
/dev/hda8 partition.

When I insert a floppy, it gets (manually or automatically) mounted under 
/mnt/floppy.
/mnt/floppy     is then /dev/floppy
/mnt/cdrom      is then /dev/hdc
and so on...

So, coming back to your "where is /usr/opt/gcc/... ?" question, and why you 
can't find it.
I don't knwow how the disks are usually managed under MacOS, but you can 
give a try at this. From the terminal, run

mount

You should get a list like this:

/dev/hda7 on / type ext2 (rw)
/dev/hda1 on /boot type ext2 (rw)
/dev/hda8 on /home type ext3 (rw)
/dev/hda5 on /var type ext3 (rw)

which tells you the same that I said above:
/dev/hda7 is mounted as "/" (the system root), and all the other folder are 
mounted under it.
ext2 and ext3 are the types or fylsystems used, while (rw) means that the 
partition is readable and writeble.

If you have a kind of graphical file manager, try to point to /usr/opt/gcc, 
there you should *see* all the installed files.
Concerning why you saw no new files in the system library folders, this has 
to do (at least) with the way I made you configure GCC:
if you had used --prefix=/usr, GCC would have been installed under 
/usr/bin, /usr/lib, etc., putting then some of it librais (maybe) in a 
place where you could have *seen* them.
This would have made it more difficult to uninstall or redistribute GCC, 
however, and could have caused some conflicts with the installed GCC.

At this point, I think I've told you all I can think of that could be 
helpfull. The best advices I can give you are:
1.) Try to explore all the depht or your MacOS. Have a look at the Darwin 
web site <http://developer.apple.com/darwin/>, maybe that can help you.
2.) Find someone who unlike myself has used a MacOS X machine for some 
time, and get him/her to teach you :-)
3.) Google around !

Good luck Ben, and Happy New Year !
fwyzard





More information about the Gcc-help mailing list