On 29.08.2016 03:38, Andrew Wilkins wrote:
I've been looking into doing this too, for llgo (Go compiler frontend for LLVM).

Nice! :-)

You need libc6-dev also. After including that, I was then met with another
issue: libc.so is a linker script, and that uses absolute paths to point at the
real libraries. I haven't solved that yet. If it's possible to override files in
a staged package, you could just provide a replacement linker script.

Yea, including libc6-dev gets me to the point where attempting to build a program fails with:

    cannot find /usr/lib/x86_64-linux-gnu/libpthread_nonshared.a

... which I presume is down to the linker script expecting the absolute paths you describe.

I already edit some stuff after the stage -- my current process is to type `snapcraft stage`, and after that completes, editing files in the `stage/` directory, followed by `snapcraft snap` to finish it up.

So, in principle it should be possible to edit the stuff in stage/usr/lib/x86_64-linux-gnu to change the paths. (I guess it'll need to be more than just libc.so though; I'd guess libm.so and libpthread.so will also need to be tweaked.)

It's a bit late at night for me to start work on it now and I probably won't have time tomorrow, but I'll give it a go some time this week. If you get to it before me and it works for you, let me know!

Thanks & best wishes,

    -- Joe

--
Snapcraft mailing list
Snapcraft@lists.snapcraft.io
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/snapcraft

Reply via email to