Open goodwillcoding opened 8 years ago
I built a test class to load mesos
Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/lib/libmesos-0.23.0.so: /usr/lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.18' not found (required by /usr/lib/libmesos-0.23.0.so)
Which is strange since
ldd /usr/lib/libmesos-0.23.0.so | grep std
libstdc++.so.6 => /usr/lib/mesos/libstdc++.so.6 (0x00007f25dcfb6000
So putting LD_PRELOAD=/usr/lib/mesos/libstdc++.so.6 before running it starts it all up. Still not sure why mesos is looking at the system libstdc++
Also this seems to be relevant: https://stackoverflow.com/questions/13952189/how-to-get-rid-of-ld-preload-when-using-jni
If a statically linked library is used, it sounds like it should be preloaded
I am still not sure if this is a mesos problem or a chronos packaging issue
bump! anyone?
It looks like your /usr/lib/mesos/libstdc++.so.6
is not in the searched library path from Java (which claims to be /usr/local/lib:/usr/lib64:/usr/lib
, maybe that is a problem?
bump ... anyone?
@stevenschlansker ... yeah I tried adding that path to -D and it makes no difference
-Djava.libary.path that is
@goodwillcoding it looks like a chronos packaging issue to me. Ubuntu 12.04 is pretty old, have you tried on 14.04?
To give some background, Mesos 0.23+ only compiles with GCC 4.8+. To still support Ubuntu 12.04 LTS in Mesos 0.23 we compile it with a recent version of gcc, set LD_RUN_PATH=/usr/lib/mesos during linking and ship the libstdc++ compiler runtime library with the Ubuntu 12.04 mesos deb package.
The commit that is responsible for that in mesos-deb-packaging is: https://github.com/mesosphere/mesos-deb-packaging/commit/1185171304b2555270a25f1a682abade83b195b9
And in our build job you'll find a
cp -f /usr/lib/gcc/x86_64-linux-gnu/4.8/libstdc++.so /usr/lib/mesos/libstdc++.so.6
./build_mesos --repo {{repo}} --nominal-version {{version}} --extra-libs /usr/lib/mesos/libstdc++.so.6 --build-version {{build_version}}.{{distro_tag}}
Now the bad news is I'm not quite sure yet why when used via JNI it doesn't correctly resolve the library. As you already found out yourself ldd correctly prints the dependency. I will have to ask our Scala/Java devs to debug this issue further.
@pyronicide on Ubuntu 14.04 the problem doesn't exist because there we have native GCC 4.8+ support. It's 12.04 specific and I would expect to also see it in Marathon. I'll update here once I find out more.
@lloesche ... that was my conclusion as well ... so glad I was not way off
@lloesche thank you for looking at this
libmesos.so is accounted for in the path /usr/lib
Tried setting MESOS_NATIVE_JAVA_LIBRARY to no avail.
Also tried running with java directly, same problem
The server is a Ubuntu 12.04 amd64, fresh box
Correction, Java version:
OpenJDK 64-Bit Server VM (build 23.25-b01, mixed mo