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

Build error. Aarch64. gcc-12. Nim 1.6.0 vs 1.6.6 #5

Open
clort81 opened this issue Jul 9, 2022 · 4 comments
Open

Build error. Aarch64. gcc-12. Nim 1.6.0 vs 1.6.6 #5

clort81 opened this issue Jul 9, 2022 · 4 comments

Comments

@clort81
Copy link

clort81 commented Jul 9, 2022

Hi! Nimble is a neat tool.
I'm not a NIM programmer but here's what happens when i try the nimble compile/run using:

  • gcc version 12.0.1 20220319 (experimental) [master r12-7719-g8ca61ad148f] (Debian 12-20220319-1)
  • Nim Compiler Version 1.6.2 [Linux: arm64]
    Compiled at 2021-12-17
    Cheers!
...
...
  Success: cligen installed successfully.
 Installing [email protected]
   Building tpix/tpix using c backend
/home/plab/.cache/nim/tpix_r/@m..@s..@s..@shome@[email protected]@[email protected]@szippy@sadler32_simd.nim.c: In function ‘adler32_neon__OOZOOZOOZhomeZplabZOnimbleZpkgsZzippy4548O4948O51ZzippyZadler515095simd_63’:
/home/plab/.cache/nim/tpix_r/@m..@s..@s..@shome@[email protected]@[email protected]@szippy@sadler32_simd.nim.c:346:25: note: use ‘-flax-vector-conversions’ to permit conversions between vectors with differing element types or numbers of subparts
  346 |                         T39_ = vget_low_u32(vecS1);
      |                         ^~~~
/home/plab/.cache/nim/tpix_r/@m..@s..@s..@shome@[email protected]@[email protected]@szippy@sadler32_simd.nim.c:346:32: error: incompatible types when assigning to type ‘uint8x8_t’ from type ‘uint32x2_t’
  346 |                         T39_ = vget_low_u32(vecS1);
      |                                ^~~~~~~~~~~~
/home/plab/.cache/nim/tpix_r/@m..@s..@s..@shome@[email protected]@[email protected]@szippy@sadler32_simd.nim.c:347:32: error: incompatible types when assigning to type ‘uint8x8_t’ from type ‘uint32x2_t’
  347 |                         T40_ = vget_high_u32(vecS1);
      |                                ^~~~~~~~~~~~~
/home/plab/.cache/nim/tpix_r/@m..@s..@s..@shome@[email protected]@[email protected]@szippy@sadler32_simd.nim.c:348:42: error: incompatible type for argument 1 of ‘vpadd_u32’
  348 |                         sum1 = vpadd_u32(T39_, T40_);
      |                                          ^~~~
      |                                          |
      |                                          uint8x8_t
In file included from /home/plab/.cache/nim/tpix_r/@m..@s..@s..@shome@[email protected]@[email protected]@szippy@sadler32_simd.nim.c:9:
/usr/lib/gcc/aarch64-linux-gnu/12/include/arm_neon.h:20299:23: note: expected ‘uint32x2_t’ but argument is of type ‘uint8x8_t’
20299 | vpadd_u32 (uint32x2_t __a, uint32x2_t __b)
      |            ~~~~~~~~~~~^~~
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/usr/lib/nim -I/tmp/nimble_1065393/githubcom_jesvedbergtpix -o /home/plab/.cache/nim/tpix_r/@m..@s..@s..@shome@[email protected]@[email protected]@szippy@sadler32_simd.nim.c.o /home/plab/.cache/nim/tpix_r/@m..@s..@s..@shome@[email protected]@[email protected]@szippy@sadler32_simd.nim.c' failed with exit code: 1


    Prompt: Build failed for 'https://github.com/jesvedberg/[email protected]', would you like to try installing 'https://github.com/jesvedberg/tpix@#head' (latest unstable)? [y/N]
    Answer: y
Downloading https://github.com/jesvedberg/tpix using git
  Verifying dependencies for tpix@#head
      Info: Dependency on pixie@any version already satisfied
  Verifying dependencies for [email protected]
      Info: Dependency on vmath@>= 1.1.4 already satisfied
  Verifying dependencies for [email protected]
      Info: Dependency on chroma@>= 0.2.5 already satisfied
  Verifying dependencies for [email protected]
      Info: Dependency on zippy@>= 0.10.2 already satisfied
  Verifying dependencies for [email protected]
      Info: Dependency on flatty@>= 0.3.4 already satisfied
  Verifying dependencies for [email protected]
      Info: Dependency on nimsimd@>= 1.1.1 already satisfied
  Verifying dependencies for [email protected]
      Info: Dependency on bumpy@>= 1.1.1 already satisfied
  Verifying dependencies for [email protected]
      Info: Dependency on vmath@>= 1.0.0 already satisfied
  Verifying dependencies for [email protected]
      Info: Dependency on cligen@any version already satisfied
  Verifying dependencies for [email protected]
 Installing tpix@#head
   Building tpix/tpix using c backend
