-
Notifications
You must be signed in to change notification settings - Fork 384
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
Build failure with in-source autotools build on case-insensitive filesystem with C++20-capable compiler #621
Comments
More about this problem in this llvm bug report if you're interested. |
For completeness of the picture I'd be happy to see results of testing the in-source CMake build. But I do not support changing a great/simple name of a file so that deprecated build system works in non-recommended scenarios. |
The good news is that cmake builds, whether in-source or out-of-source, don't seem to have the problem. Even with an in-source build, cmake doesn't add a If the "non-recommended scenario" you're referring to is doing an in-source autotools build, then it could suffice to update the documentation to recommend an out-of-source build. Currently, the documentation shows how to do an in-source build: Lines 48 to 51 in c19ae12
An out-of-source build would be: --- BUILD.autotools.md.orig 2023-09-04 06:24:45.000000000 -0500
+++ BUILD.autotools.md 2023-09-04 06:25:14.000000000 -0500
@@ -46,7 +46,9 @@
```sh
./bootstrap # this prepares the configure script
-./configure
+mkdir build
+cd build
+../configure
make # build the library
make install # as root, or using sudo, this will install hidapi into your system
``` |
Do not recommend using in-source Autotools build. Closes: #621
Good point, I'll update the doc. |
Thanks. |
* Update BUILD.autotools.md Do not recommend using in-source Autotools build. Closes: #621
When doing an in-source build using the autotools build system on a case-insensitive filesystem (for example, most Macs) when using a compiler that is aware of C++20, the build fails, for example on macOS 12:
This is because C++20 has a header called
version
which is automatically included by various system headers, but your project has a file calledVERSION
in its root directory. An in-source autotools build will add the flag-I.
to find the generated config.h file, but this will also cause theVERSION
file to be used instead of theversion
file.Note this problem occurs in any C++ mode, not just C++20 mode, as long as the compiler has C++20 compatibility and therefore has the
version
header.Doing an out-of-source build does work. I am aware that the autotools build system is deprecated. I have not tested in-source nor out-of-source cmake builds.
The text was updated successfully, but these errors were encountered: