Giter Site home page Giter Site logo

Comments (6)

JakeStanger avatar JakeStanger commented on July 22, 2024 1

There's certainly no harm in setting up another action to produce a musl build, it sounds pretty easy to do so I'm on board.

Their action file has a step for producing a Debian file. That'd possibly be very useful to have if nothing else to help with #68.

from dura.

tkellogg avatar tkellogg commented on July 22, 2024

I don't know much about building Rust yet. I noticed this was a potential problem earlier when you had that error about glibc.

from dura.

JakeStanger avatar JakeStanger commented on July 22, 2024

I've been exclusively working on it & building it on Linux (Arch) so I know it does work. I've not had to do anything except cargo build.

You should definitely avoid static linking these days, especially when it comes to NixOS and it's weird filesystem structure. It doesn't really serve any benefit and often results in having to patch code to get it to build on different platforms. Also with Nix you'll more than likely need a derivation to build it locally and ensure everything is there at build-time.

From your ldd it just looks like the package is missing a couple of deps. libssl and libcrypto should both be provided by openssl, and libz from zlib.

Here's mine for comparison:

λ ldd target/debug/dura 
	linux-vdso.so.1 (0x00007ffc2b76d000)
	libgit2.so.1.3 => /usr/lib/libgit2.so.1.3 (0x00007f039df03000)
	libssl.so.1.1 => /usr/lib/libssl.so.1.1 (0x00007f039de71000)
	libcrypto.so.1.1 => /usr/lib/libcrypto.so.1.1 (0x00007f039db90000)
	libgcc_s.so.1 => /usr/lib/libgcc_s.so.1 (0x00007f039db75000)
	libpthread.so.0 => /usr/lib/libpthread.so.0 (0x00007f039db54000)
	libm.so.6 => /usr/lib/libm.so.6 (0x00007f039da10000)
	libdl.so.2 => /usr/lib/libdl.so.2 (0x00007f039da07000)
	libc.so.6 => /usr/lib/libc.so.6 (0x00007f039d83b000)
	/lib64/ld-linux-x86-64.so.2 => /usr/lib64/ld-linux-x86-64.so.2 (0x00007f039e90f000)
	libpcre.so.1 => /usr/lib/libpcre.so.1 (0x00007f039d7c4000)
	libhttp_parser.so.2.9 => /usr/lib/libhttp_parser.so.2.9 (0x00007f039d7b8000)
	libz.so.1 => /usr/lib/libz.so.1 (0x00007f039d79e000)
	libssh2.so.1 => /usr/lib/libssh2.so.1 (0x00007f039d75d000)

from dura.

drupol avatar drupol commented on July 22, 2024

I know all of this, but I wasn't complaining for my specific use case, there might be some other people having the same issue.

In order to foster a greater adoption, I would suggest to provide also a build based on musl, just like fd is doing.

Ideally, we should provide the same amount of versions as this package.

PS: Hence the fact that I'm not reacting to "NixOS and it's weird filesystem structure.", the idea here is to make sure that the shipped software works for every available Linux, with a statically compiled version or not.

from dura.

JakeStanger avatar JakeStanger commented on July 22, 2024

PS: Hence the fact that I'm not reacting to "NixOS and it's weird filesystem structure.", the idea here is to make sure that the shipped software works for every available Linux, with a statically compiled version or not.

Oh I'm not suggesting we don't support NixOS or anything like that, I'm just noting it's different.

I don't think static binaries solve any problems, and by the looks of it aren't supported by Rust anyway:
https://doc.rust-lang.org/reference/linkage.html

What we should do is update the readme with a list of non-cargo build/runtime deps, and just ensure any distro packages correctly depend on these.

from dura.

drupol avatar drupol commented on July 22, 2024

I think we could just solve this by providing a musl version, don't you think?

Or we could "adapt" their Github action file to our needs?

from dura.

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.