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

os:standalone Error: system module needs: appendString #10978

Closed
mikra01 opened this issue Apr 7, 2019 · 0 comments

Comments

Projects
None yet
3 participants
@mikra01
Copy link

commented Apr 7, 2019

I tried to compile nimkernel but it failed because of the error above.
my fork is here : https://github.com/mikra01/nimkernel_ext

Current Output

main.nim(7, 1) template/generic instantiation from here
main.nim(8, 3) template/generic instantiation from here
main.nim(12, 14) template/generic instantiation from here
ioutils.nim(72, 3) template/generic instantiation from here
ioutils.nim(77, 3) template/generic instantiation from here
ioutils.nim(78, 5) template/generic instantiation from here
C:\Users\test\Nim\lib\system\chcks.nim(23, 11) template/generic instantiation from here
Error: system module needs: appendString
No stack traceback available
To create a stacktrace, rerun compilation with ./koch temp c <file>

I traced down the error and it seems it's located within a template of "/lib/system/indexerrors.nim"

The '&' operator seems not to work but I also didn't expect that.

My workaround-patch (modified indexerrors.nim)

# imported by other modules, unlike helpers.nim which is included
template formatErrorIndexBound*[T](i, a, b: T): string =
  when defined(standalone):
    "indexOutOfBounds"
  else:
    "index " & $i & " not in " & $a & " .. " & $b

template formatErrorIndexBound*[T](i, n: T): string =
  formatErrorIndexBound(i, 0, n)

my cross-compiler setup

D:\nprojects\nimkernel>i686-elf-gcc -v
Using built-in specs.
COLLECT_GCC=i686-elf-gcc
COLLECT_LTO_WRAPPER=c:/gcc_cross/i686-elf/bin/../libexec/gcc/i686-elf/7.1.0/lto-wrapper.exe
Target: i686-elf
Configured with: ../gcc-7.1.0/configure --host=i686-w64-mingw32.static --target=i686-elf --disable-nls --enable-languages=c,c++ --without-headers --prefix=/home/debian/build-i686-elf/windows/output
Thread model: single
gcc version 7.1.0 (GCC)

my nim compiler setup (devel)

git hash: f6ad071a46a2bec57db453343d8d8b75d3d16ac2

@mratsim mratsim added the Crash label Apr 8, 2019

@Araq Araq added the Regression label Apr 8, 2019

@Araq Araq closed this in a85d387 May 6, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.