tags:

views:

43

answers:

1

I'm compiling parallel C code on a cluster (HECToR).

Although I won't be running any parallel jobs interactively, my code contains some references to X11 functions which are used when it's run sequentially. The cluster I'm using doesn't support shared libraries, which rules out X11, at least in the way I've been using it so far.

Could you advise me on whether there's anything I can do to compile X11 statically?

Thanks in advance for your help.

Ross

+2  A: 

There's nothing magic about X11 here - if you don't have libX11.a and other static libraries on your system, you'll need to either find packages for your OS that provide those, or build whichever set of X11 libraries you need from source with the --enable-static flag passed to the configure script.

If you do have libX11.a, then see your compiler's documentation for it's flag to link with static libraries.

(Really though, anything in 2010 that doesn't support shared libraries is just plain wrong. They should enter the 1980's already.)

alanc
Thanks. After some questioning of the sysadmins, it seems that there is a version of X11 on there, so I just needed to work that into the makefiles.
rossmcf