Mantis - guile_dev
Viewing Issue Advanced Details
5069 major always 2013-04-21 15:07 2013-04-23 10:22
yann  
 
normal  
closed  
won't fix  
none    
none  
0005069: Compilation issue with guile and solaris studio
Hi,

I am currently running into a compilation issue when trying to re-package mailutils with guile support.

I've got the following error message at the configure step:

"/opt/csw/include/guile/2.0/libguile/gc.h", line 279: warning: implicit function declaration: scm_remember_upto_here_1
"/opt/csw/include/guile/2.0/libguile/gc.h", line 320: identifier redeclared: scm_remember_upto_here_1
         current : function(pointer to struct scm_unused_struct {char scm_unused_field}) returning void
         previous: function() returning int : "/opt/csw/include/guile/2.0/libguile/gc.h", line 279

This prevents me from enabling guile support.


Having a look at the source, it seems that when GNU GCC is not used, scm_remember_upto_here_1 is used before being defined hence the error.

Can you have a look at this issue ?

Thanks in advance,

Yann






c file icon test_guile.c [^] (7,212 bytes) 2013-04-21 15:10
Issue History
2013-04-21 15:07 yann New Issue
2013-04-21 15:10 yann File Added: test_guile.c
2013-04-21 15:12 yann Note Added: 0010351
2013-04-21 15:39 pfelecan Note Added: 0010352
2013-04-21 17:37 yann Note Added: 0010353
2013-04-21 18:44 pfelecan Note Added: 0010354
2013-04-21 18:47 yann Note Added: 0010355
2013-04-23 10:22 pfelecan Note Added: 0010357
2013-04-23 10:22 pfelecan Status new => closed
2013-04-23 10:22 pfelecan Resolution open => won't fix

Notes
(0010351)
yann   
2013-04-21 15:12   
I attached the program used by configure to test for guile:
https://www.opencsw.org/mantis/file_download.php?file_id=61&type=bug [^]

The command line used to compile it is:
/opt/SUNWspro/bin/cc -o conftest -xO3 -m32 -xarch=pentium_pro -xchip=pentium_pro -xc99=all -I/opt/csw/include/guile/2.0 -I/opt/csw/include -I../lib -I../../lib -D_XPG6 -features=extensions -D__FUNCTION__=__func__ -I/opt/csw/include -m32 -xarch=pentium_pro -xchip=pentium_pro -D_XPG6 -L/opt/csw/lib conftest.c -lsocket -lnsl -lcrypt -lresolv -lpthread -L/opt/csw/lib -lguile-2.0 -lgc
(0010352)
pfelecan   
2013-04-21 15:39   
Guile was built using gcc. I'm not really caring for other compilers. As what you report is quite strange I'll investigate next week. In the mean time, why don't you give a try to a gcc based build for mailutils? It's a FSF project anyway.
(0010353)
yann   
2013-04-21 17:37   
I already tried and ran into other errors.

As I found a workaround for the guile problem, I am still trying to compile it with solaris studio as I've nearly have a working package.
(0010354)
pfelecan   
2013-04-21 18:44   
Did you find a workaround for the issue that you described? If that is the case please describe it.
(0010355)
yann   
2013-04-21 18:47   
The workaround is temporary ugly one.
I just define scm_remember_upto_here_before including the guile header.

extern void scm_remember_upto_here_1();


It seems the compiler will stop if a prototype is redefined with a different return type but not different arguments (it will just be a warning in that case).
(0010357)
pfelecan   
2013-04-23 10:22   
There is an easy although ugly work-around. See the attached notes.