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

nix-serve errors on macOS Sonoma 14.5 #57

Open
djgoku opened this issue Jun 29, 2024 · 6 comments
Open

nix-serve errors on macOS Sonoma 14.5 #57

djgoku opened this issue Jun 29, 2024 · 6 comments

Comments

@djgoku
Copy link

djgoku commented Jun 29, 2024

macOS Sonoma 14.5, M2

Not sure what other information will be useful for this issue.

% nix-serve -p 8888
2024/06/28-19:03:07 Starman::Server (type Net::Server::PreFork) starting! pid(77176)
Resolved [*]:8888 to [0.0.0.0]:8888, IPv4
Host [*] resolved to IPv6 address [::] but IO::Socket::INET6->new fails: Can't locate object method "new" via package "IO::Socket::INET6" at /nix/store/skj2xk0zkkrh0z6b8yg590a4gv31fqdb-perl5.38.2-Net-Server-2.014/lib/perl5/site_perl/5.38.2/Net/Server/Proto.pm line 139.
Binding to TCP port 8888 on host 0.0.0.0 with IPv4
Setting gid to "20 20 20 12 61 79 80 81 98 33 100 204 250 395 398 399 400 701"
lib/Nix/Store.cc: loadable library and perl binaries are mismatched (got first handshake key 0x10380080, needed 0x10200080)
lib/Nix/Store.cc: loadable library and perl binaries are mismatched (got first handshake key 0x10380080, needed 0x10200080)
lib/Nix/Store.cc: loadable library and perl binaries are mismatched (got first handshake key 0x10380080, needed 0x10200080)
lib/Nix/Store.cc: loadable library and perl binaries are mismatched (got first handshake key 0x10380080, needed 0x10200080)
lib/Nix/Store.cc: loadable library and perl binaries are mismatched (got first handshake key 0x10380080, needed 0x10200080)
<trimmed>
@Mic92
Copy link
Contributor

Mic92 commented Sep 20, 2024

We just upgraded the nix version for nix-serve. Please check nixpkgs master if the problem is still existing.

@djgoku
Copy link
Author

djgoku commented Sep 21, 2024

% nix --version
nix (Nix) 2.24.6

% uname -a
Darwin MacBook-Pro.local 24.0.0 Darwin Kernel Version 24.0.0: Mon Aug 12 20:51:54 PDT 2024; root:xnu-11215.1.10~2/RELEASE_ARM64_T6000 arm64 arm Darwin

% nix run --extra-experimental-features nix-command --extra-experimental-features flakes github:edolstra/nix-serve
lib/Nix/Store.cc: loadable library and perl binaries are mismatched (got first handshake key 0x10380080, needed 0x10200080)

Not sure if this the best way to get the latest nix-serve. Hopefully this is helpful.

@Mic92
Copy link
Contributor

Mic92 commented Sep 21, 2024

So we got /nix/store/w3frs30vl5vcg7hrak5byl3795vj4c1w-perl-5.38.2/lib/perl5/5.38.2/darwin-thread-multi-2level/CORE/libperl.dylib
and /nix/store/w3frs30vl5vcg7hrak5byl3795vj4c1w-perl-5.38.2/lib/perl5/site_perl

I wonder where the override comes from?

% otool -l /nix/store/ryvpg26zhmfxynd9gbjsb3ckddifxqka-nix-perl-2.25.0pre20240910_b9d3cdfb/lib/perl5/site_perl/5.38.2/darwin-thread-multi-2level/auto/Nix/Store/Store.dylib | grep perl
/nix/store/ryvpg26zhmfxynd9gbjsb3ckddifxqka-nix-perl-2.25.0pre20240910_b9d3cdfb/lib/perl5/site_perl/5.38.2/darwin-thread-multi-2level/auto/Nix/Store/Store.dylib:
         name /nix/store/ryvpg26zhmfxynd9gbjsb3ckddifxqka-nix-perl-2.25.0pre20240910_b9d3cdfb/lib/perl5/site_perl/5.38.2/darwin-thread-multi-2level/auto/Nix/Store/Store.dylib (offset 24)
         name /nix/store/w3frs30vl5vcg7hrak5byl3795vj4c1w-perl-5.38.2/lib/perl5/5.38.2/darwin-thread-multi-2level/CORE/libperl.dylib (offset 24)
