Problem with configure compiling 64-bit under Solaris 10

John Center john.center at villanova.edu
Mon Mar 16 12:43:35 GMT 2009


Hi Volker,

I'm not sure I know how to do that.  Are there instructions for Samba? 
I don't have a git repository set up for Samba, yet.

Thanks.

	-John


Volker Lendecke wrote:
> On Sun, Mar 15, 2009 at 01:37:32PM -0400, John Center wrote:
>> There is a problem with configure when trying to compile 64-bit binaries 
>> on Solaris 10 using Sun Studio 12.  When some of the tests are run, the 
>> CFLAGS variable is completely replaced with one that contains an option 
>> for testing.  For example, when testing for compiler warnings, CFLAGS is 
>> replaced with Werror_FLAGS, which can contain -Werror, -w2 or -errwarn. 
>>  This fails in 64-bit mode because the appropriate option, "-m64", is 
>> not included.  Without this flag, conftest fails with a "wrong ELF 
>> class" error, which configure does not catch.
>>
>> The offending lines in configure are often in the form:
>>
>> 	old_CFLAGS="$CFLAGS";
>> 	CFLAGS="$Werror_FLAGS";
>> 	export CFLAGS;
>>
>> where Werror_FLAGS is defined as:  Werror_FLAGS="<errflag>".
>>
>> I think Werror_FLAGS should be redefined instead as:
>>
>> 	Werror_FLAGS="$CFLAGS <errflag>"
>>
>> maintaining the builder's CFLAGS.  This would prevent problems like this 
>> from occurring in the future.
> 
> Do you want to provide a git-format-patch style patch?
> 
> Thanks,
> 
> Volker


More information about the samba-technical mailing list