gcc 4.4を入れてみたい。さてどうしようか。Xcode...だが断られる!!Leopard用だもん!
しょうがない。自前でやるか。
でも無理でした。
gcc-4.4.0をいれようとすると断られてしまった。がーん。
checking for correct version of gmp.h... no
configure: error: Building GCC requires GMP 4.1+ and MPFR 2.3.2+.
Try the --with-gmp and/or --with-mpfr options to specify their locations.
Copies of these libraries' source code can be found at their respective
hosting sites as well as at ftp://gcc.gnu.org/pub/gcc/infrastructure/.
See also http://gcc.gnu.org/install/prerequisites.html for additional info.
If you obtained GMP and/or MPFR from a vendor distribution package, make
sure that you have installed both the libraries and the header files.
They may be located in separate packages.
gmpとmpfrがいるらしい。
gmpは別に入れた
gmpはGMP.Frameworkとして/Library/Framework/GMP.framework/あたりに入っている。めんどいので、gmpは/usr/local/gmp/4.3.0にいれよう。
Macではstaticではなくshared libraryだから変更。あと、cxx=c++を対応可能にしてみた。まあ、clamav関連ですね。
curl ftp://ftp.gnu.org/gnu/gmp/gmp-4.3.0.tar.bz2 | bzip2 -dc | tar xf - cd gmp-4.3.0 ./configure --prefix=/usr/local/gmp/4.3.0 --enable-cxx \ --disable-static --enable-shared make make check sudo make install
普通じゃないからこんなこと言われた。
Libraries have been installed in:
/usr/local/gmp/4.3.0/libIf you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the `-LLIBDIR'
flag during linking and do at least one of the following:
- add LIBDIR to the `DYLD_LIBRARY_PATH' environment variable
during executionSee any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
CAUTION:
If you have not already run "make check", then we strongly
recommend you do so.
GMP has been carefully tested by its authors, but compilers
are all too often released with serious bugs. GMP tends to
explore interesting corners in compilers and has hit bugs
on quite a few occasions.
mpfr
mpfrは同じように/usr/local/mpfr/2.4.1に入れてみよう。
curl http://www.mpfr.org/mpfr-current/mpfr-2.4.1.tar.bz2 | bzip2 -dc | tar xf - curl http://www.mpfr.org/mpfr-2.4.1/patches | patch -N -Z -p1 ./configure --prefix=/usr/local/mpfr/2.4.1 --disable-static \ --enable-shared --with-gmp=/usr/local/gmp/4.3.0 make make check make pdf make ps make info sudo make install
またでた
Libraries have been installed in:
/usr/local/mpfr/2.4.1/libIf you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the `-LLIBDIR'
flag during linking and do at least one of the following:
- add LIBDIR to the `DYLD_LIBRARY_PATH' environment variable
during executionSee any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.