1994.09.13 08:50 "problems building on NeXT", by Helmut Heller

1994.09.13 08:50 "problems building on NeXT", by Helmut Heller

Hello,

I just downloaded v3.3beta015 and tried to compile it on a NeXT (a black one and a white one, same problems on both :-). The libtiff.a makes like a charm without problems, but tiffdump gives me a headache:

cc -o tiffdump -g -I../libtiff tiffdump.c
tiffdump.c:158: illegal function call, found `0'
tiffdump.c:239: illegal function call, found `off'
tiffdump.c:239: illegal expression, found `)'
tiffdump.c:243: illegal external declaration, found `if'
tiffdump.c:243: illegal external declaration, missing `;' after `*'
and so on and on.

After some investigation I found that the type off_t is unknown. In complete ignorance I added the line

#define off_t int

at the beginning of the file and now it makes without errors. However, I don't know if this change of mine is reasonable at all...

The next problem is with fax2ps:

cc -O -ansi -I../../libtiff -c fax2ps.c
../../libtiff/tiffiop.h:42: undefined type, found `u_long'
../../libtiff/tiffiop.h:57: undefined type, found `u_long'
../../libtiff/tiffiop.h:92: undefined type, found `u_char'
../../libtiff/tiffiop.h:93: undefined type, found `u_char'
../../libtiff/tiffiop.h:94: undefined type, found `u_char'
../../libtiff/tiffiop.h:201: undefined type, found `u_short'
and so on and on.

Here it helps to remove the -ansi from the compiler options, but then I have a more serious problem:

cc -O -I../../libtiff -c fax2ps.c
fax2ps.c: In function `printTIF':
fax2ps.c:425: structure has no member named `white'

I checked into this: line 425:

    fax.b.white = (photometric == PHOTOMETRIC_MINISBLACK);

and fax.b is of type Fax3BaseState which is defined in tif_fax3.h as

typedef struct {
        short   data;                   /* current i/o byte */
        short   bit;                    /* current i/o bit in byte */
        u_long  rowbytes;               /* bytes in a decoded scanline */
        u_long  rowpixels;              /* pixels in a scanline */
        enum {                          /* decoding/encoding mode */
            G3_1D,                      /* basic 1-d mode */
            G3_2D                       /* optional 2-d mode */
        } tag;
        const u_char *bitmap;           /* bit reversal table */
        u_char  *refline;               /* reference line for 2d decoding */
} Fax3BaseState;

which does not include any white member, in deed! Being bold, I tried adding such a white member, but this then leeds to a lot more trouble (many missing functions and so on), so I am stumped here.

Is there s.th. I am doing wrong or can anyone help??

Thanks a lot,
Helmut

--
Servus, Helmut  (DH0MAD)    ______________NeXT-mail welcome_________________
FAX: +49-89-2394-4607       "Knowledge must be gathered and cannot be given"
heller@nirvana.imo.physik.uni-muenchen.de              ZEN, one of BLAKES7
Phone: +49-89-2394-4565, -4562----------------------------------------------
Helmut Heller, Ludwig Maximilians University
Institute for Medical Optics, Theoretical Biophysics Group
Theresienstr. 37, 80333 Munich, GERMANY