runtime icon indicating copy to clipboard operation
runtime copied to clipboard

build-test.sh fails due to file encoding

Open salrashid123 opened this issue 9 years ago • 2 comments

I'm trying to build the test suite (build-test.sh) on a workstation with the following but it looks like the file encoding is non utf-8 and the build fail:

$ uname -a
Linux salrashid123-laptop 4.4.0-78-generic dotnet/runtime#3903~14.04.2-Ubuntu SMP Thu Apr 27 18:49:46 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

$ env | echo $LANG
en_US.UTF-8

when i try to build the coreclr test suite i kept seeing the following...

CSC : error CS2001: Source file '/home/salrashid123/Desktop/coreclr/tests/src/JIT/Directed/Convert/FPZero.cs' could not be found. [/home/salrashid123/Desktop/coreclr/tests/src/JIT/Directed/Convert/FPZero.csproj]
CSC : error CS2001: Source file '/home/salrashid123/Desktop/coreclr/tests/src/JIT/Methodical/fp/apps/Ball.cs' could not be found. [/home/salrashid123/Desktop/coreclr/tests/src/JIT/Methodical/fp/apps/bouncingball_cs_r.csproj]
CSC : error CS2001: Source file '/home/salrashid123/Desktop/coreclr/tests/src/JIT/Methodical/fp/apps/Ball.cs' could not be found. [/home/salrashid123/Desktop/coreclr/tests/src/JIT/Methodical/fp/apps/bouncingball_cs_ro.csproj]
CSC : error CS2001: Source file '/home/salrashid123/Desktop/coreclr/tests/src/JIT/Methodical/flowgraph/dev10_bug723489/qMarkColon.cs' could not be found. [/home/salrashid123/Desktop/coreclr/tests/src/JIT/Methodical/flowgraph/dev10_bug723489/qMarkColon.csproj]
CSC : error CS2001: Source file '/home/salrashid123/Desktop/coreclr/tests/src/JIT/Methodical/fp/apps/Ball.cs' could not be found. [/home/salrashid123/Desktop/coreclr/tests/src/JIT/Methodical/fp/apps/bouncingball_cs_do.csproj]
CSC : error CS2001: Source file '/home/salrashid123/Desktop/coreclr/tests/src/JIT/Methodical/fp/apps/Ball.cs' could not be found. [/home/salrashid123/Desktop/coreclr/tests/src/JIT/Methodical/fp/apps/bouncingball_cs_d.csproj]
/home/salrashid123/Desktop/coreclr/tests/dir.traversal.targets(25,5): error : (No message specified) [/home/salrashid123/Desktop/coreclr/tests/src/dirs.proj]
/home/salrashid123/Desktop/coreclr/tests/dir.traversal.targets(25,5): error : (No message specified) [/home/salrashid123/Desktop/coreclr/tests/build.proj]
    172 Warning(s)
    8 Error(s)

Time Elapsed 02:26:07.10
Command execution failed with exit code 1.

for example, for

vi tests/src/JIT/Directed/Convert/FPZero.cs

you'll see fileencoding=latin1

--- Options ---
  cindent             helplang=en         langnoremap         nrformats=bin,hex   showcmd             ttimeoutlen=100     wildmenu
  display=truncate    history=200       nolangremap           ruler               syntax=cs           ttyfast
  filetype=cs         incsearch           mouse=a             scrolloff=5         ttimeout            ttymouse=sgr
  backspace=indent,eol,start
  comments=sO:* -,mO:*  ,exO:*/,s1:/*,mb:*,ex:*/,:///,://
  fileencoding=latin1
  fileencodings=ucs-bom,utf-8,default,latin1
  formatoptions=croql
  printoptions=paper:letter
  runtimepath=~/.vim,/var/lib/vim/addons,/usr/share/vim/vimfiles,/usr/share/vim/vim80,/usr/share/vim/vimfiles/after,/var/lib/vim/addons/after,~/.vim/after
  suffixes=.bak,~,.swp,.o,.info,.aux,.log,.dvi,.bbl,.blg,.brf,.cb,.ind,.idx,.ilg,.inx,.out,.toc

or

$ file -i tests/src/JIT/Directed/Convert/FPZero.cs
tests/src/JIT/Directed/Convert/FPZero.cs: text/plain; charset=unknown-8bit

if i change that to utf-8, the build passes (atleast that file)

salrashid123 avatar Jun 08 '17 23:06 salrashid123

cc @rartemev

sandreenko avatar Jun 09 '17 07:06 sandreenko

Fixed

rartemev avatar Jun 09 '17 23:06 rartemev