Trying to compile 64bit version with Sun WorkShop
Compiler C 5.0
SunOS mmmm 5.8 Generic_108528-05 sun4u sparc
SUNW,Ultra-60
cc -xtarget=ultra -xarch=v9 -xcode=pic32
-DHAVE_CONFIG_H -I. -I. -I.
-DPKGLIBDIR="\"/pkgconfig/lib/pkgconfig\""
-I./glib-1.2.8 -g -c main.c
"main.c", line 38: non-constant initializer: op "U&"
"main.c", line 40: non-constant initializer: op "U&"
"main.c", line 42: non-constant initializer: op "U&"
"main.c", line 44: non-constant initializer: op "U&"
"main.c", line 46: non-constant initializer: op "U&"
"main.c", line 48: non-constant initializer: op "U&"
"main.c", line 50: non-constant initializer: op "U&"
"main.c", line 52: non-constant initializer: op "U&"
"main.c", line 54: non-constant initializer: op "U&"
"main.c", line 56: non-constant initializer: op "U&"
"main.c", line 58: non-constant initializer: op "U&"
"main.c", line 60: non-constant initializer: op "U&"
"main.c", line 62: non-constant initializer: op "U&"
"main.c", line 64: non-constant initializer: op "U&"
"main.c", line 247: cannot recover from previous errors
cc: acomp failed for main.c
*** Error code 2
make: Fatal error: Command failed for target `main.o'
Current working directory /var/tmp/pkgconfig-0.5.0
*** Error code 1
make: Fatal error: Command failed for target
`all-recursive'
Current working directory /var/tmp/pkgconfig-0.5.0
*** Error code 1
make: Fatal error: Command failed for target
`all-recursive-am'
Compiles ok with gcc version 2.95.2 19991024. The
problem
with this is gcc isn't production with 64bit compiling.
Logged In: NO
I'm getting this problem too with Solaris 2.6/C 4.2. The problem is gcc is allowing illegal C syntax. These
errors are coming from a set of structure initialization statements. The member values must be constants,
not the pointers to variables that appear in the code. What is needed is a series of assignment statements
after the array of structures declaration.