Coder Social home page Coder Social logo

Workaround for when PatchELF fails? about patchelf HOT 4 OPEN

nixos avatar nixos commented on June 1, 2024
Workaround for when PatchELF fails?

from patchelf.

Comments (4)

darealshinji avatar darealshinji commented on June 1, 2024

It should be possible to run a binary directly with /nix/store/<...>/ld-linux-x86-64.so.2 /nix/store/<...>/<program>. You might have to overwrite the LD_LIBRARY_PATH variable too.

from patchelf.

chris-martin avatar chris-martin commented on June 1, 2024

When I run nix/store/.../ld-linux-x86-64.so.2 ./otto, it halts immediately with no output.

from patchelf.

chris-martin avatar chris-martin commented on June 1, 2024

In case this is of any help:

> /nix/store/.../ld-linux-x86-64.so.2 --list ./otto
        linux-vdso.so.1 (0x00007ffc9c7c3000)
        libpthread.so.0 => /nix/store/.../libpthread.so.0 (0x00007febb77c9000)
        libc.so.6 => /nix/store/.../libc.so.6 (0x00007febb7429000)
        /lib64/ld-linux-x86-64.so.2 => /nix/store/.../ld-linux-x86-64.so.2 (0x00007febb79e6000)

from patchelf.

phunehehe avatar phunehehe commented on June 1, 2024

Very anecdotal, but what @darealshinji said in #68 (comment) worked for me. I ended up using a wrapper to the effect of exec $(cat $NIX_CC/nix-support/dynamic-linker) $orig $@.

from patchelf.

Related Issues (20)

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.