/home/plab/.cache/nim/tpix_r/@m..@s..@s..@shome@[email protected]@[email protected]@szippy@sadler32_simd.nim.c: In function ‘adler32_neon__OOZOOZOOZhomeZplabZOnimbleZpkgsZzippy4548O4948O51ZzippyZadler515095simd_63’:
/home/plab/.cache/nim/tpix_r/@m..@s..@s..@shome@[email protected]@[email protected]@szippy@sadler32_simd.nim.c:346:25: note: use ‘-flax-vector-conversions’ to permit conversions between vectors with differing element types or numbers of subparts
  346 |                         T39_ = vget_low_u32(vecS1);
      |                         ^~~~
/home/plab/.cache/nim/tpix_r/@m..@s..@s..@shome@[email protected]@[email protected]@szippy@sadler32_simd.nim.c:346:32: error: incompatible types when assigning to type ‘uint8x8_t’ from type ‘uint32x2_t’
  346 |                         T39_ = vget_low_u32(vecS1);
      |                                ^~~~~~~~~~~~
/home/plab/.cache/nim/tpix_r/@m..@s..@s..@shome@[email protected]@[email protected]@szippy@sadler32_simd.nim.c:347:32: error: incompatible types when assigning to type ‘uint8x8_t’ from type ‘uint32x2_t’
  347 |                         T40_ = vget_high_u32(vecS1);
      |                                ^~~~~~~~~~~~~
/home/plab/.cache/nim/tpix_r/@m..@s..@s..@shome@[email protected]@[email protected]@szippy@sadler32_simd.nim.c:348:42: error: incompatible type for argument 1 of ‘vpadd_u32’
  348 |                         sum1 = vpadd_u32(T39_, T40_);
      |                                          ^~~~
      |                                          |
      |                                          uint8x8_t
In file included from /home/plab/.cache/nim/tpix_r/@m..@s..@s..@shome@[email protected]@[email protected]@szippy@sadler32_simd.nim.c:9:
/usr/lib/gcc/aarch64-linux-gnu/12/include/arm_neon.h:20299:23: note: expected ‘uint32x2_t’ but argument is of type ‘uint8x8_t’
20299 | vpadd_u32 (uint32x2_t __a, uint32x2_t __b)
      |            ~~~~~~~~~~~^~~
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/usr/lib/nim -I'/tmp/nimble_1065393/githubcom_jesvedbergtpix_#head' -o /home/plab/.cache/nim/tpix_r/@m..@s..@s..@shome@[email protected]@[email protected]@szippy@sadler32_simd.nim.c.o /home/plab/.cache/nim/tpix_r/@m..@s..@s..@shome@[email protected]@[email protected]@szippy@sadler32_simd.nim.c' failed with exit code: 1


       Tip: 182 messages have been suppressed, use --verbose to show them.
     Error: Build failed for package: tpix
        ... Execution failed with exit code 1
        ... Command: /usr/bin/nim c --colors:on --noNimblePath -d:release -d:NimblePkgVersion=1.0.3 --path:/home/plab/.nimble/pkgs/pixie-4.4.0 --path:/home/plab/.nimble/pkgs/vmath-1.1.4 --path:/home/plab/.nimble/pkgs/chroma-0.2.5 --path:/home/plab/.nimble/pkgs/zippy-0.10.3 --path:/home/plab/.nimble/pkgs/flatty-0.3.4 --path:/home/plab/.nimble/pkgs/nimsimd-1.1.5 --path:/home/plab/.nimble/pkgs/bumpy-1.1.1 --path:/home/plab/.nimble/pkgs/vmath-1.1.4 --path:/home/plab/.nimble/pkgs/cligen-1.5.24 --hints:off -o:'/tmp/nimble_1065393/githubcom_jesvedbergtpix_#head/tpix' '/tmp/nimble_1065393/githubcom_jesvedbergtpix_#head/tpix.nim'
