lassoan
(Andras Lasso)
August 15, 2024, 1:07pm
2
Good catch! This is due to an unlucky coincidence of some recently added CTK files containing a BOM, recently modified Python wrapping code not being robust enough for different encodings, and you using a computer that has system code page set to Korean (cp949). If you change your system code page or any of the two other issues are fixed then you’ll be able to build successfully.
@jcfr , please have a look at:
opened 01:02PM - 15 Aug 24 UTC
[Some CTK source files start with UTF-8 BOM](https://github.com/commontk/CTK/iss… ues/1213), which causes [build failures on Korean computers (cp949 system code page)](https://discourse.slicer.org/t/failed-to-build-slicer-cause-the-ctk-build-exited-with-code-1/37872) due to [ctkWrapPythonQt.py](https://github.com/commontk/CTK/blob/f01b620112bba32f01fb0d2f4ed90dd51064ecb1/CMake/ctkWrapPythonQt.py#L93 fails on computers) failing on files containing a BOM.
ctkWrapPythonQt.py should be made more robust to work well regardless of system code page.
@Davide_Punzo , could you please fix these files (and maybe disable automatic adding of BOM in your text editor):
opened 12:59PM - 15 Aug 24 UTC
These source files start with UTF-8 BOM, which causes build failure on Korean co… mputers:
CTK\Libs\DICOM\Core\ctkDICOMRetrieve.cpp
CTK\Libs\DICOM\Widgets\ctkDICOMJobListWidget.h CTK\Libs\DICOM\Widgets\ctkDICOMPatientItemWidget.h CTK\Libs\DICOM\Widgets\ctkDICOMSeriesItemWidget.h CTK\Libs\DICOM\Widgets\ctkDICOMStudyItemWidget.h CTK\Libs\DICOM\Widgets\ctkDICOMVisualBrowserWidget.h
The build scripts should be improved to not be sensitive to the presence of a UTF-8 BOM, but for consistency, we should not just start using BOM for some source files. For now, the easiest is to keep using ASCII in all CTK source files. If there is a good reason to change this in the future then it should be changed for all source files.
2 Likes