{"action":"created","issue":{"url":"https://api.github.com/repos/NixOS/nixpkgs/issues/14812","repository_url":"https://api.github.com/repos/NixOS/nixpkgs","labels_url":"https://api.github.com/repos/NixOS/nixpkgs/issues/14812/labels{/name}","comments_url":"https://api.github.com/repos/NixOS/nixpkgs/issues/14812/comments","events_url":"https://api.github.com/repos/NixOS/nixpkgs/issues/14812/events","html_url":"https://github.com/NixOS/nixpkgs/issues/14812","id":149316046,"number":14812,"title":"Cannot build gcc on OSX El Capitan","user":{"login":"codygman","id":225847,"avatar_url":"https://avatars.githubusercontent.com/u/225847?v=3","gravatar_id":"","url":"https://api.github.com/users/codygman","html_url":"https://github.com/codygman","followers_url":"https://api.github.com/users/codygman/followers","following_url":"https://api.github.com/users/codygman/following{/other_user}","gists_url":"https://api.github.com/users/codygman/gists{/gist_id}","starred_url":"https://api.github.com/users/codygman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codygman/subscriptions","organizations_url":"https://api.github.com/users/codygman/orgs","repos_url":"https://api.github.com/users/codygman/repos","events_url":"https://api.github.com/users/codygman/events{/privacy}","received_events_url":"https://api.github.com/users/codygman/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/NixOS/nixpkgs/labels/6.topic:%20darwin","name":"6.topic: darwin","color":"fef2c0"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2016-04-19T01:04:58Z","updated_at":"2016-05-13T20:20:22Z","closed_at":null,"body":"## Issue description\r\n\r\nUsing nix version 1.11.2 OSX 10.11.4 El Capitan with Apple LLVM version 7.0.2 (clang-700.1.81). I have this in my `/etc/nix/nix.conf`:\r\n\r\n```\r\n~ λ cat /etc/nix/nix.conf \r\n# chroot didn't work with 1.10, haven't tried with 1.12 yet\r\nbuild-use-chroot = false\r\n# Anytime a build tries to access a file it’s not allowed to, the file path and culprit will be logged to the system log, which you can view with Console.app. The filter Sandbox: will show you sandbox violations. \r\ndarwin-log-sandbox-violations = true\r\n```\r\n\r\nHere is a full output log of me trying to install gcc5:\r\n\r\n```shell\r\nacbc32a98e5f:tmp cody$ nix-env -iA nixpkgs.gcc5\r\ninstalling ‘gcc-wrapper-5.3.0’\r\nthese derivations will be built:\r\n  /nix/store/w7dshcjfpmpa5cga6cchj4pf320plli2-gcc-5.3.0.drv\r\n  /nix/store/2fg64qvxdw7cf21kkjcjyhnc41fxrg3r-gcc-wrapper-5.3.0.drv\r\nbuilding path(s) ‘/nix/store/7cd2j3h1i47fnxlycm0gkdla8ijz0ds2-gcc-5.3.0-info’, ‘/nix/store/fs1pa2bip048i353bc01k2xqvj9xdjr0-gcc-5.3.0’\r\n$CPATH is `/nix/store/5fvfxwd069sgkr0rrqj032wqs0kms7i5-zlib-1.2.8/include'\r\n$LIBRARY_PATH is `/nix/store/5fvfxwd069sgkr0rrqj032wqs0kms7i5-zlib-1.2.8/lib'\r\nunpacking sources\r\nunpacking source archive /nix/store/5g86gghmv2jzwp5rxqpizwhhnf0y0b5y-gcc-5.3.0.tar.bz2\r\nsource root is gcc-5.3.0\r\nsetting SOURCE_DATE_EPOCH to timestamp 1449235351 of file gcc-5.3.0/MD5SUMS\r\npatching sources\r\napplying patch /nix/store/k4xxs05a0y02m36sv2hdl0vrmzpk77y8-use-source-date-epoch.patch\r\npatching file libcpp/macro.c\r\napplying patch /nix/store/pz03lhak99nzyyni72m14zsjzfjvqvr8-no-sys-dirs.patch\r\npatching file gcc/cppdefault.c\r\npatching file gcc/gcc.c\r\nHunk #1 succeeded at 1261 (offset 99 lines).\r\nfixing the `GLIBC_DYNAMIC_LINKER' and `UCLIBC_DYNAMIC_LINKER' macros...\r\n... SNIP ...\r\nclang-3.7: warning: argument unused during compilation: '-isystem /nix/store/nh9magpclysn06wnqik8amp40qy4mx6f-gettext-0.19.7/include'\r\nclang-3.7: warning: argument unused during compilation: '-isystem /nix/store/zvyqwaqqd7mmpnpqbjxh42xpqb3gi9i0-gmp-5.1.3/include'\r\nclang-3.7: warning: argument unused during compilation: '-isystem /nix/store/295xa0d6shds4x9dk09b4dhqhxj2b9d3-mpfr-3.1.3/include'\r\nclang-3.7: warning: argument unused during compilation: '-isystem /nix/store/qd5hsfrhp39slj6524di1zvqcbv5w4i7-libmpc-1.0.3/include'\r\nclang-3.7: warning: argument unused during compilation: '-isystem /nix/store/lrsk4iy91f9ff9ray6yb4d2n4sc2p62s-libelf-0.8.13/include'\r\nclang-3.7: warning: argument unused during compilation: '-isystem /nix/store/zz8y762f28f23gsza4rk8sdmnj2vipqs-isl-0.14.1/include'\r\nclang-3.7: warning: argument unused during compilation: '-isystem /nix/store/5fvfxwd069sgkr0rrqj032wqs0kms7i5-zlib-1.2.8/include'\r\nclang-3.7: warning: argument unused during compilation: '-isystem /nix/store/93y7bp6x3fa691a96nyvb4kp0fdaa3rl-cctools-binutils-darwin/include'\r\nclang-3.7: warning: argument unused during compilation: '-F/nix/store/y18ng60rsc8zvvdpk8k8z3i8c9nzhbcm-CF-osx-10.9.5/Library/Frameworks'\r\nclang-3.7: warning: argument unused during compilation: '-isystem /nix/store/cbdrpqbhzs9lah33251r7600gzwdz00j-libc++-3.7.1/include'\r\n# Early copyback; see \"all\" above for the rationale.  The\r\n# early copy is necessary so that the gcc -B options find\r\nrm -f libgcc.a\r\n# the right startup files when linking shared libgcc.\r\n/nix/store/m9m9ql2pbdhmbls584k1z571vr1ynfqi-bash-4.3-p42/bin/bash ../../../gcc-5.3.0/libgcc/../mkinstalldirs ../.././gcc\r\nobjects=\"_muldi3.o _negdi2.o _lshrdi3.o _ashldi3.o _ashrdi3.o _cmpdi2.o _ucmpdi2.o _clear_cache.o _trampoline.o __main.o _absvsi2.o _absvdi2.o _addvsi3.o _addvdi3.o _subvsi3.o _subvdi3.o _mulvsi3.o _mulvdi3.o _negvsi2.o _negvdi2.o _ctors.o _ffssi2.o _ffsdi2.o _clz.o _clzsi2.o _clzdi2.o _ctzsi2.o _ctzdi2.o _popcount_tab.o _popcountsi2.o _popcountdi2.o _paritysi2.o _paritydi2.o _powisf2.o _powidf2.o _powixf2.o _powitf2.o _mulsc3.o _muldc3.o _mulxc3.o _multc3.o _divsc3.o _divdc3.o _divxc3.o _divtc3.o _bswapsi2.o _bswapdi2.o _clrsbsi2.o _clrsbdi2.o _eprintf.o __gcc_bcmp.o _fixunssfsi.o _fixunsdfsi.o _fixunsxfsi.o _fixsfdi.o _fixdfdi.o _fixxfdi.o _fixunssfdi.o _fixunsdfdi.o _fixunsxfdi.o _floatdisf.o _floatdidf.o _floatdixf.o _floatundisf.o _floatundidf.o _floatundixf.o _fixsfti.o _fixdfti.o _fixxfti.o _fixtfti.o _fixunssfti.o _fixunsdfti.o _fixunsxfti.o _fixunstfti.o _floattisf.o _floattidf.o _floattixf.o _floattitf.o _floatuntisf.o _floatuntidf.o _floatuntixf.o _floatuntitf.o _divdi3.o _moddi3.o _udivdi3.o _umoddi3.o _udiv_w_sdiv.o _udivmoddi4.o darwin-64.o cpuinfo.o sfp-exceptions.o addtf3.o divtf3.o eqtf2.o getf2.o letf2.o multf3.o negtf2.o subtf3.o unordtf2.o fixtfsi.o fixunstfsi.o floatsitf.o floatunsitf.o fixtfdi.o fixunstfdi.o floatditf.o floatunditf.o fixtfti.o fixunstfti.o floattitf.o floatuntitf.o extendsftf2.o extenddftf2.o extendxftf2.o trunctfsf2.o trunctfdf2.o trunctfxf2.o enable-execute-stack.o\";\t\t\t\t\t\\\r\nif test -z \"$objects\"; then\t\t\t\t\\\r\n  echo 'int __libgcc_eh_dummy;' > eh_dummy.c;\t\t\\\r\n  /private/var/folders/d7/3941r8qj64b5y2h2yw3xnwrxmwd4h7/T/nix-build-gcc-5.3.0.drv-0/build/./gcc/xgcc -B/private/var/folders/d7/3941r8qj64b5y2h2yw3xnwrxmwd4h7/T/nix-build-gcc-5.3.0.drv-0/build/./gcc/ -F/System/Library/Frameworks    -F/System/Library/Frameworks -O2  -F/System/Library/Frameworks -DIN_GCC    -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wno-format -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition  -isystem ./include   -pipe -fno-common -g -DIN_LIBGCC2 -fbuilding-libgcc -fno-stack-protector   -pipe -fno-common -I. -I. -I../.././gcc -I../../../gcc-5.3.0/libgcc -I../../../gcc-5.3.0/libgcc/. -I../../../gcc-5.3.0/libgcc/../gcc -I../../../gcc-5.3.0/libgcc/../include  -DHAVE_CC_TLS -DUSE_EMUTLS -fvisibility=hidden -DHIDE_EXPORTS -c eh_dummy.c\t\t\\\r\n     -o eh_dummy.o;\t\t\t\t\\\r\n  objects=eh_dummy.o;\t\t\t\t\\\r\nfi;\t\t\t\t\t\t\t\\\r\nar  rc libgcc.a $objects\r\nparts=\"crt3.o crttms.o crttme.o crtprec32.o crtprec64.o crtprec80.o crtfastmath.o\";\t\t\t\t\t\\\r\nfor file in $parts; do\t\t\t\t\t\\\r\n  rm -f ../.././gcc/$file;\t\t\\\r\n  /nix/store/k8k36jwwjaqnsikc8li4f3ys5n75x83r-coreutils-8.25/bin/install -c -m 644 $file ../.././gcc/;\t\\\r\n  case $file in \t\t\t\t\t\\\r\n    *.a)\t\t\t\t\t\t\\\r\n      ranlib ../.././gcc/$file ;;\t\\\r\n  esac;\t\t\t\t\t\t\t\\\r\ndone\r\n/nix/store/lq36kfy1njwdr52db69aa742isgw7lr7-cctools-port-877.5/bin/ranlib: file: libgcc.a(_trampoline.o) has no symbols\r\n/nix/store/lq36kfy1njwdr52db69aa742isgw7lr7-cctools-port-877.5/bin/ranlib: file: libgcc.a(_ctors.o) has no symbols\r\n/nix/store/lq36kfy1njwdr52db69aa742isgw7lr7-cctools-port-877.5/bin/ranlib: file: libgcc.a(_floatuntisf.o) has no symbols\r\n/nix/store/lq36kfy1njwdr52db69aa742isgw7lr7-cctools-port-877.5/bin/ranlib: file: libgcc.a(_floatuntidf.o) has no symbols\r\n/nix/store/lq36kfy1njwdr52db69aa742isgw7lr7-cctools-port-877.5/bin/ranlib: file: libgcc.a(_floatuntixf.o) has no symbols\r\n/nix/store/lq36kfy1njwdr52db69aa742isgw7lr7-cctools-port-877.5/bin/ranlib: file: libgcc.a(_floatuntitf.o) has no symbols\r\nranlib libgcc.a\r\nranlib: file: libgcc.a(_trampoline.o) has no symbols\r\nranlib: file: libgcc.a(_ctors.o) has no symbols\r\nranlib: file: libgcc.a(_floatuntisf.o) has no symbols\r\nranlib: file: libgcc.a(_floatuntidf.o) has no symbols\r\nranlib: file: libgcc.a(_floatuntixf.o) has no symbols\r\nranlib: file: libgcc.a(_floatuntitf.o) has no symbols\r\n# @multilib_flags@ is still needed because this may use\r\n# /private/var/folders/d7/3941r8qj64b5y2h2yw3xnwrxmwd4h7/T/nix-build-gcc-5.3.0.drv-0/build/./gcc/xgcc -B/private/var/folders/d7/3941r8qj64b5y2h2yw3xnwrxmwd4h7/T/nix-build-gcc-5.3.0.drv-0/build/./gcc/ -F/System/Library/Frameworks    and -O2  -F/System/Library/Frameworks -DIN_GCC    -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wno-format -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition  -isystem ./include   -pipe -fno-common -g -DIN_LIBGCC2 -fbuilding-libgcc -fno-stack-protector  directly.\r\n# @multilib_dir@ is not really necessary, but sometimes it has\r\n# more uses than just a directory name.\r\n/nix/store/m9m9ql2pbdhmbls584k1z571vr1ynfqi-bash-4.3-p42/bin/bash ../../../gcc-5.3.0/libgcc/../mkinstalldirs .\r\n/private/var/folders/d7/3941r8qj64b5y2h2yw3xnwrxmwd4h7/T/nix-build-gcc-5.3.0.drv-0/build/./gcc/xgcc -B/private/var/folders/d7/3941r8qj64b5y2h2yw3xnwrxmwd4h7/T/nix-build-gcc-5.3.0.drv-0/build/./gcc/ -F/System/Library/Frameworks    -O2  -F/System/Library/Frameworks -DIN_GCC    -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wno-format -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition  -isystem ./include   -pipe -fno-common -g -DIN_LIBGCC2 -fbuilding-libgcc -fno-stack-protector  -dynamiclib -nodefaultlibs -install_name /nix/store/fs1pa2bip048i353bc01k2xqvj9xdjr0-gcc-5.3.0/lib/libgcc_s.1.dylib -single_module -o ./libgcc_s.dylib -Wl,-exported_symbols_list,libgcc.map -compatibility_version 1 -current_version 1.0 -F/System/Library/Frameworks -B./ _muldi3_s.o _negdi2_s.o _lshrdi3_s.o _ashldi3_s.o _ashrdi3_s.o _cmpdi2_s.o _ucmpdi2_s.o _clear_cache_s.o _trampoline_s.o __main_s.o _absvsi2_s.o _absvdi2_s.o _addvsi3_s.o _addvdi3_s.o _subvsi3_s.o _subvdi3_s.o _mulvsi3_s.o _mulvdi3_s.o _negvsi2_s.o _negvdi2_s.o _ctors_s.o _ffssi2_s.o _ffsdi2_s.o _clz_s.o _clzsi2_s.o _clzdi2_s.o _ctzsi2_s.o _ctzdi2_s.o _popcount_tab_s.o _popcountsi2_s.o _popcountdi2_s.o _paritysi2_s.o _paritydi2_s.o _powisf2_s.o _powidf2_s.o _powixf2_s.o _powitf2_s.o _mulsc3_s.o _muldc3_s.o _mulxc3_s.o _multc3_s.o _divsc3_s.o _divdc3_s.o _divxc3_s.o _divtc3_s.o _bswapsi2_s.o _bswapdi2_s.o _clrsbsi2_s.o _clrsbdi2_s.o _fixunssfsi_s.o _fixunsdfsi_s.o _fixunsxfsi_s.o _fixsfdi_s.o _fixdfdi_s.o _fixxfdi_s.o _fixunssfdi_s.o _fixunsdfdi_s.o _fixunsxfdi_s.o _floatdisf_s.o _floatdidf_s.o _floatdixf_s.o _floatundisf_s.o _floatundidf_s.o _floatundixf_s.o _fixsfti_s.o _fixdfti_s.o _fixxfti_s.o _fixtfti_s.o _fixunssfti_s.o _fixunsdfti_s.o _fixunsxfti_s.o _fixunstfti_s.o _floattisf_s.o _floattidf_s.o _floattixf_s.o _floattitf_s.o _floatuntisf_s.o _floatuntidf_s.o _floatuntixf_s.o _floatuntitf_s.o _divdi3_s.o _moddi3_s.o _udivdi3_s.o _umoddi3_s.o _udiv_w_sdiv_s.o _udivmoddi4_s.o darwin-64_s.o cpuinfo_s.o sfp-exceptions_s.o addtf3_s.o divtf3_s.o eqtf2_s.o getf2_s.o letf2_s.o multf3_s.o negtf2_s.o subtf3_s.o unordtf2_s.o fixtfsi_s.o fixunstfsi_s.o floatsitf_s.o floatunsitf_s.o fixtfdi_s.o fixunstfdi_s.o floatditf_s.o floatunditf_s.o fixtfti_s.o fixunstfti_s.o floattitf_s.o floatuntitf_s.o extendsftf2_s.o extenddftf2_s.o extendxftf2_s.o trunctfsf2_s.o trunctfdf2_s.o trunctfxf2_s.o enable-execute-stack_s.o unwind-dw2_s.o unwind-dw2-fde-darwin_s.o unwind-sjlj_s.o unwind-c_s.o emutls_s.o libgcc.a -lc\r\nld: library not found for -lc\r\ncollect2: error: ld returned 1 exit status\r\nMakefile:947: recipe for target 'libgcc_s.dylib' failed\r\nmake[3]: *** [libgcc_s.dylib] Error 1\r\nmake[3]: *** Waiting for unfinished jobs....\r\nmake[3]: Leaving directory '/private/var/folders/d7/3941r8qj64b5y2h2yw3xnwrxmwd4h7/T/nix-build-gcc-5.3.0.drv-0/build/x86_64-apple-darwin15.4.0/libgcc'\r\nMakefile:14829: recipe for target 'all-stage1-target-libgcc' failed\r\nmake[2]: *** [all-stage1-target-libgcc] Error 2\r\nmake[2]: Leaving directory '/private/var/folders/d7/3941r8qj64b5y2h2yw3xnwrxmwd4h7/T/nix-build-gcc-5.3.0.drv-0/build'\r\nMakefile:19039: recipe for target 'stage1-bubble' failed\r\nmake[1]: *** [stage1-bubble] Error 2\r\nmake[1]: Leaving directory '/private/var/folders/d7/3941r8qj64b5y2h2yw3xnwrxmwd4h7/T/nix-build-gcc-5.3.0.drv-0/build'\r\nMakefile:19343: recipe for target 'bootstrap' failed\r\nmake: *** [bootstrap] Error 2\r\nbuilder for ‘/nix/store/w7dshcjfpmpa5cga6cchj4pf320plli2-gcc-5.3.0.drv’ failed with exit code 2\r\ncannot build derivation ‘/nix/store/2fg64qvxdw7cf21kkjcjyhnc41fxrg3r-gcc-wrapper-5.3.0.drv’: 1 dependencies couldn't be built\r\nerror: build of ‘/nix/store/2fg64qvxdw7cf21kkjcjyhnc41fxrg3r-gcc-wrapper-5.3.0.drv’ failed\r\n```\r\n\r\n\r\n### Steps to reproduce\r\n\r\n```\r\nnix-env -iA nixpkgs.gcc5\r\n```\r\n\r\n## Technical details\r\n\r\n* System: OSX 10.11.4 El Capitan\r\n* Nix version: 1.11.2\r\n* Nixpkgs version: (run `nix-instantiate --eval '<nixpkgs>' -A lib.nixpkgsVersion`)\r\n"},"comment":{"url":"https://api.github.com/repos/NixOS/nixpkgs/issues/comments/219149194","html_url":"https://github.com/NixOS/nixpkgs/issues/14812#issuecomment-219149194","issue_url":"https://api.github.com/repos/NixOS/nixpkgs/issues/14812","id":219149194,"user":{"login":"copumpkin","id":2623,"avatar_url":"https://avatars.githubusercontent.com/u/2623?v=3","gravatar_id":"","url":"https://api.github.com/users/copumpkin","html_url":"https://github.com/copumpkin","followers_url":"https://api.github.com/users/copumpkin/followers","following_url":"https://api.github.com/users/copumpkin/following{/other_user}","gists_url":"https://api.github.com/users/copumpkin/gists{/gist_id}","starred_url":"https://api.github.com/users/copumpkin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/copumpkin/subscriptions","organizations_url":"https://api.github.com/users/copumpkin/orgs","repos_url":"https://api.github.com/users/copumpkin/repos","events_url":"https://api.github.com/users/copumpkin/events{/privacy}","received_events_url":"https://api.github.com/users/copumpkin/received_events","type":"User","site_admin":false},"created_at":"2016-05-13T20:20:22Z","updated_at":"2016-05-13T20:20:22Z","body":"Are you sure that colm actually needs gcc? Does it integrate into the compiler somehow?"}}