EMsoft-org / EMsoft

Public EMsoft repository
Other
61 stars 94 forks source link

Lzw decompression bugfix #98

Closed hakonanes closed 4 years ago

hakonanes commented 4 years ago

Got this error while building EMsoft after updating to Ubuntu 19.10:

> cmake -DCMAKE_BUILD_TYPE=Debug -DEMsoft_SDK=/home/hakon/kode/emsoft/EMsoft_SDK -DEMsoft_ENABLE_EMsoftWorkbench=OFF -S /home/hakon/kode/emsoft/EMsoft -B .
# [...]
> make -j4
Scanning dependencies of target EMsoftLib_Generate_StringConstants
Scanning dependencies of target EMsoftLib_Cpp
Scanning dependencies of target DIWorkflowTestPrep
Scanning dependencies of target EMsoftLib_C
[  1%] Generating StringConstants files....
# [...]
[  3%] Built target EMsoftLib_Cpp
Scanning dependencies of target EMsoftLib
[  4%] Building Fortran object EMsoftLib/CMakeFiles/EMsoftLib.dir/stringconstants.f90.o
# [...]
[  4%] Building Fortran object EMsoftLib/CMakeFiles/EMsoftLib.dir/lzw.f90.o
/home/hakon/kode/emsoft/EMsoft/Source/EMsoftLib/lzw.f90:222:22:

  222 |       b2 = ishft(iand(this%encoded(this%index+2),magicBytes(8+this%dict%bits-this%bitsLeft)),this%dict%bits-this%bitsLeft-16) ! mask off middle/trailing bits and shift
      |                      1
Error: Arguments of ‘iand’ have different kind type parameters at (1)
[  5%] Building Fortran object EMsoftLib/CMakeFiles/EMsoftLib.dir/random.f90.o
make[2]: *** [EMsoftLib/CMakeFiles/EMsoftLib.dir/build.make:531: EMsoftLib/CMakeFiles/EMsoftLib.dir/lzw.f90.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [CMakeFiles/Makefile2:1474: EMsoftLib/CMakeFiles/EMsoftLib.dir/all] Error 2
make: *** [Makefile:163: all] Error 2

Looked into lzw.f90 and saw some changes applied to two of three similar lines... After applying the changes to the last line it built OK. Hence this PR.

marcdegraef commented 4 years ago

closes #98