Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dms binary can't be executed in NixOS. #118

Closed
2brownc opened this issue May 6, 2023 · 6 comments
Closed

dms binary can't be executed in NixOS. #118

2brownc opened this issue May 6, 2023 · 6 comments

Comments

@2brownc
Copy link

2brownc commented May 6, 2023

I am trying to get dms running in NixOS (unstable) but to no avail.

I have downloaded the release "dms_1.5.0_linux_amd64.tar.gz" and tried to start the executble dms as such:

$ ./dms -friendlyName DMS_Server -path '/mnt/ORION/DLNA/'
bash: ./dms: cannot execute: required file not found

Yes, I made it "executable" with chmod +x dms.

What is this required file?! Do I need to install extra packages?

$ file dms
dms: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, Go BuildID=70qL_eAn53mMwlAiYXFJ/uSbAOCS3y8LgpulCu9Od/01pppLdzHPARYF31H8DL/qHKpYw6yYFPD6bU1DmE2, stripped
$ ldd dms
	linux-vdso.so.1 (0x00007ffe07b9d000)
	libpthread.so.0 => /nix/store/0z5kcds7b6qmm373s3b5w9ykvqbgw87i-glibc-2.37-8/lib/libpthread.so.0 (0x00007fd494705000)
	libc.so.6 => /nix/store/0z5kcds7b6qmm373s3b5w9ykvqbgw87i-glibc-2.37-8/lib/libc.so.6 (0x00007fd49451f000)
	/lib64/ld-linux-x86-64.so.2 => /nix/store/0z5kcds7b6qmm373s3b5w9ykvqbgw87i-glibc-2.37-8/lib64/ld-linux-x86-64.so.2 (0x00007fd49470c000)
@anacrolix
Copy link
Owner

I'm not sure, I would assume a mismatch with your environment, and what the release executable was built against (glibc, CPU arch etc.). Given that you are using Nix you're probably a lot more familiar with this than I am, I would have started with ldd as well. It does look like the vdso file in the ldd output is missing tho?

@2brownc
Copy link
Author

2brownc commented May 6, 2023

It's likely the environment but not the architecture.

$ uname -a
Linux nixos 6.1.27 #1-NixOS SMP PREEMPT_DYNAMIC Sun Apr 30 23:26:28 UTC 2023 x86_64 GNU/Linux

I built from the source and it's working now.

$ nix-shell -p libcap go gcc

$ go install github.com/anacrolix/dms@latest

$ ~/go/bin/dms -friendlyName DMS_Server -path '/mnt/ORION/DLNA/'
2023-05-06T17:49:33+0530 NIL [main main.mainErr:157]: allowed ip nets are ["0.0.0.0/0" "::/0"]
2023-05-06T17:49:33+0530 NIL [main main.mainErr:158]: serving folder "/mnt/ORION/DLNA"
2023-05-06T17:49:33+0530 NIL [main.(*fFprobeCache).load:269]: added 0 items from cache
2023-05-06T17:49:33+0530 NIL [main dms server github.com/anacrolix/dms/dlna/dms.(*Server).Init:918]: HTTP srv on [::]:1338
^C2023-05-06T17:52:25+0530 NIL [main.(*fFprobeCache).save:298]: saved cache with 0 items

Thanks.

@2brownc 2brownc closed this as completed May 6, 2023
@anacrolix
Copy link
Owner

Well that's excellent, thanks. Are you able to make a Nix recipe or something to make this available to other Nix users?

@2brownc
Copy link
Author

2brownc commented May 7, 2023

If someone doesn't already in the meantime I am planning to submit dms to the official repos. But unfortunately I don't have a time frame.

I only started with NixOS a few days ago. So I am still figuring it out.

@anacrolix
Copy link
Owner

No worries, let me know if you end up contributing something to Nix so I can link to it and credit you for the effort!

@2brownc
Copy link
Author

2brownc commented May 9, 2023

I will let you know for sure!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants