[csw-maintainers] zlibCompileFlags symbol missing on sparcv9

Dagobert Michelsen dam at opencsw.org
Tue Nov 3 17:39:18 CET 2009


Hi Maciej,

Am 03.11.2009 um 17:11 schrieb Dagobert Michelsen:
> Am 03.11.2009 um 17:02 schrieb Maciej (Matchek) Blizinski:
>
>> Before I invest larger chunks of time in debugging this issue, I'm
>> going to ask here. I'm trying to compile MySQL 5 on build8s, and I'm
>> getting an error during the configure phase.  It only happens with  
>> the
>> sparcv9 modulation.
>>
>> configure:21806: checking for zlib compression library
>> configure:21974: /opt/studio/SOS11/SUNWspro/bin/cc -o conftest -xO3
>> -xarch=v9 -mt -D_POSIX_C_SOURCE=199506L -D__EXTENSIONS__
>> -I/opt/csw/include -I/opt/csw/mysql5/include   -D_FILE_OFFSET_BITS=64
>> -I/opt/csw/include -I/opt/csw/include -I/opt/csw/mysql5/include
>> -xarch=v9 -L/opt/csw/mysql5/lib/64 -L/opt/csw/mysql5/lib//mysql/64
>> conftest.c -lposix4 -lresolv -lgen -lsocket -lnsl -lm  -L/opt/csw/lib
>> -lz >&5
>> "conftest.c", line 147: warning: statement not reached
>> Undefined                       first referenced
>> symbol                             in file
>> zlibCompileFlags                    conftest.o
>> ld: fatal: Symbol referencing errors. No output written to conftest
>>
>> Has anyone run into this problem before? Any ideas why does it work
>> fine on sparcv8, but not on sparcv9?
>>
>> If anyone wants to reproduce it:
>> svn co https://gar.svn.sourceforge.net/svnroot/gar/csw/mgar/pkg/mysql5/branches/mysql-5.0.x/
>> cd mysql-5.0.x
>> gmake package
>
> You are using some pathes that are unsuitable for 64 bit  
> compilation. I'll commit
> the fix and repost the delta/revision.

The build still runs, but I have some early comments:

> Index: Makefile
> ===================================================================
> --- Makefile    (revision 7091)
> +++ Makefile    (working copy)
> @@ -51,8 +51,6 @@
>  SPKG_DESC_CSWmysql5rt     = MySQL 5 runtime files
>  SPKG_DESC_CSWmysql5test   = MySQL 5 testing files
>
> -support64 = (/(amd64|i386))?
> -

While you can insert this conditionally there is a special function  
which expands
to all buildable ISAs. You would use it as
   $(call baseisadirs,<base>,<suffix>)
It expands to <base>/<suffix> <base>/<isa1>/<suffix> <base>/<isa2>/ 
<suffix>
and it works on all platforms. This is more important if you add more  
modulations
for optimized libraries.

>  # Defining the client programs, which are going to pick up the 32-  
> and 64-bit
>  # binaries, symbolic links, isaexec stuff and man pages.
>  CSWmysql5client_programs  = myisamlog
> @@ -75,11 +73,11 @@
>
>  PKGFILES_CSWmysql5bench   = $(prefix)/sql-bench.*
>  PKGFILES_CSWmysql5client  = $(bindir)
> -PKGFILES_CSWmysql5client += $(foreach bin_name,$ 
> (CSWmysql5client_programs),$(bindir)$(support64)/$(bin_name))
> +PKGFILES_CSWmysql5client += $(foreach bin_name,$ 
> (CSWmysql5client_programs),$(call baseisadirs,$(bindir),$(bin_name)))
>  PKGFILES_CSWmysql5client += $(foreach bin_name,$ 
> (CSWmysql5client_programs),$(mandir)/man1/$(bin_name)\.1)
>  PKGFILES_CSWmysql5client += $(foreach bin_name,$ 
> (CSWmysql5client_programs),/opt/csw/bin/$(bin_name))
>  PKGFILES_CSWmysql5client += $(foreach bin_name,$ 
> (CSWmysql5client_programs),/opt/csw/sbin/$(bin_name))
> -PKGFILES_CSWmysql5devel  += $(bindir)$(support64)/mysql_config
> +PKGFILES_CSWmysql5devel  += $(call baseisadirs,$ 
> (bindir),mysql_config)
>  PKGFILES_CSWmysql5devel  += $(mandir)/man1/mysql_config\.1
>  PKGFILES_CSWmysql5devel   = $(prefix)/include.*
>  PKGFILES_CSWmysql5rt      = $(prefix)/lib/.*\.so.*
> @@ -105,8 +103,8 @@
>
>  # because we alter the prefix.  this gets us proper linking as well  
> as
>  # LD_OPTIONS (RPATH)
> -EXTRA_LIB = /opt/csw/lib
> -EXTRA_INC = /opt/csw/include
> +# EXTRA_LIB = /opt/csw/lib
> +# EXTRA_INC = /opt/csw/include

It should not be necessary to add these explicitly, even if you  
redefine "prefix".
The BUILD_PREFIX defaults to /opt/csw and it is the base where  
everything goes.
If you reset prefix to a subdir of BUILD_PREFIX the necessary library  
pathes
and include dirs are adjusted automatically. This is all done in  
gar.conf.mk.
If you must add additional library dirs always use something like
   $(abspath $(libdir)/$(MM_BINDIR)) for pathes to binaries
   $(abspath $(libdir)/$(MM_LIBDIR)) for libraries
to honour bitwidth-specific directories.

I'll verify that it really works with MySQL, please stand by.

> @@ -130,14 +128,16 @@
>  BUILD64 = 1
>
>  USERGROUP = /etc/opt/csw/pkg/CSWmysql5/cswusergroup
> -PROTOTYPE_FILTER = awk ' \
> -    $$$$3 ~ /\/var\/opt\/csw\/mysql5$$$$/ { $$$$2 = "ugfiles"; \
> -                                            $$$$4 = "0700"; \
> -                                            $$$$5 = "mysql"; \
> -                                            $$$$6 = "mysql" } \
> -    { print }'
> -SPKG_CLASSES = none cswusergroup ugfiles
>
> +PROTOTYPE_MODIFIERS = ownmysql
> +PROTOTYPE_FILES_ownmysql = /var/opt/csw/mysql5
> +PROTOTYPE_USER_ownmysql = mysql
> +PROTOTYPE_GROUP_ownmysql = mysql
> +PROTOTYPE_PERMS_ownmysql = 0700
> +PROTOTYPE_CLASS_ownmysql = ugfiles
> +
> +SPKG_CLASSES = none ugfiles
> +
>  include gar/category.mk
>
>  post-install-modulated:
>


Ok, as you suggested prototype tweaks yourself you probably know how  
they
work and why they are better than prototype filters ;-)
   http://sourceforge.net/apps/trac/gar/wiki/Prototypes


Best regards

   -- Dago



More information about the maintainers mailing list