Giter Club home page Giter Club logo

Comments (2)

mratsim avatar mratsim commented on June 20, 2024

It seems like the MacOS CI is now using ARM CPUs:
image

and the make_headers task assumes it is running on x86

  Executing task make_lib in /Users/runner/work/constantine/constantine/constantine/constantine.nimble
Compiling static library:  lib/libconstantine.a.arm
Compiling static library:  lib/libconstantine.a.x64
Compiling dynamic library: lib/libconstantine.dylib.arm
ld: warning: ignoring duplicate libraries: '-lm'
Compiling dynamic library: lib/libconstantine.dylib.x64
ld: warning: ignoring duplicate libraries: '-lm'
  Executing task make_headers in /Users/runner/work/constantine/constantine/constantine/constantine.nimble
/Users/runner/work/constantine/constantine/constantine/nimcache/libcurves_headers/@m..@sconstantine@splatforms@sisa@scpudetect_x86.nim.c:80:8: error: invalid output constraint '=a' in asm
      :"=a"(result.eax), "=b"(result.ebx), "=c"(result.ecx), "=d"(result.edx)
       ^

However building a fat binary for both x86 and ARM works well.

from constantine.

mratsim avatar mratsim commented on June 20, 2024

Cross-compiling for Linux ARM64 on Linux x86 host works with Clang.

However looking at the error message we can see Nim Compiler version 1.6.21 [MacOSX: amd64]
but the host is actually arm64-apple-darwin23.4.0

So I suspect Nim is actually running through Rosetta and "thinks" it is on a x86 platform, which leads to this const X86 check being mistakenly true:

const GCC_Compatible* = defined(gcc) or defined(clang) or defined(llvm_gcc) or defined(icc)
const X86* = defined(amd64) or defined(i386)

from constantine.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.