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

First time build fails on Windows with MSVC due to carriage return characters #452

Open
semihc opened this issue Sep 22, 2023 · 2 comments · May be fixed by #487
Open

First time build fails on Windows with MSVC due to carriage return characters #452

semihc opened this issue Sep 22, 2023 · 2 comments · May be fixed by #487
Assignees

Comments

@semihc
Copy link

semihc commented Sep 22, 2023

C:\opt\CPP\SQLiteCpp>git log
commit bcb4c78 (HEAD -> master, origin/master, origin/HEAD)
Author: Sébastien Rombauts [email protected]
Date: Wed Aug 30 13:45:42 2023 +0200

C:\opt\CPP\SQLiteCpp>cmake --version
cmake version 3.24.2

CMake suite maintained and supported by Kitware (kitware.com/cmake).

C:\opt\CPP\SQLiteCpp>cl -help
Microsoft (R) C/C++ Optimizing Compiler Version 19.37.32824 for x64
Copyright (C) Microsoft Corporation. All rights reserved.

C:\opt\CPP\SQLiteCpp>cmake -S. -Bbld_vc2 -GNinja
-- The C compiler identification is MSVC 19.37.32824.0
-- The CXX compiler identification is MSVC 19.37.32824.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.37.32822/bin/Hostx64/x64/cl.exe - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.37.32822/bin/Hostx64/x64/cl.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Using c++ standard c++11
-- CMake version: 3.24.2
-- Project version: 3.3.1
-- CMAKE_CXX_COMPILER 'C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.37.32822/bin/Hostx64/x64/cl.exe' 'MSVC' '19.37.32824.0'
-- CMAKE_CXX_FLAGS '/DWIN32 /D_WINDOWS /W3 /GR /EHsc'
-- CMAKE_CXX_FLAGS_DEBUG '/MDd /Zi /Ob0 /Od /RTC1'
-- CMAKE_CXX_FLAGS_RELEASE '/MD /O2 /Ob2 /DNDEBUG'
-- CMAKE_CXX_FLAGS_RELWITHDEBINFO '/MD /Zi /O2 /Ob1 /DNDEBUG'
-- CMAKE_CXX_FLAGS_MINSIZEREL '/MD /O1 /Ob1 /DNDEBUG'
-- Compile sqlite3 from source in subdirectory
-- Found PythonInterp: C:/Python310/python.exe (found version "3.10.7")
-- Could NOT find cppcheck
-- SQLITECPP_RUN_DOXYGEN OFF
-- SQLITECPP_BUILD_EXAMPLES OFF
-- SQLITECPP_BUILD_TESTS OFF
-- Configuring done
-- Generating done
-- Build files have been written to: C:/opt/CPP/SQLiteCpp/bld_vc2

