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

Building koch on OpenBSD fails unless the Nim directory is in $PATH #13758

Closed
euantorano opened this issue Mar 25, 2020 · 8 comments · Fixed by #13762 or #14291
Closed

Building koch on OpenBSD fails unless the Nim directory is in $PATH #13758

euantorano opened this issue Mar 25, 2020 · 8 comments · Fixed by #13762 or #14291

Comments

@euantorano
Copy link
Contributor

When building koch on OpenBSD using the following steps:

cd $HOME
git clone --depth 1 -q https://github.com/nim-lang/Nim.git
cd Nim
git clone --depth 1 -q https://github.com/nim-lang/csources.git
gmake -C csources -j $(sysctl -n hw.ncpu)
bin/nim c koch

The final step (bin/nim c koch) fails with the following output:

`bin/nim c koch` output ``` euan@corellia ~/Nim> bin/nim c koch Hint: used config file 'config/nim.cfg' [Conf] Hint: used config file '/home/euan/Nim/koch.nim.cfg' [Conf] Hint: used config file 'config/config.nims' [Conf] /home/euan/Nim/lib/system/io.nim(89, 6) Hint: 'c_clearerr' is declared but not used [XDeclaredButNotUsed] /home/euan/Nim/lib/system/io.nim(143, 6) Hint: 'strerror' is declared but not used [XDeclaredButNotUsed] /home/euan/Nim/lib/system/io.nim(117, 6) Hint: 'c_ferror' is declared but not used [XDeclaredButNotUsed] /home/euan/Nim/lib/system/io.nim(440, 6) Hint: 'readAllFile' is declared but not used [XDeclaredButNotUsed] /home/euan/Nim/lib/system/io.nim(91, 6) Hint: 'c_feof' is declared but not used [XDeclaredButNotUsed] /home/euan/Nim/lib/system/io.nim(461, 6) Hint: 'writeLn' is declared but not used [XDeclaredButNotUsed] /home/euan/Nim/lib/system/io.nim(124, 6) Hint: 'c_fputc' is declared but not used [XDeclaredButNotUsed] /home/euan/Nim/lib/system.nim(45, 3) Hint: 'nil' is declared but not used [XDeclaredButNotUsed] /home/euan/Nim/lib/system.nim(504, 5) Hint: 'NimString' is declared but not used [XDeclaredButNotUsed] /home/euan/Nim/lib/system.nim(1815, 7) Hint: 'NimStackTrace' is declared but not used [XDeclaredButNotUsed] /home/euan/Nim/lib/system.nim(1169, 10) Hint: 'sysAssert' is declared but not used [XDeclaredButNotUsed] /home/euan/Nim/lib/system.nim(211, 7) Hint: 'ThisIsSystem' is declared but not used [XDeclaredButNotUsed] /home/euan/Nim/lib/system.nim(1061, 3) Hint: 'hasSharedHeap' is declared but not used [XDeclaredButNotUsed] /home/euan/Nim/lib/system.nim(1039, 3) Hint: 'strlitFlag' is declared but not used [XDeclaredButNotUsed] /home/euan/Nim/lib/system/fatal.nim(15, 9) Hint: 'gotoBasedExceptions' is declared but not used [XDeclaredButNotUsed] /home/euan/Nim/lib/system.nim(1817, 10) Hint: 'coroutinesSupportedPlatform' is declared but not used [XDeclaredButNotUsed] Hint: system [Processing] Hint: widestrs [Processing] Hint: io [Processing] /home/euan/Nim/lib/system/io.nim(461, 6) Hint: 'writeLn' is declared but not used [XDeclaredButNotUsed] /home/euan/Nim/lib/system/io.nim(440, 6) Hint: 'readAllFile' is declared but not used [XDeclaredButNotUsed] /home/euan/Nim/lib/system/io.nim(91, 6) Hint: 'c_feof' is declared but not used [XDeclaredButNotUsed] /home/euan/Nim/lib/system/io.nim(124, 6) Hint: 'c_fputc' is declared but not used [XDeclaredButNotUsed] /home/euan/Nim/lib/system/gc.nim(143, 10) Hint: 'color' is declared but not used [XDeclaredButNotUsed] /home/euan/Nim/lib/system/mmdisp.nim(17, 3) Hint: 'debugGC' is declared but not used [XDeclaredButNotUsed] /home/euan/Nim/lib/system/dyncalls.nim(18, 3) Hint: 'NilLibHandle' is declared but not used [XDeclaredButNotUsed] /home/euan/Nim/lib/system/repr.nim(147, 8) Hint: 'reprBreak' is declared but not used [XDeclaredButNotUsed] /home/euan/Nim/lib/system/dyncalls.nim(72, 8) Hint: 'dlerror' is declared but not used [XDeclaredButNotUsed] /home/euan/Nim/lib/system/cellsets.nim(184, 10) Hint: 'elements' is declared but not used [XDeclaredButNotUsed] /home/euan/Nim/lib/system/cellsets.nim(163, 6) Hint: 'excl' is declared but not used [XDeclaredButNotUsed] /home/euan/Nim/lib/system.nim(1817, 10) Hint: 'coroutinesSupportedPlatform' is declared but not used [XDeclaredButNotUsed] /home/euan/Nim/lib/system/gc.nim(850, 8) Hint: 'GC_setStrategy' is declared but not used [XDeclaredButNotUsed] /home/euan/Nim/lib/system/cellsets.nim(66, 6) Hint: 'deinit' is declared but not used [XDeclaredButNotUsed] /home/euan/Nim/lib/system/alloc.nim(1001, 6) Hint: 'getFreeMem' is declared but not used [XDeclaredButNotUsed] /home/euan/Nim/lib/system/alloc.nim(1024, 8) Hint: 'deallocOsPages' is declared but not used [XDeclaredButNotUsed] /home/euan/Nim/lib/system/sysstr.nim(111, 6) Hint: 'newOwnedString' is declared but not used [XDeclaredButNotUsed] /home/euan/Nim/lib/system.nim(2177, 5) Hint: 'SafePoint' is declared but not used [XDeclaredButNotUsed] /home/euan/Nim/lib/system.nim(45, 3) Hint: 'nil' is declared but not used [XDeclaredButNotUsed] /home/euan/Nim/lib/system/mmdisp.nim(38, 3) Hint: 'PByte' is declared but not used [XDeclaredButNotUsed] /home/euan/Nim/lib/system.nim(211, 7) Hint: 'ThisIsSystem' is declared but not used [XDeclaredButNotUsed] /home/euan/Nim/lib/system/gc.nim(39, 3) Hint: 'rcPurple' is declared but not used [XDeclaredButNotUsed] /home/euan/Nim/lib/system/alloc.nim(979, 6) Hint: 'realloc0' is declared but not used [XDeclaredButNotUsed] /home/euan/Nim/lib/system/alloc.nim(1002, 6) Hint: 'getTotalMem' is declared but not used [XDeclaredButNotUsed] /home/euan/Nim/lib/system/cellsets.nim(45, 6) Hint: 'contains' is declared but not used [XDeclaredButNotUsed] /home/euan/Nim/lib/system/mmdisp.nim(39, 3) Hint: 'PString' is declared but not used [XDeclaredButNotUsed] /home/euan/Nim/lib/system/osalloc.nim(27, 7) Hint: 'doNotUnmap' is declared but not used [XDeclaredButNotUsed] /home/euan/Nim/lib/system/cellsets.nim(237, 10) Hint: 'elementsExcept' is declared but not used [XDeclaredButNotUsed] /home/euan/Nim/lib/system/avltree.nim(27, 6) Hint: 'find' is declared but not used [XDeclaredButNotUsed] /home/euan/Nim/lib/system/gc.nim(144, 10) Hint: 'setColor' is declared but not used [XDeclaredButNotUsed] /home/euan/Nim/lib/system/alloc.nim(815, 6) Hint: 'rawAlloc0' is declared but not used [XDeclaredButNotUsed] /home/euan/Nim/lib/system/gc.nim(38, 3) Hint: 'rcWhite' is declared but not used [XDeclaredButNotUsed] /home/euan/Nim/lib/system/gc.nim(37, 3) Hint: 'rcGray' is declared but not used [XDeclaredButNotUsed] Hint: koch [Processing] Hint: os [Processing] Hint: strutils [Processing] Hint: parseutils [Processing] Hint: math [Processing] Hint: bitops [Processing] Hint: macros [Processing] Hint: algorithm [Processing] Hint: unicode [Processing] Hint: pathnorm [Processing] Hint: osseps [Processing] /home/euan/Nim/lib/pure/pathnorm.nim(46, 10) Hint: 'dirs' is declared but not used [XDeclaredButNotUsed] Hint: posix [Processing] Hint: times [Processing] Hint: options [Processing] Hint: typetraits [Processing] /home/euan/Nim/lib/pure/typetraits.nim(92, 11) Error: cannot open file: std/macros ```

