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

Fails to build on musl #152

Closed
JustSoup312 opened this issue Nov 28, 2024 · 2 comments
Closed

Fails to build on musl #152

JustSoup312 opened this issue Nov 28, 2024 · 2 comments

Comments

@JustSoup312
Copy link

It seems that there are a few glibc-specific libc calls implemented.

Log

  = note: /usr/lib/gcc/x86_64-alpine-linux-musl/14.2.0/../../../../x86_64-alpine-linux-musl/bin/ld: /home/user/Devel/nsncd/target/release/deps/nsncd-e51f93b659ebb890.nsncd.19fcab8b709a5c22-cgu.00.rcgu.o: in function `nsncd::handlers::InNetGroup::lookup':
          nsncd.19fcab8b709a5c22-cgu.00:(.text._ZN5nsncd8handlers10InNetGroup6lookup17hc987e22b53938113E+0x339): undefined reference to `innetgr'
          /usr/lib/gcc/x86_64-alpine-linux-musl/14.2.0/../../../../x86_64-alpine-linux-musl/bin/ld: /home/user/Devel/nsncd/target/release/deps/nsncd-e51f93b659ebb890.nsncd.19fcab8b709a5c22-cgu.00.rcgu.o: in function `nsncd::handlers::NetgroupWithName::lookup':
          nsncd.19fcab8b709a5c22-cgu.00:(.text._ZN5nsncd8handlers16NetgroupWithName6lookup17h08c7c930071b306aE+0x165): undefined reference to `setnetgrent'
          /usr/lib/gcc/x86_64-alpine-linux-musl/14.2.0/../../../../x86_64-alpine-linux-musl/bin/ld: nsncd.19fcab8b709a5c22-cgu.00:(.text._ZN5nsncd8handlers16NetgroupWithName6lookup17h08c7c930071b306aE+0x21e): undefined reference to `getnetgrent_r'
          /usr/lib/gcc/x86_64-alpine-linux-musl/14.2.0/../../../../x86_64-alpine-linux-musl/bin/ld: nsncd.19fcab8b709a5c22-cgu.00:(.text._ZN5nsncd8handlers16NetgroupWithName6lookup17h08c7c930071b306aE+0x67f): undefined reference to `endnetgrent'
          collect2: error: ld returned 1 exit status
@geofft
Copy link
Collaborator

geofft commented Nov 28, 2024

Hm. As discussed in #70, because musl doesn't implement a loadable NSS mechanism, it's not clear there's a use case for using nsncd on a musl system - you'll just get the same behavior as the in-process musl would have run. Because musl implements an NSCD protocol client, it's meaningful to use a musl-linked binary against a glibc-linked nsncd. (#70 was ultimately resolved for the use case of building against a glibc that had its own internal NSCD support configured out.)

I think we could arrange to do something to skip the netgroup functions, but can you expand on your use case for building this on musl?

Alternatively, should musl implement the netgroup functions? They're not in POSIX but they're in Solaris and the BSDs in addition to glibc. Even if they were implemented as never returning anything, that would fix the build on musl.

@JustSoup312
Copy link
Author

Ah, the person who pointed me to this repo misunderstood the purpose of the software. If there would be no change on musl then I don't see a reason to push for supporting it. Thank you for your response though!

@JustSoup312 JustSoup312 closed this as not planned Won't fix, can't repro, duplicate, stale Nov 30, 2024
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