{"action":"created","issue":{"url":"https://api.github.com/repos/jedisct1/libsodium/issues/355","repository_url":"https://api.github.com/repos/jedisct1/libsodium","labels_url":"https://api.github.com/repos/jedisct1/libsodium/issues/355/labels{/name}","comments_url":"https://api.github.com/repos/jedisct1/libsodium/issues/355/comments","events_url":"https://api.github.com/repos/jedisct1/libsodium/issues/355/events","html_url":"https://github.com/jedisct1/libsodium/issues/355","id":131667678,"number":355,"title":"Build failure when using the gold linker","user":{"login":"hawkowl","id":3307100,"avatar_url":"https://avatars.githubusercontent.com/u/3307100?v=3","gravatar_id":"","url":"https://api.github.com/users/hawkowl","html_url":"https://github.com/hawkowl","followers_url":"https://api.github.com/users/hawkowl/followers","following_url":"https://api.github.com/users/hawkowl/following{/other_user}","gists_url":"https://api.github.com/users/hawkowl/gists{/gist_id}","starred_url":"https://api.github.com/users/hawkowl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hawkowl/subscriptions","organizations_url":"https://api.github.com/users/hawkowl/orgs","repos_url":"https://api.github.com/users/hawkowl/repos","events_url":"https://api.github.com/users/hawkowl/events{/privacy}","received_events_url":"https://api.github.com/users/hawkowl/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-02-05T15:11:01Z","updated_at":"2016-02-05T15:48:29Z","closed_at":null,"body":"(cross-posted from https://github.com/pyca/pynacl/issues/176, which uses libsodium)\r\n\r\nHi, one of the binaries I build at work uses the gold linker, and it seems to cause a failure in compiling the libsodium part of pynacl.\r\n\r\nTo reproduce: build with `env CFLAGS=\"-fuse-ld=gold -flto\"` or similar. To reproduce using pynacl:\r\n\r\n```\r\npython -m virtualenv test\r\nenv CFLAGS=\"-fuse-ld=gold -flto\" test/bin/pip install --no-binary pynacl pynacl\r\n```\r\n\r\nResult:\r\n\r\n```\r\n[127.0.0.1] out:     make[2]: Entering directory `/tmp/pip-build-2VDruN/pynacl/build/temp.linux-x86_64-2.7/test/default'\r\n[127.0.0.1] out:     make  aead_aes256gcm aead_chacha20poly1305 auth auth2 auth3 auth5 auth6 auth7 box box2 box7 box8 box_easy box_easy2 box_seal box_seed chacha20 core1 core2 core3 core4 core5 core6 ed25519_convert generichash generichas\r\nh2 generichash3 hash hash3 onetimeauth onetimeauth2 onetimeauth7 pwhash pwhash_scrypt_ll randombytes scalarmult scalarmult2 scalarmult5 scalarmult6 scalarmult7 secretbox secretbox2 secretbox7 secretbox8 secretbox_easy secretbox_easy2 shor\r\nthash sign sodium_core sodium_utils sodium_version stream stream2 stream3 stream4 verify1 sodium_utils2 sodium_utils3\r\n[127.0.0.1] out:     make[3]: Entering directory `/tmp/pip-build-2VDruN/pynacl/build/temp.linux-x86_64-2.7/test/default'\r\n[127.0.0.1] out:       CC       aead_aes256gcm.o\r\n[127.0.0.1] out:       CCLD     aead_aes256gcm\r\n[127.0.0.1] out:     /usr/lib/gcc/x86_64-linux-gnu/4.8/include/tmmintrin.h: In function 'blake2b_compress_sse41':\r\n[127.0.0.1] out:     /usr/lib/gcc/x86_64-linux-gnu/4.8/include/tmmintrin.h:136:45: error: '__builtin_ia32_pshufb128' needs isa option -m32 -mssse3\r\n[127.0.0.1] out:        return (__m128i) __builtin_ia32_pshufb128 ((__v16qi)__X, (__v16qi)__Y);\r\n[127.0.0.1] out:                                                  ^\r\n[127.0.0.1] out:     /usr/lib/gcc/x86_64-linux-gnu/4.8/include/tmmintrin.h:136:45: error: '__builtin_ia32_pshufb128' needs isa option -m32 -mssse3\r\n[127.0.0.1] out:        return (__m128i) __builtin_ia32_pshufb128 ((__v16qi)__X, (__v16qi)__Y);\r\n[127.0.0.1] out:                                                  ^\r\n[127.0.0.1] out:     /usr/lib/gcc/x86_64-linux-gnu/4.8/include/tmmintrin.h:136:45: error: '__builtin_ia32_pshufb128' needs isa option -m32 -mssse3\r\n[127.0.0.1] out:        return (__m128i) __builtin_ia32_pshufb128 ((__v16qi)__X, (__v16qi)__Y);\r\n[127.0.0.1] out:                                                  ^\r\n[127.0.0.1] out:     /usr/lib/gcc/x86_64-linux-gnu/4.8/include/tmmintrin.h:136:45: error: '__builtin_ia32_pshufb128' needs isa option -m32 -mssse3\r\n[127.0.0.1] out:        return (__m128i) __builtin_ia32_pshufb128 ((__v16qi)__X, (__v16qi)__Y);\r\n\r\n... continues for a bit ...\r\n\r\n[127.0.0.1] out:     /usr/lib/gcc/x86_64-linux-gnu/4.8/include/tmmintrin.h:185:3: error: '__builtin_ia32_palignr128' needs isa option -m32 -mssse3\r\n[127.0.0.1] out:        return (__m128i) __builtin_ia32_palignr128 ((__v2di)__X,\r\n[127.0.0.1] out:        ^\r\n[127.0.0.1] out:     lto-wrapper: gcc returned 1 exit status\r\n[127.0.0.1] out:     /usr/bin/ld.gold: fatal error: lto-wrapper failed\r\n[127.0.0.1] out:     collect2: error: ld returned 1 exit status\r\n[127.0.0.1] out:     make[3]: *** [aead_aes256gcm] Error 1\r\n```\r\n\r\nSome system versions, if that helps:\r\n\r\n```\r\n$ uname -a\r\nLinux brummer2 3.19.0-42-generic #48~14.04.1-Ubuntu SMP Fri Dec 18 10:24:49 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux\r\n$ gold --version\r\nGNU gold (GNU Binutils for Ubuntu 2.24) 1.11\r\nCopyright 2013 Free Software Foundation, Inc.\r\nThis program is free software; you may redistribute it under the terms of\r\nthe GNU General Public License version 3 or (at your option) a later version.\r\nThis program has absolutely no warranty.\r\n$ gcc --version\r\ngcc (Ubuntu 4.8.4-2ubuntu1~14.04) 4.8.4\r\nCopyright (C) 2013 Free Software Foundation, Inc.\r\nThis is free software; see the source for copying conditions.  There is NO\r\nwarranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\r\n```"},"comment":{"url":"https://api.github.com/repos/jedisct1/libsodium/issues/comments/180410876","html_url":"https://github.com/jedisct1/libsodium/issues/355#issuecomment-180410876","issue_url":"https://api.github.com/repos/jedisct1/libsodium/issues/355","id":180410876,"user":{"login":"hawkowl","id":3307100,"avatar_url":"https://avatars.githubusercontent.com/u/3307100?v=3","gravatar_id":"","url":"https://api.github.com/users/hawkowl","html_url":"https://github.com/hawkowl","followers_url":"https://api.github.com/users/hawkowl/followers","following_url":"https://api.github.com/users/hawkowl/following{/other_user}","gists_url":"https://api.github.com/users/hawkowl/gists{/gist_id}","starred_url":"https://api.github.com/users/hawkowl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hawkowl/subscriptions","organizations_url":"https://api.github.com/users/hawkowl/orgs","repos_url":"https://api.github.com/users/hawkowl/repos","events_url":"https://api.github.com/users/hawkowl/events{/privacy}","received_events_url":"https://api.github.com/users/hawkowl/received_events","type":"User","site_admin":false},"created_at":"2016-02-05T15:48:29Z","updated_at":"2016-02-05T15:48:29Z","body":"(I also added the suggested env variables and the failure still occurs)"}}