Changes to build in case-insensitive filesystems, builds with Ubuntu.Dockerfile in OSX (arm64) and Ubuntu (amd64)#52
Conversation
|
The project builds successfully with the new structure, but running the schema compiler the command line of the makefile I will look into updating the schema compiler to fit this new structure such that this pull request can be considered complete. |
|
The fix for the schema compiler was to ignore to Had to update the command line arguments of the schema compiler from: to removing Had to update library/api/Build.json#L3 from while having it as an empty string results in no errors: This allows the project to fully build without errors. I have not investigated a proper fix for this rather than just making it an empty string. Supporting building on case-insensitive filesystems turned out to be more complex than expected. I wonder if there are other cases to be treated. |
Hi @mmbednarek,
Here are the changes to allow the project to build with Ubuntu.Dockerfile in both OSX (arm64), which by default has a case-insensitive file system while still building in Ubuntu (amd64).
The motivation of this change is to eliminate the clashes of header files on
#includedirectives on case insensitive file systems. Example, on#include <cstring>, inside it will try to#include <string.h>, but instead of picking up the stand library'sstring.h, it will pick upminecpp/util/String.h. This happens because the system includes go last when compiling and because of the following CMake configuration inminecpp/library/util/CMakeLists.txt:This PR updates on
meta/cmake-generate-target.shand all the include directives needed for the project to fully build. Because there are many files, the most important change was to remove the following line oncmake-generate-target.sh:Then run
meta/cmake-generate.shand update the header files accordingly for a successful build.Now the project can be developed in OSX (arm64) through docker, but I'm still evaluating the effort to perform a native build.
Thanks once again for allowing me to learn with this code base.