[Patch] Configure broken for Solaris 2.6 (PR#12014)
David Collier-Brown
davecb at Canada.Sun.COM
Fri Dec 18 15:04:24 GMT 1998
Jeremy Allison wrote:
> > can confdefs.h avoid #defining types? It sort of pollutes the
> > configuration tests, although it may be necessary...
>
> This line gets added to confdefs.h if the test for
> the definition of off_t fails, done by the :
>
> AC_TYPE_OFF_T
>
> line in configure.in. In other words it thinks
> this version of UNIX doesn't have a off_t definition.
>
> The real fix is to determine why the test for off_t
> is failing.
Righto, will look at that...
Found it, several layers deep: configure is
trying to find out the cpp to use, sees a non-
empty conftest.out file from cc -E, and concludes
that this is the wrong cpp. Alas, comptest.out
contains
--
/opcom/on998-tools/SUNWspro/SC4.2/bin/../SC4.2/bin/acomp -i conftest.c
-o - -H -
E -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -Qy -D__SunOS_5_6
-D__SUNPRO_C=0x42
0 -D__SVR4 -D__unix -D__sun -D__sparc -D__BUILTIN_VA_ARG_INCR -Xa -Dunix
-Dsun -
Dsparc -D__RESTRICT -I/opcom/on998-tools/SUNWspro/SC4.2/SC4.2/include/cc
./confdefs.h
/usr/include/assert.h
acomp real 0.0 user 0.0 sys 0.0
---
This is the normal dreck from sun cc, including
the command run, include files read and time taken.
This eventually makes configure set CPP=/lib/cpp
and all future cpp tests therefor fail!
The configure.c file contains the string "Syntax Error":
if configure is changed to grep for that, it won't
make the error.
A hacky change is to change line 1228:
--
if test -z "$ac_err"; then
:
else
--
to
---
if test -z "$ac_err"; then
:
elif [ "`$CPP conftest.$ac_ext | grep 'Syntax Error'`" = "" ]; then
---
A quick test shows it will then find statvfs64... and fail to find
any locking: this looks like a nasty problem in configure: we've
just exposed some untested code paths.
Jeremy: I've two recommendations:
1) figure out the proper Gnu way to test for cpp
and, having done that, consider
2) reordering the statvfs tests to look for statvfs,
then statvfs64, **IFF this will not break other
vendors' interim large-files logic**.
The latter is to find the canonical interface
before the extended one, like the current searches
for other interfaces:
checking for pread... yes
checking for _pread... yes
checking for __pread... no
checking for pread64... yes
checking for _pread64... yes
checking for __pread64... no
--
David Collier-Brown, | Always do right. This will gratify some people
185 Ellerslie Ave., | and astonish the rest. -- Mark Twain
Willowdale, Ontario | http://java.science.yorku.ca/~davecb
Work: (905) 477-0437 Home: (416) 223-8968 Email: davecb at canada.sun.com
More information about the samba-technical
mailing list