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

[Error] get a ton of errors when compiling. #86

Open
ThatOneDev-Code opened this issue Dec 27, 2022 · 2 comments
Open

[Error] get a ton of errors when compiling. #86

ThatOneDev-Code opened this issue Dec 27, 2022 · 2 comments

Comments

@ThatOneDev-Code
Copy link

os: void linux
nim ver: 1.6.0

problem:

when ever i run the nim build command, i get alot of errors and have no idea what they mean, ive tried to read them but it looks like nim is trying to find files that arent there?

error(sorry for the block of text) :

/usr/lib/gcc/x86_64-unknown-linux-gnu/12.2/include/avxintrin.h: In function 'fillUnsafeAvx_wm_780':
/usr/lib/gcc/x86_64-unknown-linux-gnu/12.2/include/avxintrin.h:1326:1: error: inlining failed in call to 'always_inline' '_mm256_set1_epi32': target specific option mismatch
1326 | _mm256_set1_epi32 (int __A)
| ^~~~~~~~~~~~~~~~~
/home/pugn/.cache/nim/worm_r/@mwm.nim.c:2452:20: note: called from here
2452 | colorVec = _mm256_set1_epi32(LOC5.dest);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/lib/gcc/x86_64-unknown-linux-gnu/12.2/include/avxintrin.h:921:1: error: inlining failed in call to 'always_inline' '_mm256_store_si256': target specific option mismatch
921 | _mm256_store_si256 (__m256i __P, __m256i __A)
| ^~~~~~~~~~~~~~~~~~
/home/pugn/.cache/nim/worm_r/@mwm.nim.c:2463:33: note: called from here
2463 | _mm256_store_si256(((void
) (p)), colorVec);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/lib/gcc/x86_64-unknown-linux-gnu/12.2/include/avxintrin.h:1326:1: error: inlining failed in call to 'always_inline' '_mm256_set1_epi32': target specific option mismatch
1326 | _mm256_set1_epi32 (int __A)
| ^~~~~~~~~~~~~~~~~
/home/pugn/.cache/nim/worm_r/@mwm.nim.c:2452:20: note: called from here
2452 | colorVec = _mm256_set1_epi32(LOC5.dest);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated due to -fmax-errors=3.
Error: execution of an external compiler program 'gcc -c -w -fmax-errors=3 -O3 -fno-strict-aliasing -fno-ident -I/home/pugn/.choosenim/toolchains/nim-1.6.0/lib -I/home/pugn/worm/src -o /home/pugn/.cache/nim/worm_r/@mwm.nim.c.o /home/pugn/.cache/nim/worm_r/@mwm.nim.c' failed with exit code: 1

   Tip: 35 messages have been suppressed, use --verbose to show them.
 Error: Build failed for package: worm
    ... Execution failed with exit code 1
    ... Command: /home/pugn/.nimble/bin/nim c --colors:on --noNimblePath -d:release -d:NimblePkgVersion=0.2.5 --path:/home/pugn/.nimble/pkgs/x11-1.1 --path:/home/pugn/.nimble/pkgs/pixie-5.0.4 --path:/home/pugn/.nimble/pkgs/vmath-1.2.0 --path:/home/pugn/.nimble/pkgs/chroma-0.2.7 --path:/home/pugn/.nimble/pkgs/zippy-0.10.5 --path:/home/pugn/.nimble/pkgs/flatty-0.3.4 --path:/home/pugn/.nimble/pkgs/nimsimd-1.2.2 --path:/home/pugn/.nimble/pkgs/bumpy-1.1.1 --path:/home/pugn/.nimble/pkgs/vmath-1.2.0 --path:/home/pugn/.nimble/pkgs/regex-0.20.1 --path:/home/pugn/.nimble/pkgs/unicodedb-0.11.2 --hints:off -o:/home/pugn/worm/worm /home/pugn/worm/src/worm.nim

any help would be great! and thanks!

@codic12
Copy link
Owner

codic12 commented Jan 2, 2023

sorry, but it seems like this is a nim issue, not a worm issue, and I don't really know how to solve it. maybe ask on the nim forums?

@xTrayambak
Copy link

This is a SIMD issue. You can fix it by adding the following to nim.cfg

--passC: "-march=native -mtune=native -msse -msse2 -msse3 -mssse3 -msse4.1 -msse4.2 -mpclmul -mavx -mavx2"

I encountered this issue on NixOS. If you don't have SIMD support, you can compile worm with -d:pixieNoSimd and it should compile.

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