pseudo-random things compiling gtk+-2.2.1 under HP-UX 11.11



Hi -

I find myself wanting to use gtk+ for a project and so I've been working
through installing all the dependencies.

I've already run into and worked around (thanks to the archive) the
problems with atk/pango and docs not building (make failure on
all-local), and now I'm compiling gtk itself.

I'm using the HP ANSI C compiler:

$ what `which cc`
/usr/bin/cc:
        LINT B.11.11.06 CXREF B.11.11.06
        HP92453-01 B.11.11.06 HP C Compiler
         $   Sep  8 2000 23:13:51 $ 

The configure gets through OK (I had to manually move some .h files for
png/tiff into /usr/local/include) and the compile chugs along until:

cc -g -o .libs/gdk-pixbuf-csource gdk-pixbuf-csource.o  -L/usr/local/lib
-L/opt/
libpng/lib ./.libs/libgdk_pixbuf-2.0.sl /usr/local/lib/libintl.sl -lc
-Wl,+b -Wl
,/home/raj/gtk+-2.2.1/gdk-pixbuf/.libs:/usr/local/lib^M
/usr/ccs/bin/ld: (Warning) At least one PA 2.0 object file
(gdk-pixbuf-csource.o
) was detected. The linked output may not run on a PA 1.x system.^M
/usr/ccs/bin/ld: Unsatisfied symbols:^M
   g_log_set_always_fatal (code)^M
   g_fprintf (code)^M
   g_error_free (code)^M
   g_free (code)^M
   g_object_unref (code)^M
   g_type_init (code)^M
   g_strdup (code)^M
*** Error exit code 1^M

should I have seen a glib in that cc line there somewhere? I have glib
installed on the system (libs in /usr/local/lib) and it seems that those
missing symbols are from glib.  Did I fubar something in the configure
perhaps?

What follows are the nits I've found thusfar.  The seem pretty minor.

Before the link failure, there are some warnings that come-out of the
compiler...  one is a perennial "redeclaration of macro MAX" because the
HP-UX param.h has a MAX and MIN defined.  I generally don't worry about
that and press-on but thought I might mention it anyway.

cc -DHAVE_CONFIG_H -I. -I. -I../.. -I../.. -I../..
-DG_DISABLE_CAST_CHECKS -D_REENTRANT -I/usr/local/include/glib-2.0
-I/usr/local/lib/glib-2.0/include -DG_DISABLE_DEPRECATED
-DGDK_PIXBUF_DISABLE_DEPRECATED noinst_PROGRAMS = timescale
-I/usr/local/include -I/opt/libpng/include -g -c pixops.c  +Z -DPIC -o
pixops.lo^M
cpp: "/usr/include/sys/param.h", line 379: warning 2001: Redefinition of
macro MIN.^M
cpp: "/usr/include/sys/param.h", line 380: warning 2001: Redefinition of
macro MAX.^M

There is some stuff in timescale.c that the compiler warns about:

(cd .libs && rm -f libpixops.la && ln -s ../libpixops.la libpixops.la)^M
        cc -DHAVE_CONFIG_H -I. -I. -I../.. -I../.. -I../..      
-DG_DISABLE_CAS
T_CHECKS                         -D_REENTRANT
-I/usr/local/include/glib-2.0 -I/u
sr/local/lib/glib-2.0/include                           
-DG_DISABLE_DEPRECATED
                 -DGDK_PIXBUF_DISABLE_DEPRECATED                
noinst_PROGRAMS
 = timescale  -I/usr/local/include -I/opt/libpng/include  -g -c
