logo       

Re: Spread 4 Solaris build failures: msg#00008

network.spread.user

Subject: Re: Spread 4 Solaris build failures

After a bit more reading it appears that using extern inline
functions has a bunch of cases that different compilers handle
differently. Specifically GCC does it differnt from most C99 compilers
(see references below).

I'll fix this up, either by giving up on inlining these functions,
removing the 'extern', or by making the variables they reference global
rather then file static.

For the -rt case, do you happen to have a configure test that will check
for this? If so I'll include it. If not I'll write one when I get a chance.

Jonathan

References:

GCC broken with c99 inline
http://gcc.gnu.org/c99status.html

Long post going over inline/extern inline status for gcc, sun C, and
others:
http://www.mail-archive.com/bug-gnulib@xxxxxxx/msg04321.html


On Fri, Dec 01, 2006 at 08:48:22AM -0800, Alec H. Peterson wrote:
> Using the Sun compiler, I get this error:
>
> cc -g -I. -I. -I../include -I../stdutil/src -I../stdutil/src -
> DHAVE_CONFIG_H -c memory.c
> "memory.c", line 139: reference to static identifier
> "Mem_Bytes_Allocated" in extern inline function
> "memory.c", line 143: reference to static identifier "Mem_Obj_Inuse"
> in extern inline function
> "memory.c", line 147: reference to static identifier
> "Mem_Obj_Allocated" in extern inline function
> "memory.c", line 151: reference to static identifier "Mem_Max_Bytes"
> in extern inline function
> "memory.c", line 155: reference to static identifier
> "Mem_Max_Obj_Inuse" in extern inline function
> "memory.c", line 159: reference to static identifier
> "Mem_Max_Objects" in extern inline function
> "memory.c", line 163: reference to static identifier "Mem" in extern
> inline function
> "memory.c", line 169: reference to static identifier "Mem" in extern
> inline function
> "memory.c", line 173: reference to static identifier "Mem" in extern
> inline function
> "memory.c", line 178: reference to static identifier "Mem" in extern
> inline function
> "memory.c", line 182: reference to static identifier "Mem" in extern
> inline function
> "memory.c", line 186: reference to static identifier "Mem" in extern
> inline function
> "memory.c", line 190: reference to static identifier "Mem" in extern
> inline function
> cc: acomp failed for memory.c
> gmake[1]: *** [memory.o] Error 2
>
> Using gcc, it works, but I get this link error on spread:
>
> Undefined first referenced
> symbol in file
> nanosleep ../stdutil/lib/libstdutil-
> threaded-release.a(stdtime.to)
> ld: fatal: Symbol referencing errors. No output written to spread
>
> On Solaris you need to link with -lrt to get nanosleep.
>
> Alec
>
>
> _______________________________________________
> Spread-users mailing list
> Spread-users@xxxxxxxxxxxxxxxx
> http://lists.spread.org/mailman/listinfo/spread-users

--
-------------------------------------------------------
Jonathan R. Stanton jonathan@xxxxxxxxxx
Dept. of Computer Science
Johns Hopkins University
-------------------------------------------------------


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise