Opened 9 months ago
Last modified 9 months ago
#69312 assigned defect
irrlichtmt fails to build on Mac OS 10.7 but there is a fix — at Initial Version
Reported by: | programmingkidx | Owned by: | |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | |
Keywords: | lion | Cc: | |
Port: | irrlichtmt |
Description
When I was trying to install minetest it's dependency irrlichtmt failed to build. The log contains all the details about what went wrong. Some of the errors include:
irrlicht-1.9.0mt10/include/irrString.h:955:26: error: use of undeclared identifier 'mbstowcs' :info:build const size_t written = mbstowcs(&destination[0], source, (size_t)sourceSize); irrlicht-1.9.0mt10/include/irrString.h:1001:52: error: cannot initialize a parameter of type 'wchar_t' with an lvalue of type 'const wchar_t *' :info:build const size_t written = wcstombs(&destination[0], source, destination.size()); :info:build ^~~~~~ :info:build /usr/include/wchar.h:148:42: note: passing argument to parameter here :info:build size_t wcrtomb(char * __restrict, wchar_t, mbstate_t * __restrict);
Currently the irrlichtmt port being used is version 1.9.0mt10. The newest version is irrlicht-1.9.0mt14. I downloaded this version it was able to build it successfully. I just had to specify the compiler to use. This is the command I used to make the cmake step work:
cmake . -DBUILD_SHARED_LIBS=OFF -D CMAKE_C_COMPILER=clang-mp-16 -D CMAKE_CXX_COMPILER=clang++-mp-16
I picked clang-mp-16 because it was already on my system. I don't know if an older version world work. From the error message I saw it looks like a compiler that supports CXX17 should work.
This is where I downloaded irrlichtmt: https://github.com/minetest/irrlicht/releases/tag/1.9.0mt14