[Image-SIG] Still Compilation prob on solaris 8

Oliver Skiebe oliver.skiebe@gmx.net
Fri, 22 Mar 2002 16:29:29 +0100


Hi,

thanks for replying - compiling without -ansi doesn=B4t work either

Here=B4s what config.log says after a straight ./configure -
Same output, same error doing make...
I don=B4t have a confdefs.h file on this machine - why can=B4t it find those
header files resp. where to get them?

I installed gcc as a sun package... any clues what i might do?

Thank you a lot,

oliver=20

configure:558: checking for --without-gcc
configure:588: checking for gcc
configure:665: checking whether the C compiler (gcc  ) works
configure:679: gcc -o conftest    conftest.c  1>&5
configure:699: checking whether the C compiler (gcc  ) is a cross-compiler
configure:704: checking whether we are using GNU C
configure:713: gcc -E conftest.c
configure:728: checking whether gcc accepts -g
configure:758: checking for ranlib
configure:790: checking for ar
configure:829: checking MACHDEP
configure:857: checking for jpeg_destroy_compress in -ljpeg
configure:876: gcc -o conftest -g -O2   conftest.c -ljpeg   1>&5
configure:920: checking for deflate in -lz
configure:939: gcc -o conftest -g -O2   conftest.c -lz  -ljpeg  1>&5
configure:969: checking how to run the C preprocessor
configure:990: gcc -E  conftest.c >/dev/null 2>conftest.out
configure:1030: checking for ANSI C header files
configure:1043: gcc -E  conftest.c >/dev/null 2>conftest.out
configure:1110: gcc -o conftest -g -O2   conftest.c -lz -ljpeg  1>&5
configure: failed program was:
#line 1099 "configure"
#include "confdefs.h"
#include <ctype.h>
#define ISLOWER(c) ('a' <=3D (c) && (c) <=3D 'z')
#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
int main () { int i; for (i =3D 0; i < 256; i++)
if (XOR (islower (i), ISLOWER (i)) || toupper (i) !=3D TOUPPER (i)) exit(2);
exit (0); }

configure:1136: checking for inline
configure:1150: gcc -c -g -O2  conftest.c 1>&5
configure:1177: checking whether byte ordering is bigendian
configure:1195: gcc -c -g -O2  conftest.c 1>&5
configure: In function `main':
configure:1190: `bogus' undeclared (first use in this function)
configure:1190: (Each undeclared identifier is reported only once
configure:1190: for each function it appears in.)
configure:1190: parse error before `endian'
configure: failed program was:
#line 1184 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/param.h>
int main() {

#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
 bogus endian macros
#endif
; return 0; }
configure:1243: gcc -o conftest -g -O2   conftest.c -lz -ljpeg  1>&5
configure: failed program was:
#line 1230 "configure"
#include "confdefs.h"
main () {
  /* Are we little or big endian?  From Harbison&Steele.  */
  union
  {
    long l;
    char c[sizeof (long)];
  } u;
  u.l =3D 1;
  exit (u.c[sizeof (long) - 1] =3D=3D 1);
}
configure:1268: checking size of char
configure:1287: gcc -o conftest -g -O2   conftest.c -lz -ljpeg  1>&5
configure: failed program was:
#line 1276 "configure"
#include "confdefs.h"
#include <stdio.h>
main()
{
  FILE *f=3Dfopen("conftestval", "w");
  if (!f) exit(1);
  fprintf(f, "%d\n", sizeof(char));
  exit(0);
}
configure:1307: checking size of short
configure:1326: gcc -o conftest -g -O2   conftest.c -lz -ljpeg  1>&5
configure: failed program was:
#line 1315 "configure"
#include "confdefs.h"
#include <stdio.h>
main()
{
  FILE *f=3Dfopen("conftestval", "w");
  if (!f) exit(1);
  fprintf(f, "%d\n", sizeof(short));
  exit(0);
}
configure:1346: checking size of int
configure:1365: gcc -o conftest -g -O2   conftest.c -lz -ljpeg  1>&5
configure: failed program was:
#line 1354 "configure"
#include "confdefs.h"
#include <stdio.h>
main()
{
  FILE *f=3Dfopen("conftestval", "w");
  if (!f) exit(1);
  fprintf(f, "%d\n", sizeof(int));
  exit(0);
}
configure:1385: checking size of long
configure:1404: gcc -o conftest -g -O2   conftest.c -lz -ljpeg  1>&5
configure: failed program was:
#line 1393 "configure"
#include "confdefs.h"
#include <stdio.h>
main()
{
  FILE *f=3Dfopen("conftestval", "w");
  if (!f) exit(1);
  fprintf(f, "%d\n", sizeof(long));
  exit(0);
}
configure:1425: checking size of float
configure:1444: gcc -o conftest -g -O2   conftest.c -lz -ljpeg  1>&5
configure: failed program was:
#line 1433 "configure"
#include "confdefs.h"
#include <stdio.h>
main()
{
  FILE *f=3Dfopen("conftestval", "w");
  if (!f) exit(1);
  fprintf(f, "%d\n", sizeof(float));
  exit(0);
}
configure:1464: checking size of double
configure:1483: gcc -o conftest -g -O2   conftest.c -lz -ljpeg  1>&5
configure: failed program was:
#line 1472 "configure"
#include "confdefs.h"
#include <stdio.h>
main()
{
  FILE *f=3Dfopen("conftestval", "w");
  if (!f) exit(1);
  fprintf(f, "%d\n", sizeof(double));
  exit(0);
}
configure:1504: checking for working const
configure:1558: gcc -c -g -O2  conftest.c 1>&5
configure:1581: checking for prototypes
configure:1590: gcc -c -g -O2  conftest.c 1>&5
configure:1608: checking for unistd.h
configure:1618: gcc -E  conftest.c >/dev/null 2>conftest.out
configure:1647: checking for getpagesize
configure:1675: gcc -o conftest -g -O2   conftest.c -lz -ljpeg  1>&5
configure:1700: checking for working mmap
configure:1848: gcc -o conftest -g -O2   conftest.c -lz -ljpeg  1>&5
configure: failed program was:
#line 1708 "configure"
#include "confdefs.h"

/* Thanks to Mike Haertel and Jim Avera for this test.
   Here is a matrix of mmap possibilities:
        mmap private not fixed
        mmap private fixed at somewhere currently unmapped
        mmap private fixed at somewhere already mapped
        mmap shared not fixed
        mmap shared fixed at somewhere currently unmapped
        mmap shared fixed at somewhere already mapped
   For private mappings, we should verify that changes cannot be read()
   back from the file, nor mmap's back from the file at a different
   address.  (There have been systems where private was not correctly
   implemented like the infamous i386 svr4.0, and systems where the
   VM page cache was not coherent with the filesystem buffer cache
   like early versions of FreeBSD and possibly contemporary NetBSD.)
   For shared mappings, we should conversely verify that changes get
   propogated back to all the places they're supposed to be.

   Grep wants private fixed already mapped.
   The main things grep needs to know about mmap are:
   * does it exist and is it safe to write into the mmap'd area
   * how to use it (BSD variants)  */
#include <sys/types.h>
#include <fcntl.h>
#include <sys/mman.h>

/* This mess was copied from the GNU getpagesize.h.  */
#ifndef HAVE_GETPAGESIZE
# ifdef HAVE_UNISTD_H
#  include <unistd.h>
# endif

/* Assume that all systems that can run configure have sys/param.h.  */
# ifndef HAVE_SYS_PARAM_H
#  define HAVE_SYS_PARAM_H 1
# endif

# ifdef _SC_PAGESIZE
#  define getpagesize() sysconf(_SC_PAGESIZE)
# else /* no _SC_PAGESIZE */
#  ifdef HAVE_SYS_PARAM_H
#   include <sys/param.h>
#   ifdef EXEC_PAGESIZE
#    define getpagesize() EXEC_PAGESIZE
#   else /* no EXEC_PAGESIZE */
#    ifdef NBPG
#     define getpagesize() NBPG * CLSIZE
#     ifndef CLSIZE
#      define CLSIZE 1
#     endif /* no CLSIZE */
#    else /* no NBPG */
#     ifdef NBPC
#      define getpagesize() NBPC
#     else /* no NBPC */
#      ifdef PAGESIZE
#       define getpagesize() PAGESIZE
#      endif /* PAGESIZE */
#     endif /* no NBPC */
#    endif /* no NBPG */
#   endif /* no EXEC_PAGESIZE */
#  else /* no HAVE_SYS_PARAM_H */
#   define getpagesize() 8192   /* punt totally */
#  endif /* no HAVE_SYS_PARAM_H */
# endif /* no _SC_PAGESIZE */

#endif /* no HAVE_GETPAGESIZE */

#ifdef __cplusplus
extern "C" { void *malloc(unsigned); }
#else
char *malloc();
#endif

int
main()
{
        char *data, *data2, *data3;
        int i, pagesize;
        int fd;

        pagesize =3D getpagesize();

        /*
         * First, make a file with some known garbage in it.
         */
        data =3D malloc(pagesize);
        if (!data)
                exit(1);
        for (i =3D 0; i < pagesize; ++i)
                *(data + i) =3D rand();
        umask(0);
        fd =3D creat("conftestmmap", 0600);
        if (fd < 0)
                exit(1);
        if (write(fd, data, pagesize) !=3D pagesize)
                exit(1);
        close(fd);

        /*
         * Next, try to mmap the file at a fixed address which
         * already has something else allocated at it.  If we can,
         * also make sure that we see the same garbage.
         */
        fd =3D open("conftestmmap", O_RDWR);
        if (fd < 0)
                exit(1);
        data2 =3D malloc(2 * pagesize);
        if (!data2)
                exit(1);
        data2 +=3D (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize -
1);
        if (data2 !=3D mmap(data2, pagesize, PROT_READ | PROT_WRITE,
            MAP_PRIVATE | MAP_FIXED, fd, 0L))
                exit(1);
        for (i =3D 0; i < pagesize; ++i)
                if (*(data + i) !=3D *(data2 + i))
                        exit(1);

        /*
         * Finally, make sure that changes to the mapped area
         * do not percolate back to the file as seen by read().
         * (This is a bug on some variants of i386 svr4.0.)
         */
        for (i =3D 0; i < pagesize; ++i)
                *(data2 + i) =3D *(data2 + i) + 1;
        data3 =3D malloc(pagesize);
        if (!data3)
                exit(1);
        if (read(fd, data3, pagesize) !=3D pagesize)
                exit(1);
        for (i =3D 0; i < pagesize; ++i)
                if (*(data + i) !=3D *(data3 + i))
                        exit(1);
        close(fd);
        unlink("conftestmmap");
        exit(0);
}