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

gpg build fails on mac os x #60313

Closed
ssnnoo opened this issue Apr 27, 2019 · 12 comments · Fixed by #62836
Closed

gpg build fails on mac os x #60313

ssnnoo opened this issue Apr 27, 2019 · 12 comments · Fixed by #62836
Labels
6.topic: darwin Running or building packages on Darwin

Comments

@ssnnoo
Copy link

ssnnoo commented Apr 27, 2019

Issue description

build of gpgme-1.13.0 fails on macosx

.
.
.

echo x > ./gpg-sample.stamp
GNUPGHOME=/private/var/folders/md/87dsz37906dfbk6j6jkp_gg00000gn/T/nix-build-gpgme-1.13.0.drv-0/gpgme-1.13.0/tests/gpg LC_ALL=C GPG_AGENT_INFO= top_srcdir=../.. gpg --batch --no-permission-warning \
               --import ./pubdemo.asc
gpg: keybox '/private/var/folders/md/87dsz37906dfbk6j6jkp_gg00000gn/T/nix-build-gpgme-1.13.0.drv-0/gpgme-1.13.0/tests/gpg/pubring.kbx' created
gpg: /private/var/folders/md/87dsz37906dfbk6j6jkp_gg00000gn/T/nix-build-gpgme-1.13.0.drv-0/gpgme-1.13.0/tests/gpg/trustdb.gpg: trustdb created
gpg: key 2D727CC768697734: public key "Alfa Test (demo key) <alfa@example.net>" imported
gpg: can't connect to the agent: File name too long
gpg: key FE180B1DA9E3B0B2: public key "Bob (demo key)" imported
gpg: can't connect to the agent: File name too long
gpg: key 413F4AF31AFDAB6C: public key "Charlie Test (demo key) <charlie@example.net>" imported
gpg: can't connect to the agent: File name too long
gpg: key EBA9F240EB9DC9E6: public key "Delta Test (demo key) <delta@example.net>" imported
gpg: can't connect to the agent: File name too long
gpg: key 318C1FAEFAEF6D1B: public key "Echelon (demo key)" imported
gpg: can't connect to the agent: File name too long
gpg: key D4BF57F37372E243: public key "Foxtrot Test (demo key) <foxtrot@example.net>" imported
gpg: can't connect to the agent: File name too long
gpg: key 168410A48FC282E6: public key "Golf Test (demo key) <golf@example.net>" imported
gpg: can't connect to the agent: File name too long
gpg: key 13DB965534C6E3F1: public key "Hotel Test (demo key) <hotel@example.net>" imported
gpg: can't connect to the agent: File name too long
gpg: key 1FE8FC6F04259677: public key "India Test (demo key) <india@example.net>" imported
gpg: can't connect to the agent: File name too long
gpg: key 0C820C71D2699313: public key "Juliet Test (demo key) <juliet@example.net>" imported
gpg: can't connect to the agent: File name too long
gpg: key AD1B0FAD43C2D0C7: public key "Kilo Test (demo key) <kilo@example.net>" imported
gpg: can't connect to the agent: File name too long
gpg: key 37CAB51FB79103F8: public key "Lima Test (demo key) <lima@example.net>" imported
gpg: can't connect to the agent: File name too long
gpg: key BE794852BE5CF886: public key "Mallory (demo key)" imported
gpg: can't connect to the agent: File name too long
gpg: key 25B00FD430CEC684: public key "November Test (demo key) <november@example.net>" imported
gpg: can't connect to the agent: File name too long
gpg: key 5F6356BA6D9732AC: public key "Oscar Test (demo key) <oscar@example.net>" imported
gpg: can't connect to the agent: File name too long
gpg: key 5D15E01D3FF13206: public key "Papa test (demo key) <papa@example.net>" imported
gpg: can't connect to the agent: File name too long
gpg: key 1C67EC133C661C84: public key "Quebec Test (demo key) <quebec@example.net>" imported
gpg: can't connect to the agent: File name too long
gpg: key 3BDBEDB1777FBED3: public key "Romeo Test (demo key) <romeo@example.net>" imported
gpg: can't connect to the agent: File name too long
gpg: key A5E67F7FA3AE3EA1: public key "Sierra Test (demo key) <sierra@example.net>" imported
gpg: can't connect to the agent: File name too long
gpg: key 58CB9A4C85A81F38: public key "Tango Test (demo key) <tango@example.net>" imported
gpg: can't connect to the agent: File name too long
gpg: key A94C0F75653244D6: public key "Uniform Test (demo key) <uniform@example.net>" imported
gpg: can't connect to the agent: File name too long
gpg: key 47AF4B6961F04784: public key "Victor Test (demo key) <victor@example.org>" imported
gpg: can't connect to the agent: File name too long
gpg: key DEF0F7B8EC67DBDE: public key "Whisky Test (demo key) <whisky@example.net>" imported
gpg: can't connect to the agent: File name too long
gpg: key 8979A6C5567FB34A: public key "XRay Test (demo key) <xray@example.net>" imported
gpg: can't connect to the agent: File name too long
gpg: key 9EEF34CD4B11B25F: public key "Yankee Test (demo key) <yankee@example.net>" imported
gpg: can't connect to the agent: File name too long
gpg: key 6BC4778054ACD246: public key "Zulu Test (demo key) <zulu@example.net>" imported
gpg: can't connect to the agent: File name too long
gpg: Total number processed: 26
gpg:               imported: 26
make[2]: *** [Makefile:1123: pubring-stamp] Error 2
make[2]: Leaving directory '/private/var/folders/md/87dsz37906dfbk6j6jkp_gg00000gn/T/nix-build-gpgme-1.13.0.drv-0/gpgme-1.13.0/tests/gpg'
make[1]: *** [Makefile:720: all-recursive] Error 1
make[1]: Leaving directory '/private/var/folders/md/87dsz37906dfbk6j6jkp_gg00000gn/T/nix-build-gpgme-1.13.0.drv-0/gpgme-1.13.0/tests'
make: *** [Makefile:534: all-recursive] Error 1
builder for '/nix/store/mfhjkmflnhmajqwkbsf5f2prq6dwqzaf-gpgme-1.13.0.drv' failed with exit code 2
error: build of '/nix/store/mfhjkmflnhmajqwkbsf5f2prq6dwqzaf-gpgme-1.13.0.drv' failed

Steps to reproduce

nix-env -i gpgme

Technical details

Please run nix-shell -p nix-info --run "nix-info -m" and paste the
results.

nix-shell -p nix-info --run "nix-info -m"
these paths will be fetched (1.46 MiB download, 7.87 MiB unpacked):
  /nix/store/171bpg1afkf7viip3hp7h6z0qqcfx5wc-bash-interactive-4.4-p23-info
  /nix/store/2lg8zwayyvp9jmxgsv0pvg1rawk7xz34-bash-interactive-4.4-p23-dev
  /nix/store/5l3a9dl7fcgc0pj7xhsr5zviwlbc8bms-DarwinTools-1
  /nix/store/m1rhwwjbsw6z6w2k0fz0cg7jkhfd4nay-nix-info
  /nix/store/nz4nis3iyybzfcba7slbn50fgjbb23qx-bash-interactive-4.4-p23-doc
  /nix/store/p9swdwn1g807hwga8l5krdvyysdsdh91-readline-7.0p5
  /nix/store/r5f6lzwsi2jvq0015xk5c118iw2m2ipc-bash-interactive-4.4-p23-man
  /nix/store/rx77x01pv20r616z39m74wyjnym74gpr-bash-interactive-4.4-p23
copying path '/nix/store/nz4nis3iyybzfcba7slbn50fgjbb23qx-bash-interactive-4.4-p23-doc' from 'https://cache.nixos.org'...
copying path '/nix/store/5l3a9dl7fcgc0pj7xhsr5zviwlbc8bms-DarwinTools-1' from 'https://cache.nixos.org'...
copying path '/nix/store/171bpg1afkf7viip3hp7h6z0qqcfx5wc-bash-interactive-4.4-p23-info' from 'https://cache.nixos.org'...
copying path '/nix/store/r5f6lzwsi2jvq0015xk5c118iw2m2ipc-bash-interactive-4.4-p23-man' from 'https://cache.nixos.org'...
copying path '/nix/store/m1rhwwjbsw6z6w2k0fz0cg7jkhfd4nay-nix-info' from 'https://cache.nixos.org'...
copying path '/nix/store/p9swdwn1g807hwga8l5krdvyysdsdh91-readline-7.0p5' from 'https://cache.nixos.org'...
copying path '/nix/store/rx77x01pv20r616z39m74wyjnym74gpr-bash-interactive-4.4-p23' from 'https://cache.nixos.org'...
copying path '/nix/store/2lg8zwayyvp9jmxgsv0pvg1rawk7xz34-bash-interactive-4.4-p23-dev' from 'https://cache.nixos.org'...
 - system: `"x86_64-darwin"`
 - host os: `Darwin 18.5.0, macOS 10.14.4`
 - multi-user?: `no`
 - sandbox: `no`
 - version: `nix-env (Nix) 2.2.2`
 - channels(sim): `"nixpkgs-19.09pre177248.ed1b59a98e7"`
 - nixpkgs: `/Users/xxx/.nix-defexpr/channels/nixpkgs`
@veprbl veprbl added the 6.topic: darwin Running or building packages on Darwin label Apr 28, 2019
@veprbl
Copy link
Member

veprbl commented Apr 28, 2019

I can reproduce this on ed1b59a, but it builds fine on current master 0aac84e

@marsam
Copy link
Contributor

marsam commented May 1, 2019

Closing since seems to be fixed after fd2bd6e, but feel free to reopen if you continue having issues

@marsam marsam closed this as completed May 1, 2019
@mjhoy
Copy link
Contributor

mjhoy commented Jun 6, 2019

i am seeing this again on 61f0936

@mjhoy
Copy link
Contributor

mjhoy commented Jun 7, 2019

bisecting suggests it started with 7790868 or 5c7ce21 (in the latter commit, indent fails to build, rather than getting the File name too long error, though)

@yazgoo
Copy link

yazgoo commented Jun 7, 2019

Same here (seeing this again)

$ nix-shell -p nix-info --run "nix-info -m"
 - system: `"x86_64-darwin"`
 - host os: `Darwin 18.2.0, macOS 10.14.3`
 - multi-user?: `no`
 - sandbox: `no`
 - version: `nix-env (Nix) 2.2.2`
 - channels(<redacted>): `"nixpkgs-19.09pre181045.61f0936d1cd"`
 - nixpkgs: `/Users/<redacted>/.nix-defexpr/channels/nixpkgs`

@veprbl veprbl reopened this Jun 7, 2019
@veprbl
Copy link
Member

veprbl commented Jun 7, 2019

It seems like this is caused by a of unix socket path length limit (which is just 104 on darwin). A workaround that works for me is to build it with a different TMPDIR:

TMPDIR=/tmp nix-build . -A gpgme

@veprbl
Copy link
Member

veprbl commented Jun 7, 2019

Related to NixOS/nix#1085

@yazgoo
Copy link

yazgoo commented Jun 7, 2019

Thanks for the workaround @veprbl
using it, gpgme install gets stuck at

...
Encrypt A 18
Encrypt A 19
PASS: t-thread1
PASS: t-thread-keylist

@veprbl
Copy link
Member

veprbl commented Jun 7, 2019

@yazgoo I had the same problem. I think this might be an unrelated issue. It did build successfully on the second attempt for me.

@veprbl
Copy link
Member

veprbl commented Jun 7, 2019

It would be nice if somebody could investigate how to disable just the problematic tests instead of completely turning them off with doCheck = !stdenv.isDarwin.

@mjhoy
Copy link
Contributor

mjhoy commented Jun 7, 2019

Turning off the tests didn’t work for me, it seemed to fail on the build step

@marsam
Copy link
Contributor

marsam commented Jun 7, 2019

we could add a patch to disable these tests on darwin: https://github.com/gpg/gpgme/blob/f9c923bb2d87711235312e8085964372d7480ce4/tests/gpg/Makefile.am#L35

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
6.topic: darwin Running or building packages on Darwin
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants