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

Bug: Error build with cmd "make -jX nimbus_beacon_node" #6324

Closed
tranphuocanh0207 opened this issue Jun 1, 2024 · 11 comments
Closed

Bug: Error build with cmd "make -jX nimbus_beacon_node" #6324

tranphuocanh0207 opened this issue Jun 1, 2024 · 11 comments

Comments

@tranphuocanh0207
Copy link

Describe the bug
I'm try to build the process with 'make -jX nimbus_beacon_node' but I get error

  1. Platform details (OS, architecture):
    Architecture: x86_64
    CPU op-mode(s): 32-bit, 64-bit
    Address sizes: 48 bits physical, 48 bits virtual
    Byte Order: Little Endian
    CPU(s): 24
    On-line CPU(s) list: 0-23
    Vendor ID: AuthenticAMD
    Model name: AMD Ryzen 9 7900 12-Core Processor
Screenshot 2024-06-01 at 23 11 17 your problem.

Installed dependencies :
build-essential is already the newest version (12.9ubuntu3).
cmake is already the newest version (3.22.1-1ubuntu1.22.04.2).
git-lfs is already the newest version (3.0.2-1ubuntu0.2).
gcc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0

@tersec
Copy link
Contributor

tersec commented Jun 3, 2024

@tranphuocanh0207 if you run gcc -march=native -Q --help=target and look for march, mcpu, and mtune values, what does it show in your case? e.g.

$ gcc -march=native -Q --help=target | grep -E '(march|mcpu|mtune)='
  -march=                     		znver3
  -mcpu=                      		
  -mtune=                     		znver3

Testing gcc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0 it does not support znver4; this must come in gcc 12/13/14:

cc1: note: valid arguments to '-march=' switch are: nocona core2 nehalem corei7 westmere sandybridge corei7-avx ivybridge core-avx-i haswell core-avx2 broadwell skylake skylake-avx512 cannonlake icelake-client rocketlake icelake-server cascadelake tigerlake cooperlake sapphirerapids alderlake bonnell atom silvermont slm goldmont goldmont-plus tremont knl knm x86-64 x86-64-v2 x86-64-v3 x86-64-v4 eden-x2 nano nano-1000 nano-2000 nano-3000 nano-x2 eden-x4 nano-x4 k8 k8-sse3 opteron opteron-sse3 athlon64 athlon64-sse3 athlon-fx amdfam10 barcelona bdver1 bdver2 bdver3 bdver4 znver1 znver2 znver3 btver1 btver2 native

it should be one of those listed valid arguments in each case.

Furthermore, if you then substitute in place of native in:

nimbus-eth2/config.nims

Lines 124 to 125 in d2a0751

switch("passC", "-march=native")
switch("passL", "-march=native")

e.g.

 switch("passC", "-march=znver3") 
 switch("passL", "-march=znver3") 

(or whatever it shows)

does it still reproduce this issue?

@tranphuocanh0207
Copy link
Author

Oh, command "gcc -march=native -Q --help=target" is the same as your e.g.
And the solution of replacing "native" with "znver3" in config.nims worked. Thanks for your help.

@tersec
Copy link
Contributor

tersec commented Jun 3, 2024

That's strange, but, glad you were able to built it by specifying -march=znver3 directly. It should work regardless, but this is a potential workaround until a root cause is discovered.

@tranphuocanh0207
Copy link
Author

Yes, I hope it doesn't encounter any unexpected errors. Thanks you!!!

@tranphuocanh0207
Copy link
Author

@tersec It's working, but it's not stable because of this error.
image

@tersec
Copy link
Contributor

tersec commented Jun 4, 2024

That stack trace looks like the symbol non-demangling one gets using Nim 2.0. What version of Nim is being used to compile this?

@tranphuocanh0207
Copy link
Author

@tersec I'm not sure, but with these errors it's quite dangerous during validator operation. I decided to switch to another device with an Intel CPU, hopefully it will be more stable.

@arnetheduck
Copy link
Member

Nim 2.0

it's also backported to 1.6.20

@tersec
Copy link
Contributor

tersec commented Jul 2, 2024

Another workaround -- https://nimbus.guide/developers.html#makefile-tips-and-tricks-for-developers

make NIMFLAGS="-d:disableMarchNative" nimbus_beacon_node

@tersec
Copy link
Contributor

tersec commented Jul 4, 2024

#6402

@tersec tersec closed this as completed Jul 4, 2024
This issue was closed.
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

3 participants