[Coin-discuss] Build failure from current CVS source on SuSE 9.1 AMD64 platform with fix

Matthew Saltzman mjs at ces.clemson.edu
Thu May 12 23:41:22 EDT 2005


On Thu, 12 May 2005, Laszlo Ladanyi wrote:

> Yes, Matt is right, he fixed it, I have modified something else in
> Makefile.Linux. But it is still a problem that while g++ 3.x supports the
> x86_64 platform (definitely 3.2 and above), only 3.4 and above supports the
> -march=k8 specification. Before that the best one could ask for was
> -march=athlon or something like that. So, what's the right thing to do?

Do we ever determine the version in the process of invoking makefiles? I 
don't see a way around the problem of needing to determine the gcc version 
before constructing the option string.

The compiler choice is platform dependent, but any platform could use gcc. 
(All except AIX, CYGWIN do by default.)  We don't want to have to maintain 
the same version detection everywhere, so how about a Makefile.gcc that 
does the option string construction?  Call it only if CC is a gcc family 
member.  Construct the platform-independent part of the command line there 
and provide the version number back to Makefile.<platform> so it can 
construct the platform-dependent part.



>
> --Laci
>
> On Thu, 12 May 2005, Matthew Saltzman wrote:
>
>> On Thu, 12 May 2005, Laszlo Ladanyi wrote:
>>
>>> Hi Clint,
>>>
>>> I have modified the makefile and put k8 there (if the arch is x86_64), but
>>> that is still not perfect, since k8 is available only from g++-3.4 and up. I'm
>>> not sure what's the best solution since at that point the version of g++
>>> is not known. I suppose one could do a $(shell g++ -v) and parse the
>>> result... Any other suggestion?
>>
>> Do earlier versions of gcc support x86_64 with some other parameter?  If
>> not, then it's a pretty safe bet that if ARCH=x86_64 then -march=k8 is the
>> right thing to do for gcc.
>>
>> BTW, I thought I had patched this back in January (Makefile.Linux v1.11
>> and 1.12).
>>
>>  		Matt
>>>
>>> --Laci
>>>
>>>
>>> On Wed, 12 Jan 2005, Clint wrote:
>>>
>>>> The default CVS checkout of the Cbc (and dependent) modules fails to
>>>> compile on SuSE 9.1 AMD64 platform.  I checked out the source for the
>>>> Cbc module via cvs and make failed with the following errors:
>>>>
>>>> cc1plus: error: bad value (x86_64) for -march= switch
>>>>
>>>> I traced this down to COIN/Makefiles/Makefile.linux, where
>>>>
>>>> ARCH=$(shell arch)
>>>>
>>>> is passed on to
>>>>
>>>> CXXFLAGS += -march=$(ARCH)
>>>>
>>>> On the AMD64 platform, ARCH=x86_64, however this is not a correct
>>>> argument to -march in GCC.  I hardcoded
>>>>
>>>> ARCH=k8
>>>>
>>>> into Makefile.linux and make proceeded normally.  This is obviously
>>>> not a permanent fix, but I just wanted to report the bug.
>>>>
>>>> - clint
>>
>> --
>>  		Matthew Saltzman
>>
>> Clemson University Math Sciences
>> mjs AT clemson DOT edu
>> http://www.math.clemson.edu/~mjs
>> _______________________________________________
>> Coin-discuss mailing list
>> Coin-discuss at list.coin-or.org
>> http://list.coin-or.org/mailman/listinfo/coin-discuss
>>
>
> _______________________________________________
> Coin-discuss mailing list
> Coin-discuss at list.coin-or.org
> http://list.coin-or.org/mailman/listinfo/coin-discuss
>

-- 
 		Matthew Saltzman

Clemson University Math Sciences
mjs AT clemson DOT edu
http://www.math.clemson.edu/~mjs



More information about the Coin-discuss mailing list