pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

pkg/42805: [www/webalizer] compile error on Solaris.



>Number:         42805
>Category:       pkg
>Synopsis:       [www/webalizer] compile error on Solaris.
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Feb 13 01:05:00 +0000 2010
>Originator:     Youssef Ghorbal
>Release:        
>Organization:
Institut Pasteur
>Environment:
SunOS 5.10 Generic_142900-03 sun4v sparc
>Description:
Building www/webalize from pkgsrc on Solaris 10 (pkgsrc-2009Q4) generates this 
error :

In file included from webalizer.c:71:
/opt/pkg/tmp/www/webalizer/work/.buildlink/include/db4/db.h:72: error: 
duplicate 'unsigned'
/opt/pkg/tmp/www/webalizer/work/.buildlink/include/db4/db.h:72: error: 'long 
long long' is too long for GCC
/opt/pkg/tmp/www/webalizer/work/.buildlink/include/db4/db.h:72: error: 'long 
long long' is too long for GCC
/opt/pkg/tmp/www/webalizer/work/.buildlink/include/db4/db.h:72: warning: 
useless type name in empty declaration
*** Error code 1

The configure checks for the type definition u_int64_t which is not provided 
natively by Solaris 10. We end up with a -Du_int64_t=unsigned\ long\ long  
passed to gcc. The problem is that db.h (part of databases/db4) and #included 
by webalizer.c defines the u_int64_t type (db.h line 72) : typedef unsigned 
long long u_int64_t;
When substitutions is done, the line become :  typedef unsigned long long  
unsigned long long which causes gcc to fail.
>How-To-Repeat:
Try to build www/webalizer from pkgsrc on Solaris 10.
>Fix:
Add a substitution section in the Makefile, something like : 

.if ${OPSYS} == "SunOS"
SUBST_CLASSES+= uint64
SUBST_STAGE.uint64=    post-patch
SUBST_FILES.uint64=  *.c *.h configure.in configure
SUBST_SED.uint64= -e "s|u_int64_t|uint64_t|g"
.endif

Meanwhile, maybe the Webalizer team will (one day) get rid of the u_int64_t and 
use the standard uint64_t, or define it correctly (not with a dump 
substitution) if it's not natively provided by the OS.



Home | Main Index | Thread Index | Old Index