You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'd like compile an X10 program statically linked to x10 runtime libraries in order to distribute it as a stand-alone executable file. As far as I understand, libx10, libx10rt_sockets, libgc are dynamically linked by default but I'd like to link them statically.
I found that the static libraries are created when we build x10 with an environment variable X10_STATIC_LIB as follows.
export X10_STATIC_LIB=1
cd x10/x10.dist
ant -Davailable.procs=8 -Doptimize=true -DNO_CHECKS=true dist
Even though I found .a files are created under x10.dist/*/lib directories, x10c++ tries to use "libgc.so" file, which causes a run-time error like
./hello.out: error while loading shared libraries: libgc.so.1: cannot open shared object file: No such file or directory
I found a tentative workaround of deleting libgc.so to force a static link, but this must not be a canonical way. Please tell me how to link it statically.
The text was updated successfully, but these errors were encountered:
I think we need to add a test for X10_STATIC_LIB being set in x10.runtime/build.xml in the various stanzas of the build-bdwgc rule that don't already pass: <arg value="--disable-shared" /> to the configure command so that if X10_STATIC_LIB is set, then bdwgc is configured to not build libgc.so. If both libgc.a and libgc.so are available, the C++ compiler will prefer to link to the .so version. So we need to prevent libgc.so from being built.
I'd like compile an X10 program statically linked to x10 runtime libraries in order to distribute it as a stand-alone executable file. As far as I understand, libx10, libx10rt_sockets, libgc are dynamically linked by default but I'd like to link them statically.
I found that the static libraries are created when we build x10 with an environment variable
X10_STATIC_LIB
as follows.Even though I found .a files are created under x10.dist/*/lib directories,
x10c++
tries to use "libgc.so" file, which causes a run-time error likeI found a tentative workaround of deleting libgc.so to force a static link, but this must not be a canonical way. Please tell me how to link it statically.
The text was updated successfully, but these errors were encountered: