constantine icon indicating copy to clipboard operation
constantine copied to clipboard

Build failing on MacOS

Open NickSneo opened this issue 7 months ago • 3 comments

When I am trying to run commands - nimble make_lib or CC=clang nimble make_lib getting error -

nimble make_lib
  Verifying dependencies for [email protected]
  Executing task make_lib in /Users/nicks/Desktop/coding/ethereum/constantine-forked/constantine.nimble
Compiling static library:  lib/libconstantine.a.arm
/Users/nicks/Desktop/coding/ethereum/constantine-forked/nimcache/libconstantine_static/@m..@sconstantine@smath@sarithmetic@slimbs_exgcd.nim.c:138:76: error: redefinition of 'factor' with a different type: 'const tyObject_LimbsUnsaturated__IqonXAOTabqZBul1SV9aMOA' (aka 'const struct tyObject_LimbsUnsaturated__IqonXAOTabqZBul1SV9aMOA') vs 'const tyObject_LimbsUnsaturated__OSDfiXcZ49cBg39aSDQmfgMw' (aka 'const struct tyObject_LimbsUnsaturated__OSDfiXcZ49cBg39aSDQmfgMw')
N_LIB_PRIVATE NIM_CONST tyObject_LimbsUnsaturated__IqonXAOTabqZBul1SV9aMOA factor = {{3809798118450665286ULL,
                                                                           ^
/Users/nicks/Desktop/coding/ethereum/constantine-forked/nimcache/libconstantine_static/@m..@sconstantine@smath@sarithmetic@slimbs_exgcd.nim.c:124:77: note: previous definition is here
N_LIB_PRIVATE NIM_CONST tyObject_LimbsUnsaturated__OSDfiXcZ49cBg39aSDQmfgMw factor = {{691840826555407469ULL,
                                                                            ^
/Users/nicks/Desktop/coding/ethereum/constantine-forked/nimcache/libconstantine_static/@m..@sconstantine@smath@sarithmetic@slimbs_exgcd.nim.c:147:76: error: redefinition of 'm2' with a different type: 'const tyObject_LimbsUnsaturated__IqonXAOTabqZBul1SV9aMOA' (aka 'const struct tyObject_LimbsUnsaturated__IqonXAOTabqZBul1SV9aMOA') vs 'const tyObject_LimbsUnsaturated__OSDfiXcZ49cBg39aSDQmfgMw' (aka 'const struct tyObject_LimbsUnsaturated__OSDfiXcZ49cBg39aSDQmfgMw')
N_LIB_PRIVATE NIM_CONST tyObject_LimbsUnsaturated__IqonXAOTabqZBul1SV9aMOA m2 = {{4179058979223087787ULL,
                                                                           ^
/Users/nicks/Desktop/coding/ethereum/constantine-forked/nimcache/libconstantine_static/@m..@sconstantine@smath@sarithmetic@slimbs_exgcd.nim.c:131:77: note: previous definition is here
N_LIB_PRIVATE NIM_CONST tyObject_LimbsUnsaturated__OSDfiXcZ49cBg39aSDQmfgMw m2 = {{4611686014132420609ULL,
                                                                            ^
/Users/nicks/Desktop/coding/ethereum/constantine-forked/nimcache/libconstantine_static/@m..@sconstantine@smath@sarithmetic@slimbs_exgcd.nim.c:156:76: error: redefinition of 'm2' with a different type: 'const tyObject_LimbsUnsaturated__IqonXAOTabqZBul1SV9aMOA' (aka 'const struct tyObject_LimbsUnsaturated__IqonXAOTabqZBul1SV9aMOA') vs 'const tyObject_LimbsUnsaturated__OSDfiXcZ49cBg39aSDQmfgMw' (aka 'const struct tyObject_LimbsUnsaturated__OSDfiXcZ49cBg39aSDQmfgMw')
N_LIB_PRIVATE NIM_CONST tyObject_LimbsUnsaturated__IqonXAOTabqZBul1SV9aMOA m2 = {{4179058979223087787ULL,
                                                                           ^
/Users/nicks/Desktop/coding/ethereum/constantine-forked/nimcache/libconstantine_static/@m..@sconstantine@smath@sarithmetic@slimbs_exgcd.nim.c:131:77: note: previous definition is here
N_LIB_PRIVATE NIM_CONST tyObject_LimbsUnsaturated__OSDfiXcZ49cBg39aSDQmfgMw m2 = {{4611686014132420609ULL,
                                                                            ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
4 errors generated.
Error: execution of an external compiler program 'clang -c  -w -ferror-limit=3 -pthread -target arm64-apple-macos11 -fno-semantic-interposition -falign-functions=64 -fmerge-all-constants -O3   -I/opt/homebrew/Cellar/nim/2.0.6/nim/lib -I/Users/nicks/Desktop/coding/ethereum/constantine-forked/bindings -o /Users/nicks/Desktop/coding/ethereum/constantine-forked/nimcache/libconstantine_static/@m..@sconstantine@smath@sarithmetic@slimbs_exgcd.nim.c.o /Users/nicks/Desktop/coding/ethereum/constantine-forked/nimcache/libconstantine_static/@m..@sconstantine@smath@sarithmetic@slimbs_exgcd.nim.c' failed with exit code: 1


stack trace: (most recent call last)
/private/var/folders/0c/gprgl0vs4x3722q1fsw8qfdw0000gn/T/nimblecache-1720177987/nimscriptapi_4206983700.nim(211, 16)
/Users/nicks/Desktop/coding/ethereum/constantine-forked/constantine.nimble(269, 15) make_libTask
/Users/nicks/Desktop/coding/ethereum/constantine-forked/constantine.nimble(250, 5) genStaticLib
/Users/nicks/Desktop/coding/ethereum/constantine-forked/constantine.nimble(235, 5) compile
/opt/homebrew/Cellar/nim/2.0.6/nim/lib/system/nimscript.nim(265, 7) exec
/opt/homebrew/Cellar/nim/2.0.6/nim/lib/system/nimscript.nim(265, 7) Error: unhandled exception: FAILED: nim c --cpu:arm64 -l:'-target arm64-apple-macos11' -t:'-target arm64-apple-macos11' --tlsEmulation=off  -d:danger  --panics:on -d:noSignalHandler  --mm:arc -d:useMalloc  --verbosity:0 --hints:off --warnings:off  --passC:-fno-semantic-interposition  --passC:-falign-functions=64  --passC:-fmerge-all-constants --threads:on  --noMain --app:staticlib  --nimMainPrefix:ctt_init_  --out:libconstantine.a.arm --outdir:lib  --nimcache:nimcache/libconstantine_static bindings/lib_constantine.nim [OSError]
       Tip: 1 messages have been suppressed, use --verbose to show them.
nimscriptwrapper.nim(161) execScript

    Error:  Exception raised during nimble script execution
➜  constantine-forked git:(master) ✗ /Users/nicks/Desktop/coding/ethereum/constantine-forked/nimcache/libconstantine_static/@m..@sconstantine@smath@[email protected]:232:11: error: expected ';' at end of declaration
        NU64 x_NZ`gensym734;
                 ^
                 ;
/Users/nicks/Desktop/coding/ethereum/constantine-forked/nimcache/libconstantine_static/@m..@sconstantine@smath@[email protected]:248:6: error: expected ';' after expression
        x_NZ`gensym734 = accum;
            ^
            ;
/Users/nicks/Desktop/coding/ethereum/constantine-forked/nimcache/libconstantine_static/@m..@sconstantine@smath@[email protected]:248:6: error: expected expression
fatal error: too many errors emitted, stopping now [-ferror-limit=]
4 errors generated.

MacOS 14, M2 chip Nimble version - Nim Compiler Version 2.0.6 [MacOSX: arm64]

NickSneo avatar Jun 27 '24 01:06 NickSneo