Giter Club home page Giter Club logo

Comments (5)

MheniMerz avatar MheniMerz commented on June 8, 2024

add the path to libramcloud.so to the LD_LIBRARY_PATH environment variable

  • add this line to your .bashrc file export LD_LIBRARY_PATH=/home/antd/RAMCloud/obj.master in my case that's where the file libramcloud.so is located
  • then execute the same command to avoid rebooting the system export LD_LIBRARY_PATH=/home/antd/RAMCloud/obj.master
  • you can now run sudo ./gradlew run -Plocator=basic+udp:host=localhost,port=11100
    • Plocator here is the service locator for the coordinator and not a path to a file

from ramcloud.

synapsics-sergiu avatar synapsics-sergiu commented on June 8, 2024

This is not working for me unfortunately.
The path to my libramcloud.so is /home/ramdb/RAMCloud/obj.master/libramcloud.so

Did all the steps described above by you. Here is the output of LD_LIBRARY_PATH:

ramdb@ramdb:~/RAMCloud/obj.master$ echo $LD_LIBRARY_PATH
/home/ramdb/RAMCloud/obj.master

Here is the output while trying to run the client.

ramdb@ramdb:~/RAMCloud/bindings/java$ sudo ./gradlew run -Plocator=basic+udp:host=ramdb,port=11100
:compileJava UP-TO-DATE
:processResources UP-TO-DATE
:classes UP-TO-DATE
:javah UP-TO-DATE
:compileMainSharedLibraryMainCpp UP-TO-DATE
:linkMainSharedLibrary UP-TO-DATE
:mainSharedLibrary UP-TO-DATE
:copyLibs UP-TO-DATE
:jar UP-TO-DATE
:startScripts UP-TO-DATE
:installDist UP-TO-DATE
:make UP-TO-DATE
:run
Exception in thread "main" java.lang.UnsatisfiedLinkError: /tmp/libramcloud_java6503341304544372223.so: libramcloud.so: cannot open shared object file: No such file or directory
	at java.lang.ClassLoader$NativeLibrary.load(Native Method)
	at java.lang.ClassLoader.loadLibrary1(ClassLoader.java:1965)
	at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1890)
	at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1851)
	at java.lang.Runtime.load0(Runtime.java:795)
	at java.lang.System.load(System.java:1062)
	at cz.adamh.utils.NativeUtils.loadLibraryFromJar(NativeUtils.java:116)
	at edu.stanford.ramcloud.Util.loadLibrary(Util.java:47)
	at edu.stanford.ramcloud.TestClient.<clinit>(TestClient.java:32)
:run FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':run'.
> Process 'command '/usr/lib/jvm/java-7-oracle/bin/java'' finished with non-zero exit value 1

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

Any other suggestions would be much appreciated.

from ramcloud.

jdellithorpe avatar jdellithorpe commented on June 8, 2024

Hi @centrys-sergiu

sudo doesn't preserve your environment variables (in particular, LD_LIBRARY_PATH). Can you run this without using sudo? I don't think sudo should be necessary to run this.

Best,
Jonathan

from ramcloud.

synapsics-sergiu avatar synapsics-sergiu commented on June 8, 2024

You are right! However in order to run the client without sudo, I had to remove all the folders that were generated at build with sudo.

Thanks

from ramcloud.

jdellithorpe avatar jdellithorpe commented on June 8, 2024

Awesome. As far as I know, btw, building shouldn’t require sudo. You may want to consider building without it to avoid this problem.

from ramcloud.

Related Issues (19)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.