Build on windows is broken

Bug #1786731 reported by il71
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
SBCL
Fix Released
Undecided
Unassigned

Bug Description

Build of sbcl-1.4.10 by sbcl-1.4.09 fails during make-target-2.sh

Windows 10 x86-64 up to date
Msys2 up to date

$ sbcl --version
SBCL 1.4.9

$ sbcl --no-userinit --no-sysinit
* *features*

(:X86-64 :64-BIT :64-BIT-REGISTERS :ALIEN-CALLBACKS :ANSI-CL :ASH-RIGHT-VOPS
 :C-STACK-IS-CONTROL-STACK :CALL-SYMBOL :COMMON-LISP :COMPARE-AND-SWAP-VOPS
 :COMPLEX-FLOAT-VOPS :CYCLE-COUNTER :FLOAT-EQL-VOPS :FP-AND-PC-STANDARD-SAVE
 :GENCGC :IEEE-FLOATING-POINT :INLINE-CONSTANTS :INTEGER-EQL-VOP :LINKAGE-TABLE
 :LITTLE-ENDIAN :MEMORY-BARRIER-VOPS :MULTIPLY-HIGH-VOPS :OS-PROVIDES-DLOPEN
 :OS-PROVIDES-PUTWC :PACKAGE-LOCAL-NICKNAMES :RAW-INSTANCE-INIT-VOPS
 :RAW-SIGNED-WORD :SB-DOC :SB-DYNAMIC-CORE :SB-EVAL :SB-FUTEX :SB-LDB
 :SB-PACKAGE-LOCKS :SB-QSHOW :SB-SAFEPOINT :SB-SAFEPOINT-STRICTLY :SB-SIMD-PACK
 :SB-SOURCE-LOCATIONS :SB-THREAD :SB-THRUPTION :SB-UNICODE :SB-WTIMER :SBCL
 :STACK-ALLOCATABLE-CLOSURES :STACK-ALLOCATABLE-FIXED-OBJECTS
 :STACK-ALLOCATABLE-LISTS :STACK-ALLOCATABLE-VECTORS
 :STACK-GROWS-DOWNWARD-NOT-UPWARD :SYMBOL-INFO-VOPS :UNBIND-N-VOP
 :UNDEFINED-FUN-RESTARTS :UNWIND-TO-FRAME-AND-CALL-VOP :WIN32)
*

$ uname -a
MINGW64_NT-10.0 firefly 2.10.0(0.325/5/3) 2018-02-09 15:25 x86_64 Msys

$ gcc --version
gcc.exe (Rev1, Built by MSYS2 project) 8.2.0

$ sh make.sh --prefix=/d/sbcl 2>&1 | tee log

[skipped]

COLD-INIT... (Length(TLFs)= 13424)
Disassembler: 91 printers, 40 prefilters, 4 labelers

debugger invoked on a SB-C::INPUT-ERROR-IN-LOAD in thread
#<THREAD "main thread" RUNNING {1002581033}>:
  READ error during LOAD:

    couldn't read from #<SB-INT:FORM-TRACKING-STREAM for "file D:\\ws\\tmp\\sbcl-1.4.10\\src\\cold\\warm.lisp" {1002D484A3}>:
      ???????? ? ???????.

    (in form starting at line: 1, column: NIL, position: 0)

Type HELP for debugger help, or (SB-EXT:EXIT) to exit from SBCL.

restarts (invokable by number or by possibly-abbreviated name):
  0: [ABORT ] Abort loading file "D:\\ws\\tmp\\sbcl-1.4.10\\src\\cold\\warm.lisp".
  1: Abort building SBCL.
  2: [CONTINUE] Ignore runtime option --eval "(sb-fasl::!warm-load \"src/cold/warm.lisp\")".
  3: Skip rest of --eval and --load options.
  4: Skip to toplevel READ/EVAL/PRINT loop.
  5: [EXIT ] Exit SBCL (calling #'EXIT, killing the process).

(SB-C:COMPILER-ERROR SB-C::INPUT-ERROR-IN-LOAD :CONDITION #<SB-INT:SIMPLE-STREAM-ERROR "~@<~?~@[: ~2I~_~A~]~:>" {1002D4AAE3}> :POSITION 0 :LINE/COL (1) :STREAM #<SB-INT:FORM-TRACKING-STREAM for "file D:\\ws\\tmp\\sbcl-1.4.10\\src\\cold\\warm.lisp" {1002D484A3}>)
0]

The error comes from C runtime: "Access denied" while reading from warm.lisp

$ cat test.lisp

(with-open-file (f "file")
  (print (read f)))

$ cat file
123

$ which sbcl
/d/sbcl/bin/sbcl

$ sbcl --no-userinit --no-sysinit --load test.lisp --quit

123

$ ./src/runtime/sbcl --core output/cold-sbcl.core --lose-on-corruption --no-sysinit --no-userinit --load test.lisp --quit
This is SBCL 1.4.10, an implementation of ANSI Common Lisp.
More information about SBCL is available at <http://www.sbcl.org/>.

SBCL is free software, provided as is, with absolutely no warranty.
It is mostly in the public domain; some portions are provided under
BSD-style licenses. See the CREDITS and COPYING files in the
distribution for more information.

WARNING: the Windows port is fragile, particularly for multithreaded
code. Unfortunately, the development team currently lacks the time
and resources this platform demands.
COLD-INIT... (Length(TLFs)= 13424)
Disassembler: 91 printers, 40 prefilters, 4 labelers

debugger invoked on a SB-C::INPUT-ERROR-IN-LOAD in thread
#<THREAD "main thread" RUNNING {1002581033}>:
  READ error during LOAD:

    couldn't read from #<SB-INT:FORM-TRACKING-STREAM for "file D:\\ws\\tmp\\sbcl-1.4.10\\test.lisp" {1002D47233}>:
      ???????? ? ???????.

    (in form starting at line: 1, column: NIL, position: 0)

Type HELP for debugger help, or (SB-EXT:EXIT) to exit from SBCL.

restarts (invokable by number or by possibly-abbreviated name):
  0: [ABORT ] Abort loading file "D:\\ws\\tmp\\sbcl-1.4.10\\test.lisp".
  1: [CONTINUE] Ignore runtime option --load "test.lisp".
  2: Skip rest of --eval and --load options.
  3: Skip to toplevel READ/EVAL/PRINT loop.
  4: [EXIT ] Exit SBCL (calling #'EXIT, killing the process).

(SB-C:COMPILER-ERROR SB-C::INPUT-ERROR-IN-LOAD :CONDITION #<SB-INT:SIMPLE-STREAM-ERROR "~@<~?~@[: ~2I~_~A~]~:>" {1002D49903}> :POSITION 0 :LINE/COL (1) :STREAM #<SB-INT:FORM-TRACKING-STREAM for "file D:\\ws\\tmp\\sbcl-1.4.10\\test.lisp" {1002D47233}>)
0]

Tags: os-windows
Revision history for this message
il71 (il71) wrote :

Update. It's not 1.4.10 problem.
Builds of older sbcl versions lead to the same problem. I also tried older versions of sbcl for bootstrap (including downloaded from sbcl.org). Also some older msys+mingw-w64 setup (instead of msys2) with older gcc.

So it looks like current Windows update problem. The way it interopates with gcc runtime or the way sbcl cold is built. Another guilty part would be my env setup (.bashrc or PATH or anything) -- unlikely -- I don't recall changing anything.

Revision history for this message
Attila Lendvai (attila-lendvai) wrote :

how about file encoding? is this windows in the EN locale?

Revision history for this message
il71 (il71) wrote :

It's in RU locale.

When error happens during make-target-2.sh:

0] sb-impl::*default-external-format*

:LATIN-1
0]

$ which sbcl
/d/sbcl/bin/sbcl

$ sbcl --no-userinit --no-sysinit --eval '(print sb-impl::*default-external-format*)' --load test.lisp --quit

:CP1251
123

$ sbcl --no-userinit --no-sysinit --eval '(print (setf sb-impl::*default-external-format* :LATIN-1))' --load test.lisp --quit

:LATIN-1
123

Revision history for this message
Christophe Rhodes (csr21-cantab) wrote : Re: [Bug 1786731] Re: Build on windows is broken

il71 <email address hidden> writes:

> It's in RU locale.

Could you try building in a locale which would use no non-latin
characters?

Thanks,

Christophe

Revision history for this message
il71 (il71) wrote :

>Could you try building in a locale which would use no non-latin
characters?

Re unix(msys2) locale - everywhere in bash env make*.sh etc LANG=C LC_ALL=C are used

Re Windows "locale" - Not really a specialist here. I tried setting 'Regional and blah" settings in additional tab - smth like "Set language for programs not supporting Unicode" [don't really know how these menu items spelled in ENG Windows] to English (USA) -- required reboot.

Same problem. And same '???????? ? ???????.' message. Which is 'Access denied' in russian, or "Refusal in access" literally - which I was able to "decode" earlier when I run sh make.sh from cmd instead of msys's "terminal".

Revision history for this message
Stas Boukarev (stassats) wrote :

Just did pacman -Su and I get the same error. Something in mingw has changed.

Revision history for this message
Stas Boukarev (stassats) wrote :

15820458acbb8309eaef56458c3c9bcd10da7005

Changed in sbcl:
status: New → Fix Committed
Changed in sbcl:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.