timescale.c^M
cpp: "/usr/include/sys/param.h", line 379: warning 2001: Redefinition of
macro MIN.^M
cpp: "/usr/include/sys/param.h", line 380: warning 2001: Redefinition of
macro MAX.^M
cc: "timescale.c", line 184: warning 604: Pointers are not
assignment-compatible.^M
cc: "timescale.c", line 184: warning 563: Argument #1 is not the correct
type.^M
cc: "timescale.c", line 184: warning 604: Pointers are not
assignment-compatible.^M
cc: "timescale.c", line 184: warning 563: Argument #9 is not the correct
type.^M
cc: "timescale.c", line 196: warning 604: Pointers are not
assignment-compatible
.^M
cc: "timescale.c", line 196: warning 563: Argument #1 is not the correct
type.^M
cc: "timescale.c", line 196: warning 604: Pointers are not
assignment-compatible
.^M
cc: "timescale.c", line 196: warning 563: Argument #9 is not the correct
type.^M
cc: "timescale.c", line 207: warning 604: Pointers are not
assignment-compatible
.^M
cc: "timescale.c", line 207: warning 563: Argument #1 is not the correct
type.^M
cc: "timescale.c", line 207: warning 604: Pointers are not
assignment-compatible
.^M
cc: "timescale.c", line 207: warning 563: Argument #9 is not the correct
type.^M


It looks like timescale.c is passing char* when pixops_* wants guchar

testops.c

int main (int argc, char **argv)
{
  int src_width, src_height, dest_width, dest_height;
  char *src_buf, *dest_buf;

  ...to line 184...
                    pixops_scale (dest_buf, 0, 0, dest_width,
dest_height, dest_
rowstride, dest_channels, dest_has_alpha,
                                  src_buf, src_width, src_height,
src_rowstride,
 src_channels, src_has_alpha,
                                  (double)dest_width / src_width,
(double)dest_h
eight / src_height,
                                  filter_level);

and pixops_scale:

static void
pixops_scale_nearest (guchar        *dest_buf,
                      int            render_x0,
                      int            render_y0,
                      int            render_x1,
                      int            render_y1,
                      int            dest_rowstride,
                      int            dest_channels,
                      gboolean       dest_has_alpha,
                      const guchar  *src_buf,
                      int            src_width,
                      int            src_height,
                      int            src_rowstride,
                      int            src_channels,
                      gboolean       src_has_alpha,
                      double         scale_x,
                      double         scale_y)

there is a redeclaration warning about gdk_pixbuf_non_anim_get_type and
gdk_pixbuf_non_anim_iter_get_type in gdk-pixbuf-animation.c

cc -DHAVE_CONFIG_H -I. -I. -I.. -DG_LOG_DOMAIN=\"GdkPixbuf\" -I.. -I..
-I../gdk-pixbuf -I../gdk-pixbuf -DGTK_SYSCONFDIR=\"/usr/local/etc\"
-DGTK_VERSION=\"2.2.1\" -DGTK_BINARY_VERSION=\"2.2.0\"
-DG_DISABLE_DEPRECATED -DGDK_PIXBUF_DISABLE_DEPRECATED
-DPREFIX=\"/usr/local\" -DG_DISABLE_CAST_CHECKS -D_REENTRANT
-I/usr/local/include/glib-2.0 -I/usr/local/lib/glib-2.0/include
-DGDK_PIXBUF_ENABLE_BACKEND AM_CPPFLAGS =
-DPIXBUF_LIBDIR=\"/usr/local/lib/gtk-2.0/2.2.0/loaders\"
-DBUILT_MODULES_DIR=\"./.libs\" -I/usr/local/include
-I/opt/libpng/include -g -c gdk-pixbuf-animation.c  +Z -DPIC -o
gdk-pixbuf-animation.lo^M
cpp: "/usr/include/sys/param.h", line 379: warning 2001: Redefinition of
macro MIN.^M
cpp: "/usr/include/sys/param.h", line 380: warning 2001: Redefinition of
macro MAX.^M
cc: "gdk-pixbuf-animation.c", line 567: warning 562: Redeclaration of
"gdk_pixbuf_non_anim_get_type" with a different storage class specifier:
"gdk_pixbuf_non_anim_get_type" will have internal linkage.^M
cc: "gdk-pixbuf-animation.c", line 700: warning 562: Redeclaration of
"gdk_pixbuf_non_anim_iter_get_type" with a different storage class
specifier: "gdk_pixbuf_non_anim_iter_get_type" will have internal
linkage.^M
 
from line 567:

GType
gdk_pixbuf_non_anim_get_type (void)
{
        static GType object_type = 0;

but above it it is forward decl'd as:

static GType gdk_pixbuf_non_anim_get_type (void) G_GNUC_CONST;

and the other is the same:


static GType gdk_pixbuf_non_anim_iter_get_type (void) G_GNUC_CONST;
...

GType
gdk_pixbuf_non_anim_iter_get_type (void)
{


the next set of warnings are:

cc -DHAVE_CONFIG_H -I. -I. -I.. -DG_LOG_DOMAIN=\"GdkPixbuf\" -I.. -I..
-I../gdk-pixbuf -I../gdk-pixbuf -DGTK_SYSCONFDIR=\"/usr/local/etc\"
-DGTK_VERSION=\"2.2.1\" -DGTK_BINARY_VERSION=\"2.2.0\"
-DG_DISABLE_DEPRECATED -DGDK_PIXBUF_DISABLE_DEPRECATED
-DPREFIX=\"/usr/local\" -DG_DISABLE_CAST_CHECKS -D_REENTRANT
-I/usr/local/include/glib-2.0 -I/usr/local/lib/glib-2.0/include
-DGDK_PIXBUF_ENABLE_BACKEND AM_CPPFLAGS =
-DPIXBUF_LIBDIR=\"/usr/local/lib/gtk-2.0/2.2.0/loaders\"
-DBUILT_MODULES_DIR=\"./.libs\" -I/usr/local/include
-I/opt/libpng/include -g -c gdk-pixbuf-io.c  +Z -DPIC -o
gdk-pixbuf-io.lo^M
cpp: "/usr/include/sys/param.h", line 379: warning 2001: Redefinition of
macro MIN.^M
cpp: "/usr/include/sys/param.h", line 380: warning 2001: Redefinition of
macro MAX.^M
cc: "gdk-pixbuf-io.c", line 360: warning 604: Pointers are not
assignment-compatible.^M
cc: "gdk-pixbuf-io.c", line 365: warning 604: Pointers are not
assignment-compatible.^M

The first is:

                                goto context_error;
                        pattern->prefix = g_strdup (tmp_buf->str);

 
where pattern->prefix is:

        GdkPixbufModulePattern *pattern;

and prefix is unsigned char *:

typedef struct _GdkPixbufModulePattern GdkPixbufModulePattern;
struct _GdkPixbufModulePattern {
        unsigned char *prefix;
        unsigned char *mask;
        int relevance;
};

but g_strdup returns gchar*  it is the same thing with the warning on
line 365...


the next one after that is:

cc -DHAVE_CONFIG_H -I. -I. -I.. -DG_LOG_DOMAIN=\"GdkPixbuf\" -I.. -I..
-I../gdk-pixbuf -I../gdk-pixbuf -DGTK_SYSCONFDIR=\"/usr/local/etc\"
-DGTK_VERSION=\"2.2.1\" -DGTK_BINARY_VERSION=\"2.2.0\"
-DG_DISABLE_DEPRECATED -DGDK_PIXBUF_DISABLE_DEPRECATED
-DPREFIX=\"/usr/local\" -DG_DISABLE_CAST_CHECKS -D_REENTRANT
-I/usr/local/include/glib-2.0 -I/usr/local/lib/glib-2.0/include
-DGDK_PIXBUF_ENABLE_BACKEND AM_CPPFLAGS =
-DPIXBUF_LIBDIR=\"/usr/local/lib/gtk-2.0/2.2.0/loaders\"
-DBUILT_MODULES_DIR=\"./.libs\" -I/usr/local/include
-I/opt/libpng/include -g -c gdk-pixdata.c  +Z -DPIC -o gdk-pixdata.lo^M
cpp: "/usr/include/sys/param.h", line 379: warning 2001: Redefinition of
macro MIN.^M
cpp: "/usr/include/sys/param.h", line 380: warning 2001: Redefinition of
macro MAX.^M
cc: "gdk-pixdata.c", line 200: warning 604: Pointers are not
assignment-compatible.^M
cc: "gdk-pixdata.c", line 200: warning 563: Argument #2 is not the
correct type.


which seems to be this code:

  stream = get_uint32 (stream, &pixdata->magic);
  stream = get_uint32 (stream, &pixdata->length);
  if (pixdata->magic != GDK_PIXBUF_MAGIC_NUMBER || pixdata->length <
GDK_PIXDATA

get_uint32 wants guint* as parm 2:
static inline const guint8 *
get_uint32 (const guint8 *stream, guint *result)
{

and pixdata->length is gint:

typedef struct _GdkPixdata GdkPixdata;
struct _GdkPixdata
{
  guint32 magic;        /* GDK_PIXBUF_MAGIC_NUMBER */
  gint32  length;       /* <1 to disable length checks, otherwise:
                         * GDK_PIXDATA_HEADER_LENGTH + pixel_data length
                         */
  guint32 pixdata_type; /* GdkPixdataType */
  guint32 rowstride;    /* maybe 0 to indicate non-padded data */
  guint32 width;
  guint32 height;
  guint8 *pixel_data;
};


continuing :)

cc -DHAVE_CONFIG_H -I. -I. -I.. -DG_LOG_DOMAIN=\"GdkPixbuf\" -I.. -I..
-I../gdk-pixbuf -I../gdk-pixbuf -DGTK_SYSCONFDIR=\"/usr/local/etc\"
-DGTK_VERSION=\"2.2.1\" -DGTK_BINARY_VERSION=\"2.2.0\"
-DG_DISABLE_DEPRECATED -DGDK_PIXBUF_DISABLE_DEPRECATED
-DPREFIX=\"/usr/local\" -DG_DISABLE_CAST_CHECKS -D_REENTRANT -I/usr/loc
al/include/glib-2.0 -I/usr/local/lib/glib-2.0/include
-DGDK_PIXBUF_ENABLE_BACKEND AM_CPPFLAGS =
-DPIXBUF_LIBDIR=\"/usr/local/lib/gtk-2.0/2.2.0/loaders\"
-DBUILT_MODULES_DIR=\"./.libs\" -I/usr/local/include
-I/opt/libpng/include -g -c io-png.c  +Z -DPIC -o io-png.lo^M
cpp: "/usr/include/sys/param.h", line 379: warning 2001: Redefinition of
macro MIN.^M
cpp: "/usr/include/sys/param.h", line 380: warning 2001: Redefinition of
macro MAX.^M
cc: "io-png.c", line 905: warning 604: Pointers are not
assignment-compatible.^M

And the code appears to be:

void
MODULE_ENTRY (png, fill_info) (GdkPixbufFormat *info)
{
        static GdkPixbufModulePattern signature[] = {
  905              { "\x89PNG\r\n\x1a\x0a", NULL, 100 },
                { NULL, NULL, 0 }
        };

and the GdkPixbufModulePattern

typedef struct _GdkPixbufModulePattern GdkPixbufModulePattern;
struct _GdkPixbufModulePattern {
        unsigned char *prefix;
        unsigned char *mask;
        int relevance;
};

I'm not quite sure what the compiler is complaining about there but
would _guess_ that it is the constant string being assigned to the
unsigned char *prefix?  Perhaps the compiler is being overly paranoid
about pointers to literals, which will be in the TEXT area? 

continuing:

cc -DHAVE_CONFIG_H -I. -I. -I.. -DG_LOG_DOMAIN=\"GdkPixbuf\" -I.. -I..
-I../gdk-pixbuf -I../gdk-pixbuf -DGTK_SYSCONFDIR=\"/usr/local/etc\"
-DGTK_VERSION=\"2.2.1\" -DGTK_BINARY_VERSION=\"2.2.0\"
-DG_DISABLE_DEPRECATED -DGDK_PIXBUF_DISABLE_DEPRECATED
-DPREFIX=\"/usr/local\" -DG_DISABLE_CAST_CHECKS -D_REENTRANT
-I/usr/local/include/glib-2.0 -I/usr/local/lib/glib-2.0/include
-DGDK_PIXBUF_ENABLE_BACKEND AM_CPPFLAGS =
-DPIXBUF_LIBDIR=\"/usr/local/lib/gtk-2.0/2.2.0/loaders\"
-DBUILT_MODULES_DIR=\"./.libs\" -I/usr/local/include
-I/opt/libpng/include -g -c io-jpeg.c  +Z -DPIC -o io-jpeg.lo^M
cpp: "/usr/local/include/jconfig.h", line 12: warning 2001: Redefinition
of macro HAVE_STDLIB_H.^M
cpp: "/usr/include/sys/param.h", line 379: warning 2001: Redefinition of
macro MIN.^M
cpp: "/usr/include/sys/param.h", line 380: warning 2001: Redefinition of
macro MAX.^M
cpp: "../config.h", line 144: warning 2001: Redefinition of macro
HAVE_STDLIB_H.^M
cc: "io-jpeg.c", line 453: warning 562: Redeclaration of
"gdk_pixbuf__jpeg_image_begin_load" with a different storage class
specifier: "gdk_pixbuf__jpeg_image_begin_load" will have internal
linkage.^M
cc: "io-jpeg.c", line 924: warning 604: Pointers are not
assignment-compatible.^M

The "HAVE_STDLIB_H" redefinition is a bit troubling - could it mean that
some of the dependencies arrived at different conclusions as to there
being a stdlib.h on the system?

The redeclaration warning is probably another one of those static/not
static things.  

The assignment-compatible stuff is another one of those literal vs char
* things I think:

void
MODULE_ENTRY (jpeg, fill_info) (GdkPixbufFormat *info)
{
        static GdkPixbufModulePattern signature[] = {
                { "\xff\xd8", NULL, 100 },
                { NULL, NULL, 0 }
        };

io_gif.c also had some warnings:

cc -DHAVE_CONFIG_H -I. -I. -I.. -DG_LOG_DOMAIN=\"GdkPixbuf\" -I.. -I..
-I../gdk-
pixbuf -I../gdk-pixbuf -DGTK_SYSCONFDIR=\"/usr/local/etc\"
-DGTK_VERSION=\"2.2.1\" -DGTK_BINARY_VERSION=\"2.2.0\"
-DG_DISABLE_DEPRECATED -DGDK_PIXBUF_DISABLE_DEPRECATED
-DPREFIX=\"/usr/local\" -DG_DISABLE_CAST_CHECKS -D_REENTRANT -I/usr/loc
al/include/glib-2.0 -I/usr/local/lib/glib-2.0/include
-DGDK_PIXBUF_ENABLE_BACKEND AM_CPPFLAGS =
-DPIXBUF_LIBDIR=\"/usr/local/lib/gtk-2.0/2.2.0/loaders\"
-DBUILT_MODULES_DIR=\"./.libs\" -I/usr/local/include
-I/opt/libpng/include -g -c io-gif.c  +Z -DPIC -o io-gif.lo^M
cpp: "/usr/include/sys/param.h", line 379: warning 2001: Redefinition of
macro MIN.^M
cpp: "/usr/include/sys/param.h", line 380: warning 2001: Redefinition of
macro MAX.^M
cc: "io-gif.c", line 409: warning 604: Pointers are not
assignment-compatible.^M
cc: "io-gif.c", line 409: warning 563: Argument #1 is not the correct
type.^M
cc: "io-gif.c", line 410: warning 604: Pointers are not
assignment-compatible.^M
cc: "io-gif.c", line 410: warning 563: Argument #1 is not the correct
type.^M
cc: "io-gif.c", line 1622: warning 604: Pointers are not
assignment-compatible.^
M

The line 409/410 are calls to strncmp:

                                if (!strncmp (context->block_buf,
"NETSCAPE2.0", 11) ||
                                    !strncmp (context->block_buf,
"ANIMEXTS1.0", 11)) {

where strncmp is looking for a char *, but block_buf is guchar

the warning on line 1622 is another one of those literal strings things
I think.

there are a number of other things along these lines, but this email is
long enough as it is.  if folks would like, I can provide the typescript
of the compilation.

rick jones
-- 
Wisdom Teeth are impacted, people are affected by the effects of events.
these opinions are mine, all mine; HP might not want them anyway... :)
feel free to post, OR email to raj in cup.hp.com  but NOT BOTH...



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]