However, if we add $HOME/Nim/bin to the path, then run the command as nim c koch instead, the build completes successfully:

`nim c koch` output
euan@corellia ~/Nim> nim c koch
Hint: used config file '/home/euan/Nim/config/nim.cfg' [Conf]
Hint: used config file 'koch.nim.cfg' [Conf]
Hint: used config file '/home/euan/Nim/config/config.nims' [Conf]
/home/euan/Nim/lib/system/io.nim(89, 6) Hint: 'c_clearerr' is declared but not used [XDeclaredButNotUsed]
/home/euan/Nim/lib/system/io.nim(143, 6) Hint: 'strerror' is declared but not used [XDeclaredButNotUsed]
/home/euan/Nim/lib/system/io.nim(117, 6) Hint: 'c_ferror' is declared but not used [XDeclaredButNotUsed]
/home/euan/Nim/lib/system/io.nim(440, 6) Hint: 'readAllFile' is declared but not used [XDeclaredButNotUsed]
/home/euan/Nim/lib/system/io.nim(91, 6) Hint: 'c_feof' is declared but not used [XDeclaredButNotUsed]
/home/euan/Nim/lib/system/io.nim(461, 6) Hint: 'writeLn' is declared but not used [XDeclaredButNotUsed]
/home/euan/Nim/lib/system/io.nim(124, 6) Hint: 'c_fputc' is declared but not used [XDeclaredButNotUsed]
/home/euan/Nim/lib/system.nim(45, 3) Hint: 'nil' is declared but not used [XDeclaredButNotUsed]
/home/euan/Nim/lib/system.nim(504, 5) Hint: 'NimString' is declared but not used [XDeclaredButNotUsed]
/home/euan/Nim/lib/system.nim(1815, 7) Hint: 'NimStackTrace' is declared but not used [XDeclaredButNotUsed]
/home/euan/Nim/lib/system.nim(1169, 10) Hint: 'sysAssert' is declared but not used [XDeclaredButNotUsed]
/home/euan/Nim/lib/system.nim(211, 7) Hint: 'ThisIsSystem' is declared but not used [XDeclaredButNotUsed]
/home/euan/Nim/lib/system.nim(1061, 3) Hint: 'hasSharedHeap' is declared but not used [XDeclaredButNotUsed]
/home/euan/Nim/lib/system.nim(1039, 3) Hint: 'strlitFlag' is declared but not used [XDeclaredButNotUsed]
/home/euan/Nim/lib/system/fatal.nim(15, 9) Hint: 'gotoBasedExceptions' is declared but not used [XDeclaredButNotUsed]
/home/euan/Nim/lib/system.nim(1817, 10) Hint: 'coroutinesSupportedPlatform' is declared but not used [XDeclaredButNotUsed]
Hint: system [Processing]
Hint: widestrs [Processing]
Hint: io [Processing]
/home/euan/Nim/lib/system/io.nim(461, 6) Hint: 'writeLn' is declared but not used [XDeclaredButNotUsed]
/home/euan/Nim/lib/system/io.nim(440, 6) Hint: 'readAllFile' is declared but not used [XDeclaredButNotUsed]
/home/euan/Nim/lib/system/io.nim(91, 6) Hint: 'c_feof' is declared but not used [XDeclaredButNotUsed]
/home/euan/Nim/lib/system/io.nim(124, 6) Hint: 'c_fputc' is declared but not used [XDeclaredButNotUsed]
/home/euan/Nim/lib/system/gc.nim(143, 10) Hint: 'color' is declared but not used [XDeclaredButNotUsed]
/home/euan/Nim/lib/system/mmdisp.nim(17, 3) Hint: 'debugGC' is declared but not used [XDeclaredButNotUsed]
/home/euan/Nim/lib/system/dyncalls.nim(18, 3) Hint: 'NilLibHandle' is declared but not used [XDeclaredButNotUsed]
/home/euan/Nim/lib/system/repr.nim(147, 8) Hint: 'reprBreak' is declared but not used [XDeclaredButNotUsed]
/home/euan/Nim/lib/system/dyncalls.nim(72, 8) Hint: 'dlerror' is declared but not used [XDeclaredButNotUsed]
/home/euan/Nim/lib/system/cellsets.nim(184, 10) Hint: 'elements' is declared but not used [XDeclaredButNotUsed]
/home/euan/Nim/lib/system/cellsets.nim(163, 6) Hint: 'excl' is declared but not used [XDeclaredButNotUsed]
/home/euan/Nim/lib/system.nim(1817, 10) Hint: 'coroutinesSupportedPlatform' is declared but not used [XDeclaredButNotUsed]
/home/euan/Nim/lib/system/gc.nim(850, 8) Hint: 'GC_setStrategy' is declared but not used [XDeclaredButNotUsed]
/home/euan/Nim/lib/system/cellsets.nim(66, 6) Hint: 'deinit' is declared but not used [XDeclaredButNotUsed]
/home/euan/Nim/lib/system/alloc.nim(1001, 6) Hint: 'getFreeMem' is declared but not used [XDeclaredButNotUsed]
/home/euan/Nim/lib/system/alloc.nim(1024, 8) Hint: 'deallocOsPages' is declared but not used [XDeclaredButNotUsed]
/home/euan/Nim/lib/system/sysstr.nim(111, 6) Hint: 'newOwnedString' is declared but not used [XDeclaredButNotUsed]
/home/euan/Nim/lib/system.nim(2177, 5) Hint: 'SafePoint' is declared but not used [XDeclaredButNotUsed]
/home/euan/Nim/lib/system.nim(45, 3) Hint: 'nil' is declared but not used [XDeclaredButNotUsed]
/home/euan/Nim/lib/system/mmdisp.nim(38, 3) Hint: 'PByte' is declared but not used [XDeclaredButNotUsed]
/home/euan/Nim/lib/system.nim(211, 7) Hint: 'ThisIsSystem' is declared but not used [XDeclaredButNotUsed]
/home/euan/Nim/lib/system/gc.nim(39, 3) Hint: 'rcPurple' is declared but not used [XDeclaredButNotUsed]
/home/euan/Nim/lib/system/alloc.nim(979, 6) Hint: 'realloc0' is declared but not used [XDeclaredButNotUsed]
/home/euan/Nim/lib/system/alloc.nim(1002, 6) Hint: 'getTotalMem' is declared but not used [XDeclaredButNotUsed]
/home/euan/Nim/lib/system/cellsets.nim(45, 6) Hint: 'contains' is declared but not used [XDeclaredButNotUsed]
/home/euan/Nim/lib/system/mmdisp.nim(39, 3) Hint: 'PString' is declared but not used [XDeclaredButNotUsed]
/home/euan/Nim/lib/system/osalloc.nim(27, 7) Hint: 'doNotUnmap' is declared but not used [XDeclaredButNotUsed]
/home/euan/Nim/lib/system/cellsets.nim(237, 10) Hint: 'elementsExcept' is declared but not used [XDeclaredButNotUsed]
/home/euan/Nim/lib/system/avltree.nim(27, 6) Hint: 'find' is declared but not used [XDeclaredButNotUsed]
/home/euan/Nim/lib/system/gc.nim(144, 10) Hint: 'setColor' is declared but not used [XDeclaredButNotUsed]
/home/euan/Nim/lib/system/alloc.nim(815, 6) Hint: 'rawAlloc0' is declared but not used [XDeclaredButNotUsed]
/home/euan/Nim/lib/system/gc.nim(38, 3) Hint: 'rcWhite' is declared but not used [XDeclaredButNotUsed]
/home/euan/Nim/lib/system/gc.nim(37, 3) Hint: 'rcGray' is declared but not used [XDeclaredButNotUsed]
Hint: koch [Processing]
Hint: os [Processing]
Hint: strutils [Processing]
Hint: parseutils [Processing]
Hint: math [Processing]
Hint: bitops [Processing]
Hint: macros [Processing]
Hint: algorithm [Processing]
Hint: unicode [Processing]
Hint: pathnorm [Processing]
Hint: osseps [Processing]
/home/euan/Nim/lib/pure/pathnorm.nim(46, 10) Hint: 'dirs' is declared but not used [XDeclaredButNotUsed]
Hint: posix [Processing]
Hint: times [Processing]
Hint: options [Processing]
Hint: typetraits [Processing]
/home/euan/Nim/lib/pure/times.nim(2494, 26) Warning: countLeapYears is deprecated [Deprecated]
/home/euan/Nim/lib/pure/times.nim(2501, 15) Warning: countLeapYears is deprecated [Deprecated]
/home/euan/Nim/lib/pure/times.nim(2509, 24) Warning: countLeapYears is deprecated [Deprecated]
/home/euan/Nim/lib/pure/os.nim(2196, 6) Warning: declared lock level is 0, but real lock level is <unknown> [LockLevel]
/home/euan/Nim/lib/pure/os.nim(2316, 6) Warning: declared lock level is 0, but real lock level is <unknown> [LockLevel]
/home/euan/Nim/lib/pure/os.nim(2449, 6) Warning: declared lock level is 0, but real lock level is <unknown> [LockLevel]
/home/euan/Nim/lib/pure/os.nim(2813, 8) Hint: 'getApplAux' is declared but not used [XDeclaredButNotUsed]
Hint: parseopt [Processing]
Hint: osproc [Processing]
Hint: strtabs [Processing]
Hint: hashes [Processing]
Hint: streams [Processing]
Hint: cpuinfo [Processing]
Hint: kqueue [Processing]
/home/euan/Nim/lib/pure/osproc.nim(1344, 8) Hint: 'select' is declared but not used [XDeclaredButNotUsed]
Hint: kochdocs [Processing]
Hint: sets [Processing]
/home/euan/Nim/lib/pure/collections/hashcommon.nim(21, 7) Hint: 'freeMarker' is declared but not used [XDeclaredButNotUsed]
Hint: gcc -c  -w  -I/home/euan/Nim/lib -I/home/euan/Nim -o /home/euan/.cache/nim/koch_d/stdlib_assertions.nim.c.o /home/euan/.cache/nim/koch_d/stdlib_assertions.nim.c [Exec]
Hint: gcc -c  -w  -I/home/euan/Nim/lib -I/home/euan/Nim -o /home/euan/.cache/nim/koch_d/stdlib_dollars.nim.c.o /home/euan/.cache/nim/koch_d/stdlib_dollars.nim.c [Exec]
Hint: gcc -c  -w  -I/home/euan/Nim/lib -I/home/euan/Nim -o /home/euan/.cache/nim/koch_d/stdlib_io.nim.c.o /home/euan/.cache/nim/koch_d/stdlib_io.nim.c [Exec]
Hint: gcc -c  -w  -I/home/euan/Nim/lib -I/home/euan/Nim -o /home/euan/.cache/nim/koch_d/stdlib_system.nim.c.o /home/euan/.cache/nim/koch_d/stdlib_system.nim.c [Exec]
Hint: gcc -c  -w  -I/home/euan/Nim/lib -I/home/euan/Nim -o /home/euan/.cache/nim/koch_d/stdlib_math.nim.c.o /home/euan/.cache/nim/koch_d/stdlib_math.nim.c [Exec]
Hint: gcc -c  -w  -I/home/euan/Nim/lib -I/home/euan/Nim -o /home/euan/.cache/nim/koch_d/stdlib_strutils.nim.c.o /home/euan/.cache/nim/koch_d/stdlib_strutils.nim.c [Exec]
Hint: gcc -c  -w  -I/home/euan/Nim/lib -I/home/euan/Nim -o /home/euan/.cache/nim/koch_d/stdlib_pathnorm.nim.c.o /home/euan/.cache/nim/koch_d/stdlib_pathnorm.nim.c [Exec]
Hint: gcc -c  -w  -I/home/euan/Nim/lib -I/home/euan/Nim -o /home/euan/.cache/nim/koch_d/stdlib_posix.nim.c.o /home/euan/.cache/nim/koch_d/stdlib_posix.nim.c [Exec]
Hint: gcc -c  -w  -I/home/euan/Nim/lib -I/home/euan/Nim -o /home/euan/.cache/nim/koch_d/stdlib_times.nim.c.o /home/euan/.cache/nim/koch_d/stdlib_times.nim.c [Exec]
Hint: gcc -c  -w  -I/home/euan/Nim/lib -I/home/euan/Nim -o /home/euan/.cache/nim/koch_d/stdlib_os.nim.c.o /home/euan/.cache/nim/koch_d/stdlib_os.nim.c [Exec]
Hint: gcc -c  -w  -I/home/euan/Nim/lib -I/home/euan/Nim -o /home/euan/.cache/nim/koch_d/stdlib_parseopt.nim.c.o /home/euan/.cache/nim/koch_d/stdlib_parseopt.nim.c [Exec]
Hint: gcc -c  -w  -I/home/euan/Nim/lib -I/home/euan/Nim -o /home/euan/.cache/nim/koch_d/stdlib_hashes.nim.c.o /home/euan/.cache/nim/koch_d/stdlib_hashes.nim.c [Exec]
Hint: gcc -c  -w  -I/home/euan/Nim/lib -I/home/euan/Nim -o /home/euan/.cache/nim/koch_d/stdlib_strtabs.nim.c.o /home/euan/.cache/nim/koch_d/stdlib_strtabs.nim.c [Exec]
Hint: gcc -c  -w  -I/home/euan/Nim/lib -I/home/euan/Nim -o /home/euan/.cache/nim/koch_d/stdlib_streams.nim.c.o /home/euan/.cache/nim/koch_d/stdlib_streams.nim.c [Exec]
Hint: gcc -c  -w  -I/home/euan/Nim/lib -I/home/euan/Nim -o /home/euan/.cache/nim/koch_d/stdlib_cpuinfo.nim.c.o /home/euan/.cache/nim/koch_d/stdlib_cpuinfo.nim.c [Exec]
Hint: gcc -c  -w  -I/home/euan/Nim/lib -I/home/euan/Nim -o /home/euan/.cache/nim/koch_d/stdlib_osproc.nim.c.o /home/euan/.cache/nim/koch_d/stdlib_osproc.nim.c [Exec]
Hint: gcc -c  -w  -I/home/euan/Nim/lib -I/home/euan/Nim -o /home/euan/.cache/nim/koch_d/stdlib_sets.nim.c.o /home/euan/.cache/nim/koch_d/stdlib_sets.nim.c [Exec]
Hint: gcc -c  -w  -I/home/euan/Nim/lib -I/home/euan/Nim -o /home/euan/.cache/nim/koch_d/tools7kochdocs.nim.c.o /home/euan/.cache/nim/koch_d/tools7kochdocs.nim.c [Exec]
Hint: gcc -c  -w  -I/home/euan/Nim/lib -I/home/euan/Nim -o /home/euan/.cache/nim/koch_d/koch.nim.c.o /home/euan/.cache/nim/koch_d/koch.nim.c [Exec]
Hint:  [Link]
Hint: operation successful (51408 lines compiled; 6.803 sec total; 72.449MiB peakmem; Debug Build) [SuccessX]

