Thursday, January 25, 2007

Install software Fink on Mac OS X using Terminal/command; Install GCC4 with Fink

First mount the disk image, this command reports back it's path in the /Volumes directory:
$ hdiutil attach ./file.dmg

$ cd /Volumes/SomeVolume

install the software on the main (boot) partition
$ su
# installer -pkg ./XcodeTools.mpkg -target /

When you're done with it, either drag it to the trash as usual, or you can type:
$ hdiutil detach /Volumes/SomeVolume

I use the above commands to install Fink, then I use the following commands to install GCC4 through Fink:

apple:~ root# fink install gcc4
Information about 2131 packages read in 2 seconds.

WARNING: You are using a version of gcc which is known to produce incorrect output from C++ code
under certain circumstances.

For information about upgrading, see the Fink web site.

The following package will be installed or updated:
gcc4
The following 3 additional packages will be installed:
gcc4-shlibs gmp-shlibs odcctools
Do you want to continue? [Y/n] Y
/sw/bin/apt-get -q --ignore-breakage --download-only install gcc4=1:4.0.0-1
Reading Package Lists...
Building Dependency Tree...
The following NEW packages will be installed:
gcc4
0 packages upgraded, 1 newly installed, 0 to remove and 7 not upgraded.
Need to get 38.0MB of archives. After unpacking 136MB will be used.
Get:1 http://bindist.finkmirrors.net 10.3/release/main gcc4 1:4.0.0-1 [38.0MB]
Fetched 38.0MB in 10m29s (60.3kB/s)
Download complete and in download only mode
/sw/bin/apt-get -q --ignore-breakage --download-only install gcc4-shlibs=1:4.0.0-1
Reading Package Lists...
Building Dependency Tree...
The following NEW packages will be installed:
gcc4-shlibs
0 packages upgraded, 1 newly installed, 0 to remove and 7 not upgraded.
Need to get 1721kB of archives. After unpacking 8999kB will be used.
Get:1 http://bindist.finkmirrors.net 10.3/release/main gcc4-shlibs 1:4.0.0-1 [1721kB]
Fetched 1721kB in 45s (37.8kB/s)
Download complete and in download only mode
/sw/bin/apt-get -q --ignore-breakage --download-only install gmp-shlibs=4.1.3-11
Reading Package Lists...
Building Dependency Tree...
The following NEW packages will be installed:
gmp-shlibs
0 packages upgraded, 1 newly installed, 0 to remove and 7 not upgraded.
Need to get 764kB of archives. After unpacking 2912kB will be used.
Get:1 http://bindist.finkmirrors.net 10.3/release/main gmp-shlibs 4.1.3-11 [764kB]
Fetched 764kB in 14s (54.1kB/s)
Download complete and in download only mode
/sw/bin/apt-get -q --ignore-breakage --download-only install odcctools=528-20050308
Reading Package Lists...
Building Dependency Tree...
The following NEW packages will be installed:
odcctools
0 packages upgraded, 1 newly installed, 0 to remove and 7 not upgraded.
Need to get 2799kB of archives. After unpacking 8815kB will be used.
Get:1 http://bindist.finkmirrors.net 10.3/release/main odcctools 528-20050308 [2799kB]
Fetched 2799kB in 1m2s (44.9kB/s)
Download complete and in download only mode
dpkg -i /sw/var/cache/apt/archives/gmp-shlibs_4.1.3-11_darwin-powerpc.deb
Selecting previously deselected package gmp-shlibs.
(Reading database ... 4131 files and directories currently installed.)
Unpacking gmp-shlibs (from .../gmp-shlibs_4.1.3-11_darwin-powerpc.deb) ...
Setting up gmp-shlibs (4.1.3-11) ...
dpkg -i /sw/var/cache/apt/archives/odcctools_528-20050308_darwin-powerpc.deb
Selecting previously deselected package odcctools.
(Reading database ... 4147 files and directories currently installed.)
Unpacking odcctools (from .../odcctools_528-20050308_darwin-powerpc.deb) ...
Setting up odcctools (528-20050308) ...

dpkg -i /sw/var/cache/apt/archives/gcc4_1%3a4.0.0-1_darwin-powerpc.deb /sw/var/cache/apt/archives/gcc4-shlibs_1%3a4.0.0-1_darwin-powerpc.deb
Selecting previously deselected package gcc4.
(Reading database ... 4209 files and directories currently installed.)
Unpacking gcc4 (from .../gcc4_1%3a4.0.0-1_darwin-powerpc.deb) ...
Selecting previously deselected package gcc4-shlibs.
Unpacking gcc4-shlibs (from .../gcc4-shlibs_1%3a4.0.0-1_darwin-powerpc.deb) ...
Setting up gcc4-shlibs (4.0.0-1) ...

Setting up gcc4 (4.0.0-1) ...

apple:~ root#
apple:~ root# gcc-4 -v
Using built-in specs.
Target: powerpc-apple-darwin7
Configured with: ../configure --prefix=/sw --prefix=/sw/lib/gcc4 --enable-languages=c,c++,f95,objc --infodir=/share/info --with-gmp=/sw --with-included-gettext --host=powerpc-apple-darwin7 --with-as=/sw/lib/odcctools/bin/as --with-ld=/sw/lib/odcctools/bin/ld
Thread model: posix
gcc version 4.0.0
apple:~ root# g++
g++ g++-3.3 g++-4
apple:~ root# g++
g++ g++-3.3 g++-4
apple:~ root# g++-4
g++-4: no input files
apple:~ root# g++-4 -v
Using built-in specs.
Target: powerpc-apple-darwin7
Configured with: ../configure --prefix=/sw --prefix=/sw/lib/gcc4 --enable-languages=c,c++,f95,objc --infodir=/share/info --with-gmp=/sw --with-included-gettext --host=powerpc-apple-darwin7 --with-as=/sw/lib/odcctools/bin/as --with-ld=/sw/lib/odcctools/bin/ld
Thread model: posix
gcc version 4.0.0
apple:~ root#

Labels: , , , , , ,

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home