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

Trouble compiling nimcrypt.nim #21

Open
bv-WoS opened this issue Sep 30, 2024 · 1 comment
Open

Trouble compiling nimcrypt.nim #21

bv-WoS opened this issue Sep 30, 2024 · 1 comment

Comments

@bv-WoS
Copy link

bv-WoS commented Sep 30, 2024

Having trouble compiling the nimcrypt.nim. I followed the steps from the README.md for installation but I run issue with the following step.

└─$ nim c -d=release --cc:gcc --embedsrc=on --hints=on --app=console --cpu=amd64 --out=nimcrypt nimcrypt.nim
Hint: used config file '/home/kali/.choosenim/toolchains/nim-2.0.8/config/nim.cfg' [Conf]
Hint: used config file '/home/kali/.choosenim/toolchains/nim-2.0.8/config/config.nims' [Conf]
...................................................................................................................................................................................
CC: ../../.nimble/pkgs2/docopt-0.7.1-387f1ae17f3b7620c7814cf44a52d3d91b8906e9/docopt.nim
/home/kali/.cache/nim/nimcrypt_r/@m..@[email protected]@[email protected]@sdocopt.nim.c: In function ‘single_match__OOZOOZOnimbleZpkgs50Zdocopt4548O55O4945515655f49ae4955f51b55545048c55564952cf5252a5350d51d5749b56574854e57Zdocopt_u2762’:
/home/kali/.cache/nim/nimcrypt_r/@m..@[email protected]@[email protected]@sdocopt.nim.c:7284:51: error: assignment to ‘tyObject_PatterncolonObjectType___WeyB6gDQ3YI7EV4PvOyZ2A *’ from incompatible pointer type ‘tyObject_ArgumentcolonObjectType___CnpOh3bCx58uVV1B5TEUzA *’ [-Wincompatible-pointer-types]
 7284 |                                         colontmp_ = argument__OOZOOZOnimbleZpkgs50Zdocopt4548O55O4945515655f49ae4955f51b55545048c55564952cf5252a5350d51d5749b56574854e57Zdocopt_u324(colontmpD__2, (*pattern).value);
      |                                                   ^
/home/kali/.cache/nim/nimcrypt_r/@m..@[email protected]@[email protected]@sdocopt.nim.c: In function ‘single_match__OOZOOZOnimbleZpkgs50Zdocopt4548O55O4945515655f49ae4955f51b55545048c55564952cf5252a5350d51d5749b56574854e57Zdocopt_u2774’:
/home/kali/.cache/nim/nimcrypt_r/@m..@[email protected]@[email protected]@sdocopt.nim.c:7586:59: error: assignment to ‘tyObject_PatterncolonObjectType___WeyB6gDQ3YI7EV4PvOyZ2A *’ from incompatible pointer type ‘tyObject_CommandcolonObjectType___wI72NlipaGf69cGksPNVtcA *’ [-Wincompatible-pointer-types]
 7586 |                                                 colontmp_ = command__OOZOOZOnimbleZpkgs50Zdocopt4548O55O4945515655f49ae4955f51b55545048c55564952cf5252a5350d51d5749b56574854e57Zdocopt_u619(colontmpD__4, colontmpD__5);
      |                                                           ^
Error: execution of an external compiler program 'gcc -c -w -fmax-errors=3 -pthread -O3 -fno-strict-aliasing -fno-ident -fno-math-errno   -I/home/kali/.choosenim/toolchains/nim-2.0.8/lib -I/home/kali/Tools/Nimcrypt2 -o /home/kali/.cache/nim/nimcrypt_r/@m..@[email protected]@[email protected]@sdocopt.nim.c.o /home/kali/.cache/nim/nimcrypt_r/@m..@[email protected]@[email protected]@sdocopt.nim.c' failed with exit code: 1

Here is all my basic information (nim version, kali version, gcc version).

$ nim -v
Nim Compiler Version 2.0.8 [Linux: amd64]
Compiled at 2024-07-03
Copyright (c) 2006-2023 by Andreas Rumpf

git hash: 5935c3bfa9fec6505394867b23510eb5cbab3dbf
active boot switches: -d:release

$ uname -a
Linux Kali 6.10.9-amd64 #1 SMP PREEMPT_DYNAMIC Kali 6.10.9-1kali1 (2024-09-09) x86_64 GNU/Linux

$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-linux-gnu/14/lto-wrapper
OFFLOAD_TARGET_NAMES=nvptx-none:amdgcn-amdhsa
OFFLOAD_TARGET_DEFAULT=1
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Debian 14.2.0-3' --with-bugurl=file:///usr/share/doc/gcc-14/README.Bugs --enable-languages=c,ada,c++,go,d,fortran,objc,obj-c++,m2,rust --prefix=/usr --with-gcc-major-version-only --program-suffix=-14 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/libexec --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-bootstrap --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-libstdcxx-backtrace --enable-gnu-unique-object --disable-vtable-verify --enable-plugin --enable-default-pie --with-system-zlib --enable-libphobos-checking=release --with-target-system-zlib=auto --enable-objc-gc=auto --enable-multiarch --disable-werror --enable-cet --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none=/build/reproducible-path/gcc-14-14.2.0/debian/tmp-nvptx/usr,amdgcn-amdhsa=/build/reproducible-path/gcc-14-14.2.0/debian/tmp-gcn/usr --enable-offload-defaulted --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu --with-build-config=bootstrap-lto-lean --enable-link-serialization=2
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 14.2.0 (Debian 14.2.0-3)

Sorry if this is a basic question, I'm fairly new to nim and not versed with how to correct the compilation errors.

@godylockz
Copy link

Found a solution:
https://forum.nim-lang.org/t/11587
https://www.reddit.com/r/nim/comments/1d3tq39/crash_in_gcc_incompatiblepointertypes_is_it_me_or/

nim c -d=release --cc:gcc --embedsrc=on --hints=on --app=console --cpu=amd64 --out=nimcrypt --passC:-fpermissive nimcrypt.nim

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

2 participants