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

Nim bindings for #30 #31

Merged
merged 2 commits into from
May 24, 2024
Merged

Nim bindings for #30 #31

merged 2 commits into from
May 24, 2024

Conversation

arnetheduck
Copy link
Contributor

No description provided.

@CLAassistant
Copy link

CLAassistant commented May 15, 2024

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@etan-status
Copy link
Contributor

% nimble test --verbose
     Info:  Nimble data file "/Users/etan/.nimble/nimbledata2.json" has been loaded.
  Verifying dependencies for hashtree_abi@0.1.0
  Compiling /Users/etan/Documents/Repos/hashtree/tests/test_hashtree_abi (from package hashtree_abi) using c backend
  Executing /usr/local/Cellar/nim/2.0.4/nim/bin/nim c --noNimblePath -d:NimblePkgVersion=0.1.0 -r --path:. /Users/etan/Documents/Repos/hashtree/tests/test_hashtree_abi 
Hint: used config file '/usr/local/Cellar/nim/2.0.4/nim/config/nim.cfg' [Conf]
Hint: used config file '/usr/local/Cellar/nim/2.0.4/nim/config/config.nims' [Conf]
...................................................................................................................
CC: hashtree
CC: ../../../../../../usr/local/Cellar/nim/2.0.4/nim/lib/system/exceptions.nim
CC: ../../../../../../usr/local/Cellar/nim/2.0.4/nim/lib/std/private/digitsutils.nim
CC: ../../../../../../usr/local/Cellar/nim/2.0.4/nim/lib/std/assertions.nim
CC: ../../../../../../usr/local/Cellar/nim/2.0.4/nim/lib/system/dollars.nim
CC: ../../../../../../usr/local/Cellar/nim/2.0.4/nim/lib/system.nim
CC: ../../../../../../usr/local/Cellar/nim/2.0.4/nim/lib/posix/posix.nim
CC: ../../../../../../usr/local/Cellar/nim/2.0.4/nim/lib/pure/times.nim
CC: ../../../../../../usr/local/Cellar/nim/2.0.4/nim/lib/std/cmdline.nim
CC: test_hashtree_abi.nim
Hint:  [Link]
ld: warning: ignoring duplicate libraries: '-lm'
Undefined symbols for architecture x86_64:
  "_hashtree_sha256_avx2_x8", referenced from:
      _hashtree_detect in @m..@ssrc@shashtree.c.o
  "_hashtree_sha256_avx512_x16", referenced from:
      _hashtree_detect in @m..@ssrc@shashtree.c.o
  "_hashtree_sha256_avx_x4", referenced from:
      _hashtree_detect in @m..@ssrc@shashtree.c.o
  "_hashtree_sha256_shani_x2", referenced from:
      _hashtree_detect in @m..@ssrc@shashtree.c.o
  "_hashtree_sha256_sse_x1", referenced from:
      _hashtree_detect in @m..@ssrc@shashtree.c.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Error: execution of an external program failed: 'clang   -o /Users/etan/Documents/Repos/hashtree/tests/test_hashtree_abi  /Users/etan/.cache/nim/test_hashtree_abi_d/@m..@ssrc@shashtree.c.o /Users/etan/.cache/nim/test_hashtree_abi_d/@m..@s..@s..@s..@s..@s..@susr@slocal@sCellar@snim@s2.0.4@snim@slib@ssystem@sexceptions.nim.c.o /Users/etan/.cache/nim/test_hashtree_abi_d/@m..@s..@s..@s..@s..@s..@susr@slocal@sCellar@snim@s2.0.4@snim@slib@sstd@sprivate@sdigitsutils.nim.c.o /Users/etan/.cache/nim/test_hashtree_abi_d/@m..@s..@s..@s..@s..@s..@susr@slocal@sCellar@snim@s2.0.4@snim@slib@sstd@sassertions.nim.c.o /Users/etan/.cache/nim/test_hashtree_abi_d/@m..@s..@s..@s..@s..@s..@susr@slocal@sCellar@snim@s2.0.4@snim@slib@ssystem@sdollars.nim.c.o /Users/etan/.cache/nim/test_hashtree_abi_d/@m..@s..@s..@s..@s..@s..@susr@slocal@sCellar@snim@s2.0.4@snim@slib@ssystem.nim.c.o /Users/etan/.cache/nim/test_hashtree_abi_d/@m..@s..@s..@s..@s..@s..@susr@slocal@sCellar@snim@s2.0.4@snim@slib@sposix@sposix.nim.c.o /Users/etan/.cache/nim/test_hashtree_abi_d/@m..@s..@s..@s..@s..@s..@susr@slocal@sCellar@snim@s2.0.4@snim@slib@spure@stimes.nim.c.o /Users/etan/.cache/nim/test_hashtree_abi_d/@m..@s..@s..@s..@s..@s..@susr@slocal@sCellar@snim@s2.0.4@snim@slib@sstd@scmdline.nim.c.o /Users/etan/.cache/nim/test_hashtree_abi_d/@mtest_hashtree_abi.nim.c.o  -lm -lm   -ldl'
tools.nim(36)            doCmd

    Error:  Execution failed with exit code 1
        ... Command: /usr/local/Cellar/nim/2.0.4/nim/bin/nim c --noNimblePath -d:NimblePkgVersion=0.1.0 -r --path:. /Users/etan/Documents/Repos/hashtree/tests/test_hashtree_abi 
     Info:  Nimble data file "/Users/etan/.nimble/nimbledata2.json" has been saved.
% sw_vers
ProductName:		macOS
ProductVersion:		14.4.1
BuildVersion:		23E224

% system_profiler SPHardwareDataType
Hardware:

    Hardware Overview:

      Model Name: MacBook Pro
      Model Identifier: MacBookPro16,1
      Processor Name: 8-Core Intel Core i9
      Processor Speed: 2.4 GHz
      Number of Processors: 1
      Total Number of Cores: 8
      L2 Cache (per Core): 256 KB
      L3 Cache: 16 MB
      Hyper-Threading Technology: Enabled
      Memory: 32 GB
      System Firmware Version: 2022.100.22.0.0 (iBridge: 21.16.4222.0.0,0)
      OS Loader Version: 580~1678

@potuz
Copy link
Collaborator

potuz commented May 24, 2024

Yeah, Intel macs are not covered until I get my hands on one

Copy link
Contributor

@etan-status etan-status left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Nim itself looks fine, but someone with an ARM based macOS machine should confirm that brew install nim and then nimble test works.

I also can't confirm whether the clang assembler bypass works, but it was already present before and solely restricted to only activate on Linux (and not on Mac).

@arnetheduck
Copy link
Contributor Author

ARM based macOS

we're testing this with this trick here: https://github.com/status-im/nim-ssz-serialization/pull/86/files#diff-b803fcb7f17ed9235f1e5cb1fcd2f5d3b2838429d4368ae4c57ce4436577f03fR45 - depending on the macos version, github will use either an intel or a mac

@potuz potuz merged commit 27906d9 into prysmaticlabs:main May 24, 2024
7 of 8 checks passed
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

Successfully merging this pull request may close these issues.

None yet

4 participants