[racket] SunOS-5.10-amd64: Issue with lseek64 etc. functions in xform'ed source

From: Tim Brown (tim.brown at cityc.co.uk)
Date: Thu May 31 08:50:10 EDT 2012

Matthew Flatt wrote:
> It looks like C pre-processing might be sensitive to the build mode.
> Does it help to put "-m64" in CPPFLAGS instead of CFLAGS?

Spot on!

../configure \
   --prefix=/usr2/local/racket-master/SunOS-5.10-amd64 \
   CPPFLAGS=-m64 \
   LDFLAGS=-m64 \

Make plain-install-both works! (I've not done a full install yet, getting
the basics going for now).

One thing to note:

the src/racket/racketcgc (and 3m?) shell scripts used during the build
neatly wrap LD_LIBRARY_PATH to include the .libs directory within the

However, when I build with LD_LIBRARY_PATH_64 set (which it is in my
user environment), the .libs directory is not set into LD_LIBRARY_PATH_64
(because there is no script to do so). ld.so.1 sees that we're running a
64-bit executable, and uses the ..._64 environment variables if they are

So to do a "make", or a "make ...install"; I need to
"unset LD_LIBRARY_PATH_64". I suspect this is a general issue with
any system that uses ld.so / ld.so.1, e.g. SunOS and Linux. I guess it
would also be a problem on a 32 bit build where LD_LIBRARY_PATH_32 is set.

I've not seen any reports of this being a problem on the mailing list.
Should it be handled though?


Tim Brown <tim.brown at cityc.co.uk>  | City Computing Limited            |
T: +44 20 8770 2110                | City House, Sutton Park Road      |
F: +44 20 8770 2130                | Sutton, Surrey, SM1 2AE, GB       |
BEAUTY:  What's in your eye when you have a bee in your hand           |
City Computing Limited registered in London No. 1767817.
Registered Office: City House, Sutton Park Road, Sutton, Surrey, SM1 2AE
VAT number 372 8290 34.

Posted on the users mailing list.