msys2 / MINGW-packages

Package scripts for MinGW-w64 targets to build under MSYS2.
https://packages.msys2.org
BSD 3-Clause "New" or "Revised" License
2.25k stars 1.21k forks source link

[UCRT64] Error: junk at end of line, first unrecognized character is `.' #19995

Closed ghost closed 7 months ago

ghost commented 7 months ago

Discussed in https://github.com/msys2/MINGW-packages/discussions/19694

Originally posted by **iahung3** January 9, 2024 `example.i` and `example.c` taken from https://swig.org/tutorial.html. I followed the instructions for Python, except I used `python-config --cflags` instead of `-I/usr/local/include/python2.7`. GCC will always give me this error: ``` $ gcc `python-config --cflags` -c example.c example_wrap.c {standard input}: Assembler messages: {standard input}:21131: Error: junk at end of line, first unrecognized character is `.' {standard input}:29381: Error: junk at end of line, first unrecognized character is `.' ``` ``` $ gcc -v Using built-in specs. COLLECT_GCC=C:\msys64\ucrt64\bin\gcc.exe COLLECT_LTO_WRAPPER=C:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/lto-wrapper.exe Target: x86_64-w64-mingw32 Configured with: ../gcc-13.2.0/configure --prefix=/ucrt64 --with-local-prefix=/ucrt64/local --build=x86_64-w64-mingw32 --host=x86_64-w64-mingw32 --target=x86_64-w64-mingw32 --with-native-system-header-dir=/ucrt64/include --libexecdir=/ucrt64/lib --enable-bootstrap --enable-checking=release --with-arch=nocona --with-tune=generic --enable-languages=c,lto,c++,fortran,ada,objc,obj-c++,jit --enable-shared --enable-static --enable-libatomic --enable-threads=posix --enable-graphite --enable-fully-dynamic-string --enable-libstdcxx-filesystem-ts --enable-libstdcxx-time --disable-libstdcxx-pch --enable-lto --enable-libgomp --disable-libssp --disable-multilib --disable-rpath --disable-win32-registry --disable-nls --disable-werror --disable-symvers --with-libiconv --with-system-zlib --with-gmp=/ucrt64 --with-mpfr=/ucrt64 --with-mpc=/ucrt64 --with-isl=/ucrt64 --with-pkgversion='Rev3, Built by MSYS2 project' --with-bugurl=https://github.com/msys2/MINGW-packages/issues --with-gnu-as --with-gnu-ld --disable-libstdcxx-debug --with-boot-ldflags=-static-libstdc++ --with-stage1-ldflags=-static-libstdc++ Thread model: posix Supported LTO compression algorithms: zlib zstd gcc version 13.2.0 (Rev3, Built by MSYS2 project) ``` ``` $ python-config --cflags -IC:/msys64/ucrt64/include/python3.11 -IC:/msys64/ucrt64/include/python3.11 -march=nocona -msahf -mtune=generic -O2 -pipe -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector-strong -O3 -DNDEBUG -g -fwrapv -O3 -Wall ```

Currently, I'm using winlibs.com's build of GCC. But I don't want to use an external GCC distro. Please fix the UCRT64 GCC.

ghost commented 7 months ago

Seems related: https://github.com/msys2/MINGW-packages/issues/17749

ghost commented 7 months ago

I have switched to CLANG64 for a while. Everything is good.