* [bug #21378] guile 1.8.3 numbers.c fails to compile in Solaris 9
@ 2007-10-20 21:29 David Halik
2007-10-21 13:25 ` Ludovic Courtès
0 siblings, 1 reply; 8+ messages in thread
From: David Halik @ 2007-10-20 21:29 UTC (permalink / raw)
To: David Halik, bug-guile
URL:
<http://savannah.gnu.org/bugs/?21378>
Summary: guile 1.8.3 numbers.c fails to compile in Solaris 9
Project: Guile
Submitted by: dhalik
Submitted on: Saturday 10/20/2007 at 21:29
Category: None
Severity: 3 - Normal
Item Group: None
Status: None
Privacy: Public
Assigned to: None
Open/Closed: Open
Discussion Lock: Any
_______________________________________________________
Details:
Hello,
I'm posting this to bug-guile@gnu.org as well since I'm not sure where the
proper place is. When compiling guile 1.8.3 in Solaris 9 with Sun Studio I'm
receiving this fatal error:
source='numbers.c' object='libguile_la-numbers.lo' libtool=yes \
DEPDIR=.deps depmode=none /bin/bash ../build-aux/depcomp \
/bin/bash ../libtool --tag=CC --mode=compile cc -DHAVE_CONFIG_H -I.
-I.. -I.. -I.. -I/usr/local/include -I/usr/local/include/gmp32 -D_REENTRANT
-g -c -o libguile_la-numbers.lo `test -f 'numbers.c' || echo './'`numbers.c
cc -DHAVE_CONFIG_H -I. -I.. -I.. -I.. -I/usr/local/include
-I/usr/local/include/gmp32 -D_REENTRANT -g -c numbers.c -KPIC -DPIC -o
.libs/libguile_la-numbers.o
"numbers.c", line 190: reference to static identifier "scm_double_cell" in
extern inline function
"numbers.c", line 199: reference to static identifier "scm_double_cell" in
extern inline function
"numbers.c", line 208: reference to static identifier "scm_double_cell" in
extern inline function
"numbers.c", line 217: reference to static identifier "scm_double_cell" in
extern inline function
"numbers.c", line 238: reference to static identifier "scm_double_cell" in
extern inline function
cc: acomp failed for numbers.c
Any help would be appreciated.
Thanks!
-Dave
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?21378>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
_______________________________________________
Bug-guile mailing list
Bug-guile@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-guile
^ permalink raw reply [flat|nested] 8+ messages in thread
* [bug #21378] guile 1.8.3 numbers.c fails to compile in Solaris 9
2007-10-20 21:29 [bug #21378] guile 1.8.3 numbers.c fails to compile in Solaris 9 David Halik
@ 2007-10-21 13:25 ` Ludovic Courtès
2007-10-21 16:38 ` David Halik
0 siblings, 1 reply; 8+ messages in thread
From: Ludovic Courtès @ 2007-10-21 13:25 UTC (permalink / raw)
To: Ludovic Courtès, David Halik, bug-guile
Follow-up Comment #1, bug #21378 (project guile):
Hello,
Can you please send us the output of "grep inline config.log"?
Also, do you know whether Sun Studio's CC supports the `inline' keyword (or
`__inline__' or similar), with the same semantics as in C99 and GNU C? Is a
special compiler flag needed to obtain it?
Besides, note that compiling on Solaris with GCC should work.
Thanks,
Ludovic.
PS: Comments entered in the bug tracker are automatically forwarded to
`bug-guile@gnu.org'.
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?21378>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
_______________________________________________
Bug-guile mailing list
Bug-guile@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-guile
^ permalink raw reply [flat|nested] 8+ messages in thread
* [bug #21378] guile 1.8.3 numbers.c fails to compile in Solaris 9
2007-10-21 13:25 ` Ludovic Courtès
@ 2007-10-21 16:38 ` David Halik
2008-02-04 13:40 ` Ludovic Courtès
0 siblings, 1 reply; 8+ messages in thread
From: David Halik @ 2007-10-21 16:38 UTC (permalink / raw)
To: Ludovic Courtès, David Halik, bug-guile
Follow-up Comment #2, bug #21378 (project guile):
Ah, I see what you're getting at. I've actually run into this before.
"inline" is the correct keyword in suncc, but it is much more strict C99 than
gcc, which is usually the case with Sun Studio. You might want to check out
this post, it explains the different uses of inline related to Sun, C99, GNU,
etc, and their incompatibilities with examples. This isn't my best subject,
but it looks like your question can be answered there.
http://www.mail-archive.com/bug-gnulib@gnu.org/msg04321.html
As far as your configure, it looks like it finds inline ok, Suncc is just not
happy with its usage.
configure:21606: checking for inline
configure:21656: result: inline
ac_cv_c_inline=inline
SCM_I_GSC_C_INLINE='"inline"'
We try to use Suncc whenever possible to avoid gcc lib dependencies across
our platforms and because Suncc ferrets out Sun problems more often, but it is
always possible of course. ;) Thanks for the clarification about the
bugtracker by the way.
-Dave
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?21378>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
_______________________________________________
Bug-guile mailing list
Bug-guile@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-guile
^ permalink raw reply [flat|nested] 8+ messages in thread
* [bug #21378] guile 1.8.3 numbers.c fails to compile in Solaris 9
2007-10-21 16:38 ` David Halik
@ 2008-02-04 13:40 ` Ludovic Courtès
2008-02-06 13:52 ` Ludovic Courtès
0 siblings, 1 reply; 8+ messages in thread
From: Ludovic Courtès @ 2008-02-04 13:40 UTC (permalink / raw)
To: Ludovic Courtès, David Halik, bug-guile
Update of bug #21378 (project guile):
Assigned to: None => civodul
_______________________________________________________
Follow-up Comment #3:
Sorry for taking soooo long to handle this.
It appears that the main issue here is that all these functions are declared
`extern' in "numbers.h", and then defined "inline" in `numbers.c'.
From my understanding of the standard (summarized in Bruno Haible's message
that you cited), this isn't correct: the function should have been either
declared "extern inline", in which case its definition should appear in every
translation unit, or the function is just declared "extern", in which case it
cannot be defined "inline".
So I suggest removing the "inline" keyword for all these definitions. It
appears that this does not affect the code generated by GCC -O2, as evidenced
by "objdump -d numbers.o", since all calls to these functions within
`numbers.c' *are* inlined (calls from outside are not inlined, which is
normal).
Please, try out the attached patch and let me know if it works with Sun CC.
Thanks!
Ludovic.
(file #14954)
_______________________________________________________
Additional Item Attachment:
File name: ,,numbers-inline.diff Size:1 KB
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?21378>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
^ permalink raw reply [flat|nested] 8+ messages in thread
* [bug #21378] guile 1.8.3 numbers.c fails to compile in Solaris 9
2008-02-04 13:40 ` Ludovic Courtès
@ 2008-02-06 13:52 ` Ludovic Courtès
2008-02-06 13:56 ` David Halik
0 siblings, 1 reply; 8+ messages in thread
From: Ludovic Courtès @ 2008-02-06 13:52 UTC (permalink / raw)
To: Ludovic Courtès, David Halik, bug-guile
Update of bug #21378 (project guile):
Open/Closed: Open => Closed
_______________________________________________________
Follow-up Comment #4:
I committed the proposed change to both branches, so it will be in 1.8.4.
Thanks,
Ludovic.
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?21378>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
^ permalink raw reply [flat|nested] 8+ messages in thread
* [bug #21378] guile 1.8.3 numbers.c fails to compile in Solaris 9
2008-02-06 13:52 ` Ludovic Courtès
@ 2008-02-06 13:56 ` David Halik
2008-02-06 16:23 ` David Diffenbaugh
0 siblings, 1 reply; 8+ messages in thread
From: David Halik @ 2008-02-06 13:56 UTC (permalink / raw)
To: Ludovic Courtès, David Halik, bug-guile
Follow-up Comment #5, bug #21378 (project guile):
Hey, I'm waiting on a full response from my tester, but it looks like there
was another file that needed the change that isn't in your patch. The fix
works, but I think he had to add it one more time. I'll ask him to post his
results today.
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?21378>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
^ permalink raw reply [flat|nested] 8+ messages in thread
* [bug #21378] guile 1.8.3 numbers.c fails to compile in Solaris 9
2008-02-06 13:56 ` David Halik
@ 2008-02-06 16:23 ` David Diffenbaugh
2008-02-07 9:32 ` Ludovic Courtès
0 siblings, 1 reply; 8+ messages in thread
From: David Diffenbaugh @ 2008-02-06 16:23 UTC (permalink / raw)
To: Ludovic Courtès, David Halik, David Diffenbaugh, bug-guile
Follow-up Comment #6, bug #21378 (project guile):
The patch allowed numbers.c to be compiled without a problem, however it
looks like the same issue occurs in libguile/strings.c
"strings.c", line 132: reference to static identifier "scm_double_cell" in
extern inline function
This compiles by replacing
SCM_C_INLINE_KEYWORD SCM with only SCM on line 127
The only other problem I encountered was with the file read.c Sun CC doesn't
have the predefined macro __FUNCTION__. I believe __FUNCTION__ should return
the undecorated name of the enclosing function (as a string). Since it only
occurs twice in the file I just replaced it with the name of the enclosing
function which allowed the compile to complete. Appears to run fine after
installation.
I have your original changes plus the two mentioned above attached in the
file below.
Thanks,
Dave D.
(file #14971)
_______________________________________________________
Additional Item Attachment:
File name: guile.inline-2.patch Size:2 KB
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?21378>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
^ permalink raw reply [flat|nested] 8+ messages in thread
* [bug #21378] guile 1.8.3 numbers.c fails to compile in Solaris 9
2008-02-06 16:23 ` David Diffenbaugh
@ 2008-02-07 9:32 ` Ludovic Courtès
0 siblings, 0 replies; 8+ messages in thread
From: Ludovic Courtès @ 2008-02-07 9:32 UTC (permalink / raw)
To: Ludovic Courtès, David Halik, David Diffenbaugh, bug-guile
Follow-up Comment #7, bug #21378 (project guile):
Hi David,
Thanks a lot for the patch, which is now installed. Hopefully 1.8.4 will
compile out-of-the-box with Sun Studio.
Ludovic.
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?21378>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2008-02-07 9:32 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-10-20 21:29 [bug #21378] guile 1.8.3 numbers.c fails to compile in Solaris 9 David Halik
2007-10-21 13:25 ` Ludovic Courtès
2007-10-21 16:38 ` David Halik
2008-02-04 13:40 ` Ludovic Courtès
2008-02-06 13:52 ` Ludovic Courtès
2008-02-06 13:56 ` David Halik
2008-02-06 16:23 ` David Diffenbaugh
2008-02-07 9:32 ` Ludovic Courtès
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).