@clort81 clort81 changed the title Build error. Aarch64. gcc-12 Build error. Aarch64. gcc-12. Nim 1.6.0 vs 1.6.6 Jul 9, 2022
@clort81
Copy link
Author

clort81 commented Jul 9, 2022

With 1.6.6 it looks like:

    Prompt: Build failed for 'https://github.com/jesvedberg/[email protected]', would you like to try installing 'https://github.com/jesvedberg/tpix@#head' (latest unstable)? [y/N]
    Answer: y
Downloading https://github.com/jesvedberg/tpix using git
  Verifying dependencies for tpix@#head
      Info: Dependency on pixie@any version already satisfied
  Verifying dependencies for [email protected]
      Info: Dependency on vmath@>= 1.1.4 already satisfied
  Verifying dependencies for [email protected]
      Info: Dependency on chroma@>= 0.2.5 already satisfied
  Verifying dependencies for [email protected]
      Info: Dependency on zippy@>= 0.10.2 already satisfied
  Verifying dependencies for [email protected]
      Info: Dependency on flatty@>= 0.3.4 already satisfied
  Verifying dependencies for [email protected]
      Info: Dependency on nimsimd@>= 1.1.1 already satisfied
  Verifying dependencies for [email protected]
      Info: Dependency on bumpy@>= 1.1.1 already satisfied
  Verifying dependencies for [email protected]
      Info: Dependency on vmath@>= 1.0.0 already satisfied
  Verifying dependencies for [email protected]
      Info: Dependency on cligen@any version already satisfied
  Verifying dependencies for [email protected]
 Installing tpix@#head
   Building tpix/tpix using c backend
/home/plab/.cache/nim/tpix_r/stdlib_system.nim.c: In function ‘nimParseBiggestFloat’:
/home/plab/.cache/nim/tpix_r/stdlib_system.nim.c:6979:53: error: incompatible types when assigning to type ‘NF’ {aka ‘double’} from type ‘__attribute__((const)) double (*)(const char *)’
 6979 |                                         (*number) = nan;
      |                                                     ^~~
Error: execution of an external compiler program 'gcc -c  -w -fmax-errors=3 -O3 -fno-strict-aliasing -fno-ident   -I/usr/local/lib/nim -I'/tmp/nimble_1086229/githubcom_jesvedbergtpix_#head' -o /home/plab/.cache/nim/tpix_r/stdlib_system.nim.c.o /home/plab/.cache/nim/tpix_r/stdlib_system.nim.c' failed with exit code: 1


       Tip: 49 messages have been suppressed, use --verbose to show them.
     Error: Build failed for package: tpix
        ... Execution failed with exit code 1
        ... Command: /usr/local/bin/nim c --colors:on --noNimblePath -d:release -d:NimblePkgVersion=1.0.3 --path:/home/plab/.nimble/pkgs/pixie-4.4.0 --path:/home/plab/.nimble/pkgs/vmath-1.1.4 --path:/home/plab/.nimble/pkgs/chroma-0.2.5 --path:/home/plab/.nimble/pkgs/zippy-0.10.3 --path:/home/plab/.nimble/pkgs/flatty-0.3.4 --path:/home/plab/.nimble/pkgs/nimsimd-1.1.5 --path:/home/plab/.nimble/pkgs/bumpy-1.1.1 --path:/home/plab/.nimble/pkgs/vmath-1.1.4 --path:/home/plab/.nimble/pkgs/cligen-1.5.24 --hints:off -o:'/tmp/nimble_1086229/githubcom_jesvedbergtpix_#head/tpix' '/tmp/nimble_1086229/githubcom_jesvedbergtpix_#head/tpix.nim'

cheers!

@SolitudeSF
Copy link
Contributor

does this compile for you?

import strutils
echo stdin.readLine.parseFloat

@SolitudeSF
Copy link
Contributor

SolitudeSF commented Jul 9, 2022

if you're installing with nimble, try it with -p:-d:pixieNoSimd

@jesvedberg
Copy link
Owner

Hi clort81! I am getting the same error as you, but unfortunately I currently don't know how to fix it. I tried SolitudeSF's suggestions too, and that didn't help either. It seems like the problem might be with the Zippy library that tpix is using through the pixie library. I have not encountered this problem before, as I have only compiled arm64 binaries through cross compilation with the zig compiler on my Intel system, and that works perfectly.

I will have to spend some more time with this to figure out what could be wrong, but for now I would recommend downloading the precompiled arm64 binary that you can find in the Releases section. I have tested that one on a Rpi4 running 64-bit RaspberryPi OS without any issues.

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