C:\opt\CPP\SQLiteCpp>cmake --build bld_vc2 -v
[1/11] C:\PROGRA1\MIB0551\2022\COMMUN1\VC\Tools\MSVC\14371.328\bin\Hostx64\x64\cl.exe /nologo /TP -DSQLITE_ENABLE_COLUMN_METADATA -D_CRT_SECURE_NO_WARNINGS -IC:\opt\CPP\SQLiteCpp\include -IC:\opt\CPP\SQLiteCpp\sqlite3 /DWIN32 /D_WINDOWS /W3 /GR /EHsc /MDd /Zi /Ob0 /Od /RTC1 /showIncludes /FoCMakeFiles\SQLiteCpp.dir\src\Exception.cpp.obj /FdCMakeFiles\SQLiteCpp.dir\SQLiteCpp.pdb /FS -c C:\opt\CPP\SQLiteCpp\src\Exception.cpp
[2/11] C:\PROGRA1\MIB0551\2022\COMMUN1\VC\Tools\MSVC\14371.328\bin\Hostx64\x64\cl.exe /nologo /TP -DSQLITE_ENABLE_COLUMN_METADATA -D_CRT_SECURE_NO_WARNINGS -IC:\opt\CPP\SQLiteCpp\include -IC:\opt\CPP\SQLiteCpp\sqlite3 /DWIN32 /D_WINDOWS /W3 /GR /EHsc /MDd /Zi /Ob0 /Od /RTC1 /showIncludes /FoCMakeFiles\SQLiteCpp.dir\src\Backup.cpp.obj /FdCMakeFiles\SQLiteCpp.dir\SQLiteCpp.pdb /FS -c C:\opt\CPP\SQLiteCpp\src\Backup.cpp
[3/11] C:\PROGRA1\MIB0551\2022\COMMUN1\VC\Tools\MSVC\14371.328\bin\Hostx64\x64\cl.exe /nologo /TP -DSQLITE_ENABLE_COLUMN_METADATA -D_CRT_SECURE_NO_WARNINGS -IC:\opt\CPP\SQLiteCpp\include -IC:\opt\CPP\SQLiteCpp\sqlite3 /DWIN32 /D_WINDOWS /W3 /GR /EHsc /MDd /Zi /Ob0 /Od /RTC1 /showIncludes /FoCMakeFiles\SQLiteCpp.dir\src\Transaction.cpp.obj /FdCMakeFiles\SQLiteCpp.dir\SQLiteCpp.pdb /FS -c C:\opt\CPP\SQLiteCpp\src\Transaction.cpp
[4/11] C:\PROGRA1\MIB0551\2022\COMMUN1\VC\Tools\MSVC\14371.328\bin\Hostx64\x64\cl.exe /nologo /TP -DSQLITE_ENABLE_COLUMN_METADATA -D_CRT_SECURE_NO_WARNINGS -IC:\opt\CPP\SQLiteCpp\include -IC:\opt\CPP\SQLiteCpp\sqlite3 /DWIN32 /D_WINDOWS /W3 /GR /EHsc /MDd /Zi /Ob0 /Od /RTC1 /showIncludes /FoCMakeFiles\SQLiteCpp.dir\src\Savepoint.cpp.obj /FdCMakeFiles\SQLiteCpp.dir\SQLiteCpp.pdb /FS -c C:\opt\CPP\SQLiteCpp\src\Savepoint.cpp
[5/11] C:\PROGRA1\MIB0551\2022\COMMUN1\VC\Tools\MSVC\14371.328\bin\Hostx64\x64\cl.exe /nologo /TP -DSQLITE_ENABLE_COLUMN_METADATA -D_CRT_SECURE_NO_WARNINGS -IC:\opt\CPP\SQLiteCpp\include -IC:\opt\CPP\SQLiteCpp\sqlite3 /DWIN32 /D_WINDOWS /W3 /GR /EHsc /MDd /Zi /Ob0 /Od /RTC1 /showIncludes /FoCMakeFiles\SQLiteCpp.dir\src\Statement.cpp.obj /FdCMakeFiles\SQLiteCpp.dir\SQLiteCpp.pdb /FS -c C:\opt\CPP\SQLiteCpp\src\Statement.cpp
[6/11] C:\PROGRA1\MIB0551\2022\COMMUN1\VC\Tools\MSVC\14371.328\bin\Hostx64\x64\cl.exe /nologo /TP -DSQLITE_ENABLE_COLUMN_METADATA -D_CRT_SECURE_NO_WARNINGS -IC:\opt\CPP\SQLiteCpp\include -IC:\opt\CPP\SQLiteCpp\sqlite3 /DWIN32 /D_WINDOWS /W3 /GR /EHsc /MDd /Zi /Ob0 /Od /RTC1 /showIncludes /FoCMakeFiles\SQLiteCpp.dir\src\Column.cpp.obj /FdCMakeFiles\SQLiteCpp.dir\SQLiteCpp.pdb /FS -c C:\opt\CPP\SQLiteCpp\src\Column.cpp
[7/11] C:\PROGRA1\MIB0551\2022\COMMUN1\VC\Tools\MSVC\14371.328\bin\Hostx64\x64\cl.exe /nologo /TP -DSQLITE_ENABLE_COLUMN_METADATA -D_CRT_SECURE_NO_WARNINGS -IC:\opt\CPP\SQLiteCpp\include -IC:\opt\CPP\SQLiteCpp\sqlite3 /DWIN32 /D_WINDOWS /W3 /GR /EHsc /MDd /Zi /Ob0 /Od /RTC1 /showIncludes /FoCMakeFiles\SQLiteCpp.dir\src\Database.cpp.obj /FdCMakeFiles\SQLiteCpp.dir\SQLiteCpp.pdb /FS -c C:\opt\CPP\SQLiteCpp\src\Database.cpp
[8/11] C:\PROGRA1\MIB0551\2022\COMMUN1\VC\Tools\MSVC\14371.328\bin\Hostx64\x64\cl.exe /nologo -DSQLITE_ENABLE_COLUMN_METADATA -D_CRT_SECURE_NO_WARNINGS -IC:\opt\CPP\SQLiteCpp\sqlite3 /DWIN32 /D_WINDOWS /W3 /MDd /Zi /Ob0 /Od /RTC1 /showIncludes /Fosqlite3\CMakeFiles\sqlite3.dir\sqlite3.c.obj /Fdsqlite3\CMakeFiles\sqlite3.dir\sqlite3.pdb /FS -c C:\opt\CPP\SQLiteCpp\sqlite3\sqlite3.c
[9/11] cmd.exe /C "cd . && C:\PROGRA1\MIB0551\2022\COMMUN1\VC\Tools\MSVC\14371.328\bin\Hostx64\x64\lib.exe /nologo /machine:x64 /out:sqlite3\sqlite3.lib sqlite3\CMakeFiles\sqlite3.dir\sqlite3.c.obj && cd ."
[10/11] cmd.exe /C "cd . && C:\PROGRA1\MIB0551\2022\COMMUN1\VC\Tools\MSVC\14371.328\bin\Hostx64\x64\lib.exe /nologo /machine:x64 /out:SQLiteCpp.lib CMakeFiles\SQLiteCpp.dir\src\Backup.cpp.obj CMakeFiles\SQLiteCpp.dir\src\Column.cpp.obj CMakeFiles\SQLiteCpp.dir\src\Database.cpp.obj CMakeFiles\SQLiteCpp.dir\src\Exception.cpp.obj CMakeFiles\SQLiteCpp.dir\src\Savepoint.cpp.obj CMakeFiles\SQLiteCpp.dir\src\Statement.cpp.obj CMakeFiles\SQLiteCpp.dir\src\Transaction.cpp.obj && cd ."
[11/11] cmd.exe /C "cd /D C:\opt\CPP\SQLiteCpp\bld_vc2 && C:\Python310\python.exe C:/opt/CPP/SQLiteCpp/cpplint.py --output=vs7 --verbose=3 --linelength=120 C:/opt/CPP/SQLiteCpp/src/Backup.cpp C:/opt/CPP/SQLiteCpp/src/Column.cpp C:/opt/CPP/SQLiteCpp/src/Database.cpp C:/opt/CPP/SQLiteCpp/src/Exception.cpp C:/opt/CPP/SQLiteCpp/src/Savepoint.cpp C:/opt/CPP/SQLiteCpp/src/Statement.cpp C:/opt/CPP/SQLiteCpp/src/Transaction.cpp C:/opt/CPP/SQLiteCpp/include/SQLiteCpp/SQLiteCpp.h C:/opt/CPP/SQLiteCpp/include/SQLiteCpp/Assertion.h C:/opt/CPP/SQLiteCpp/include/SQLiteCpp/Backup.h C:/opt/CPP/SQLiteCpp/include/SQLiteCpp/Column.h C:/opt/CPP/SQLiteCpp/include/SQLiteCpp/Database.h C:/opt/CPP/SQLiteCpp/include/SQLiteCpp/Exception.h C:/opt/CPP/SQLiteCpp/include/SQLiteCpp/Savepoint.h C:/opt/CPP/SQLiteCpp/include/SQLiteCpp/Statement.h C:/opt/CPP/SQLiteCpp/include/SQLiteCpp/Transaction.h C:/opt/CPP/SQLiteCpp/include/SQLiteCpp/VariadicBind.h C:/opt/CPP/SQLiteCpp/include/SQLiteCpp/ExecuteMany.h"
C:/opt/CPP/SQLiteCpp/src/Backup.cpp(0): error: One or more carriage-return \r (^M) (Windows endline) found; Use only UNIX endline \n [whitespace/newline] [5]
C:/opt/CPP/SQLiteCpp/src/Column.cpp(0): error: One or more carriage-return \r (^M) (Windows endline) found; Use only UNIX endline \n [whitespace/newline] [5]
C:/opt/CPP/SQLiteCpp/src/Database.cpp(0): error: One or more carriage-return \r (^M) (Windows endline) found; Use only UNIX endline \n [whitespace/newline] [5]
C:/opt/CPP/SQLiteCpp/src/Exception.cpp(0): error: One or more carriage-return \r (^M) (Windows endline) found; Use only UNIX endline \n [whitespace/newline] [5]
C:/opt/CPP/SQLiteCpp/src/Savepoint.cpp(0): error: One or more carriage-return \r (^M) (Windows endline) found; Use only UNIX endline \n [whitespace/newline] [5]
C:/opt/CPP/SQLiteCpp/src/Statement.cpp(0): error: One or more carriage-return \r (^M) (Windows endline) found; Use only UNIX endline \n [whitespace/newline] [5]
C:/opt/CPP/SQLiteCpp/src/Transaction.cpp(0): error: One or more carriage-return \r (^M) (Windows endline) found; Use only UNIX endline \n [whitespace/newline] [5]
C:/opt/CPP/SQLiteCpp/include/SQLiteCpp/SQLiteCpp.h(0): error: One or more carriage-return \r (^M) (Windows endline) found; Use only UNIX endline \n [whitespace/newline] [5]
C:/opt/CPP/SQLiteCpp/include/SQLiteCpp/Assertion.h(0): error: One or more carriage-return \r (^M) (Windows endline) found; Use only UNIX endline \n [whitespace/newline] [5]
C:/opt/CPP/SQLiteCpp/include/SQLiteCpp/Backup.h(0): error: One or more carriage-return \r (^M) (Windows endline) found; Use only UNIX endline \n [whitespace/newline] [5]
C:/opt/CPP/SQLiteCpp/include/SQLiteCpp/Column.h(0): error: One or more carriage-return \r (^M) (Windows endline) found; Use only UNIX endline \n [whitespace/newline] [5]
C:/opt/CPP/SQLiteCpp/include/SQLiteCpp/Database.h(0): error: One or more carriage-return \r (^M) (Windows endline) found; Use only UNIX endline \n [whitespace/newline] [5]
C:/opt/CPP/SQLiteCpp/include/SQLiteCpp/Exception.h(0): error: One or more carriage-return \r (^M) (Windows endline) found; Use only UNIX endline \n [whitespace/newline] [5]
C:/opt/CPP/SQLiteCpp/include/SQLiteCpp/Savepoint.h(0): error: One or more carriage-return \r (^M) (Windows endline) found; Use only UNIX endline \n [whitespace/newline] [5]
C:/opt/CPP/SQLiteCpp/include/SQLiteCpp/Statement.h(0): error: One or more carriage-return \r (^M) (Windows endline) found; Use only UNIX endline \n [whitespace/newline] [5]
C:/opt/CPP/SQLiteCpp/include/SQLiteCpp/Transaction.h(0): error: One or more carriage-return \r (^M) (Windows endline) found; Use only UNIX endline \n [whitespace/newline] [5]
C:/opt/CPP/SQLiteCpp/include/SQLiteCpp/VariadicBind.h(0): error: One or more carriage-return \r (^M) (Windows endline) found; Use only UNIX endline \n [whitespace/newline] [5]
C:/opt/CPP/SQLiteCpp/include/SQLiteCpp/ExecuteMany.h(0): error: One or more carriage-return \r (^M) (Windows endline) found; Use only UNIX endline \n [whitespace/newline] [5]
cpplint: Total errors found: 18

C:\opt\CPP\SQLiteCpp>

@UnixY2K
Copy link
Contributor

UnixY2K commented Sep 30, 2023

please disable SQLITECPP_RUN_CPPLINT cmake option and check again

it should be like this

C:\opt\CPP\SQLiteCpp>cmake -S. -Bbld_vc2 -GNinja -SQLITECPP_RUN_CPPLINT=OFF 

this is the same error as #88

@semihc
Copy link
Author

semihc commented Sep 30, 2023 via email

@SRombauts SRombauts self-assigned this Aug 20, 2024
SRombauts added a commit that referenced this issue Aug 20, 2024
Reserve it for power developers

Fix #452 First time build fails on Windows with MSVC due to carriage return characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants