Opened 4 years ago
Closed 3 years ago
#62870 closed defect (wontfix)
gerbil: builds failing for Big Sur ARM; undeclared identifiers for intrinsics
Reported by: | mascguy (Christopher Nielsen) | Owned by: | neverpanic (Clemens Lang) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | |
Keywords: | Cc: | ||
Port: | gerbil |
Description
The following compilation errors are occurring on our Big Sur ARM buildbot, with complaints about missing intrinsics:
In file included from /opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_science_gerbil/gerbil/work/gerbil-5a7705fe1170f812a6cd0e79a1a853f4d8aec2cf/core/multi_img/multi_img_ext.cpp:13: /Library/Developer/CommandLineTools/usr/lib/clang/12.0.5/include/mmintrin.h:33:5: error: use of undeclared identifier '__builtin_ia32_emms'; did you mean '__builtin_isless'? __builtin_ia32_emms(); ^ /Library/Developer/CommandLineTools/SDKs/MacOSX11.3.sdk/usr/include/c++/v1/math.h:649:12: note: '__builtin_isless' declared here return isless(__lcpp_x, __lcpp_y); ^ /Library/Developer/CommandLineTools/SDKs/MacOSX11.3.sdk/usr/include/math.h:545:22: note: expanded from macro 'isless' #define isless(x, y) __builtin_isless((x),(y)) ^ In file included from /opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_science_gerbil/gerbil/work/gerbil-5a7705fe1170f812a6cd0e79a1a853f4d8aec2cf/core/multi_img/multi_img_ext.cpp:13: /Library/Developer/CommandLineTools/usr/lib/clang/12.0.5/include/mmintrin.h:33:25: error: too few arguments to function call, expected 2, have 0 __builtin_ia32_emms(); ^ /Library/Developer/CommandLineTools/usr/lib/clang/12.0.5/include/mmintrin.h:50:19: error: use of undeclared identifier '__builtin_ia32_vec_init_v2si' return (__m64)__builtin_ia32_vec_init_v2si(__i, 0); ^ /Library/Developer/CommandLineTools/usr/lib/clang/12.0.5/include/mmintrin.h:67:12: error: use of undeclared identifier '__builtin_ia32_vec_ext_v2si' return __builtin_ia32_vec_ext_v2si((__v2si)__m, 0); ^ [...etc, etc...]
Full log attached.
Attachments (1)
Change History (14)
Changed 4 years ago by mascguy (Christopher Nielsen)
Attachment: | gerbil-buildbot-compile-failure-big-sur-arm.txt.gz added |
---|
comment:1 Changed 4 years ago by mascguy (Christopher Nielsen)
comment:2 Changed 4 years ago by Christopher Nielsen <mascguy@…>
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
comment:3 Changed 4 years ago by mascguy (Christopher Nielsen)
Resolution: | fixed |
---|---|
Status: | closed → reopened |
Hmmmm, -march=native
doesn't work for ARM builds. Might be easier to simply not specify anything for the ARM case...
comment:4 Changed 4 years ago by Christopher Nielsen <mascguy@…>
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
comment:5 Changed 4 years ago by mascguy (Christopher Nielsen)
Resolution: | fixed |
---|---|
Status: | closed → reopened |
Still not working, sigh. Back to the drawing board...
comment:6 Changed 4 years ago by jmroot (Joshua Root)
I think the real question is why it's including mmintrin.h
at all, since that is an MMX-specific file.
comment:7 Changed 4 years ago by jmroot (Joshua Root)
BTW, only VoleModuleMacros.cmake
uses the enable_sse2
macro. Removing it there would likely make more sense than changing the macro's definition.
comment:8 Changed 4 years ago by mascguy (Christopher Nielsen)
Great points Josh, I'll take a look at the code.
comment:9 Changed 4 years ago by mascguy (Christopher Nielsen)
It looks like the port is directly utilizing Intel intrinsics, so we'll need to add a shim like simde
to fill in the gaps. Thankfully we already have a port for that, so I'll see if I can integrate it into the port for ARM builds.
Local testing is going to be a challenge without an M1 Mac, but we'll see...
comment:10 Changed 4 years ago by mascguy (Christopher Nielsen)
Hmmmm. This might be doable, if we patch the source files to include the appropriate simde
headers, rather than mminstrin.h and friends. Though this is turning into a mini-project, which may not be worth the trouble.
Plus I'd hate to deprive the maintainer of this challenge... :-)
comment:11 Changed 4 years ago by Christopher Nielsen <mascguy@…>
comment:12 Changed 3 years ago by mascguy (Christopher Nielsen)
Clemens, is this something that would be worth tackling? If not, we can close this as "wontfix."
comment:13 Changed 3 years ago by mascguy (Christopher Nielsen)
Resolution: | → wontfix |
---|---|
Status: | reopened → closed |
Let's close this for now. We can always revisit later, if there's interest in an ARM build.
Reviewing the compilation arguments passed to Clang, I'm seeing
-msse2
, which I think (?) is Intel-specific. It should probably be something like-march=native
.I'd need someone to confirm though...