icyguider / Nimcrypt2

.NET, PE, & Raw Shellcode Packer/Loader Written in Nim
GNU General Public License v3.0
736 stars 120 forks source link

Limits.h file not found #13

Closed javvylx closed 2 years ago

javvylx commented 2 years ago

Hello, I managed to build Obfuscator-LLVM and performed the steps in https://github.com/icyguider/Nimcrypt2/issues/6#top

However, i am getting an error that limits.h is not found.

In file included from /home/ubuntu/.cache/nim/stub_r/stdlib_digitsutils.nim.c:7:
In file included from /home/ubuntu/.choosenim/toolchains/nim-1.6.6/lib/nimbase.h:269:
/usr/include/limits.h:124:16: fatal error: 'limits.h' file not found
# include_next <limits.h>
               ^~~~~~~~~~
1 error generated.
Error: execution of an external compiler program 'clang -c -w -ferror-limit=3 -DWIN32_LEAN_AND_MEAN -mllvm -bcf -mllvm -sub -mllvm -fla -mllvm -split -aesSeed=TDMDF2AR1LO88IBHR998V6YI4MT3Q9NG -Os   -I/home/ubuntu/.choosenim/toolchains/nim-1.6.6/lib -I/home/ubuntu/Desktop/Nimcrypt2 -o /home/ubuntu/.cache/nim/stub_r/stdlib_digitsutils.nim.c.o /home/ubuntu/.cache/nim/stub_r/stdlib_digitsutils.nim.c' failed with exit code: 1

In file included from /home/ubuntu/.cache/nim/stub_r/stdlib_assertions.nim.c:7:
In file included from /home/ubuntu/.choosenim/toolchains/nim-1.6.6/lib/nimbase.h:269:
/usr/include/limits.h:124:16: fatal error: 'limits.h' file not found
# include_next <limits.h>
               ^~~~~~~~~~
In file included from /home/ubuntu/.cache/nim/stub_r/stdlib_formatfloat.nim.c:7:
In file included from /home/ubuntu/.choosenim/toolchains/nim-1.6.6/lib/nimbase.h:269:
/usr/include/limits.h:124:16: fatal error: 'limits.h' file not found
# include_next <limits.h>
               ^~~~~~~~~~
1 error generated.
In file included from /home/ubuntu/.cache/nim/stub_r/stdlib_dollars.nim.c:7:
In file included from /home/ubuntu/.choosenim/toolchains/nim-1.6.6/lib/nimbase.h:269:
/usr/include/limits.h:124:16: fatal error: 'limits.h' file not found
# include_next <limits.h>
               ^~~~~~~~~~
1 error generated.
1 error generated.

[!] Stub compilation failed! Check stub for errors.

Been trying to fix this for a while, limits.h is actually in /usr/include/ directory, but it still prompts the error. Please help.

jamesproudstar commented 1 year ago

Did you hash this limits.h problem out? I am getting the same issue on my end, nim 1.6.6 clang-9 as described in the nimcrypt2 readme

javvylx commented 1 year ago

You must add the following lines to your nim.cfg file to point nim to your wclang binaries:

amd64.windows.clang.exe = "x86_64-w64-mingw32-clang" amd64.windows.clang.linkerexe = "x86_64-w64-mingw32-clang" amd64.windows.clang.cpp.exe = "x86_64-w64-mingw32-clang++" amd64.windows.clang.cpp.linkerexe = "x86_64-w64-mingw32-clang++"

jamesproudstar commented 1 year ago

I'm on Linux, but thanks I'll give it a shot!