incubator-mesos-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From " (Commented) (JIRA)" <>
Subject [jira] [Commented] (MESOS-127) configure JAVA_LDFLAGS detection doesn't set rpath on Linux
Date Mon, 23 Jan 2012 00:40:41 GMT

] commented on MESOS-127:

This is an automatically generated e-mail. To reply, visit:

(Updated 2012-01-23 00:39:05.097745)

Review request for mesos.


Since -R is a libtool option but not a gcc option, it doesn't work for linking the python
egg. Computed a separate PYTHON_JAVA_LDFLAGS to handle that difference.


On Linux, I've needed to build with -Wl,-rpath to nicely link against -ljvm. We should do
something like this automatically.

This patch (on Linux only) uses -Wl,-ljvm instead of -ljvm to link -ljvm so libtool doesn't
add it to dependency_libs [*]. Besides hopefully being unnecessary, it fails to link things
linked against that libtool library because libtool doesn't add the rpath for the java libraries
(even if I specify it with -R). This also requires that the flags be added on
and uses the assumption that is linked dynamically.

[*] Things added to dependency_libs are automatically linked into any executables linking
against the library; this would be fine (and would make sense if our header files might contain
inline functions that call JNI_* calls) if the -R settings were properly passed through, but
libtool does not appear to do this.

This addresses bug MESOS-127.

Diffs (updated)
----- bda6769 
  src/ b8fc58e 





> configure JAVA_LDFLAGS detection doesn't set rpath on Linux
> -----------------------------------------------------------
>                 Key: MESOS-127
>                 URL:
>             Project: Mesos
>          Issue Type: Bug
>          Components: build
>         Environment: Linux (only some JVM versions or distros?) 
>            Reporter: Charles Reiss
>            Assignee: Charles Reiss
>            Priority: Minor
> On Linux, it is usually necessary to use something like -rpath to link against a library
like the that is typically off the default library search path. Our current build
scripts don't set this; if one doesn't set LDFLAGS to include -Wl,-rpath or similar, this
can result in errors like:
> /scratch/charles/mesos2/build-linux/src/.libs/lt-mesos-tests: error while loading shared
libraries: cannot open shared object file: No such file or directory

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:!default.jspa
For more information on JIRA, see:


View raw message