[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: compilation error on Solaris OpenIndiana
From: |
Bruno Haible |
Subject: |
Re: compilation error on Solaris OpenIndiana |
Date: |
Sun, 07 Mar 2021 23:15:42 +0100 |
User-agent: |
KMail/5.1.3 (Linux/4.4.0-203-generic; KDE/5.18.0; x86_64; ; ) |
Hi Luca,
> > On Solaris 11/OpenIndiana, I get this compilation error (both in 32-bit and
> > 64-bit mode):
>
> Thanks for the report Bruno. I will fix this in a different way.
A related issue:
On AIX, 32-bit, with xlc, I get two compilation errors:
source='jitterc/jitterc-scanner.c'
object='jitterc/bin_jitter-jitterc-scanner.o' libtool=no DEPDIR=.deps
depmode=xlc /bin/sh ../../jitter/build-aux/depcomp xlc -qthreaded -qtls
-DHAVE_CONFIG_H -I. -I../../jitter -I./config-private -I./jitter
-I./gnulib-local -I../../jitter/gnulib-local -DJITTER_WITH_LIBTEXTSTYLE=1
-DJITTER_FLAGDIR=/home/haible/poke-1.0c/build-32-xlc/jitter/flags
-DJITTER_TEMPLATEDIR=/home/haible/poke-1.0c/build-32-xlc/jitter/../../jitter/templates
-DJITTER_INTERNAL=1 -I/home/haible/prefix32/include -g -c -o
jitterc/bin_jitter-jitterc-scanner.o `test -f 'jitterc/jitterc-scanner.c' ||
echo '../../jitter/'`jitterc/jitterc-scanner.c
"/usr/include/unistd.h", line 201.17: 1506-343 (S) Redeclaration of lseek64
differs from previous declaration on line 199 of "/usr/include/unistd.h".
"/usr/include/unistd.h", line 201.17: 1506-050 (I) Return type "long long" in
redeclaration is not compatible with the previous return type "long".
"/usr/include/unistd.h", line 201.17: 1506-377 (I) The type "long long" of
parameter 2 differs from the previous type "long".
"/usr/include/sys/lockf.h", line 64.20: 1506-343 (S) Redeclaration of lockf64
differs from previous declaration on line 62 of "/usr/include/sys/lockf.h".
"/usr/include/sys/lockf.h", line 64.20: 1506-377 (I) The type "long long" of
parameter 3 differs from the previous type "long".
"/usr/include/unistd.h", line 920.33: 1506-343 (S) Redeclaration of ftruncate64
differs from previous declaration on line 918 of "/usr/include/unistd.h".
"/usr/include/unistd.h", line 920.33: 1506-377 (I) The type "long long" of
parameter 2 differs from the previous type "long".
"/usr/include/unistd.h", line 977.33: 1506-343 (S) Redeclaration of truncate64
differs from previous declaration on line 975 of "/usr/include/unistd.h".
"/usr/include/unistd.h", line 977.33: 1506-377 (I) The type "long long" of
parameter 2 differs from the previous type "long".
"/usr/include/unistd.h", line 996.33: 1506-343 (S) Redeclaration of pread64
differs from previous declaration on line 993 of "/usr/include/unistd.h".
"/usr/include/unistd.h", line 996.33: 1506-377 (I) The type "long long" of
parameter 4 differs from the previous type "long".
"/usr/include/unistd.h", line 997.33: 1506-343 (S) Redeclaration of pwrite64
differs from previous declaration on line 994 of "/usr/include/unistd.h".
"/usr/include/unistd.h", line 997.33: 1506-377 (I) The type "long long" of
parameter 4 differs from the previous type "long".
"/usr/include/unistd.h", line 1086.25: 1506-343 (S) Redeclaration of fclear64
differs from previous declaration on line 1083 of "/usr/include/unistd.h".
"/usr/include/unistd.h", line 1086.25: 1506-050 (I) Return type "long long" in
redeclaration is not compatible with the previous return type "long".
"/usr/include/unistd.h", line 1086.25: 1506-377 (I) The type "long long" of
parameter 2 differs from the previous type "long".
"/usr/include/unistd.h", line 1087.25: 1506-343 (S) Redeclaration of
fsync_range64 differs from previous declaration on line 1084 of
"/usr/include/unistd.h".
"/usr/include/unistd.h", line 1087.25: 1506-377 (I) The type "long long" of
parameter 3 differs from the previous type "long".
make: 1254-004 The error code from the last command is 1.
source='jitter/jitter-routine-scanner.c'
object='jitter/lib_libjitter__switch__partial_la-jitter-routine-scanner.lo'
libtool=yes \
DEPDIR=.deps depmode=xlc /bin/sh ../../jitter/build-aux/depcomp \
/bin/sh ./libtool --tag=CC --mode=compile xlc -qthreaded -qtls
-DHAVE_CONFIG_H -I. -I../../jitter -I./config-private -I./jitter
-DJITTER_WITH_LIBTEXTSTYLE=1 -DJITTER_DISPATCH_SWITCH
-I/home/haible/prefix32/include -g -c -o
jitter/lib_libjitter__switch__partial_la-jitter-routine-scanner.lo `test -f
'jitter/jitter-routine-scanner.c' || echo
'../../jitter/'`jitter/jitter-routine-scanner.c
libtool: compile: xlc -qthreaded -qtls -DHAVE_CONFIG_H -I. -I../../jitter
-I./config-private -I./jitter -DJITTER_WITH_LIBTEXTSTYLE=1
-DJITTER_DISPATCH_SWITCH -I/home/haible/prefix32/include -g -c
../../jitter/jitter/jitter-routine-scanner.c
-Wp,-qmakedep=gcc,-MFjitter/.deps/lib_libjitter__switch__partial_la-jitter-routine-scanner.TPlo
-DPIC -o
jitter/.libs/lib_libjitter__switch__partial_la-jitter-routine-scanner.o
"/usr/include/unistd.h", line 201.17: 1506-343 (S) Redeclaration of lseek64
differs from previous declaration on line 199 of "/usr/include/unistd.h".
"/usr/include/unistd.h", line 201.17: 1506-050 (I) Return type "long long" in
redeclaration is not compatible with the previous return type "long".
"/usr/include/unistd.h", line 201.17: 1506-377 (I) The type "long long" of
parameter 2 differs from the previous type "long".
"/usr/include/sys/lockf.h", line 64.20: 1506-343 (S) Redeclaration of lockf64
differs from previous declaration on line 62 of "/usr/include/sys/lockf.h".
"/usr/include/sys/lockf.h", line 64.20: 1506-377 (I) The type "long long" of
parameter 3 differs from the previous type "long".
"/usr/include/unistd.h", line 920.33: 1506-343 (S) Redeclaration of ftruncate64
differs from previous declaration on line 918 of "/usr/include/unistd.h".
"/usr/include/unistd.h", line 920.33: 1506-377 (I) The type "long long" of
parameter 2 differs from the previous type "long".
"/usr/include/unistd.h", line 977.33: 1506-343 (S) Redeclaration of truncate64
differs from previous declaration on line 975 of "/usr/include/unistd.h".
"/usr/include/unistd.h", line 977.33: 1506-377 (I) The type "long long" of
parameter 2 differs from the previous type "long".
"/usr/include/unistd.h", line 996.33: 1506-343 (S) Redeclaration of pread64
differs from previous declaration on line 993 of "/usr/include/unistd.h".
"/usr/include/unistd.h", line 996.33: 1506-377 (I) The type "long long" of
parameter 4 differs from the previous type "long".
"/usr/include/unistd.h", line 997.33: 1506-343 (S) Redeclaration of pwrite64
differs from previous declaration on line 994 of "/usr/include/unistd.h".
"/usr/include/unistd.h", line 997.33: 1506-377 (I) The type "long long" of
parameter 4 differs from the previous type "long".
"/usr/include/unistd.h", line 1086.25: 1506-343 (S) Redeclaration of fclear64
differs from previous declaration on line 1083 of "/usr/include/unistd.h".
"/usr/include/unistd.h", line 1086.25: 1506-050 (I) Return type "long long" in
redeclaration is not compatible with the previous return type "long".
"/usr/include/unistd.h", line 1086.25: 1506-377 (I) The type "long long" of
parameter 2 differs from the previous type "long".
"/usr/include/unistd.h", line 1087.25: 1506-343 (S) Redeclaration of
fsync_range64 differs from previous declaration on line 1084 of
"/usr/include/unistd.h".
"/usr/include/unistd.h", line 1087.25: 1506-377 (I) The type "long long" of
parameter 3 differs from the previous type "long".
gmake[3]: *** [Makefile:10136:
jitter/lib_libjitter__switch__partial_la-jitter-routine-scanner.lo] Error 1
The cause is that the files jitterc-scanner.c and jitter-routine-scanner.c
don't start with '#include <config.h>', as is required by Gnulib. When I
manually add '#include <config.h>' as the first line, the compilation
proceeds.
The corresponding .l files have a '#include <config.h>' already. But flex
generates its code like this:
/* begin standard C headers. */
#include <stdio.h>
#include <string.h>
#include <errno.h>
#include <stdlib.h>
/* end standard C headers. */
and the '#include <config.h>' comes too late — at a point where, since
the preprocessor symbol _LARGE_FILES (defined by Gnulib's config.h) was
not defined, <sys/types.h> decided to make 'off_t' a 32-bit type. It
should have made 'off_t' a 64-bit type.
There are several possibilities to fix this:
- Is there a flex command-line option to insert a '#include <config.h>'
first?
- Postprocess jitterc-scanner.c and jitter-routine-scanner.c by adding
'#include <config.h>' as the first line.
- Don't add jitterc-scanner.c to *_SOURCES directly. Instead create a
simple C file
#include <config.h>
#include "jitterc-scanner.c"
and add this one to *_SOURCES. And likewise for jitter-routine-scanner.c.
Bruno