If we run nim dump with the nim binary built from csources, we get the following output:

`nim dump` output
lib/pure
lib/core
lib/arch
lib/pure/unidecode
lib/js
lib/posix
lib/windows
lib/wrappers/linenoise
lib/wrappers
lib/impure
lib/pure/concurrency
lib/pure/collections
lib/deprecated/pure
lib/deprecated/core
lib
lib

I'm not sure what else to do in order to troubleshoot this...

@euantorano
Copy link
Contributor Author

euantorano commented Mar 25, 2020

Note that even with $HOME/Nim/bin in $PATH, after koch has been built, koch boot fails with similar errors:

`koch boot` output
euan@corellia ~/Nim> ./koch boot
iteration: 1
bin/nim c  --skipUserCfg --skipParentCfg --nimcache:nimcache/d_openbsd_amd64  --compileOnly compiler/nim.nim
Hint: used config file 'config/nim.cfg' [Conf]
Hint: used config file '/home/euan/Nim/compiler/nim.cfg' [Conf]
Hint: used config file 'config/config.nims' [Conf]
Hint: system [Processing]
Hint: widestrs [Processing]
Hint: io [Processing]
Hint: nim [Processing]
Hint: commands [Processing]
Hint: os [Processing]
Hint: strutils [Processing]
Hint: parseutils [Processing]
Hint: math [Processing]
Hint: bitops [Processing]
Hint: macros [Processing]
Hint: algorithm [Processing]
Hint: unicode [Processing]
Hint: pathnorm [Processing]
Hint: osseps [Processing]
Hint: posix [Processing]
Hint: times [Processing]
Hint: options [Processing]
Hint: typetraits [Processing]
/home/euan/Nim/lib/pure/typetraits.nim(92, 11) Error: cannot open file: std/macros
FAILURE

