[csw-maintainers] Building MySQL with Studio

Rafael Ostertag raos at opencsw.org
Tue Jun 19 14:13:06 CEST 2012


Hi Maciej

On Tue, Jun 19, 2012 at 10:12:51AM +0100, Maciej (Matchek) Blizi??ski wrote:
> I poked it a little. The missing prototype is missing. I think the
> reason why it's missing is because __EXTENSIONS__ is not set.
> 
> But it's set!
> 
> I've configured CMake to display the commands it's running, and yet,
> it doesn't display the failing command. It looks like there's a
> subinvocation of make which ignores CFLAGS.
> 
> The next step will be to identify, what exact invocation is run that
> produces this error:
> "/home/maciej/src/opencsw/pkg/mysql5/branches/mysql-5.5.x/work/solaris10-sparc/build-isa-sparcv8plus/mysql-5.5.25/libmysqld/../sql/mysqld.cc",
> line 3255: Error: The function "getpagesizes" must have a prototype.

The passage from /usr/include/sys/mman.h looks like:

#if (_POSIX_C_SOURCE > 2) || defined(_XPG4_2)
[...]
#else   /* (_POSIX_C_SOURCE > 2) || defined(_XPG4_2) */
[...]
#if !defined(_XOPEN_SOURCE) && !defined(_POSIX_C_SOURCE) || \
        defined(__EXTENSIONS__)
extern int getpagesizes(size_t *, int); /* <<== That, we want */
[...]
#endif /* !defined(_XOPEN_SOURCE) && !defined(_POSIX_C_SOURCE)... */
[...]


In the recipe, you specify

 EXTRA_CFLAGS = -mt -D_POSIX_C_SOURCE=199506L -D__EXTENSIONS__

Hence _POSIX_C_SOURCE > 2, and getpagesizes() will not be declared.

Is there any particular reason for defining _POSIX_C_SOURCE? I just built it
successfully without _POSIX_C_SOURCE for sparcv8plus on unstable9s.

cheers
rafi


More information about the maintainers mailing list