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

Installation fails on ARM64 #3

Closed
Totktonada opened this issue Apr 3, 2022 · 3 comments
Closed

Installation fails on ARM64 #3

Totktonada opened this issue Apr 3, 2022 · 3 comments

Comments

@Totktonada
Copy link

Cloning into 'cluacov'...
remote: Enumerating objects: 65, done.
remote: Total 65 (delta 0), reused 0 (delta 0), pack-reused 65
Receiving objects: 100% (65/65), 39.87 KiB | 474.00 KiB/s, done.
Resolving deltas: 100% (26/26), done.
gcc -O2 -fPIC -I/usr/local/include/tarantool -c src/cluacov/deepactivelines.c -o src/cluacov/deepactivelines.o
In file included from src/cluacov/lj2/lj_obj.h:14,
                 from src/cluacov/deepactivelines.c:19:
src/cluacov/lj2/lj_arch.h:55:2: error: #error "No support for this architecture (yet)"
   55 | #error "No support for this architecture (yet)"
      |  ^~~~~
src/cluacov/lj2/lj_arch.h:294:2: error: #error "No target architecture defined"
  294 | #error "No target architecture defined"
      |  ^~~~~

Error: Build error: Failed compiling object src/cluacov/deepactivelines.o

A brief look at the code points me the following snippet:

#if defined(__i386) || defined(__i386__) || defined(_M_IX86)
#define LUAJIT_TARGET LUAJIT_ARCH_X86
#elif defined(__x86_64__) || defined(__x86_64) || defined(_M_X64) || defined(_M_AMD64)
#define LUAJIT_TARGET LUAJIT_ARCH_X64
#elif defined(__arm__) || defined(__arm) || defined(__ARM__) || defined(__ARM)
#define LUAJIT_TARGET LUAJIT_ARCH_ARM
#elif defined(__ppc__) || defined(__ppc) || defined(__PPC__) || defined(__PPC) || defined(__powerpc__) || defined(__powerpc) || defined(__POWERPC__) || defined(__POWERPC) || defined(_M_PPC)
#ifdef __NO_FPRS__
#define LUAJIT_TARGET LUAJIT_ARCH_PPCSPE
#else
#define LUAJIT_TARGET LUAJIT_ARCH_PPC
#endif
#elif defined(__mips__) || defined(__mips) || defined(__MIPS__) || defined(__MIPS)
#define LUAJIT_TARGET LUAJIT_ARCH_MIPS
#else
#error "No support for this architecture (yet)"
#endif

It seems the file is copied from LuaJIT sources and actual LuaJIT has the ARM64 branch:

https://github.com/LuaJIT/LuaJIT/blob/8ff09d9f5ad5b037926be2a50dc32b681c5e7597/src/lj_arch.h#L54-L70

Initially reported in tarantool/crud#211.

@Totktonada
Copy link
Author

@hishamhm Is there a chance to get update here? Should I open a pull request?

@hishamhm
Copy link
Member

Should be fixed in cluacov 0.1.3!

@Totktonada
Copy link
Author

f485047 from PR #5 seems related. I can confirm that an installation from the scm-1 rockspec on an ARM64 machine is successful. Thank you!

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