Re: Unable to Compile GTK 2.4.0 on Linux-AIX-HP-SUN-IRIX

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

 



On Fri, 30 Apr 2004 15:30:49 +0200, Vincent Jamart said:

I'm writing mostly from memory here, as I don't have access to my AIX boxes as
I'm typing this, and it's been a while since I ported this stuff.  Although I
also support Linux, Solaris, and Irix boxes, you don't give enough context for
the errors on those platforms for me to identify the exact cause of the
problem, although for at least Linux and Solaris, it's pretty obvious
where to start chasing....

It *is* possible to get all of this stuff to build and run on AIX.  However, it
does require some AIX clue (libtool and shared libraries is particularly...
umm.. "interesting").  Also, the IBM C compiler can be invoked under multiple
names (xlc, cc, c89, and so on), which compile with different sets of default
pre-defined preprocessor symbols and compiler/linker options and flags....

You might want to visit http://www.bullfreeware.com - the nice guys at Bull
have a large collection of pre-built packages that may help considerably in
easing the pain of getting this going.

> -AIX: Dependency libtiff has a problem at make time:
> = libtiff
>         /usr/vacpp/bin/xlc -o mkversion -Dunix -qlanglvl=ansi -qsrcmsg
> -qmaxmem=8192 -bM:SRE -g -O  -I. -I../libtiff   ../libtiff/mkversion.c
>         rm -f ../libtiff/tiffvers.h
>         ./mkversion -v .././VERSION -r .././RELEASE-DATE
> ../libtiff/tiffvers.h
>         /usr/vacpp/bin/xlc -c -Dunix -qlanglvl=ansi -qsrcmsg
> -qmaxmem=8192 -bM:SRE -g -O  -I. -I../libtiff   ../libtiff/tif_aux.c
> "../libtiff/tiff.h", line 75.21: 1506-334 (S) Identifier int8 has
> already been defined on line 631 of "/usr/include/sys/inttypes.h".
> "../libtiff/tiff.h", line 80.15: 1506-334 (S) Identifier int16 has
> already been defined on line 632 of "/usr/include/sys/inttypes.h".
> "../libtiff/tiff.h", line 86.14: 1506-334 (S) Identifier int32 has
> already been defined on line 633 of "/usr/include/sys/inttypes.h".
> make: 1254-004 The error code from the last command is 1.
> Stop.
> make: 1254-004 The error code from the last command is 2.
> Stop.

If I remember correctly, the problem ls libtiff not knowing what AIX's header
files supply under all combinations of -D flags (often predefines supplied by
the compiler). In particular, the presence/lack of -D_ALL_SOURCE caused issues.

>From a /usr/include/tiff.h on my Linux box:

/*
 * The so called TIFF types conflict with definitions from inttypes.h 
 * included from sys/types.h on AIX (at least using VisualAge compiler). 
 * We try to work around this by detecting this case.  Defining 
 * _TIFF_DATA_TYPEDEFS_ short circuits the later definitions in tiff.h, and
 * we will in the holes not provided for by inttypes.h. 
 *
 * See http://bugzilla.remotesensing.org/show_bug.cgi?id=39
 */

I took the easy out and just commented out the three offending declarations -
be careful if you change compiler versions (xlc/cc/c89 and so on), as that may
change things around...

I seem to remember libtiff being a long afternoon's worth of porting, as
it took multiple iterations to stamp out all the sillyness in the libtiff
headers..

> libpng-1.2.5 also fails, even when modifying its pre-written Makefile
> (based on makefile.aix with "CC = xlc"): I got a_lot of syntax errors
> and missing types declarations in png.h.

Hard to diagnose without seeing the actual error messages, but it's
probably libpng not expecting to be built with xlc (it's either making a
lot of unwarranted gcc assumptions, or wants a different alias for the
compiler).

I don't remember libpng as being a particularly difficult port to AIX,
even using the 'xlc' alias for the compiler...

> Dependency pkg-config fails as it only seem to compile with gcc as their
> makefile is not genric enough to support xlc...I wasn't able to compile 
> glib/pango/atk/gtk

Quite frankly, you probably need to visit bullfreeware.

Alternatively, you might want to re-evaluate your product direction - if your
in-house AIX expertise wasn't able to figure out the libtiff and libpng issues,
you may be in trouble there.  In addition, there seems to be weakness on
the Linux, Solaris, and Irix platforms as well:

> -Linux: Dependency libpng-1.2.5 cannot compile:

Almost certainly a misconfiguration causing an #include inside a #ifdef to be missed,
which resulted in a missing C 'struct' definition.  I can't speculate more
without looking at the png.c source.

> glib-2.4.0: 
> configure: error:
> *** You must have either have gettext support in your C library,...

Repeat after me:  "If configure fails, look in config.log".

What distribution/release of Linux was this on?  gexttext *should* be
in any recent glibc release (note that glib and glibc are two different things
entirely).

You should be able to just install gtk and all its pre-requisites on most
Linux distributions - RedHat, Debian, and Suse all support gtk "out of
the box".  

> -Solaris: Dependency libpng-1.2.5 has problem (using makefile.so9).
> cc -o pngtest -I/usr/include -O3 pngtest.o -L. -R. -L/usr/lib -R/usr/lib -lpng12 -lz -lm
> cc: Warning: option -3 passed to ld
> /usr/ccs/bin/ld: illegal option -- 3

The Sun C compiler wants to see -O, not -O3.  Were you using a makefile
that assumed that gcc was the compiler, or was it just a botched setting
of CFLAGS?

> Also for pkg-config, I get:
> (...)
> gcc -g -O2 -o pkg-config pkg.o partial-glib.o parse.o main.o findme.o
> popt.o poptconfig.o popthelp.o poptparse.o  glib-1.2.8/.libs/libglib.al
> Undefined                       first referenced
>  symbol                             in file
> setresuid                           popt.o

1) You're using gcc here, but cc for libpng - unclear why the change.
2) The reference to glib-1.2.8 looks like an upper-level Makefile passing
bad values for CFLAGS and/or LDFLAGS...
3) the setresuid() issue smells of a broken configuration - I suspect you
copied over a source tree from a Linux (or possibly *BSD) box, and
failed to re-run './configure' on Solaris....

Time to visit the SunFreeware site, I suspect...

> -Irix: Dependency libtiff fails:
> --- all ---
> = libtiff
> smake: Error: Can't figure out how to make -. Stop
> *** Error code 2
> smake: Error: 1 error

Yowza.  I have *no* idea what you managed to do here....

And yes, SGI has a Freeware site with this sort of stuff already on it...

Attachment: pgp00087.pgp
Description: PGP signature


[Index of Archives]     [Touch Screen Library]     [GIMP Users]     [Gnome]     [KDE]     [Yosemite News]     [Steve's Art]

  Powered by Linux