Description
libcdio-paranoia does not build using MSVC compiler.
This is due to the use of compiler specific keywords and types that are not supported by MSVC.
How to Reproduce
Build libcdio-paranoia using MSVC, by providing all the source files under libcdio-paranoia/lib and headers under libcdio-paranoia/include.
In my case, this was achieved using a Rust build script (which basically provides an interface to do just the above).
Here's a CI workflow I've created specifically to be able to diagnose this.
Since public workflows are not available on GitHub, you may fork the repo and run the workflow manually. Make sure to use the one from the paranoia-on-msvc branch.
Output Given
Here are the logs:
D:\a\libcdio-sys\libcdio-sys\vendor/libcdio-paranoia/lib/cdda_interface/utils.c(34): error C2146: syntax error: missing ';' before identifier '__attribute__'
D:\a\libcdio-sys\libcdio-sys\vendor/libcdio-paranoia/lib/cdda_interface/utils.c(34): error C2065: 'unused': undeclared identifier
D:\a\libcdio-sys\libcdio-sys\vendor/libcdio-paranoia/lib/cdda_interface/utils.c(38): error C2065: 'STDERR_FILENO': undeclared identifier
D:\a\libcdio-sys\libcdio-sys\vendor/libcdio-paranoia/lib/cdda_interface/utils.c(55): error C2146: syntax error: missing ';' before identifier '__attribute__'
D:\a\libcdio-sys\libcdio-sys\vendor/libcdio-paranoia/lib/cdda_interface/utils.c(55): error C2065: 'unused': undeclared identifier
D:\a\libcdio-sys\libcdio-sys\vendor/libcdio-paranoia/lib/cdda_interface/utils.c(59): error C2065: 'STDERR_FILENO': undeclared identifier
D:\a\libcdio-sys\libcdio-sys\vendor/libcdio-paranoia/lib/cdda_interface/utils.c(90): error C2146: syntax error: missing ';' before identifier '__attribute__'
D:\a\libcdio-sys\libcdio-sys\vendor/libcdio-paranoia/lib/cdda_interface/utils.c(90): error C2065: 'unused': undeclared identifier
D:\a\libcdio-sys\libcdio-sys\vendor/libcdio-paranoia/lib/cdda_interface/utils.c(93): error C2065: 'STDERR_FILENO': undeclared identifier
D:\a\libcdio-sys\libcdio-sys\vendor/libcdio-paranoia/lib/cdda_interface/utils.c(95): error C2065: 'STDERR_FILENO': undeclared identifier
D:\a\libcdio-sys\libcdio-sys\vendor/libcdio-paranoia/lib/cdda_interface/utils.c(96): error C2065: 'STDERR_FILENO': undeclared identifier
D:\a\libcdio-sys\libcdio-sys\vendor/libcdio-paranoia/lib/cdda_interface/utils.c(97): error C2065: 'STDERR_FILENO': undeclared identifier
D:\a\libcdio-sys\libcdio-sys\vendor/libcdio-paranoia/lib/cdda_interface/utils.c(124): error C2146: syntax error: missing ';' before identifier '__attribute__'
D:\a\libcdio-sys\libcdio-sys\vendor/libcdio-paranoia/lib/cdda_interface/utils.c(124): error C2065: 'unused': undeclared identifier
D:\a\libcdio-sys\libcdio-sys\vendor/libcdio-paranoia/lib/cdda_interface/utils.c(141): error C2065: 'STDERR_FILENO': undeclared identifier
D:\a\libcdio-sys\libcdio-sys\vendor/libcdio-paranoia/lib/cdda_interface/utils.c(143): error C2065: 'STDERR_FILENO': undeclared identifier
(this is an excerpt from the output of a very long Cargo build script)
Expected behavior
libcdio-paranoia to build fine under MSVC, just like libcdio does.
Environment
Using the windows-latest runner in GitHub Actions.
Workarounds
This shouldn't be a problem with MinGW, but I haven't tested that yet.
Priority
Fixing this enables libcdio-sys (rust interface to libcdio-paranoia) to support static builds on windows.
Additional Context
Encountered this while adding support for static (aka vendored) builds of libcdio-paranoia for libcdio-sys.
Description
libcdio-paranoia does not build using MSVC compiler.
This is due to the use of compiler specific keywords and types that are not supported by MSVC.
How to Reproduce
Build libcdio-paranoia using MSVC, by providing all the source files under
libcdio-paranoia/liband headers underlibcdio-paranoia/include.In my case, this was achieved using a Rust build script (which basically provides an interface to do just the above).
Here's a CI workflow I've created specifically to be able to diagnose this.
Since public workflows are not available on GitHub, you may fork the repo and run the workflow manually. Make sure to use the one from the
paranoia-on-msvcbranch.Output Given
Here are the logs:
(this is an excerpt from the output of a very long Cargo build script)
Expected behavior
libcdio-paranoia to build fine under MSVC, just like libcdio does.
Environment
Using the
windows-latestrunner in GitHub Actions.Workarounds
This shouldn't be a problem with MinGW, but I haven't tested that yet.
Priority
Fixing this enables libcdio-sys (rust interface to libcdio-paranoia) to support static builds on windows.
Additional Context
Encountered this while adding support for static (aka vendored) builds of libcdio-paranoia for libcdio-sys.