digego / extempore

A cyber-physical programming environment
1.4k stars 127 forks source link

Can't compile on macos #311

Closed ales-tsurko closed 6 years ago

ales-tsurko commented 6 years ago

It stops on portaudio compilation with the next error:

[ 25%] Building C object CMakeFiles/portaudio.dir/src/portaudio/src/hostapi/coreaudio/pa_mac_core.c.o
In file included from /Users/alestsurko/Desktop/extempore/src/portaudio/src/hostapi/coreaudio/pa_mac_core.c:65:
In file included from /Users/alestsurko/Desktop/extempore/src/portaudio/src/hostapi/coreaudio/pa_mac_core_internal.h:65:
In file included from /System/Library/Frameworks/CoreServices.framework/Headers/CoreServices.h:23:
In file included from /System/Library/Frameworks/CoreServices.framework/Frameworks/AE.framework/Headers/AE.h:20:
In file included from /System/Library/Frameworks/CoreServices.framework/Frameworks/CarbonCore.framework/Headers/CarbonCore.h:127:
In file included from /System/Library/Frameworks/CoreServices.framework/Frameworks/CarbonCore.framework/Headers/DriverServices.h:26:
In file included from /System/Library/Frameworks/CoreServices.framework/Frameworks/CarbonCore.framework/Headers/MachineExceptions.h:22:
/usr/local/bin/../lib/clang/3.9.0/include/emmintrin.h:420:10: error: invalid conversion
      between vector type '__m128' (vector of 4 'float' values) and integer type 'int' of
      different size
  return (__m128)__builtin_ia32_cvtsd2ss((__v4sf)__a, (__v2df)__b);
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/bin/../lib/clang/3.9.0/include/emmintrin.h:1757:10: error: invalid conversion
      between vector type '__m128i' (vector of 2 'long long' values) and integer type 'int'
      of different size
  return (__m128i)__builtin_ia32_cvttps2dq((__v4sf)__a);
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2 errors generated.
make[2]: *** [CMakeFiles/portaudio.dir/src/portaudio/src/hostapi/coreaudio/pa_mac_core.c.o] Error 1
make[1]: *** [CMakeFiles/portaudio.dir/all] Error 2
make: *** [all] Error 2

I've already installed portaudio with homebrew. Maybe is there a flag to link against my version?

benswift commented 6 years ago

Hmm, that's interesting. There's currently no easy way to get it to just use the brew-installed one, sorry.

Which version of macOS/clang are you using?

ales-tsurko commented 6 years ago

macOS 10.13.

Ales :: / » clang -v
clang version 3.9.0 (http://root.cern.ch/git/clang.git 1d3611b352ada6e8fc8dd41631bd17495f37b258) (http://root.cern.ch/git/llvm.git 967fc5bd859b61bac9620c7d70372d856d3e11a0)
Target: x86_64-apple-darwin17.0.0
Thread model: posix
InstalledDir: /usr/local/bin

But Cmake uses clang by Xcode:

-- The C compiler identification is AppleClang 9.0.0.9000037
-- The CXX compiler identification is AppleClang 9.0.0.9000037
ales-tsurko commented 6 years ago

Updating clang and llvm to the last version (5.0.1) downloaded from llvm.org solved the problem.

Thanks!