[parsec-users] Building statically linked executables

Christian Bienia cbienia at CS.Princeton.EDU
Thu Oct 15 23:03:01 EDT 2009


Building programs with complex library dependencies statically is a pain.
Static linking isn't properly supported anymore on current systems.
Moreover, current versions of glibc dynamically load parts of itself at
runtime with libdl, even if everything has been built statically. If that
happens you can get very strange errors and random crashes if the glibc
versions don't match up because of incompatible data structures.

The PARSEC binaries I offer on the website link all libraries statically
except glibc. I had to recompile gcc with --disable-shared to force a
runtime that will be statically linked by programs. That is really as fast
as you can go nowadays. You can try to create fully static binaries, but
those won't work on all system. You might get lucky though...


-----Original Message-----
From: parsec-users-bounces at lists.cs.princeton.edu
[mailto:parsec-users-bounces at lists.cs.princeton.edu] On Behalf Of Vivek Rane
Sent: Thursday, October 15, 2009 9:11 PM
To: 'PARSEC Users'
Subject: [parsec-users] Building statically linked executables

Due to a requirement in our simulator, I'm trying to statically link  
the parsec benchmarks. I added a -static flag to LDFLAGS in  
gcc.bldconf and gcc-pthreads.bldconf (I'm building with -c  
gcc-pthreads). It worked with blackscholes, but I'm unable to coerce  
bodytrack into building statically. What might I be missing? Any  
pointers would be very helpful.


parsec-users mailing list
parsec-users at lists.cs.princeton.edu

More information about the parsec-users mailing list