You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It seems Corrade fails trying to find the function isatty with emscripten 3.1.22. On my local copy, I managed to fix it by including unistd.h in Debug.cpp under #elif defined(CORRADE_TARGET_EMSCRIPTEN)
FAILED: src/Corrade/Utility/CMakeFiles/CorradeUtilityObjects.dir/Debug.cpp.o
C:\Source\mixedreality.vcpkgbuilder\packages\su-externals\BuildToolsRepo__toolPackages\Windows\Cpp\emsdk\upstream\emscripten\em++.bat -DCORRADE_IS_DEBUG_BUILD -IC:/Source/mixedreality.vcpkgbuilder/packages/su-externals/__vcpkg/buildtrees/corrade/src/ee686c341d-33b116b212.clean/src -IC:/Source/mixedreality.vcpkgbuilder/packages/su-externals/__vcpkg/buildtrees/corrade/wasm32-emscripten-dbg/src -g -g -g -std=c++11 -Wall -Wextra -Wold-style-cast -Winit-self -Werror=return-type -Wmissing-declarations -Wpedantic -fvisibility=hidden -fvisibility-inlines-hidden -Wmissing-prototypes -Wno-shorten-64-to-32 -MD -MT src/Corrade/Utility/CMakeFiles/CorradeUtilityObjects.dir/Debug.cpp.o -MF src\Corrade\Utility\CMakeFiles\CorradeUtilityObjects.dir\Debug.cpp.o.d -o src/Corrade/Utility/CMakeFiles/CorradeUtilityObjects.dir/Debug.cpp.o -c C:/Source/mixedreality.vcpkgbuilder/packages/su-externals/__vcpkg/buildtrees/corrade/src/ee686c341d-33b116b212.clean/src/Corrade/Utility/Debug.cpp
C:/Source/mixedreality.vcpkgbuilder/packages/su-externals/__vcpkg/buildtrees/corrade/src/ee686c341d-33b116b212.clean/src/Corrade/Utility/Debug.cpp:356:35: error: use of undeclared identifier 'isatty'; did you mean 'isTty'?
((output == &std::cout && isatty(1)) ||
^~~~~~
isTty
C:/Source/mixedreality.vcpkgbuilder/packages/su-externals/__vcpkg/buildtrees/corrade/src/ee686c341d-33b116b212.clean/src/Corrade/Utility/Debug.cpp:337:13: note: 'isTty' declared here
bool Debug::isTty(std::ostream* const output) {
^
C:/Source/mixedreality.vcpkgbuilder/packages/su-externals/__vcpkg/buildtrees/corrade/src/ee686c341d-33b116b212.clean/src/Corrade/Utility/Debug.cpp:356:42: error: cannot initialize a parameter of type 'std::ostream ' (aka 'basic_ostream ') with an rvalue of type 'int'
((output == &std::cout && isatty(1)) ||
^
C:/Source/mixedreality.vcpkgbuilder/packages/su-externals/__vcpkg/buildtrees/corrade/src/ee686c341d-33b116b212.clean/src/Corrade/Utility/Debug.cpp:337:39: note: passing argument to parameter 'output' here
bool Debug::isTty(std::ostream const output) {
^
C:/Source/mixedreality.vcpkgbuilder/packages/su-externals/__vcpkg/buildtrees/corrade/src/ee686c341d-33b116b212.clean/src/Corrade/Utility/Debug.cpp:357:35: error: use of undeclared identifier 'isatty'; did you mean 'isTty'?
(output == &std::cerr && isatty(2)))
^~~~~~
isTty
C:/Source/mixedreality.vcpkgbuilder/packages/su-externals/__vcpkg/buildtrees/corrade/src/ee686c341d-33b116b212.clean/src/Corrade/Utility/Debug.cpp:337:13: note: 'isTty' declared here
bool Debug::isTty(std::ostream const output) {
The text was updated successfully, but these errors were encountered:
kokulshan
changed the title
Corrade fails to compile with emscripten 3.12.3
Corrade fails to compile with emscripten 3.1.22
Nov 1, 2022
Huh, wait a moment. The code path that uses isatty() shouldn't be used on Emscripten at all. That's a Vcpkg package bug, probably a leftover from the times when it was Windows-only -- i.e., this line should be there only for Windows and nothing else.
I'll work around it here but the package itself needs to be fixed.
It seems Corrade fails trying to find the function isatty with emscripten 3.1.22. On my local copy, I managed to fix it by including unistd.h in Debug.cpp under #elif defined(CORRADE_TARGET_EMSCRIPTEN)
The text was updated successfully, but these errors were encountered: