Giter Club home page Giter Club logo

Comments (21)

rudolf-bauer avatar rudolf-bauer commented on May 31, 2024 3

I think -Wshorten-64-to-32 is a clang specific flag and unsupported by gcc as stated here: https://stackoverflow.com/questions/1759807/c-warns-about-implicit-long-to-int-conversion.

However, I have managed to install arctic with clang. As proposed by @cosnis and @mphilipose I installed iomp for clang:

brew install clang-omp libiomp

Further, I manually specified the clang-omp compiler and the libiomp paths to use in the setup.py script. Note that you might need to replace 20150701 by the libiomp version installed on your system.

CC="clang-omp -I/usr/local/Cellar/libiomp/20150701/include/libiomp/ -L/usr/local/Cellar/libiomp/20150701/lib" pip install git+https://github.com/manahl/arctic.git

This worked fine for me. By the way: I'm working an OSX El Capitan.

from arctic.

canada4663 avatar canada4663 commented on May 31, 2024 1

Here is what I did to get this working in El Capitan:

brew remove libivmp
brew install libiomp
brew install gcc --without-multilib
brew link gcc
CC=/usr/local/bin/gcc-5 pip install git+https://github.com/manahl/arctic.git

I think the key was installing v.5.x of gcc from home-brew, not Apple's command line tool version without multilib support, then ensuring that I pointed to that compiler when installing via pip.

from arctic.

anthonywittemann avatar anthonywittemann commented on May 31, 2024 1

For those of you on Mac Sierra 10.12.1, modifying the last line of @canada4663 solution to
CC=/usr/local/bin/gcc-6` pip3 install git+https://github.com/manahl/arctic.git
did the trick for me

from arctic.

AdrianTeng avatar AdrianTeng commented on May 31, 2024

@jamesblackburn reported this issue to homebrew. In the mean time please use gcc, instructions here

from arctic.

jamesblackburn avatar jamesblackburn commented on May 31, 2024

This will be quite painful for OS X users (of which I'm one), I think we need to produce a .egg with the cython bits in to make this easier

from arctic.

mphilipose avatar mphilipose commented on May 31, 2024

I ran into the same problem.
I solved it by running "brew install clang-omp"

Hope this helps!

from arctic.

jamesblackburn avatar jamesblackburn commented on May 31, 2024

@mphilipose brew's clang-omp didn't work for me: Homebrew/legacy-homebrew#40391 gcc in conda works though...

from arctic.

ccoossdddffdd avatar ccoossdddffdd commented on May 31, 2024

is that work now?

from arctic.

llazzaro avatar llazzaro commented on May 31, 2024

here is working on OS X

from arctic.

femtotrader avatar femtotrader commented on May 31, 2024

+1 it works with my Mac too (OS X Yosemite 10.10.5)

from arctic.

femtotrader avatar femtotrader commented on May 31, 2024

I wonder how to install a locally modified version of Arctic under OS X

CC=/usr/local/bin/gcc-5 sudo python setup.py install

raises

gcc -fno-strict-aliasing -I//anaconda/envs/py27/include -arch x86_64 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I//anaconda/envs/py2/include/python2.7 -c src/_compress.c -o build/temp.macosx-10.5-x86_64-2.7/src/_compress.o -fopenmp
src/_compress.c:244:10: fatal error: 'omp.h' file not found
#include "omp.h"
         ^
1 error generated.
error: command 'gcc' failed with exit status 1

from arctic.

jamesblackburn avatar jamesblackburn commented on May 31, 2024

You can build it in a conda environment (having installed the conda GCC). When it comes to the Python link line, if you run that with -static when linking against OMP, then the egg seems to be portable.

from arctic.

spyamine avatar spyamine commented on May 31, 2024

worked for me in El Capitan.

Thanks canada4663

from arctic.

TomTaylorLondon avatar TomTaylorLondon commented on May 31, 2024

@femtotrader the exception is because osx gcc (which is just a symlink to clang) doesn't ship with openmp support out of the box. You can install gcc with openmp and compile using the steps canada4663 highlighted

brew install gcc --without-multilib
brew link gcc
CC=/usr/local/bin/gcc-5 pip install git+https://github.com/manahl/arctic.git

from arctic.

huaiweicheng avatar huaiweicheng commented on May 31, 2024

EI Capitan. The last step does not work. @TomTaylorLondon @canada4663

    /usr/local/bin/gcc-5 -fno-strict-aliasing -fno-common -dynamic -arch x86_64 -arch i386 -g -Os -pipe -fno-common -fno-strict-aliasing -fwrapv -DENABLE_DTRACE -DMACOSX -DNDEBUG -Wall -Wstrict-prototypes -Wshorten-64-to-32 -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch x86_64 -arch i386 -pipe -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c src/_compress.c -o build/temp.macosx-10.11-intel-2.7/src/_compress.o -fopenmp
    gcc-5: error: unrecognized command line option '-Wshorten-64-to-32'
    error: command '/usr/local/bin/gcc-5' failed with exit status 1

u guys deal with this problem?
Many thanks.

from arctic.

bmoscon avatar bmoscon commented on May 31, 2024

@huaiweicheng its possible your version of GCC doesn't support that flag. Its just a flag to enable a very specific type of warning. You can remove it from the command and try again.

from arctic.

harkmall avatar harkmall commented on May 31, 2024

@rudolf-bauer that worked for me too on El Capitan

from arctic.

thoriuchi0531 avatar thoriuchi0531 commented on May 31, 2024

@rudolf-bauer this worked for me as well with Yosemite. Thank you.

from arctic.

rthford avatar rthford commented on May 31, 2024

Hi - having some issues with the above installing on mac sierra

Tried using gcc and the work around shown above, but getting the following error:

/usr/local/Cellar/gcc/6.2.0 -fno-strict-aliasing -I/Users/local/anaconda/include -arch x86_64 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/Users/local/anaconda/include/python2.7 -c src/_compress.c -o build/temp.macosx-10.6-x86_64-2.7/src/_compress.o -fopenmp

unable to execute '/usr/local/Cellar/gcc/6.2.0': Permission denied
error: command '/usr/local/Cellar/gcc/6.2.0' failed with exit status 1

from arctic.

HedgeShot avatar HedgeShot commented on May 31, 2024

Hi,

Just tried to install Arctic on a fresh El Capitan install. I had to tweak a bit the proposition of @rudolf-bauer.

  1. clang-omp is now in the boneyard directory of homebrew.
    brew install homebrew/boneyard/clang-omp
  2. Got a new error about "stdio.h" that was missing. So I had to install the Xcode command line tool
    xcode-select --install
    and follow the command prompt.

The install went smoothly after that.
Hope this helps.

from arctic.

bmoscon avatar bmoscon commented on May 31, 2024

OSX build now works. Must have gcc 6 installed. Install like so:

brew install gcc --without-multilib

Not ideal, but you should only have to install gcc/g++ with brew to get the build to work. No more weird env variables need to be set.

from arctic.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.