{"action":"opened","issue":{"url":"https://api.github.com/repos/HIPS/pgmult/issues/7","repository_url":"https://api.github.com/repos/HIPS/pgmult","labels_url":"https://api.github.com/repos/HIPS/pgmult/issues/7/labels{/name}","comments_url":"https://api.github.com/repos/HIPS/pgmult/issues/7/comments","events_url":"https://api.github.com/repos/HIPS/pgmult/issues/7/events","html_url":"https://github.com/HIPS/pgmult/issues/7","id":154777380,"number":7,"title":"problem with installation on mac","user":{"login":"kayhan-batmanghelich","id":12301533,"avatar_url":"https://avatars.githubusercontent.com/u/12301533?v=3","gravatar_id":"","url":"https://api.github.com/users/kayhan-batmanghelich","html_url":"https://github.com/kayhan-batmanghelich","followers_url":"https://api.github.com/users/kayhan-batmanghelich/followers","following_url":"https://api.github.com/users/kayhan-batmanghelich/following{/other_user}","gists_url":"https://api.github.com/users/kayhan-batmanghelich/gists{/gist_id}","starred_url":"https://api.github.com/users/kayhan-batmanghelich/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kayhan-batmanghelich/subscriptions","organizations_url":"https://api.github.com/users/kayhan-batmanghelich/orgs","repos_url":"https://api.github.com/users/kayhan-batmanghelich/repos","events_url":"https://api.github.com/users/kayhan-batmanghelich/events{/privacy}","received_events_url":"https://api.github.com/users/kayhan-batmanghelich/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-05-13T18:50:39Z","updated_at":"2016-05-13T18:50:39Z","closed_at":null,"body":"Hi Scott,\r\n\r\nThank you for sharing your code. I have some issues with installation on Mac and Linux (not the focus of this post). Here is what I get when I want to install it:\r\n\r\n```\r\n$ pip install -e .\r\n[....]\r\nBuilding wheels for collected packages: pypolyagamma, gslrandom\r\n  Running setup.py bdist_wheel for pypolyagamma ... error\r\n  Complete output from command /Users/kayhan/anaconda/bin/python -u -c \"import setuptools, tokenize;__file__='/private/var/folders/kh/s846jbks2539yqq9g1fs3fqr0000gn/T/pip-build-o1HhAA/pypolyagamma/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\\r\\n', '\\n'), __file__, 'exec'))\" bdist_wheel -d /var/folders/kh/s846jbks2539yqq9g1fs3fqr0000gn/T/tmp_6UI33pip-wheel- --python-tag cp27:\r\n  running bdist_wheel\r\n[...]\r\n  creating build/temp.macosx-10.5-x86_64-2.7/pypolyagamma\r\n  creating build/temp.macosx-10.5-x86_64-2.7/pypolyagamma/cpp\r\n  creating build/temp.macosx-10.5-x86_64-2.7/pypolyagamma/cpp/include\r\n  gcc -fno-strict-aliasing -I/Users/kayhan/anaconda/include -arch x86_64 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -Ipypolyagamma/cpp/include -I/usr/local/include -I/Users/kayhan/anaconda/lib/python2.7/site-packages/numpy/core/include -I/Users/kayhan/anaconda/include/python2.7 -c pypolyagamma/pypolyagamma.cpp -o build/temp.macosx-10.5-x86_64-2.7/pypolyagamma/pypolyagamma.o -O0 -w -std=c++11 -fopenmp\r\n  clang: error: unsupported option '-fopenmp'\r\n  error: command 'gcc' failed with exit status 1\r\n\r\n  ----------------------------------------\r\n  Failed building wheel for pypolyagamma\r\n  Running setup.py clean for pypolyagamma\r\n  Running setup.py bdist_wheel for gslrandom ... error\r\n  Complete output from command /Users/kayhan/anaconda/bin/python -u -c \"import setuptools, t\r\n[....]\r\n  building 'gslrandom.gslrandom' extension\r\n  creating build/temp.macosx-10.5-x86_64-2.7\r\n  creating build/temp.macosx-10.5-x86_64-2.7/gslrandom\r\n  gcc -fno-strict-aliasing -I/Users/kayhan/anaconda/include -arch x86_64 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/usr/local/include -Igslrandom/ -I/Users/kayhan/anaconda/lib/python2.7/site-packages/numpy/core/include -I/Users/kayhan/anaconda/include/python2.7 -c gslrandom/gslrandom.cpp -o build/temp.macosx-10.5-x86_64-2.7/gslrandom/gslrandom.o -O3 -w -std=c++11 -fopenmp\r\n  clang: error: unsupported option '-fopenmp'\r\n  error: command 'gcc' failed with exit status 1\r\n\r\n  ----------------------------------------\r\n  Failed building wheel for gslrandom\r\n  Running setup.py clean for gslrandom\r\nFailed to build pypolyagamma gslrandom\r\nInstalling collected packages: pypolyagamma, gslrandom, pylds, pgmult, funcsigs, pbr, mock\r\n[....]\r\nI/Users/kayhan/anaconda/lib/python2.7/site-packages/numpy/core/include -I/Users/kayhan/anaconda/include/python2.7 -c pypolyagamma/pypolyagamma.cpp -o build/temp.macosx-10.5-x86_64-2.7/pypolyagamma/pypolyagamma.o -O0 -w -std=c++11 -fopenmp\r\n    clang: error: unsupported option '-fopenmp'\r\n    error: command 'gcc' failed with exit status 1\r\n\r\n    ----------------------------------------\r\n``` \r\n\r\nIt seems that issue is with the compiler. Following this post:\r\nhttp://stackoverflow.com/questions/29057437/compile-openmp-programs-with-gcc-compiler-on-os-x-yosemite\r\n\r\nI gcc without `--without-multilib`:\r\n\r\n```\r\nalias gcc='gcc-5'\r\nalias g++='g++-5'\r\n\r\n$ gcc -v\r\nUsing built-in specs.\r\nCOLLECT_GCC=gcc-5\r\nCOLLECT_LTO_WRAPPER=/usr/local/Cellar/gcc/5.3.0/libexec/gcc/x86_64-apple-darwin15.4.0/5.3.0/lto-wrapper\r\nTarget: x86_64-apple-darwin15.4.0\r\nConfigured with: ../configure --build=x86_64-apple-darwin15.4.0 --prefix=/usr/local/Cellar/gcc/5.3.0 --libdir=/usr/local/Cellar/gcc/5.3.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.3.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.3.0 (Homebrew gcc 5.3.0 --without-multilib)\r\n\r\n$ g++ -v\r\nUsing built-in specs.\r\nCOLLECT_GCC=g++-5\r\nCOLLECT_LTO_WRAPPER=/usr/local/Cellar/gcc/5.3.0/libexec/gcc/x86_64-apple-darwin15.4.0/5.3.0/lto-wrapper\r\nTarget: x86_64-apple-darwin15.4.0\r\nConfigured with: ../configure --build=x86_64-apple-darwin15.4.0 --prefix=/usr/local/Cellar/gcc/5.3.0 --libdir=/usr/local/Cellar/gcc/5.3.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.3.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.3.0 (Homebrew gcc 5.3.0 --without-multilib)\r\n```\r\n\r\nbut I still get the same error. It seems that the package still tries to use `clang` (not sure?). Do you have any idea how to solve this issue?\r\n\r\nThanks,\r\nKayhan\r\n\r\nanother relevant post in stackoverflow:\r\nhttp://stackoverflow.com/questions/36908426/compile-an-openmp-program-with-cmake-on-os-x\r\n\r\n  "}}