~/git/nixpkgs home-assistant*
% grep perl5 ./result/bin/nix-serve
PERL5LIB=/nix/store/w3frs30vl5vcg7hrak5byl3795vj4c1w-perl-5.38.2/lib/perl5/site_perl:/nix/store/ryvpg26zhmfxynd9gbjsb3ckddifxqka-nix-perl-2.25.0pre20240910_b9d3cdfb/lib/perl5/site_perl:/nix/store/s5m3z46fbij13j9d3bd34skwmqv7kpz5-perl5.38.2-Plack-1.0050/lib/perl5/site_perl:/nix/store/mhv8f4ssl40mzrwslfwpsdr3xbhf9n77-perl5.38.2-Apache-LogFormat-Compiler-0.36/lib/perl5/site_perl:/nix/store/128csr6x70ibvmf1gnl66rq5ys8cs73g-perl5.38.2-POSIX-strftime-Compiler-0.44/lib/perl5/site_perl:/nix/store/43cmkfmh7aifgqp6n3kabqj8gx5xk7cf-perl5.38.2-Cookie-Baker-0.11/lib/perl5/site_perl:/nix/store/mzsjcq2vbw2z2r2hy5wbrirzsn7brjzq-perl5.38.2-URI-5.21/lib/perl5/site_perl:/nix/store/5kyv4zvmm1bnwja4cy3f95i4ckgx36l2-perl5.38.2-Devel-StackTrace-AsHTML-0.15/lib/perl5/site_perl:/nix/store/cjppcwy3k2002xk7cnd37yrwj4krg78p-perl5.38.2-Devel-StackTrace-2.04/lib/perl5/site_perl:/nix/store/cd2lf99m4gy390kcpdi1vz651rcm9s9q-perl5.38.2-File-ShareDir-1.118/lib/perl5/site_perl:/nix/store/p0llnymjkc6nivrj66w89hpid6mmf98d-perl5.38.2-Class-Inspector-1.36/lib/perl5/site_perl:/nix/store/cd4qx2r4g1cpv5c4kd850wzzzmq4mzdd-perl5.38.2-Filesys-Notify-Simple-0.14/lib/perl5/site_perl:/nix/store/lzf67py00jw1v1q9sd8yagdihlvx52ri-perl5.38.2-HTTP-Entity-Parser-0.25/lib/perl5/site_perl:/nix/store/jmdpwi2l1p5jairjgwhnfh46vsnc0lg1-perl5.38.2-HTTP-MultiPartParser-0.02/lib/perl5/site_perl:/nix/store/7pv0yc5kf95p2lw2hykccaai6hlmvk1p-perl5.38.2-Hash-MultiValue-0.16/lib/perl5/site_perl:/nix/store/wdcb4bsi2znc2fsgpb9n7axbj17sb37m-perl5.38.2-JSON-MaybeXS-1.004005/lib/perl5/site_perl:/nix/store/p6zavw017rxn4ycvwb873jgq235p1093-perl5.38.2-Stream-Buffered-0.03/lib/perl5/site_perl:/nix/store/sqhqgyn0pj24hkkq5vvg8j1k81pij3wb-perl5.38.2-WWW-Form-UrlEncoded-0.26/lib/perl5/site_perl:/nix/store/hlx9bm4qs5854raanhfvzy8zaqpjkf19-perl5.38.2-HTTP-Headers-Fast-0.22/lib/perl5/site_perl:/nix/store/dfz0l967vz24mhky01x492izf4l79gjw-perl5.38.2-HTTP-Date-6.06/lib/perl5/site_perl:/nix/store/3i22fkw5wmb2vgcfqplwb2vz2mx10pfz-perl5.38.2-TimeDate-2.33/lib/perl5/site_perl:/nix/store/wqhzapafqbrpkc8xvmah3jx8rsgxg47r-perl5.38.2-HTTP-Message-6.45/lib/perl5/site_perl:/nix/store/lq7v92934pc6gskvma1hdm0dxxn44g3f-perl5.38.2-Clone-0.46/lib/perl5/site_perl:/nix/store/h1lhxrrb3p72a8khfiqmi58qx8bv7gww-perl5.38.2-Encode-Locale-1.05/lib/perl5/site_perl:/nix/store/kyzzgy8l30ssl3k8z9azij956jwvila4-perl5.38.2-IO-HTML-1.004/lib/perl5/site_perl:/nix/store/4502w9pdwxdz6zw5nzfvaggd9kpbjf21-perl5.38.2-LWP-MediaTypes-6.04/lib/perl5/site_perl:/nix/store/7m9xb05vsajwc0jyy52nxpg73fkhcr62-perl5.38.2-Try-Tiny-0.31/lib/perl5/site_perl:/nix/store/n4g515gkypv96xc0x0wf04ddsdk63rxr-perl5.38.2-Starman-0.4017/lib/perl5/site_perl:/nix/store/82hmaaw66wrzgrfmj7kk97nrmvmbk334-perl5.38.2-Data-Dump-1.25/lib/perl5/site_perl:/nix/store/8ipmdwq4cxv8yb53gaha64zwasdr429g-perl5.38.2-HTTP-Parser-XS-0.17/lib/perl5/site_perl:/nix/store/9x32caqld7i27gdcpvig2k7jp764d8xs-perl5.38.2-Net-Server-2.014/lib/perl5/site_perl:/nix/store/jmcq76r5c4gqb7m8iypz61yr8jr0l927-perl5.38.2-Net-Server-SS-PreFork-0.06pre/lib/perl5/site_perl:/nix/store/2xy9rpbr82zn6j0fl6klzbcnx14vdjli-perl5.38.2-Server-Starter-0.35/lib/perl5/site_perl:/nix/store/5dwryqnika1i81r7b814wp853kwljvw1-perl5.38.2-IO-Socket-INET6-2.73/lib/perl5/site_perl:/nix/store/4j87dqgrq3lfggs2mvjir7jkbllj2hrs-perl5.38.2-Socket6-0.29/lib/perl5/site_perl:/nix/store/5s627ai6giblp039zzd4maqarhln18gf-perl5.38.2-DBD-SQLite-1.74/lib/perl5/site_perl:/nix/store/9k8sdkxnl09b2a6a6sr0hw6i4iqfrrcz-perl5.38.2-DBI-1.644/lib/perl5/site_perl NIX_REMOTE="${NIX_REMOTE:-auto?path-info-cache-size=0}" exec /nix/store/n4g515gkypv96xc0x0wf04ddsdk63rxr-perl5.38.2-Starman-0.4017/bin/starman --preload-app /nix/store/0fvh68xixvkcw712aiz2skx70f7lbf5r-nix-serve-20240920160637/libexec/nix-serve/nix-serve.psgi "$@"

@Mic92
Copy link
Contributor

Mic92 commented Sep 21, 2024

But even when I try to passthru the perl package from nix-perl-bindings it still reports a mismatch.

@Mic92
Copy link
Contributor

Mic92 commented Sep 21, 2024

I think I need to mark this as broken on macOS in the meantime as I don't know C-extensions in perl well enough to tell what is going on. However you can also try one of the other binary caches: nix-serve-ng and harmonia. I have aarch64-darwin in my CI for harmonia: https://buildbot.thalheim.io/#/builders/42/builds/545

@djgoku
Copy link
Author

djgoku commented Sep 22, 2024

Thanks! I’ll check out Harmonia. I might also try installing nix-serve master on a Linux virtual machine.

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