* Re: problems compiling gcc under Max OS X
@ 2008-07-12 17:52 Dan Allen
2008-07-12 20:31 ` Nicholas Miller
0 siblings, 1 reply; 7+ messages in thread
From: Dan Allen @ 2008-07-12 17:52 UTC (permalink / raw)
To: gcc-help
I too am having problems building an Intel gcc 4.3.1 on Mac OS X
10.5.4 on a standard iMac. There are many issues.
I grab the gmp-4.2.2 distribution, ./configure, make, and make install
it to /usr/local. Everything is great.
ISSUE #1:
I then grab the mpfr-2.3.1 distribution, ./configure it, and the ./
configure fails. It says that the ABIs do not match. config.guess in
the gmp build gives returns 'core2-apple-darwin9.4.0', while
config.guess in the mpfr build returns 'i386-apple-darwin9.4.0'.
Hmm. Well, core2 is not the same as i386, but they are in some sense
compatible. How does one fix this?
ISSUE #2:
There are a lot of places in the configure scripts where you see
rm: conftest.dSYM: is a directory
Is there an autoconf that fixes this? rm needs to be rm -rf on Mac OS
X. (Is this because of a case-insensitive file system?)
ISSUE #3:
I really wish that these extra dependencies were not there. I can
build gcc 4.2.5 without any problems, but requiring gmp and mpfr in
4.3+ with these hassles is a real pain. Why can't these be integrated
into gcc and put into gcclib so builds go smoother?
Thanks for listening.
Dan Allen
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: problems compiling gcc under Max OS X
2008-07-12 17:52 problems compiling gcc under Max OS X Dan Allen
@ 2008-07-12 20:31 ` Nicholas Miller
2008-07-12 20:45 ` Chris Jefferson
0 siblings, 1 reply; 7+ messages in thread
From: Nicholas Miller @ 2008-07-12 20:31 UTC (permalink / raw)
To: Dan Allen; +Cc: gcc-help
Take a look at the Makefile for gmp. Look for the line CFLAGS= and
then when going to configure mpfr use:
configure <whatever options you normally use> CFLAGS="<whatevers
listed in the make">. This should allow you to build and install
mpfr. Apparently, theres issues with it's configuration scripts.
This should allow you to get mpfr installed. Let me know if this
completly solves your issues or if you are still having problems
getting gcc to compile.
As far as my issue:
I've made a seperate build directory and am still having the same
issues. Not specifying any parameters gives me an error that gmp/mpfr
are not found... but I've built and installed them in the default
location. If you guys have any other suggestions I'm all ears. I
would perfer not to have to jump to an earlier build...
~Nick
On Jul 12, 2008, at 10:10 AM, Dan Allen wrote:
> I too am having problems building an Intel gcc 4.3.1 on Mac OS X
> 10.5.4 on a standard iMac. There are many issues.
>
> I grab the gmp-4.2.2 distribution, ./configure, make, and make
> install it to /usr/local. Everything is great.
>
> ISSUE #1:
> I then grab the mpfr-2.3.1 distribution, ./configure it, and the ./
> configure fails. It says that the ABIs do not match. config.guess
> in the gmp build gives returns 'core2-apple-darwin9.4.0', while
> config.guess in the mpfr build returns 'i386-apple-darwin9.4.0'.
> Hmm. Well, core2 is not the same as i386, but they are in some
> sense compatible. How does one fix this?
>
> ISSUE #2:
> There are a lot of places in the configure scripts where you see
>
> rm: conftest.dSYM: is a directory
>
> Is there an autoconf that fixes this? rm needs to be rm -rf on Mac
> OS X. (Is this because of a case-insensitive file system?)
>
> ISSUE #3:
> I really wish that these extra dependencies were not there. I can
> build gcc 4.2.5 without any problems, but requiring gmp and mpfr in
> 4.3+ with these hassles is a real pain. Why can't these be
> integrated into gcc and put into gcclib so builds go smoother?
>
> Thanks for listening.
>
> Dan Allen
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: problems compiling gcc under Max OS X
2008-07-12 20:31 ` Nicholas Miller
@ 2008-07-12 20:45 ` Chris Jefferson
0 siblings, 0 replies; 7+ messages in thread
From: Chris Jefferson @ 2008-07-12 20:45 UTC (permalink / raw)
To: Nicholas Miller; +Cc: Dan Allen, gcc-help
Could I suggest you install gcc via macports?
While this does mean the resulting executable is in /sw/bin, I find it
works fine.
Chris
2008/7/12 Nicholas Miller <nicholas.d.miller@mac.com>:
> Take a look at the Makefile for gmp. Look for the line CFLAGS= and then when
> going to configure mpfr use:
> configure <whatever options you normally use> CFLAGS="<whatevers listed in
> the make">. This should allow you to build and install mpfr. Apparently,
> theres issues with it's configuration scripts.
>
> This should allow you to get mpfr installed. Let me know if this completly
> solves your issues or if you are still having problems getting gcc to
> compile.
>
> As far as my issue:
>
> I've made a seperate build directory and am still having the same issues.
> Not specifying any parameters gives me an error that gmp/mpfr are not
> found... but I've built and installed them in the default location. If you
> guys have any other suggestions I'm all ears. I would perfer not to have to
> jump to an earlier build...
>
> ~Nick
>
> On Jul 12, 2008, at 10:10 AM, Dan Allen wrote:
>
>> I too am having problems building an Intel gcc 4.3.1 on Mac OS X 10.5.4 on
>> a standard iMac. There are many issues.
>>
>> I grab the gmp-4.2.2 distribution, ./configure, make, and make install it
>> to /usr/local. Everything is great.
>>
>> ISSUE #1:
>> I then grab the mpfr-2.3.1 distribution, ./configure it, and the
>> ./configure fails. It says that the ABIs do not match. config.guess in the
>> gmp build gives returns 'core2-apple-darwin9.4.0', while config.guess in the
>> mpfr build returns 'i386-apple-darwin9.4.0'. Hmm. Well, core2 is not the
>> same as i386, but they are in some sense compatible. How does one fix this?
>>
>> ISSUE #2:
>> There are a lot of places in the configure scripts where you see
>>
>> rm: conftest.dSYM: is a directory
>>
>> Is there an autoconf that fixes this? rm needs to be rm -rf on Mac OS X.
>> (Is this because of a case-insensitive file system?)
>>
>> ISSUE #3:
>> I really wish that these extra dependencies were not there. I can build
>> gcc 4.2.5 without any problems, but requiring gmp and mpfr in 4.3+ with
>> these hassles is a real pain. Why can't these be integrated into gcc and
>> put into gcclib so builds go smoother?
>>
>> Thanks for listening.
>>
>> Dan Allen
>>
>
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: problems compiling gcc under Max OS X
2008-07-12 21:47 Dan Allen
@ 2008-07-13 0:15 ` Nicholas Miller
0 siblings, 0 replies; 7+ messages in thread
From: Nicholas Miller @ 2008-07-13 0:15 UTC (permalink / raw)
To: gcc-help
Glad to have helped. Answering your question drew me to the same
evaluation and results.
Now the real work begins. ;)
On Jul 12, 2008, at 2:16 PM, Dan Allen wrote:
> Thanks to Bill Broadley, Robert Fuller, Nicholas Miller, and Chris
> Jefferson for the help.
>
> It appears that my issue #1 is related to the default build of
> gmp-4.2.2. On my iMac with its Core2 Duo chip, gmp's ./configure
> script builds gmp with -m64 -mtune=k8. This appears to be the root
> of the problems. The build should be 32-bit, not 64-bit, and my
> machine does not have an AMD K8 in it!
>
> Starting with gmp-4.2.2, I found success by doing:
>
> ./configure ABI="32" CFLAGS="-O2"
> make -j4
> sudo make install
>
> Then with mpfr-2.3.1, I found success by doing exactly the same:
>
> ./configure ABI="32" CFLAGS="-O2"
> make -j4
> sudo make install
>
> Then with the folder gcc-4.3-20080710 (the latest GCC snapshot), I
> did:
>
> cd gcc-4.3-20080710
> mkdir build
> cd build
> ../configure
> make
>
> and voila: gcc-4.3.1 builds!
>
> Perhaps this info can be added to GCC release notes so that others
> which want to build GCC-4.3 can build these required libraries
> properly.
>
> <soapbox>
> It would be MUCH BETTER to make these libraries part of the GCC
> sources as part of gcclib perhaps, and have them subsumed into a
> coherent whole so that everyone does not have to deal with this.
> GCC has way too many external dependencies. These dependencies
> need to be removed!
> </soapbox>
>
> BTW, I discovered all of this because on FreeBSD-7.0 CURRENT I can
> build gcc-4.3.1 and these libraries just fine on a Core2 Duo
> Toshiba laptop of mine. I inspected their builds and found that
> they were not 64-bit builds. That is what gave me the clue.
>
> So the bug is that the ./configure of gmp works on FreeBSD but does
> not on Mac OS X.
>
> Dan
>
>
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: problems compiling gcc under Max OS X
@ 2008-07-12 21:47 Dan Allen
2008-07-13 0:15 ` Nicholas Miller
0 siblings, 1 reply; 7+ messages in thread
From: Dan Allen @ 2008-07-12 21:47 UTC (permalink / raw)
To: gcc-help
Thanks to Bill Broadley, Robert Fuller, Nicholas Miller, and Chris
Jefferson for the help.
It appears that my issue #1 is related to the default build of
gmp-4.2.2. On my iMac with its Core2 Duo chip, gmp's ./configure
script builds gmp with -m64 -mtune=k8. This appears to be the root of
the problems. The build should be 32-bit, not 64-bit, and my machine
does not have an AMD K8 in it!
Starting with gmp-4.2.2, I found success by doing:
./configure ABI="32" CFLAGS="-O2"
make -j4
sudo make install
Then with mpfr-2.3.1, I found success by doing exactly the same:
./configure ABI="32" CFLAGS="-O2"
make -j4
sudo make install
Then with the folder gcc-4.3-20080710 (the latest GCC snapshot), I did:
cd gcc-4.3-20080710
mkdir build
cd build
../configure
make
and voila: gcc-4.3.1 builds!
Perhaps this info can be added to GCC release notes so that others
which want to build GCC-4.3 can build these required libraries properly.
<soapbox>
It would be MUCH BETTER to make these libraries part of the GCC
sources as part of gcclib perhaps, and have them subsumed into a
coherent whole so that everyone does not have to deal with this. GCC
has way too many external dependencies. These dependencies need to be
removed!
</soapbox>
BTW, I discovered all of this because on FreeBSD-7.0 CURRENT I can
build gcc-4.3.1 and these libraries just fine on a Core2 Duo Toshiba
laptop of mine. I inspected their builds and found that they were not
64-bit builds. That is what gave me the clue.
So the bug is that the ./configure of gmp works on FreeBSD but does
not on Mac OS X.
Dan
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: problems compiling gcc under Max OS X
2008-07-12 11:48 Nicholas Miller
@ 2008-07-12 15:40 ` Chris Jefferson
0 siblings, 0 replies; 7+ messages in thread
From: Chris Jefferson @ 2008-07-12 15:40 UTC (permalink / raw)
To: Nicholas Miller; +Cc: gcc-help
You should not do an 'in-build' tree for gcc. Also, did you try
without those flags?
Try doing this:
make a directory "gccobj" in the same directory as you have the source
do:
cd gccobj
../gccsourcedirectory/configure
make
Where you obviously replace gccsourcedirectory with the directory you
put gcc in.
Does this work? (It does for me, on 10.5.3, latest iPhone SDK beta)
Chris
2008/7/12 Nicholas Miller <nicholas.d.miller@mac.com>:
> I'm attempting to compile gcc 4.3.1 under Mac OS X (i686 processor) using
> gcc 4.0.1 which apple provided as part of their XCode tools.
>
> ./configure CC=gcc CFLAGS="-02 -m64 -mtune=k8"
>
> and then of course a make all. I am getting the following:
>
> gcc -g -fkeep-inline-functions -DIN_GCC -W -Wall -Wwrite-strings
> -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition
> -Wmissing-format-attribute -fno-common -DHAVE_CONFIG_H -DGENERATOR_FILE
> -o build/genmodes \
> build/genmodes.o build/errors.o
> ../../build-i386-apple-darwin8.11.1/libiberty/libiberty.a
> /usr/libexec/gcc/i686-apple-darwin8/4.0.1/ld: truncated or malformed
> archive: ../../build-i386-apple-darwin8.11.1/libiberty/libiberty.a (ranlib
> structures in table of contents extends past the end of the table of
> contents, can't load from it)
> collect2: ld returned 1 exit status
> make[3]: *** [build/genmodes] Error 1
> make[2]: *** [all-stage1-gcc] Error 2
> make[1]: *** [stage1-bubble] Error 2
> make: *** [all] Error 2
>
> I'm unfamiliar with this error. Can anyone point me in the right direction?
>
> ~Nick
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* problems compiling gcc under Max OS X
@ 2008-07-12 11:48 Nicholas Miller
2008-07-12 15:40 ` Chris Jefferson
0 siblings, 1 reply; 7+ messages in thread
From: Nicholas Miller @ 2008-07-12 11:48 UTC (permalink / raw)
To: gcc-help
I'm attempting to compile gcc 4.3.1 under Mac OS X (i686 processor)
using gcc 4.0.1 which apple provided as part of their XCode tools.
./configure CC=gcc CFLAGS="-02 -m64 -mtune=k8"
and then of course a make all. I am getting the following:
gcc -g -fkeep-inline-functions -DIN_GCC -W -Wall -Wwrite-strings -
Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -
Wmissing-format-attribute -fno-common -DHAVE_CONFIG_H -
DGENERATOR_FILE -o build/genmodes \
build/genmodes.o build/errors.o ../../build-i386-apple-
darwin8.11.1/libiberty/libiberty.a
/usr/libexec/gcc/i686-apple-darwin8/4.0.1/ld: truncated or malformed
archive: ../../build-i386-apple-darwin8.11.1/libiberty/libiberty.a
(ranlib structures in table of contents extends past the end of the
table of contents, can't load from it)
collect2: ld returned 1 exit status
make[3]: *** [build/genmodes] Error 1
make[2]: *** [all-stage1-gcc] Error 2
make[1]: *** [stage1-bubble] Error 2
make: *** [all] Error 2
I'm unfamiliar with this error. Can anyone point me in the right
direction?
~Nick
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2008-07-12 23:13 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-07-12 17:52 problems compiling gcc under Max OS X Dan Allen
2008-07-12 20:31 ` Nicholas Miller
2008-07-12 20:45 ` Chris Jefferson
-- strict thread matches above, loose matches on Subject: below --
2008-07-12 21:47 Dan Allen
2008-07-13 0:15 ` Nicholas Miller
2008-07-12 11:48 Nicholas Miller
2008-07-12 15:40 ` Chris Jefferson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).