Bugs item #1883505, was opened at 2008-01-31 15:14
Message generated for change (Comment added) made by mr-meltdown
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=482468&aid=1883505&group_id=56967

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Build
Group: MonetDB Common CVS Head
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Fabian (mr-meltdown)
Assigned to: Sjoerd Mullender (sjoerd)
Summary: MonetDB Compilation fails on sparcv9-sun-solaris2.10

Initial Comment:
 sparcv9-sun-solaris2.10-gcc -DHAVE_CONFIG_H -I. 
-I/scratch/tmp/monetdb-fabian/current/common/src/gdk -I../.. 
-I/scratch/tmp/monetdb-fabian/current/common/src/gdk -I../common 
-I/scratch/tmp/monetdb-fabian/current/common/src/gdk/../common -DLIBGDK 
-mcpu=v9 -mtune=v9 -pipe -g -O2 -W -Wall -D__EXTENSIONS__ -std=c99 
-fgnu89-inline -Werror -D_REENTRANT -c gdk_utils.c  -fPIC -DPIC -o 
.libs/libbat_la-gdk_utils.o
cc1: warnings being treated as errors
/scratch/tmp/monetdb-fabian/current/common/src/gdk/gdk_utils.mx: In function 
'GDKmem_heapcheck':
/scratch/tmp/monetdb-fabian/current/common/src/gdk/gdk_utils.mx:524: warning: 
comparison of unsigned expression < 0 is always false
/scratch/tmp/monetdb-fabian/current/common/src/gdk/gdk_utils.mx:524: warning: 
comparison of unsigned expression < 0 is always false
/scratch/tmp/monetdb-fabian/current/common/src/gdk/gdk_utils.mx:524: warning: 
comparison of unsigned expression < 0 is always false
make[5]: *** [libbat_la-gdk_utils.lo] Error 1
make[5]: *** Waiting for unfinished jobs....

(sparcv9 == 64-bits native target)

offending code block:
#if ((SIZEOF_VOID_P==8) && defined(HAVE_SIGNED_MALLINFO))
                if (m.usmblks < 0 || m.uordblks < 0 || m.hblkhd < 0)
                        mallinfo_ok = 0;        /* incredible POSIX 
incompetence!! non-64-bit safe mallinfo */
                else
#endif


----------------------------------------------------------------------

>Comment By: Fabian (mr-meltdown)
Date: 2008-01-31 15:52

Message:
Logged In: YES 
user_id=963970
Originator: YES

The configure check appears to be b0rkened, as HAVE_SIGNED_MALLINFO should
not be 1 as it is in my case.  It looks like configure never runs a check
for this, so there is possibly some branch that isn't too obvious to me at
the moment.

----------------------------------------------------------------------

Comment By: Fabian (mr-meltdown)
Date: 2008-01-31 15:33

Message:
Logged In: YES 
user_id=963970
Originator: YES

interestingly enough google seems to suggest with RedHat and IBM backing
up that mallinfo is not in ANSI or POSIX.

IBM claims that "most platforms have mallinfo available", and that "The
implementation of this function is specific to the implementation of
dynamic memory on the z/TPF system."

----------------------------------------------------------------------

Comment By: Fabian (mr-meltdown)
Date: 2008-01-31 15:27

Message:
Logged In: YES 
user_id=963970
Originator: YES

s/your machine/CWI's Sun T1 Niagara machine running an up-to-date patched
Solaris 10 installation/ :)

Yes, Sun seems to support 64-bits quite well.

(build-t1000-sol10:~) fabian% grep mallinfo /usr/include/*
/usr/include/malloc.h:struct mallinfo  {
/usr/include/malloc.h:struct mallinfo mallinfo(void);
/usr/include/malloc.h:struct mallinfo mallinfo();


from malloc.h:
struct mallinfo  {
        unsigned long arena;    /* total space in arena */
        unsigned long ordblks;  /* number of ordinary blocks */
        unsigned long smblks;   /* number of small blocks */
        unsigned long hblks;    /* number of holding blocks */
        unsigned long hblkhd;   /* space in holding block headers */
        unsigned long usmblks;  /* space in small blocks in use */
        unsigned long fsmblks;  /* space in free small blocks */
        unsigned long uordblks; /* space in ordinary blocks in use */
        unsigned long fordblks; /* space in free ordinary blocks */
        unsigned long keepcost; /* cost of enabling keep option */
};

So the compiler is fine, and it is also LP64-safe.

----------------------------------------------------------------------

Comment By: Stefan Manegold (stmane)
Date: 2008-01-31 15:22

Message:
Logged In: YES 
user_id=572415
Originator: NO

from MonetDB/src/gdk/gdk_posix.mx:
========
#ifndef HAVE_STRUCT_MALLINFO
struct mallinfo {
        int arena;              /* total space in arena */
        int ordblks;            /* number of ordinary blocks */
        int smblks;             /* number of small blocks */
        int hblks;              /* number of holding blocks */
        int hblkhd;             /* space in holding block headers */
        int usmblks;            /* space in small blocks in use */
        int fsmblks;            /* space in free small blocks */
        int uordblks;           /* space in ordinary blocks in use */
        int fordblks;           /* space in free ordinary blocks */
        int keepcost;           /* cost of enabling keep option */
};
#endif
========

so, apparently your system provides it's own mallinfo struct --- what does
it look like, in particular, of which type are members "usmblks",
"uordblks", and/or "hblkhd", and does it properly support 64-bit?



----------------------------------------------------------------------

Comment By: Fabian (mr-meltdown)
Date: 2008-01-31 15:16

Message:
Logged In: YES 
user_id=963970
Originator: YES

The build system info:

(build-t1000-sol10:/scratch/tmp/monetdb-fabian) fabian%
sparcv9-sun-solaris2.10-gcc --version
sparcv9-sun-solaris2.10-gcc (GCC) 4.2.2 (Gentoo 4.2.2 p1.0)
Copyright (C) 2007 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is
NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=482468&aid=1883505&group_id=56967

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Monetdb-bugs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-bugs

Reply via email to