{"action":"opened","issue":{"url":"https://api.github.com/repos/jemalloc/jemalloc/issues/266","labels_url":"https://api.github.com/repos/jemalloc/jemalloc/issues/266/labels{/name}","comments_url":"https://api.github.com/repos/jemalloc/jemalloc/issues/266/comments","events_url":"https://api.github.com/repos/jemalloc/jemalloc/issues/266/events","html_url":"https://github.com/jemalloc/jemalloc/issues/266","id":103951483,"number":266,"title":"cannot build on Mac Yosemite with any compiler (linker error)","user":{"login":"jeffhammond","id":406118,"avatar_url":"https://avatars.githubusercontent.com/u/406118?v=3","gravatar_id":"","url":"https://api.github.com/users/jeffhammond","html_url":"https://github.com/jeffhammond","followers_url":"https://api.github.com/users/jeffhammond/followers","following_url":"https://api.github.com/users/jeffhammond/following{/other_user}","gists_url":"https://api.github.com/users/jeffhammond/gists{/gist_id}","starred_url":"https://api.github.com/users/jeffhammond/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jeffhammond/subscriptions","organizations_url":"https://api.github.com/users/jeffhammond/orgs","repos_url":"https://api.github.com/users/jeffhammond/repos","events_url":"https://api.github.com/users/jeffhammond/events{/privacy}","received_events_url":"https://api.github.com/users/jeffhammond/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-08-30T21:19:53Z","updated_at":"2015-08-30T21:19:53Z","closed_at":null,"body":"I attempted to build the latest version of jemalloc on my Mac.  It fails with GCC 5.2.0, Clang 3.6, and Intel 15.\r\n\r\nThis is how I configured with GCC 5:\r\n```\r\njrhammon-mac01:build jrhammon$ ../configure CC=gcc-5 --prefix=/Users/jrhammon/Work/MEMORY/MEMKIND/install-jemalloc-gcc5 && make -j4\r\n```\r\n\r\nThe error with GCC 5.2 is:\r\n```\r\njrhammon-mac01:build jrhammon$ make\r\ngcc-5 -shared -Wl,-install_name,/Users/jrhammon/Work/MEMORY/MEMKIND/install-jemalloc-gcc5/lib/libjemalloc.2.dylib  -o lib/libjemalloc.2.dylib src/jemalloc.pic.o src/arena.pic.o src/atomic.pic.o src/base.pic.o src/bitmap.pic.o src/chunk.pic.o src/chunk_dss.pic.o src/chunk_mmap.pic.o src/ckh.pic.o src/ctl.pic.o src/extent.pic.o src/hash.pic.o src/huge.pic.o src/mb.pic.o src/mutex.pic.o src/pages.pic.o src/prof.pic.o src/quarantine.pic.o src/rtree.pic.o src/stats.pic.o src/tcache.pic.o src/util.pic.o src/tsd.pic.o src/valgrind.pic.o src/zone.pic.o  -lpthread \r\n0  0x10b974a44  __assert_rtn + 144\r\n1  0x10b99c5d5  mach_o::relocatable::Parser<x86_64>::parse(mach_o::relocatable::ParserOptions const&) + 3175\r\n2  0x10b97ff81  mach_o::relocatable::Parser<x86_64>::parse(unsigned char const*, unsigned long long, char const*, long, ld::File::Ordinal, mach_o::relocatable::ParserOptions const&) + 375\r\n0  0x10b974a44  __assert_rtn + 144\r\n3  0x10b9c2bf8  ld::tool::InputFiles::makeFile(Options::FileInfo const&, bool) + 796\r\n1  0x10b99c5d5  mach_o::relocatable::Parser<x86_64>::parse(mach_o::relocatable::ParserOptions const&) + 3175\r\n2  0x10b97ff81  mach_o::relocatable::Parser<x86_64>::parse(unsigned char const*, unsigned long long, char const*, long, ld::File::Ordinal, mach_o::relocatable::ParserOptions const&) + 375\r\n3  0x10b9c2bf8  ld::tool::InputFiles::makeFile(Options::FileInfo const&, bool) + 796\r\n4  0x10b9c4a80  ld::tool::InputFiles::parseWorkerThread() + 472\r\n5  0x7fff87b47268  _pthread_body + 131\r\n6  0x7fff87b471e5  _pthread_body + 0\r\nA linker snapshot was created at:\r\n\t/tmp/libjemalloc.2.dylib-2015-07-30-141144.ld-snapshot\r\nld: Assertion failed: (cfiStartsArray[i] != cfiStartsArray[i-1]), function parse, file /SourceCache/ld64/ld64-242.2/src/ld/parsers/macho_relocatable_file.cpp, line 1748.\r\ncollect2: error: ld returned 1 exit status\r\nmake: *** [lib/libjemalloc.2.dylib] Error 1\r\n```\r\n\r\nWith Clang 3.6, the error is:\r\n```\r\njrhammon-mac01:build jrhammon$ make\r\nclang-3.6 -shared -Wl,-install_name,/Users/jrhammon/Work/MEMORY/MEMKIND/install-jemalloc-clang36/lib/libjemalloc.2.dylib  -o lib/libjemalloc.2.dylib src/jemalloc.pic.o src/arena.pic.o src/atomic.pic.o src/base.pic.o src/bitmap.pic.o src/chunk.pic.o src/chunk_dss.pic.o src/chunk_mmap.pic.o src/ckh.pic.o src/ctl.pic.o src/extent.pic.o src/hash.pic.o src/huge.pic.o src/mb.pic.o src/mutex.pic.o src/pages.pic.o src/prof.pic.o src/quarantine.pic.o src/rtree.pic.o src/stats.pic.o src/tcache.pic.o src/util.pic.o src/tsd.pic.o src/valgrind.pic.o src/zone.pic.o  -lpthread \r\n0  0x10d0cca44  __assert_rtn + 144\r\n1  0x10d0f45d5  mach_o::relocatable::Parser<x86_64>::parse(mach_o::relocatable::ParserOptions const&) + 3175\r\n2  0x10d0d7f81  mach_o::relocatable::Parser<x86_64>::parse(unsigned char const*, unsigned long long, char const*, long, ld::File::Ordinal, mach_o::relocatable::ParserOptions const&) + 375\r\n3  0x10d11abf8  ld::tool::InputFiles::makeFile(Options::FileInfo const&, bool) + 796\r\n4  0x10d11ca80  ld::tool::InputFiles::parseWorkerThread() + 472\r\n5  0x7fff87b47268  _pthread_body + 131\r\n6  0x7fff87b471e5  _pthread_body + 0\r\nA linker snapshot was created at:\r\n\t/tmp/libjemalloc.2.dylib-2015-07-30-141548.ld-snapshot\r\nld: Assertion failed: (cfiStartsArray[i] != cfiStartsArray[i-1]), function parse, file /SourceCache/ld64/ld64-242.2/src/ld/parsers/macho_relocatable_file.cpp, line 1748.\r\nclang: error: linker command failed with exit code 1 (use -v to see invocation)\r\nmake: *** [lib/libjemalloc.2.dylib] Error 1\r\n```\r\n\r\nWith Intel 15, the error is:\r\n```\r\njrhammon-mac01:build jrhammon$ make\r\nicc -shared -Wl,-install_name,/Users/jrhammon/Work/MEMORY/MEMKIND/install-jemalloc-intel15/lib/libjemalloc.2.dylib  -o lib/libjemalloc.2.dylib src/jemalloc.pic.o src/arena.pic.o src/atomic.pic.o src/base.pic.o src/bitmap.pic.o src/chunk.pic.o src/chunk_dss.pic.o src/chunk_mmap.pic.o src/ckh.pic.o src/ctl.pic.o src/extent.pic.o src/hash.pic.o src/huge.pic.o src/mb.pic.o src/mutex.pic.o src/pages.pic.o src/prof.pic.o src/quarantine.pic.o src/rtree.pic.o src/stats.pic.o src/tcache.pic.o src/util.pic.o src/tsd.pic.o src/valgrind.pic.o src/zone.pic.o  -lpthread \r\n0  0x10c51ca44  __assert_rtn + 144\r\n1  0x10c5445d5  mach_o::relocatable::Parser<x86_64>::parse(mach_o::relocatable::ParserOptions const&) + 3175\r\n2  0x10c527f81  mach_o::relocatable::Parser<x86_64>::parse(unsigned char const*, unsigned long long, char const*, long, ld::File::Ordinal, mach_o::relocatable::ParserOptions const&) + 375\r\n0  0x10c51ca44  __assert_rtn + 144\r\n1  0x10c5445d5  mach_o::relocatable::Parser<x86_64>::parse(mach_o::relocatable::ParserOptions const&) + 3175\r\n3  0x10c56abf8  ld::tool::InputFiles::makeFile(Options::FileInfo const&, bool) + 796\r\n2  0x10c527f81  mach_o::relocatable::Parser<x86_64>::parse(unsigned char const*, unsigned long long, char const*, long, ld::File::Ordinal, mach_o::relocatable::ParserOptions const&) + 375\r\n4  0x10c56ca80  ld::tool::InputFiles::parseWorkerThread() + 472\r\n3  0x10c56abf8  ld::tool::InputFiles::makeFile(Options::FileInfo const&, bool) + 796\r\n5  0x7fff87b47268  _pthread_body + 131\r\n4  0x10c56ca80  ld::tool::InputFiles::parseWorkerThread() + 472\r\n5  0x7fff87b47268  _pthread_body + 131\r\n6  0x7fff87b471e5  _pthread_body + 0\r\nA linker snapshot was created at:\r\n\t/tmp/libjemalloc.2.dylib-2015-07-30-141738.ld-snapshot\r\nld: Assertion failed: (cfiStartsArray[i] != cfiStartsArray[i-1]), function parse, file /SourceCache/ld64/ld64-242.2/src/ld/parsers/macho_relocatable_file.cpp, line 1748.\r\n6  0x7fff87b471e5  _pthread_body + 0\r\nmake: *** [lib/libjemalloc.2.dylib] Error 1\r\n```\r\n\r\nThis is where I am on the jemalloc master:\r\n```\r\njrhammon-mac01:build jrhammon$ git info | grep Recent -A6\r\n## Most Recent Commit:\r\n\r\ncommit 6e98caf8f064482b9ab292ef3638dea67420bbc2\r\nMerge: 46c0af6 9b68f67\r\nAuthor: Jason Evans <jasone@canonware.com>\r\n\r\n    Merge branch 'dev'\r\n```\r\n\r\nThese are the compilers:\r\n```\r\njrhammon-mac01:build jrhammon$ gcc-5 -v\r\nUsing built-in specs.\r\nCOLLECT_GCC=gcc-5\r\nCOLLECT_LTO_WRAPPER=/usr/local/Cellar/gcc/5.2.0/libexec/gcc/x86_64-apple-darwin14.4.0/5.2.0/lto-wrapper\r\nTarget: x86_64-apple-darwin14.4.0\r\nConfigured with: ../configure --build=x86_64-apple-darwin14.4.0 --prefix=/usr/local/Cellar/gcc/5.2.0 --libdir=/usr/local/Cellar/gcc/5.2.0/lib/gcc/5 --enable-languages=c,c++,objc,obj-c++,fortran --program-suffix=-5 --with-gmp=/usr/local/opt/gmp --with-mpfr=/usr/local/opt/mpfr --with-mpc=/usr/local/opt/libmpc --with-isl=/usr/local/opt/isl --with-system-zlib --enable-libstdcxx-time=yes --enable-stage1-checking --enable-checking=release --enable-lto --with-build-config=bootstrap-debug --disable-werror --with-pkgversion='Homebrew gcc 5.2.0 --without-multilib' --with-bugurl=https://github.com/Homebrew/homebrew/issues --enable-plugin --disable-nls --disable-multilib\r\nThread model: posix\r\ngcc version 5.2.0 (Homebrew gcc 5.2.0 --without-multilib) \r\n\r\njrhammon-mac01:build jrhammon$ clang-3.6 -v\r\nclang version 3.6.1 (tags/RELEASE_361/final)\r\nTarget: x86_64-apple-darwin14.4.0\r\nThread model: posix\r\n\r\njrhammon-mac01:build jrhammon$ icc --version\r\nicc (ICC) 15.0.3 20150408\r\nCopyright (C) 1985-2015 Intel Corporation.  All rights reserved.\r\n```\r\n\r\nI am using Mac Yosemite (10.10.4):\r\n```\r\njrhammon-mac01:build jrhammon$ uname -a\r\nDarwin jrhammon-mac01.local 14.4.0 Darwin Kernel Version 14.4.0: Thu May 28 11:35:04 PDT 2015; root:xnu-2782.30.5~1/RELEASE_X86_64 x86_64\r\n```"}}