[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[patch] guile 1.8.4 build problem on x86_64-sun-solaris2.10
From: |
Tim Mooney |
Subject: |
[patch] guile 1.8.4 build problem on x86_64-sun-solaris2.10 |
Date: |
Tue, 19 Feb 2008 22:11:18 -0600 (CST) |
I'm trying to build guile 1.8.4 on x86_64-sun-solaris2.10 with the Sun
Workshop 12 toolchain. The OS and the toolchain are up to date with
patches.
I've tried with both
CFLAGS='-Xa -xO2 -xstrconst -mt -KPIC -xtarget=native -m64
-xarch=native'
and the same with the addition of -xc99=all (which should be the default
anyway...). Either way, the configure proceeds fine and the build makes
it to libguile/numbers.c and then fails with:
cc -DHAVE_CONFIG_H -I. -I.. -I.. -I.. -I/local/gnu/include
-I/local/gnu/include -I/usr/local/include -I/local/gnu/include
-I/local/gnu/include -I/usr/local/include -D_REENTRANT -Xa -xc99=all -xO2
-xstrconst -mt -KPIC -xtarget=native -m64 -xarch=native
-I/local/gnu/include -I/local/gnu/include -I/usr/local/include -c
numbers.c -KPIC -DPIC -o .libs/libguile_la-numbers.o
"numbers.c", line 5339: invalid type combination
"numbers.c", line 5339: incomplete _Imaginary type specifier
"numbers.c", line 5343: identifier redeclared: scm_make_rectangular
current : function(pointer to struct scm_unused_struct {}, double
imaginary) returning pointer to struct scm_unused_struct {}
previous: function(pointer to struct scm_unused_struct {}, pointer
to struct scm_unused_struct {}) returning pointer to struct
scm_unused_struct {} : "../libguile/numbers.h", line 249
"numbers.c", line 5343: formal parameter lacks name: param #2
"numbers.c", line 5345: syntax error before or at: _Imaginary
"numbers.c", line 5347: cannot recover from previous errors
cc: acomp failed for numbers.c
I was puzzled at what the compiler was upset about until I preprocessed
the file and examined it.
/usr/include/complex.h on Solaris has these defines near the top:
/*
* Compilation environments for Solaris must provide the _Imaginary
* datatype
* and the compiler intrinsics _Complex_I and _Imaginary_I
*/
#define _Complex_I _Complex_I
#define complex _Complex
#define _Imaginary_I _Imaginary_I
#define imaginary _Imaginary
#undef I
#define I _Imaginary_I
It looks like the "#define imaginary _Imaginary" is being triggered by
this:
SCM_DEFINE (scm_make_rectangular, "make-rectangular", 2, 0, 0,
(SCM real, SCM imaginary),
"Return a complex number constructed of the given @var{real} and\n"
"@var{imaginary} parts.")
in numbers.c.
The following patch avoids the problem:
--- guile-1.8.4.orig/libguile/numbers.c 2008-02-12 05:24:46.000000000 -0600
+++ guile-1.8.4/libguile/numbers.c 2008-02-19 22:04:21.511969000 -0600
@@ -5336,13 +5336,13 @@
}
SCM_DEFINE (scm_make_rectangular, "make-rectangular", 2, 0, 0,
- (SCM real, SCM imaginary),
- "Return a complex number constructed of the given @var{real} and\n"
- "@var{imaginary} parts.")
+ (SCM real_part, SCM imaginary_part),
+ "Return a complex number constructed of the given @var{real_part}
and\n"
+ "@var{imaginary_part} parts.")
#define FUNC_NAME s_scm_make_rectangular
{
struct dpair xy;
- scm_two_doubles (real, imaginary, FUNC_NAME, &xy);
+ scm_two_doubles (real_part, imaginary_part, FUNC_NAME, &xy);
return scm_c_make_rectangular (xy.x, xy.y);
}
#undef FUNC_NAME
With that patch in place, the rest of the compile proceeds, and "gmake
check" reports:
Totals for this test run:
passes: 11878
failures: 1
unexpected passes: 0
expected failures: 25
unresolved test cases: 9
untested test cases: 0
unsupported test cases: 11
errors: 0
FAIL: check-guile
The FAIL seems to be:
FAIL: time.test: strftime: C99 %z format: EST+5
Tim
--
Tim Mooney address@hidden
Information Technology Services (701) 231-1076 (Voice)
Room 242-J6, IACC Building (701) 231-8541 (Fax)
North Dakota State University, Fargo, ND 58105-5164
- [patch] guile 1.8.4 build problem on x86_64-sun-solaris2.10,
Tim Mooney <=