koch boot seems to call bin/nim which fails.

@Araq
Copy link
Member

Araq commented Mar 25, 2020

Try to modify typetraits so that it does import macros and not import std / macros.

@euantorano
Copy link
Contributor Author

@Araq That does solve the problem. Both bin/nim c koch now works, as does ./koch boot.

I'm making this change in my OpenBSD CI PR (#12105) to let the CI run. I believe similar errors crop up elsewhere based upon past runs.

@alaviss
Copy link
Collaborator

alaviss commented Mar 25, 2020

If the error also happens for the devel compiler (not the one built with csources), then you should check to see if getAppFilename() is implemented correctly. It's used by the compiler to derive a lot of paths, so if there's any problem it'd be in there.

@euantorano
Copy link
Contributor Author

euantorano commented Mar 25, 2020 via email

@euantorano
Copy link
Contributor Author

@alaviss I'm not sure if these are the right steps to try the devel compiler, but it works:

  1. Use sources to bootstrap
  2. Edit typetraits as suggested above
  3. Run bin/nim c koch to build koch
  4. Run ./koch boot -d:release
  5. Clear out ~/.cache/nim and nimcache
  6. Revert the changes to typetraits
  7. Run bin/nim c koch

If those aren't the correct steps to try the devel compiler, I'd welcome any tips 😄

@Araq
Copy link
Member

Araq commented Mar 25, 2020

It's fine, now please create a PR for this required change and add a comment so that we don't forget we must import it via import macros.

Araq pushed a commit that referenced this issue May 12, 2020
* properly fix #12389
* use --lib:lib in koch.nim.cfg instead
* third time is the charm
EchoPouet pushed a commit to EchoPouet/Nim that referenced this issue Jun 13, 2020
…nim-lang#14291)

* properly fix nim-lang#12389
* use --lib:lib in koch.nim.cfg instead
* third time is the charm
@iacore
Copy link
Contributor

iacore commented Mar 19, 2022

./koch boot still fails now with "cannot find std/os`

./koch boot --lib:lib fixes the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants