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

Can't compile on aarch64 on MacOS #11

Open
tasansal opened this issue Oct 26, 2023 · 0 comments
Open

Can't compile on aarch64 on MacOS #11

tasansal opened this issue Oct 26, 2023 · 0 comments

Comments

@tasansal
Copy link

tasansal commented Oct 26, 2023

Hi, I am trying to compile the code in MacOS with an M1 Max chip (aarch64 / ARM64).

I am getting the following compilation error coming from ARM's Neon extensions.

To reproduce:

export CC=clang
export CXX=clang
git clone https://github.com/powturbo/Turbo-Run-Length-Encoding.git
cd Turbo-Run-Length-Encoding
make
  • With gcc and g++, I get the same error. So, not Clang related.
  • I tried adding another else statement to the makefile and set arch to aarch64 if uname -m returns arm64, as M1 returns arm64, but not aarch64. Without this I believe it goes on to native compiler optimizations, correct?
cc -O3 -DNDEBUG -s  -w -Wall -std=gnu99 -DUSE_THREADS  -fstrict-aliasing -Iext -falign-loops  trlec.c -c -o trlec.o
cc -O3 -DNDEBUG -s  -w -Wall -std=gnu99 -DUSE_THREADS  -fstrict-aliasing -Iext -falign-loops  trled.c -c -o trled.o
In file included from trled.c:46:
./include_/sse_neon.h:232:85: error: invalid conversion between vector type 'uint64x2_t' (vector of 2 'uint64_t' values) and 'uint8x8_t' (vector of 8 'uint8_t' values) of different size
static ALWAYS_INLINE uint64_t  mm_movemask4_epu8(__m128i v) { return vgetq_lane_u64((uint64x2_t)vshrn_n_u16((uint8x16_t)v, 4), 0); } //uint8x16_t
                                                                     ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Library/Developer/CommandLineTools/usr/lib/clang/15.0.0/include/arm_neon.h:7749:21: note: expanded from macro 'vgetq_lane_u64'
  uint64x2_t __s0 = __p0; \
                    ^~~~

Any ideas?

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

1 participant