Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compilation for arm platform fails when cross-compiling #76

Closed
cschol opened this issue Jan 21, 2023 · 3 comments
Closed

Compilation for arm platform fails when cross-compiling #76

cschol opened this issue Jan 21, 2023 · 3 comments

Comments

@cschol
Copy link

cschol commented Jan 21, 2023

Compilation with the Rack Plugin Toolchain fails for arm64 platform:

rm64-apple-darwin20.2-clang++-libc++  -std=c++11 -stdlib=libc++  -I./dsp/generators -I./dsp/utils -I./dsp/filters -I./dsp/third-party/src -I./dsp/third-party/falco -I./dsp -fPIC -I/home/build/rack-plugin-toolchain/Rack-SDK-mac-arm64/include -I/home/build/rack-plugin-toolchain/Rack-SDK-mac-arm64/dep/include -
MMD -MP -g -O3 -funsafe-math-optimizations -fno-omit-frame-pointer -Wall -Wextra -Wno-unused-parameter -DARCH_ARM64 -march=armv8-a+fp+simd -DARCH_MAC -mmacosx-version-min=10.9  -c -o build/dsp/third-party/falco/DspFilter.cpp.o dsp/third-party/falco/DspFilter.cpp                                                
In file included from src/PigeonPlink.cpp:8:                                                                                                                                                                                                                                                                          
In file included from src/PigeonPlink.hpp:83:                                                                                                                                                                                                                                                                         
In file included from src/../dsp/utils/LookupTable.h:10:                                                                                                                                                                                                                                                              
In file included from /home/build/rack-plugin-toolchain/local/bin/../lib/clang/12.0.1/include/emmintrin.h:13:                                                                                                                                                                                                         
In file included from /home/build/rack-plugin-toolchain/local/bin/../lib/clang/12.0.1/include/xmmintrin.h:13:                                                                                                                                                                                                         
/home/build/rack-plugin-toolchain/local/bin/../lib/clang/12.0.1/include/mmintrin.h:13:19: error: typedef redefinition with different types ('__attribute__((__vector_size__(1 * sizeof(long long)))) long long' (vector of 1 'long long' value) vs 'simde__m64' (aka 'int32x2_t'))                                    
typedef long long __m64 __attribute__((__vector_size__(8), __aligned__(8)));                                                                                                                                                                                                                                          
                  ^                                                                                                                                                                                                                                                                                                   
/home/build/rack-plugin-toolchain/Rack-SDK-mac-arm64/dep/include/simde/x86/mmx.h:121:22: note: previous definition is here                                                                                                                                                                                            
  typedef simde__m64 __m64;                                                                                                                                                                                                                                                                                           
                     ^                                                                                                                                                                                                                                                                                                
In file included from src/PigeonPlink.cpp:8:                                                                                                                                                                                                                                                                          
In file included from src/PigeonPlink.hpp:83:                                                                                                                                                                                                                                                                         
In file included from src/../dsp/utils/LookupTable.h:10:                                                                                                                                                                                                                                                              
In file included from /home/build/rack-plugin-toolchain/local/bin/../lib/clang/12.0.1/include/emmintrin.h:13:                                                                                                                                                                                                         
In file included from /home/build/rack-plugin-toolchain/local/bin/../lib/clang/12.0.1/include/xmmintrin.h:13:                                                                                                                                                                                                         
/home/build/rack-plugin-toolchain/local/bin/../lib/clang/12.0.1/include/mmintrin.h:31:11: error: too many arguments provided to function-like macro invocation                                                                                                                                                        
_mm_empty(void)                                                                                                                                                                                                                                                                                                       
          ^                                                                                                                                                                                                                                                                                                           
/home/build/rack-plugin-toolchain/Rack-SDK-mac-arm64/dep/include/simde/x86/mmx.h:768:11: note: macro '_mm_empty' defined here                                                                                                                                                                                         
#  define _mm_empty() simde_mm_empty()                                                                                                                                                                                                                                                                                
          ^                                                                                                                                                                                                                                                                                                           
In file included from src/PigeonPlink.cpp:8:                                                                                                                                                                                                                                                                          
In file included from src/PigeonPlink.hpp:83:                                                                                                                                                                                                                                                                         
In file included from src/../dsp/utils/LookupTable.h:10:                                                                                                                                                                                                                                                              
In file included from /home/build/rack-plugin-toolchain/local/bin/../lib/clang/12.0.1/include/emmintrin.h:13:                                                                                                                                                                                                         
In file included from /home/build/rack-plugin-toolchain/local/bin/../lib/clang/12.0.1/include/xmmintrin.h:13:                                                                                                                                                                                                         
/home/build/rack-plugin-toolchain/local/bin/../lib/clang/12.0.1/include/mmintrin.h:30:72: error: '__target__' attribute only applies to functions                                                                                                                                                                     
static __inline__ void  __attribute__((__always_inline__, __nodebug__, __target__("mmx")))                                                                                                                                                                                                                            
                                                                       ^                                                                                                                                                                                                                                              
/home/build/rack-plugin-toolchain/local/bin/../lib/clang/12.0.1/include/mmintrin.h:31:1: error: variable has incomplete type 'void'                                                                                                                                                                                   
_mm_empty(void)                                                                                                                                                                                                                                                                                                       
^                                                                                                                                                                                                                                                                                                                     
/home/build/rack-plugin-toolchain/local/bin/../lib/clang/12.0.1/include/mmintrin.h:33:5: error: use of undeclared identifier '__builtin_ia32_emms'; did you mean '__builtin_isless'?                                                                                                                                  
    __builtin_ia32_emms();                                                                                                                                                                                                                                                                                            
    ^                                                                                                                                                                                                                                                                                                                 
/home/build/rack-plugin-toolchain/local/osxcross/bin/../SDK/MacOSX11.1.sdk/usr/include/c++/v1/math.h:647:12: note: '__builtin_isless' declared here                                                                                                                                                                   
    return isless(__lcpp_x, __lcpp_y);                                                                                                                                                                                                                                                                                
           ^                                                                                                                                                                                                                                                                                                          
/home/build/rack-plugin-toolchain/local/osxcross/bin/../SDK/MacOSX11.1.sdk/usr/include/math.h:545:22: note: expanded from macro 'isless'                                                                                                                                                                              
#define isless(x, y) __builtin_isless((x),(y))                                                                                                                                                                                                                                                                        
                     ^                                                                                                                                             
[...]
@kockie69
Copy link
Owner

I had a look at this, but I have no idea how I can fix this. To me it looks like it is conflicting with what is in the clang and what is in the SDK. I have no clue how to force it using the same include file. Any help appreciated

@kockie69
Copy link
Owner

Ok, I think I already have a solution provided by another user.

@kockie69
Copy link
Owner

This one is fixed now. Compiled locally on toolchain with success

Latest

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants