Opened 20 years ago

Closed 17 years ago

#137 closed Bugs (Out of Date)

build bjam fails on SGI; here is fix

Reported by: nobody Owned by: Ralf W. Grosse-Kunstleve
Milestone: Component: None
Version: None Severity:
Keywords: Cc:

Description

On SGI w/ Irix 6.5.13 w/ MipsPro CC 7.3.1, the build of
bjam fails on file tools/build/jam_src/newstr.c line 79
(the line that has offsetof): on SGI, this is a macro
that has two definitions; the default is to use a macro
def that requires the data member to be a compile time
const, so compile stops at that file. The fix consisted
in adding the two following lines just under the
#include <stddef.h>:

#undef offsetof
#define offsetof(s, m)  (size_t)(&(((s *)0)->m))

to override the default define of offsetof with the
second definition copied there verbatim. With this fix,
the rest of the build succeeded, but for bjam and for
building the boost libraries per se.  I have no idea
how solid the above offsetof implementation is. 

Best,
Oliver

Change History (4)

comment:1 by david_abrahams, 19 years ago

Logged In: YES 
user_id=52572

Ralf, can you discern whether a workaround is still needed 
here?

Thanks!

comment:2 by Ralf W. Grosse-Kunstleve, 19 years ago

Logged In: YES 
user_id=71407

> Ralf, can you discern whether a workaround is still needed 
here?

Is this what I am supposed to try?

cd boost/tools/build/jam_src
./build.sh mipspro

Using the latest CVS snapshot it works without a problem on my 
machine. My compiler (installed about two years ago!):

cc -version
MIPSpro Compilers: Version 7.3.1.2m

To the original poster (?): Could you please send us the output of 
cc -version on your platform?

Please also try this (all in one line):

alias whatdefcc 'echo '"'"'main(){printf("hello world");}'"'"' 
> /var/tmp/tmp$$.c; cc -E -v \!* /var/tmp/tmp$$.c; rm -
f /var/tmp/tmp$$.c'

Please send us the output of running this command.

Ralf

comment:3 by Ralf W. Grosse-Kunstleve, 17 years ago

Logged In: YES 
user_id=71407

I mark the bug as out of date just to be conservative. The
last time I tried, which is about a year ago, bjam worked
fine under IRIX. If there is still a problem a new, detailed
report should be filed.

comment:4 by Ralf W. Grosse-Kunstleve, 17 years ago

Status: assignedclosed
Note: See TracTickets for help on using tickets.