mosra / corrade Goto Github PK
View Code? Open in Web Editor NEWC++11 multiplatform utility library
Home Page: https://magnum.graphics/corrade/
License: Other
C++11 multiplatform utility library
Home Page: https://magnum.graphics/corrade/
License: Other
Use case: I want to load textures using the Magnum::Trade
subsystem in a background thread. Basically, I have to load one texture per rendered frame, that's why I would like to minimize/hide I/O and decoding time.
Problem: I can't find a clean solution. Separate Corrade::PluginManager::Manager
instances do not work, since they act upon a global, static GlobalPluginStorage
without locking. The handy AnyImageImporter
plugin even loads other plugins at runtime, which further complicates things.
Do you think it might be feasible to either introduce some locking on the global plugin storage or to completely decouple the Manager
instances, i.e. remove any global state?
At least under Linux dlopen()
and dlclose()
seem to be robust against multiple calls, even from separate threads as they do locking and refcounting internally. I haven't looked at other platforms yet...
I can also understand if you say this is out of scope for Corrade
. Probably I'd have to use a separate image loading library then...
error C2766: explicit specialization; 'Corrade::Utility::ConfigurationValue' has already been defined corrade\utility\configurationvalue.h 201 Magnum
for vs2013 platfrom
typedef unsigned int char32_t;
so
template<> struct ConfigurationValue<char32_t>
is equal to
template<> struct ConfigurationValue
CMake modules (FindCorrade.cmake
) are installed in CMAKE_ROOT
:
set(CORRADE_CMAKE_MODULE_INSTALL_DIR ${CMAKE_ROOT}/Modules)
Installing in CMAKE_ROOT
is not a good practise (only Kitware-reviewed Find
script are expected there).
http://www.cmake.org/cmake/help/v2.8.8/cmake.html#command:find_package lists the paths search by find_package
.
I think a better option is ${CMAKE_INSTALL_PREFIX}/lib/cmake/${PROJECT_NAME}/
without #103 the emscripten build fails for me with:
CMake Error at modules/UseCorrade.cmake:319 (include):
include could not find load file:
UseEmscripten
Call Stack (most recent call first):
CMakeLists.txt:225 (include)
CMake Error at CMakeLists.txt:227 (include):
include could not find load file:
UseEmscripten
-- Configuring incomplete, errors occurred!
Corrade build on OSX results in this somewhat annoying linker warning. This warning has been around since I first started using Corrade.
The warning shows up in both Eclipse (Unix Makefile) and Xcode builds.
I've haven't been bothered enough to try to track it down, but just reporting it here if anyone has a quick fix.
This warning does not seem to effect functionality or usage, it's just kind of annoying to see the warning on each build.
ld: warning: direct access in function 'Corrade::Utility::ConfigurationGroup::addGroup(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, Corrade::Utility::ConfigurationGroup*)' from file '../../extern/corrade/src/Corrade/Utility/libCorradeUtility.a(ConfigurationGroup.cpp.o)' to global weak symbol 'std::__1::char_traits<char>::eq(char, char)' from file 'CMakeFiles/CylinderTest.dir/AppDelegate.mm.o' means the weak symbol cannot be overridden at runtime. This was likely caused by different translation units being compiled with different visibility settings.
ld: warning: direct access in function 'Corrade::Utility::ConfigurationGroup::setValueInternal(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, unsigned int, Corrade::Containers::EnumSet<Corrade::Utility::ConfigurationValueFlag, (unsigned char)255>)' from file '../../extern/corrade/src/Corrade/Utility/libCorradeUtility.a(ConfigurationGroup.cpp.o)' to global weak symbol 'std::__1::char_traits<char>::eq(char, char)' from file 'CMakeFiles/CylinderTest.dir/AppDelegate.mm.o' means the weak symbol cannot be overridden at runtime. This was likely caused by different translation units being compiled with different visibility settings.
ld: warning: direct access in function 'Corrade::Utility::ConfigurationGroup::addValueInternal(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, Corrade::Containers::EnumSet<Corrade::Utility::ConfigurationValueFlag, (unsigned char)255>)' from file '../../extern/corrade/src/Corrade/Utility/libCorradeUtility.a(ConfigurationGroup.cpp.o)' to global weak symbol 'std::__1::char_traits<char>::eq(char, char)' from file 'CMakeFiles/CylinderTest.dir/AppDelegate.mm.o' means the weak symbol cannot be overridden at runtime. This was likely caused by different translation units being compiled with different visibility settings.
Hi mosra,
I followed the manual build and install instructions for magnum and corrade. Afterwards i tried building the object picking example also following the instructions.
I get the following cmake error message:
CMake Error at /usr/share/cmake-3.14/Modules/FindPackageHandleStandardArgs.cmake:137 (message):
Could NOT find Corrade (missing: CORRADE_INCLUDE_DIR
_CORRADE_CONFIGURE_FILE)
Call Stack (most recent call first):
/usr/share/cmake-3.14/Modules/FindPackageHandleStandardArgs.cmake:378 (_FPHSA_FAILURE_MESSAGE)
/usr/local/share/cmake/Corrade/FindCorrade.cmake:278 (find_package_handle_standard_args)
/usr/local/share/cmake/Corrade/CorradeConfig.cmake:26 (include)
/usr/local/share/cmake/Magnum/FindMagnum.cmake:218 (find_package)
/usr/local/share/cmake/Magnum/MagnumConfig.cmake:26 (include)
CMakeLists.txt:32 (find_package)
-- Configuring incomplete, errors occurred!
Im working on a Void Linux machine. Probably i forgot sth but i dont know what.
Greetings
jonas
PS: Thanks for the great introduction you gave at the LMU a few weeks ago.
I think clang and gcc struggle with the big strings in the generated cpp files? My Magnum projects with a few KB of shaders compiles in ~5sec but including a 25MB model and it takes 2.5min to build. Compile times could be kept low by embedding resources with incbin or ld or objcopy?
I installed corrade into /usr/local and now it cannot find libCorradeUtility.so.0. Here's the terminal output:
raoul@raoul:/usr/local/bin$ ldd corrade-rc
linux-vdso.so.1 => (0x00007ffdde75b000)
libCorradeUtility.so.0 => not found
libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f534dc06000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f534d900000)
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f534d6ea000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f534d325000)
/lib64/ld-linux-x86-64.so.2 (0x00007f534df0a000)
maybe we need to make corrade-rc
as a standalone dependency?
$ vcpkg install corrade[*] --triplet x86-uwp
Error:
[1/2] cmd /c "cd ../../x86-uwp-dbg && "C:/Program Files/CMake/bin/cmake.exe" "C:/workspace/vcpkg/buildtrees/corrade/src/v2019.10-56f3949c0e" "-DUTILITY_USE_ANSI_COLORS=ON" "-DBUILD_STATIC=0" "-DWITH_INTERCONNECT=ON" "-DWITH_PLUGINMANAGER=ON" "-DWITH_TESTSUITE=ON" "-DWITH_UTILITY=ON" "-DWITH_=OFF" "-DCMAKE_SYSTEM_NAME=WindowsStore" "-DCMAKE_SYSTEM_VERSION=10.0" "-DBUILD_SHARED_LIBS=ON" "-DVCPKG_CHAINLOAD_TOOLCHAIN_FILE=C:/workspace/vcpkg/scripts/toolchains/windows.cmake" "-DVCPKG_TARGET_TRIPLET=x86-uwp" "-DVCPKG_SET_CHARSET_FLAG=ON" "-DVCPKG_PLATFORM_TOOLSET=v142" "-DCMAKE_EXPORT_NO_PACKAGE_REGISTRY=ON" "-DCMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY=ON" "-DCMAKE_FIND_PACKAGE_NO_SYSTEM_PACKAGE_REGISTRY=ON" "-DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=TRUE" "-DCMAKE_VERBOSE_MAKEFILE=ON" "-DVCPKG_APPLOCAL_DEPS=OFF" "-DCMAKE_TOOLCHAIN_FILE=C:/workspace/vcpkg/scripts/buildsystems/vcpkg.cmake" "-DCMAKE_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION=ON" "-DVCPKG_CXX_FLAGS=" "-DVCPKG_CXX_FLAGS_RELEASE=" "-DVCPKG_CXX_FLAGS_DEBUG=" "-DVCPKG_C_FLAGS=" "-DVCPKG_C_FLAGS_RELEASE=" "-DVCPKG_C_FLAGS_DEBUG=" "-DVCPKG_CRT_LINKAGE=dynamic" "-DVCPKG_LINKER_FLAGS=" "-DVCPKG_TARGET_ARCHITECTURE=x86" "-DCMAKE_INSTALL_LIBDIR:STRING=lib" "-DCMAKE_INSTALL_BINDIR:STRING=bin" "-AWin32" "-G" "Visual Studio 16 2019" "-DCMAKE_BUILD_TYPE=Debug" "-DCMAKE_INSTALL_PREFIX=C:/workspace/vcpkg/packages/corrade_x86-uwp/debug""
FAILED: ../../x86-uwp-dbg/CMakeCache.txt
cmd /c "cd ../../x86-uwp-dbg && "C:/Program Files/CMake/bin/cmake.exe" "C:/workspace/vcpkg/buildtrees/corrade/src/v2019.10-56f3949c0e" "-DUTILITY_USE_ANSI_COLORS=ON" "-DBUILD_STATIC=0" "-DWITH_INTERCONNECT=ON" "-DWITH_PLUGINMANAGER=ON" "-DWITH_TESTSUITE=ON" "-DWITH_UTILITY=ON" "-DWITH_=OFF" "-DCMAKE_SYSTEM_NAME=WindowsStore" "-DCMAKE_SYSTEM_VERSION=10.0" "-DBUILD_SHARED_LIBS=ON" "-DVCPKG_CHAINLOAD_TOOLCHAIN_FILE=C:/workspace/vcpkg/scripts/toolchains/windows.cmake" "-DVCPKG_TARGET_TRIPLET=x86-uwp" "-DVCPKG_SET_CHARSET_FLAG=ON" "-DVCPKG_PLATFORM_TOOLSET=v142" "-DCMAKE_EXPORT_NO_PACKAGE_REGISTRY=ON" "-DCMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY=ON" "-DCMAKE_FIND_PACKAGE_NO_SYSTEM_PACKAGE_REGISTRY=ON" "-DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=TRUE" "-DCMAKE_VERBOSE_MAKEFILE=ON" "-DVCPKG_APPLOCAL_DEPS=OFF" "-DCMAKE_TOOLCHAIN_FILE=C:/workspace/vcpkg/scripts/buildsystems/vcpkg.cmake" "-DCMAKE_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION=ON" "-DVCPKG_CXX_FLAGS=" "-DVCPKG_CXX_FLAGS_RELEASE=" "-DVCPKG_CXX_FLAGS_DEBUG=" "-DVCPKG_C_FLAGS=" "-DVCPKG_C_FLAGS_RELEASE=" "-DVCPKG_C_FLAGS_DEBUG=" "-DVCPKG_CRT_LINKAGE=dynamic" "-DVCPKG_LINKER_FLAGS=" "-DVCPKG_TARGET_ARCHITECTURE=x86" "-DCMAKE_INSTALL_LIBDIR:STRING=lib" "-DCMAKE_INSTALL_BINDIR:STRING=bin" "-AWin32" "-G" "Visual Studio 16 2019" "-DCMAKE_BUILD_TYPE=Debug" "-DCMAKE_INSTALL_PREFIX=C:/workspace/vcpkg/packages/corrade_x86-uwp/debug""
-- Selecting Windows SDK version 10.0.18362.0 to target Windows 10.0.
-- The CXX compiler identification is MSVC 19.23.28106.4
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.23.28105/bin/Hostx64/x86/cl.exe
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.23.28105/bin/Hostx64/x86/cl.exe -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Error at CMakeLists.txt:158 (message):
Native `corrade-rc` executable, which is needed when crosscompiling, was
not found
-- Configuring incomplete, errors occurred!
See also "C:/workspace/vcpkg/buildtrees/corrade/x86-uwp-dbg/CMakeFiles/CMakeOutput.log".
[2/2] cmd /c "cd .. && "C:/Program Files/CMake/bin/cmake.exe" "C:/workspace/vcpkg/buildtrees/corrade/src/v2019.10-56f3949c0e" "-DUTILITY_USE_ANSI_COLORS=ON" "-DBUILD_STATIC=0" "-DWITH_INTERCONNECT=ON" "-DWITH_PLUGINMANAGER=ON" "-DWITH_TESTSUITE=ON" "-DWITH_UTILITY=ON" "-DWITH_=OFF" "-DCMAKE_SYSTEM_NAME=WindowsStore" "-DCMAKE_SYSTEM_VERSION=10.0" "-DBUILD_SHARED_LIBS=ON" "-DVCPKG_CHAINLOAD_TOOLCHAIN_FILE=C:/workspace/vcpkg/scripts/toolchains/windows.cmake" "-DVCPKG_TARGET_TRIPLET=x86-uwp" "-DVCPKG_SET_CHARSET_FLAG=ON" "-DVCPKG_PLATFORM_TOOLSET=v142" "-DCMAKE_EXPORT_NO_PACKAGE_REGISTRY=ON" "-DCMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY=ON" "-DCMAKE_FIND_PACKAGE_NO_SYSTEM_PACKAGE_REGISTRY=ON" "-DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=TRUE" "-DCMAKE_VERBOSE_MAKEFILE=ON" "-DVCPKG_APPLOCAL_DEPS=OFF" "-DCMAKE_TOOLCHAIN_FILE=C:/workspace/vcpkg/scripts/buildsystems/vcpkg.cmake" "-DCMAKE_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION=ON" "-DVCPKG_CXX_FLAGS=" "-DVCPKG_CXX_FLAGS_RELEASE=" "-DVCPKG_CXX_FLAGS_DEBUG=" "-DVCPKG_C_FLAGS=" "-DVCPKG_C_FLAGS_RELEASE=" "-DVCPKG_C_FLAGS_DEBUG=" "-DVCPKG_CRT_LINKAGE=dynamic" "-DVCPKG_LINKER_FLAGS=" "-DVCPKG_TARGET_ARCHITECTURE=x86" "-DCMAKE_INSTALL_LIBDIR:STRING=lib" "-DCMAKE_INSTALL_BINDIR:STRING=bin" "-AWin32" "-G" "Visual Studio 16 2019" "-DCMAKE_BUILD_TYPE=Release" "-DCMAKE_INSTALL_PREFIX=C:/workspace/vcpkg/packages/corrade_x86-uwp""
FAILED: ../CMakeCache.txt
cmd /c "cd .. && "C:/Program Files/CMake/bin/cmake.exe" "C:/workspace/vcpkg/buildtrees/corrade/src/v2019.10-56f3949c0e" "-DUTILITY_USE_ANSI_COLORS=ON" "-DBUILD_STATIC=0" "-DWITH_INTERCONNECT=ON" "-DWITH_PLUGINMANAGER=ON" "-DWITH_TESTSUITE=ON" "-DWITH_UTILITY=ON" "-DWITH_=OFF" "-DCMAKE_SYSTEM_NAME=WindowsStore" "-DCMAKE_SYSTEM_VERSION=10.0" "-DBUILD_SHARED_LIBS=ON" "-DVCPKG_CHAINLOAD_TOOLCHAIN_FILE=C:/workspace/vcpkg/scripts/toolchains/windows.cmake" "-DVCPKG_TARGET_TRIPLET=x86-uwp" "-DVCPKG_SET_CHARSET_FLAG=ON" "-DVCPKG_PLATFORM_TOOLSET=v142" "-DCMAKE_EXPORT_NO_PACKAGE_REGISTRY=ON" "-DCMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY=ON" "-DCMAKE_FIND_PACKAGE_NO_SYSTEM_PACKAGE_REGISTRY=ON" "-DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=TRUE" "-DCMAKE_VERBOSE_MAKEFILE=ON" "-DVCPKG_APPLOCAL_DEPS=OFF" "-DCMAKE_TOOLCHAIN_FILE=C:/workspace/vcpkg/scripts/buildsystems/vcpkg.cmake" "-DCMAKE_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION=ON" "-DVCPKG_CXX_FLAGS=" "-DVCPKG_CXX_FLAGS_RELEASE=" "-DVCPKG_CXX_FLAGS_DEBUG=" "-DVCPKG_C_FLAGS=" "-DVCPKG_C_FLAGS_RELEASE=" "-DVCPKG_C_FLAGS_DEBUG=" "-DVCPKG_CRT_LINKAGE=dynamic" "-DVCPKG_LINKER_FLAGS=" "-DVCPKG_TARGET_ARCHITECTURE=x86" "-DCMAKE_INSTALL_LIBDIR:STRING=lib" "-DCMAKE_INSTALL_BINDIR:STRING=bin" "-AWin32" "-G" "Visual Studio 16 2019" "-DCMAKE_BUILD_TYPE=Release" "-DCMAKE_INSTALL_PREFIX=C:/workspace/vcpkg/packages/corrade_x86-uwp""
-- Selecting Windows SDK version 10.0.18362.0 to target Windows 10.0.
-- The CXX compiler identification is MSVC 19.23.28106.4
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.23.28105/bin/Hostx64/x86/cl.exe
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.23.28105/bin/Hostx64/x86/cl.exe -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Error at CMakeLists.txt:158 (message):
Native `corrade-rc` executable, which is needed when crosscompiling, was
not found
-- Configuring incomplete, errors occurred!
See also "C:/workspace/vcpkg/buildtrees/corrade/x86-uwp-rel/CMakeFiles/CMakeOutput.log".
ninja: build stopped: subcommand failed.
@mosra,
Containers::Pointer is just similar to std::unique_ptr, so is there any plan for a simplified version of std::shared_ptr?
Similarly, how about copyable and resizable std::vector? Currently Containers::Array is non-resizable.
I have implemented those (here and here). You can have a look.
Similar to my previous feature requests, those features were implemented by me in my codebase and were used by me exclusively so far. I just think it is better to share my work by integrating into magnum such that there're more people use it, then it can get feedback from the community and be improved much more.
I've attempted to follow docs here: https://doc.magnum.graphics/magnum/platforms-android.html
and also here: https://doc.magnum.graphics/corrade/building-corrade.html#building-corrade-cross-android
I've set a variable for ANDROID_NDK_HOME to point to my ndk, and set paths for tools needed like the cmake included in the SDK. In the case of the Android CI instructions, there is a nice description of grabbing the NDKr16b, unzipping it, and a simple cmake command, cmake .. -DCMAKE_ANDROID_NDK=$ANDROID_NDK_HOME -DCMAKE_SYSTEM_NAME=Android -DCMAKE_SYSTEM_VERSION=22 -DCMAKE_ANDROID_ARCH_ABI=armeabi-v7a -DCMAKE_ANDROID_NDK_TOOLCHAIN_VERSION=clang -DCMAKE_ANDROID_STL_TYPE=c++_static -DCMAKE_BUILD_TYPE=Release
That configures nicely. When I build, I get an error right away when compiling Directory.cpp:
Scanning dependencies of target CorradeUtilityObjects
[ 3%] Building CXX object src/Corrade/Utility/CMakeFiles/CorradeUtilityObjects.dir/Debug.cpp.o
[ 6%] Building CXX object src/Corrade/Utility/CMakeFiles/CorradeUtilityObjects.dir/Directory.cpp.o
corrade.git/src/Corrade/Utility/Directory.cpp:50:31: fatal error: android/api-level.h: No such file or directory
The build is unable to find the path to the platform version headers, which are most definitely present in the NDK.
I'm looking for some pointers on what configure step I am missing. I am fairly competent with the NDK, although the integration with cmake has changed a bit over the years and I am no expert. Also, I am surprised that for a project supporting android, there is only one bug filed in this project against android. Any help would be appreciated so I can complete evaluation of this project.
As mentioned per gitter, the following code asserts on the vectors bounds check:
#include <vector>
#include <Corrade/Containers/ArrayViewStl.h>
//...
std::vector<int> v;
ArrayView<int>(v);
As in line https://github.com/mosra/corrade/blob/master/src/Corrade/Containers/ArrayViewStl.h#L65 it tries to access element 0.
Some parameters (like “${CMAKE_CURRENT_BINARY_DIR}/configure.h”) are passed to CMake commands in your build scripts without enclosing them by quotation marks. I see that these places will result in build difficulties if the contents of the used variables will contain special characters like semicolons.
I would recommend to apply advices from a wiki article.
Currently it is not possible to define an output file only folder with acme.py..
Ouput:
> make install
Scanning dependencies of target CorradeUtilityObjects
[ 3%] Building CXX object src/Corrade/Utility/CMakeFiles/CorradeUtilityObjects.dir/Debug.cpp.obj
[ 6%] Building CXX object src/Corrade/Utility/CMakeFiles/CorradeUtilityObjects.dir/Directory.cpp.obj
D:\Files\C++\lib_build\corrade\src\Corrade\Utility\Directory.cpp: In function 'bool Corrade::Utility::Directory::rm(const string&)':
D:\Files\C++\lib_build\corrade\src\Corrade\Utility\Directory.cpp:179:33: error: '_wremove' was not declared in this scope
return _wremove(wpath.data()) == 0;
^
D:\Files\C++\lib_build\corrade\src\Corrade\Utility\Directory.cpp: In function 'bool Corrade::Utility::Directory::move(const string&, const string&)':
D:\Files\C++\lib_build\corrade\src\Corrade\Utility\Directory.cpp:198:62: error: '_wrename' was not declared in this scope
_wrename(widen(oldPath).data(), widen(newPath).data())
^
No CMake variables seem to affect this problem (fails on multiple variations of C++ standard, debug/release, linkage type, deprecated API on/off)
Would be cool if one could just say brew install corrade on osx homebrew and it simply works ...
Hello,
Today I just found a bug. In Debug mode, when using the code like this:
Debug() << str;
where str
is a std::string
, then all callings to Debug() << ...
from that line no longer output anything. Using Debug()
with const char*
does not suffer from this problem.
My compiler is MSVC 2019.
Note that if not in Debug mode (Release/RelDebugInfo) then I don't have this problem.
It's really difficult to find a good/lightweight library with no dependencies that also compiles with emscripten regarding sockets.
-s USE_SDL=2 -s USE_SDL_NET=2
) and it isn't easy to integrate (no websocket layer for the server, many bugs, many incompatibilities, etc)I know this is a crazy idea that maybe should be added as a plugin/integration to Magnum but it would open a world of possibilities
Wasm + GPU Graphics + Audio + Networking == fully fledged game framework
Setting UNICODE/_UNICODE breaks the library because it expects e.g. CreateDirectoryA
instead of CreateDirectoryW
.
Using the following settings:
Using MinGW on windows.
Test project D:/workspace/git/corrade/build
Start 1: ContainersArrayTest
1/26 Test #1: ContainersArrayTest ................. Passed 0.01 sec
Start 2: ContainersArrayReferenceTest
2/26 Test #2: ContainersArrayReferenceTest ........ Passed 0.01 sec
Start 3: ContainersEnumSetTest
3/26 Test #3: ContainersEnumSetTest ............... Passed 0.01 sec
Start 4: ContainersLinkedListTest
4/26 Test #4: ContainersLinkedListTest ............ Passed 0.01 sec
Start 5: InterconnectTest
5/26 Test #5: InterconnectTest .................... Passed 0.01 sec
Start 6: InterconnectStateMachineTest
6/26 Test #6: InterconnectStateMachineTest ........ Passed 0.01 sec
Start 7: PluginManagerTest
7/26 Test #7: PluginManagerTest ...................***Exception: SegFault 2.71 sec
Starting Corrade::PluginManager::Test::Test with 16 test cases...
Utility::Configuration::Configuration(): key/value pair without '=' character
Canary initialized
Canary finalized
Canary initialized
Canary finalized
OK: nameList()
OK: wrongPluginVersion()
OK: wrongPluginInterface()
Canary initialized
Canary finalized
OK: wrongMetadataFile()
Utility::Configuration::Configuration(): key/value pair without '=' character
Canary initialized
Canary finalized
OK: loadNonexistent()
Utility::Configuration::Configuration(): key/value pair without '=' character
Canary initialized
Canary finalized
OK: unloadNonexistent()
Utility::Configuration::Configuration(): key/value pair without '=' character
Canary initialized
Canary finalized
OK: staticPlugin()
Utility::Configuration::Configuration(): key/value pair without '=' character
Canary initialized
Dog initialized
Dog finalized
PluginManager::AbstractPlugin::AbstractPlugin(): attempt to register instance of plugin not known to given manager
FAIL: dynamicPlugin() at D:\workspace\git\corrade\src\Corrade\PluginManager\Test\Test.cpp on line 230
Values manager.unload("Dog") and LoadState::Used are not the same, actual is
PluginManager::LoadState::NotLoaded
but expected
PluginManager::LoadState::Used
Start 8: TestSuiteCompareContainerTest
8/26 Test #8: TestSuiteCompareContainerTest ....... Passed 0.01 sec
Start 9: TestSuiteCompareFileTest
9/26 Test #9: TestSuiteCompareFileTest ............ Passed 0.02 sec
Start 10: TestSuiteCompareFileToStringTest
10/26 Test #10: TestSuiteCompareFileToStringTest .... Passed 0.02 sec
Start 11: TestSuiteCompareFloatingPointTest
11/26 Test #11: TestSuiteCompareFloatingPointTest ... Passed 0.01 sec
Start 12: TestSuiteCompareStringToFileTest
12/26 Test #12: TestSuiteCompareStringToFileTest .... Passed 0.02 sec
Start 13: TestSuiteTesterTest
13/26 Test #13: TestSuiteTesterTest ................. Passed 0.01 sec
Start 14: UtilityArgumentsTest
14/26 Test #14: UtilityArgumentsTest ................ Passed 0.02 sec
Start 15: UtilityDirectoryTest
15/26 Test #15: UtilityDirectoryTest ................ Passed 0.02 sec
Start 16: UtilityEndianTest
16/26 Test #16: UtilityEndianTest ................... Passed 0.01 sec
Start 17: UtilityMurmurHash2Test
17/26 Test #17: UtilityMurmurHash2Test .............. Passed 0.01 sec
Start 18: UtilityConfigurationTest
18/26 Test #18: UtilityConfigurationTest ............ Passed 0.04 sec
Start 19: UtilityDebugTest
19/26 Test #19: UtilityDebugTest .................... Passed 0.01 sec
Start 20: UtilityHashDigestTest
20/26 Test #20: UtilityHashDigestTest ............... Passed 0.01 sec
Start 21: UtilitySha1Test
21/26 Test #21: UtilitySha1Test ..................... Passed 0.01 sec
Start 22: UtilityStringTest
22/26 Test #22: UtilityStringTest ................... Passed 0.01 sec
Start 23: UtilityTypeTraitsTest
23/26 Test #23: UtilityTypeTraitsTest ............... Passed 0.01 sec
Start 24: UtilityUnicodeTest
24/26 Test #24: UtilityUnicodeTest .................. Passed 0.01 sec
Start 25: UtilityResourceTest
25/26 Test #25: UtilityResourceTest ................. Passed 0.02 sec
Start 26: UtilityResourceStaticTest
26/26 Test #26: UtilityResourceStaticTest ........... Passed 0.01 sec
96% tests passed, 1 tests failed out of 26
Total Test time (real) = 3.08 sec
The following tests FAILED:
7 - PluginManagerTest (SEGFAULT)
Reporting here, because the error is about Corrade's header:
/usr/local/bin/g++9 -DCORRADE_DYNAMIC_PLUGIN -DWavAudioImporter_EXPORTS -I/wrkdirs/usr/ports/graphics/magnum/work/magnum-2019.10/src -Isrc -I/usr/local/include/AL -O2 -pipe -fstack-protector-strong -Wl,-rpath=/usr/local/lib/gcc9 -Wl,-rpath=/usr/local/lib/gcc9 -O2 -pipe -fstack-protector-strong -Wl,-rpath=/usr/local/lib/gcc9 -Wl,-rpath=/usr/local/lib/gcc9 -fPIC -std=c++11 -Wall -Wextra -Wold-style-cast -Winit-self -Werror=return-type -Wmissing-declarations -pedantic -fvisibility=hidden -fvisibility-inlines-hidden -Wzero-as-null-pointer-constant -Wdouble-promotion -fno-strict-aliasing -MD -MT src/MagnumPlugins/WavAudioImporter/CMakeFiles/WavAudioImporter.dir/WavImporter.cpp.o -MF src/MagnumPlugins/WavAudioImporter/CMakeFiles/WavAudioImporter.dir/WavImporter.cpp.o.d -o src/MagnumPlugins/WavAudioImporter/CMakeFiles/WavAudioImporter.dir/WavImporter.cpp.o -c /wrkdirs/usr/ports/graphics/magnum/work/magnum-2019.10/src/MagnumPlugins/WavAudioImporter/WavImporter.cpp
In file included from /wrkdirs/usr/ports/graphics/magnum/work/magnum-2019.10/src/MagnumPlugins/WavAudioImporter/WavImporter.cpp:31:
/usr/local/include/Corrade/Utility/Endianness.h: In instantiation of 'static void Corrade::Utility::Endianness::littleEndianInPlaceInternal(T&, U& ...) [with T = const unsigned int; U = {const Magnum::Audio::Implementation::WavAudioFormat, const short unsigned int, const unsigned int, const unsigned int, const short unsigned int, const short unsigned int}]':
/usr/local/include/Corrade/Utility/Endianness.h:108:40: required from 'static void Corrade::Utility::Endianness::littleEndianInPlace(T& ...) [with T = {const unsigned int, const Magnum::Audio::Implementation::WavAudioFormat, const short unsigned int, const unsigned int, const unsigned int, const short unsigned int, const short unsigned int}]'
/wrkdirs/usr/ports/graphics/magnum/work/magnum-2019.10/src/MagnumPlugins/WavAudioImporter/WavImporter.cpp:125:35: required from here
/usr/local/include/Corrade/Utility/Endianness.h:127:19: error: assignment of read-only reference 'first'
127 | first = littleEndian(first);
| ~~~~~~^~~~~~~~~~~~~~~~~~~~~
The host runs FreeBSD 12.1-RELEASE (big-endian). Corrade is version 2019.10.
Mac OS
AppleClang 12.0.0.12000032
why do i get
Scanning dependencies of target Corrade_Log
[ 20%] Building CXX object CMakeFiles/Corrade_Log.dir/src/Corrade_AndroidLogStreamBuffer.cpp.o
[ 40%] Building CXX object CMakeFiles/Corrade_Log.dir/src/Corrade_Debug.cpp.o
[ 60%] Building CXX object CMakeFiles/Corrade_Log.dir/src/Corrade_String.cpp.o
[ 80%] Building CXX object CMakeFiles/Corrade_Log.dir/src/Corrade_StringView.cpp.o
[100%] Linking CXX shared library libCorrade_Log.dylib
Undefined symbols for architecture x86_64:
"Corrade::Containers::String::data()", referenced from:
Corrade::Containers::BasicStringView<char>::BasicStringView(Corrade::Containers::String&) in Corrade_StringView.cpp.o
Corrade::Containers::BasicStringView<char>::BasicStringView(Corrade::Containers::String&) in Corrade_StringView.cpp.o
Corrade::Containers::BasicStringView<char const>::BasicStringView(Corrade::Containers::String&) in Corrade_StringView.cpp.o
Corrade::Containers::BasicStringView<char const>::BasicStringView(Corrade::Containers::String&) in Corrade_StringView.cpp.o
"Corrade::Containers::String::data() const", referenced from:
void Corrade::Utility::(anonymous namespace)::toStream<Corrade::Containers::String>(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, Corrade::Containers::String const&) in Corrade_Debug.cpp.o
Corrade::Containers::BasicStringView<char const>::BasicStringView<char const, void>(Corrade::Containers::String const&) in Corrade_StringView.cpp.o
Corrade::Containers::BasicStringView<char const>::BasicStringView<char const, void>(Corrade::Containers::String const&) in Corrade_StringView.cpp.o
"Corrade::Containers::String::size() const", referenced from:
void Corrade::Utility::(anonymous namespace)::toStream<Corrade::Containers::String>(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, Corrade::Containers::String const&) in Corrade_Debug.cpp.o
Corrade::Containers::BasicStringView<char>::BasicStringView(Corrade::Containers::String&) in Corrade_StringView.cpp.o
Corrade::Containers::BasicStringView<char>::BasicStringView(Corrade::Containers::String&) in Corrade_StringView.cpp.o
Corrade::Containers::BasicStringView<char const>::BasicStringView(Corrade::Containers::String&) in Corrade_StringView.cpp.o
Corrade::Containers::BasicStringView<char const>::BasicStringView(Corrade::Containers::String&) in Corrade_StringView.cpp.o
Corrade::Containers::BasicStringView<char const>::BasicStringView<char const, void>(Corrade::Containers::String const&) in Corrade_StringView.cpp.o
Corrade::Containers::BasicStringView<char const>::BasicStringView<char const, void>(Corrade::Containers::String const&) in Corrade_StringView.cpp.o
...
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
as I have
Corrade_StringView.cpp:26 #include "Corrade_StringView.h"
Corrade_StringView.h:298 constexpr T* data() const { return _data; }
so why isnt it linking the symbol?
this is my CMake file https://github.com/mgood7123/Corrade_Log/blob/main/CMakeLists.txt
Error message is
use of deleted function ‘std::basic_ostream<char, _Traits>& std::operator<<(std::basic_ostream<char, _Traits>&, char32_t) [with _Traits = std::char_traits<char>]’
System is an up to date arch. g++ 10.1.0
uncommenting this line "fixes" the issue
https://github.com/mosra/corrade/blob/master/src/Corrade/Utility/Debug.cpp#L551
When building a Win32 GUI app (CMake add_executable(... WIN32 ...)
, standard output isn't printed to the IDE output view, and one has to use OutputDebugString()
because ... Windows is special! So we need to comply with that. Fortunately people learned to use Debug
etc. quite extensively, Debug
can have scoped output redirection, and there's now Corrade::Main
that could do this automagically in the background.
Things to do:
std::basic_stringbuf
as seen on https://stackoverflow.com/questions/5248704/how-to-redirect-standard-output-to-output-window-from-visual-studio (but there it seems to be called char-by-char, isn't that slow?!)std::cerr
WaitForDebugEventEx
, the heck is that?!IsDebuggerPresent()
to enable this conditionally only when running from an IDE? Does that function return true
also when running a Release build / a build without debugger? Ugh._CrtSetReportMode()
, _CrtSetReportFile()
or _CrtSetReportHook()
which control whether the assertion dialog box gets open or if the message gets printed to stdout etcCc: @hsdk123
With GCC 5.3.1 (default on Ubuntu 16.04), the following errors occur if BUILD_DEPRECIATED=OFF
/home/ren/Desktop/ArcAngel2D/corrade/src/Corrade/Utility/utilities.h:66:26: error: ISO C++ forbids declaration of ‘CORRADE_DEPRECATED’ with no type [-fpermissive]
inline CORRADE_DEPRECATED("Use System::sleep() instead") void sleep(std::size_t ms) {
^
/home/ren/Desktop/ArcAngel2D/corrade/src/Corrade/Utility/utilities.h:66:26: error: ‘Corrade::Utility::CORRADE_DEPRECATED’ declared as an ‘inline’ variable
/home/ren/Desktop/ArcAngel2D/corrade/src/Corrade/Utility/utilities.h:66:56: error: invalid conversion from ‘const char*’ to ‘int’ [-fpermissive]
inline CORRADE_DEPRECATED("Use System::sleep() instead") void sleep(std::size_t ms) {
^
/home/ren/Desktop/ArcAngel2D/corrade/src/Corrade/Utility/utilities.h:66:58: error: expected ‘,’ or ‘;’ before ‘void’
inline CORRADE_DEPRECATED("Use System::sleep() instead") void sleep(std::size_t ms) {
^
Looks like -Wno-permissive would fix it, but it looks like GCC is getting smart enough to get around CORRADE_DEPRECATED logic.
Got a compiler error:
/home/user/schwarzm/install/corrade/src/Corrade/Utility/FileWatcher.cpp:59:14: error: function ‘Corrade::Utility::FileWatcher& Corrade::Utility::FileWatcher::operator=(Corrade::Utility::FileWatcher&&)’ defaulted on its redeclaration with an exception-specification that differs from the implicit exception-specification ‘’
FileWatcher& FileWatcher::operator=(FileWatcher&&)
gcc version:
# g++ -v
Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/5/lto-wrapper
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 5.4.0-6ubuntu1~16.04.9' --with-bugurl=file:///usr/share/doc/gcc-5/README.Bugs --enable-languages=c,ada,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-5 --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-libmpx --enable-plugin --with-system-zlib --disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-5-amd64/jre --enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-5-amd64 --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-5-amd64 --with-arch-directory=amd64 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --enable-objc-gc --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.9)
I did a quick bisect and the problem was introduced in e573f59.
Currently UseCorrade.cmake
checks and enforces that proper GCC version is used if GCC4*_COMPATIBILITY
is enabled. For example GCC 4.8 can't be used in depending project if Corrade was built with compatibility mode for GCC 4.7. However, this doesn't cover other cases:
GCC47_COMPATIBILITY
is not enforced and then compilation fails with missing library features, see #1). I don't know if it is possible to check for libstdc++ version from CMake, so not sure how to handle this one.BUILT_WITH_CLANG
), as they could be abused to write unportable or weirdly behaving code. The long term goal is portability (thus getting rid of all *_COMPATIBILITY
options) and this would hurt it.Luckily there are no compatibility issues with Clang (the old 3.1 with proper libstdc++ can handle everything), so we don't need to add any CLANG3*_COMPATIBILITY
. MSVC is a totally different story, though.
For displaying Container types more conveniently when debugging in Visual Studio, I created a very very rudimentary .natvis file:
<?xml version="1.0" encoding="utf-8"?>
<AutoVisualizer xmlns="http://schemas.microsoft.com/vstudio/debugger/natvis/2010">
<Type Name="Corrade::Containers::Array<*>">
<DisplayString>{{ size={_size} }}</DisplayString>
<Expand>
<ArrayItems>
<Size>_size</Size>
<ValuePointer>_data</ValuePointer>
</ArrayItems>
</Expand>
</Type>
<Type Name="Corrade::Containers::ArrayView<*>">
<DisplayString>{{ size={_size} }}</DisplayString>
<Expand>
<ArrayItems>
<Size>_size</Size>
<ValuePointer>_data</ValuePointer>
</ArrayItems>
</Expand>
</Type>
</AutoVisualizer>
Make sure to add it to your CMake project's sources so that Visual Studio picks it up.
Also, see the Documentation of NatVis.
As of 5d2faa1, there's finally a test case and a (partial) solution for signals emitted across shared object boundaries. This problem started appearing on Linux/macOS after introducing -fvisibility-inlines-hidden
in 7ae9031 (part of a fix for #53) and can be fixed on those systems by explicitly exporting the inline symbols as well.
MSVC doesn't have this problem in the first place (the inline function is defined just once in the DLL), but MinGW duplicates it and so far I'm not aware of any solution except for moving the definitions into the *.cpp
file (which is extremely verbose). The Ui library does that as of mosra/magnum-extras@97da887 to make it usable, but I hope there's a better solution in the longer term.
#~/.conan/data/corrade/v2020.06/conan/stable/build/#a588aedb50aa745a2698801b1f638aec5f70dbcd/src/Corrade/Containers/#GrowableArray.h:943:22: runtime error: null pointer passed as argument 2, which is #declared to never be null
#/usr/include/string.h:43:28: note: nonnull attribute specified here
#SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior ~/.conan/data/#corrade/v2020.06/conan/stable/build/a588aedb50aa745a2698801b1f638aec5f70dbcd/src/#Corrade/Containers/GrowableArray.h:943:22 in
#~/.conan/data/corrade/v2020.06/conan/stable/build/#a588aedb50aa745a2698801b1f638aec5f70dbcd/src/Corrade/Containers/#GrowableArray.h:943:22: runtime error: null pointer passed as argument 2, which is #declared to never be null
#/usr/include/string.h:43:28: note: nonnull attribute specified here
#SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior ~/.conan/data/#corrade/v2020.06/conan/stable/build/a588aedb50aa745a2698801b1f638aec5f70dbcd/src/#Corrade/Containers/GrowableArray.h:943:22 in
#~/.conan/data/corrade/v2020.06/conan/stable/build/#a588aedb50aa745a2698801b1f638aec5f70dbcd/src/Corrade/Containers/#GrowableArray.h:943:22: runtime error: null pointer passed as argument 2, which is #declared to never be null
#/usr/include/string.h:43:28: note: nonnull attribute specified here
#SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior ~/.conan/data/#corrade/v2020.06/conan/stable/build/a588aedb50aa745a2698801b1f638aec5f70dbcd/src/#Corrade/Containers/GrowableArray.h:943:22 in
#~/.conan/data/corrade/v2020.06/conan/stable/build/#a588aedb50aa745a2698801b1f638aec5f70dbcd/src/Corrade/Containers/#GrowableArray.h:943:22: runtime error: null pointer passed as argument 2, which is #declared to never be null
#/usr/include/string.h:43:28: note: nonnull attribute specified here
#SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior ~/.conan/data/#corrade/v2020.06/conan/stable/build/a588aedb50aa745a2698801b1f638aec5f70dbcd/src/#Corrade/Containers/GrowableArray.h:943:22 in
#~/.conan/data/corrade/v2020.06/conan/stable/build/#a588aedb50aa745a2698801b1f638aec5f70dbcd/src/Corrade/Containers/#GrowableArray.h:943:22: runtime error: null pointer passed as argument 2, which is #declared to never be null
#/usr/include/string.h:43:28: note: nonnull attribute specified here
#SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior ~/.conan/data/#corrade/v2020.06/conan/stable/build/a588aedb50aa745a2698801b1f638aec5f70dbcd/src/#Corrade/Containers/GrowableArray.h:943:22 in
To get error build with clang and -fsanitize=address,undefined
-DMEMORY_TOOL_REPLACES_ALLOCATOR=1
-D_FORTIFY_SOURCE=0
-DUNDEFINED_SANITIZER=1
-DUNDEFINED_BEHAVIOR_SANITIZER=1
-g -O0
-fPIC
-fno-optimize-sibling-calls
-fno-omit-frame-pointer
-fno-stack-protector
-fno-wrapv
-fno-sanitize-recover=all
-fsanitize-recover=unsigned-integer-overflow
-fsanitize=address,undefined
-fsanitize-trap=undefined
-fsanitize=float-divide-by-zero
-fno-sanitize=vptr
-fsanitize=nullability-arg
-fsanitize=nullability-assign
-fsanitize=nullability-return
memcpy uses __nonnull
:
extern void *memcpy (void *__restrict __dest, const void *__restrict __src,
size_t __n) __THROW __nonnull ((1, 2));
NOTE: -fsanitize may require instrumented libc++, see conanfile.py in https://github.com/blockspacer/llvm_tools as example how to build instrumented libc++
Possible fix:
if(count*sizeof(T) != NULL) // take care of nonnull attribute
{
std::memcpy(dst, src, count*sizeof(T));
}
Hi,
This library has the same logo as Magnum. It'd be nice to make it differ (the simplest change would be to turn the m
into a c
), for external use.
Thanks!
Hello,
I want my build of Corrade (and Magnum) to install the CMake find module(s) but apparently I'm need to have root rights because it will install in a CMAKE_ROOT sub-directory.
I think a proper behavior would be to have CorradeConfig.cmake installed in lib/cmake/Corrade/ or one of the other standard path used by find_package
. See http://www.cmake.org/cmake/help/v3.0/command/find_package.html (Ctrl-F "UNIX (U)" for the interesting bits).
If it is installed in such a path I would be able touse a non-system install prefix and then refer to it in my project with CMAKE_PREFIX_PATH. CMake will automatically find the definitions in lib/cmake//Config.cmake or something like that.
The following CMake documentation contains everything needed to create CMake files for packages: http://www.cmake.org/cmake/help/git-master/manual/cmake-packages.7.html#creating-packages
What do you think?
Compilation of corrade
fails on ubuntu 13.04 with stock clang++ (3.2-1~exp9ubuntu1) due to missing map.emplace
C++11 function.
Corrade doc indicates that > clang 3.1
should be ok, but you should also make clear that, unless using libc++
or libstdc++-4.8
, the CMake
flag GCC4.7_COMPATIBILITY
is required.
Hey, looks like the newest version of Xcode broke Corrade. Seems to build OK with Eclipse, but Xcode build fails.
I'm just starting to look into it, but here's what I get
Libtool /Users/andy/src/mx-xcode/extern/corrade/src/Corrade/Utility/Debug/libCorradeUtility-d.a normal x86_64 (in target: CorradeUtility)
cd /Users/andy/src/mechanica
export MACOSX_DEPLOYMENT_TARGET=10.13
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool -static -arch_only x86_64 -syslibroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk -L/Users/andy/src/mx-xcode/extern/corrade/src/Corrade/Utility/Debug -filelist /Users/andy/src/mx-xcode/extern/corrade/src/Corrade/Utility/Mechanica.build/Debug/CorradeUtility.build/Objects-normal/x86_64/CorradeUtility-d.LinkFileList
/Users/andy/src/mx-xcode/extern/corrade/src/Corrade/Utility/Mechanica.build/Debug/CorradeUtilityObjects.build/Objects-normal/undefined_arch/Debug.o
/Users/andy/src/mx-xcode/extern/corrade/src/Corrade/Utility/Mechanica.build/Debug/CorradeUtilityObjects.build/Objects-normal/undefined_arch/Directory.o
/Users/andy/src/mx-xcode/extern/corrade/src/Corrade/Utility/Mechanica.build/Debug/CorradeUtilityObjects.build/Objects-normal/undefined_arch/Configuration.o
/Users/andy/src/mx-xcode/extern/corrade/src/Corrade/Utility/Mechanica.build/Debug/CorradeUtilityObjects.build/Objects-normal/undefined_arch/ConfigurationValue.o
/Users/andy/src/mx-xcode/extern/corrade/src/Corrade/Utility/Mechanica.build/Debug/CorradeUtilityObjects.build/Objects-normal/undefined_arch/MurmurHash2.o
/Users/andy/src/mx-xcode/extern/corrade/src/Corrade/Utility/Mechanica.build/Debug/CorradeUtilityObjects.build/Objects-normal/undefined_arch/Sha1.o
/Users/andy/src/mx-xcode/extern/corrade/src/Corrade/Utility/Mechanica.build/Debug/CorradeUtilityObjects.build/Objects-normal/undefined_arch/System.o -o
/Users/andy/src/mx-xcode/extern/corrade/src/Corrade/Utility/Debug/libCorradeUtility-d.a
error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: can't open file: /Users/andy/src/mx-xcode/extern/corrade/src/Corrade/Utility/Mechanica.build/Debug/CorradeUtilityObjects.build/Objects-normal/undefined_arch/Debug.o (No such file or directory)
error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: can't open file: /Users/andy/src/mx-xcode/extern/corrade/src/Corrade/Utility/Mechanica.build/Debug/CorradeUtilityObjects.build/Objects-normal/undefined_arch/Directory.o (No such file or directory)
error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: can't open file: /Users/andy/src/mx-xcode/extern/corrade/src/Corrade/Utility/Mechanica.build/Debug/CorradeUtilityObjects.build/Objects-normal/undefined_arch/Configuration.o (No such file or directory)
error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: can't open file: /Users/andy/src/mx-xcode/extern/corrade/src/Corrade/Utility/Mechanica.build/Debug/CorradeUtilityObjects.build/Objects-normal/undefined_arch/ConfigurationValue.o (No such file or directory)
error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: can't open file: /Users/andy/src/mx-xcode/extern/corrade/src/Corrade/Utility/Mechanica.build/Debug/CorradeUtilityObjects.build/Objects-normal/undefined_arch/MurmurHash2.o (No such file or directory)
error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: can't open file: /Users/andy/src/mx-xcode/extern/corrade/src/Corrade/Utility/Mechanica.build/Debug/CorradeUtilityObjects.build/Objects-normal/undefined_arch/Sha1.o (No such file or directory)
error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: can't open file: /Users/andy/src/mx-xcode/extern/corrade/src/Corrade/Utility/Mechanica.build/Debug/CorradeUtilityObjects.build/Objects-normal/undefined_arch/System.o (No such file or directory)
Command Libtool failed with a nonzero exit code
Reported by @AVK330.
__declspec
instead of [[]]
might make it working in some cases but might require a different placement in other cases (in that case the macro would need to be completely no-op on 2015).Class Utility::Directory has various functions for dealing with filesystem and they are currently implemented for and tested on Linux and Windows only, as I don't have access to any Apple hardware where I could test that. Current implementation status:
list()
mkpath()
and home()
are POSIX-compatible and should just workrm()
and move()
should work for files, but I'm not sure about directorieshome()
returns value HOME
environment variable (also POSIX-compatible) and thus should work tooconfigurationDir("App")
currently returns ~/.config/app
, which is not wanted. It should return some directory under ~/Library/
(the correct path is returned by some system API -- relevant SO thread).An excerpt from Boost.Signals2 docs (Automatic Connection Management):
Unfortunately, the
boost::signals::trackable
scheme cannot be made thread safe due to destructor ordering. The destructor of an class derived fromboost::signals::trackable
will always be called before the destructor of the baseboost::signals::trackable
class. However, for thread-safety the connection between the signal and object needs to be disconnected before the object runs its destructors. Otherwise, if an object being destroyed in one thread is connected to a signal concurrently invoking in another thread, the signal may call into a partially destroyed object.
What about Corrade::Interconnect
? How thread-safe is it?
I decided to try building Corrade with MinGW (MSYS2 on Windows) first before giving it a go with Clang. I am getting the following error:
Native `corrade-rc` executable, which is needed when crosscompiling, was
not found
Isn't corrade-rc what gets built? Why is the builder looking for the program that its supposed to be compiling?
Currently, in case two signals have the same signature (such as the StateMachine::stepped() templated signal or Ui::UserInterface::inputWidgetFocused() and inputWidgetBlurred()
pair of signals, MSVC merges them in Release mode when the /OPT:ICF
flag is enabled as their codegen is the same. That's very unfortunate and leads to nasty hard-to-prevent bugs.
Presently, there are the following options, none of which is ideal:
/OPT:NOICF
. That'll prevent some useful optimizations elsewhere and again needs to be done by the users as CMake < 3.13 doesn't support INTERFACE_LINK_OPTIONS. Even with CMake 3.13, users with custom buildsystems will have issues because this flag won't get enabled for them automatically. (Note: it might be useful to say /OPT:REF,NOICF
instead (source).)emit()
API. One idea I have is to replace it with a CORRADE_EMIT()
macro that has __COUNTER__
inside, which then will get saved to an internal member of the Emitter class. This won't solve it for templated signals, though -- the user would again need to create a unique numeric identifier for these (typeid? something?).printf()
inside emit()
would work? Some inline assembly?In total, there are the following Windows-specific issues:
/OPT:ICF
issuevirtual
(might help casting the signal pointer to an unknown type to expand it to its full size)virtual
workaroundHello dear authors ... this is what I get trying to build on debian:
mathias@lucky3:~/corrade$ dpkg-buildpackage
dpkg-buildpackage: info: source package corrade
dpkg-buildpackage: info: source version 2018.02-1
dpkg-buildpackage: info: source distribution unstable
dpkg-buildpackage: info: source changed by Vladimír Vondruš <[email protected]>
dpkg-buildpackage: info: host architecture amd64
dpkg-source --before-build corrade
fakeroot debian/rules clean
dh clean --parallel
dh_testdir -O--parallel
dh_auto_clean -O--parallel
dh_clean -O--parallel
dpkg-source -b corrade
dpkg-source: error: can't build with source format '3.0 (native)': native package version may not have a revision
dpkg-buildpackage: error: dpkg-source -b corrade gave error exit status 255
....
any help appreciated.
When trying to use CORRADE_TWEAKABLE() with Utility::Tweakable I get a runtime error message from Utility::FileWatcher on Linux
Utility::FileWatcher: can't stat home/ad/CLionProjects/MagnumProject/src/MyApplication.cpp: No such file or directory, aborting watch
Utility::Tweakable: watching for changes in home/ad/CLionProjects/MagnumProject/src/MyApplication.cpp
I believe the root / was not inserted at the begin of the filepath string causing the filepath to be relative instead of absolute and the file not to be found.
platform: Windows 10, Visual Studio 2019, CMake 3.15.1
target: emscripten
Got the D8021: invalid numeric argument '/Wno-warn-absolute-paths'
error.
Is cross building target Web platform on Windows not supported?
C:\workspace\corrade\build-emscripten>cmake .. -DCMAKE_TOOLCHAIN_FILE="../toolchains/generic/Emscripten-wasm.cmake" -DCMAKE_BUILD_TYPE=Release -DEMSCRIPTEN_PREFIX="C:/workspace/emsdk" -DCMAKE_INSTALL_PREFIX="C:/lib/emscripten/system"
-- The CXX compiler identification is MSVC 19.23.28105.4
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.23.28105/bin/Hostx64/x64/cl.exe
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.23.28105/bin/Hostx64/x64/cl.exe -- broken
CMake Error at C:/Program Files/CMake/share/cmake-3.15/Modules/CMakeTestCXXCompiler.cmake:53 (message):
The C++ compiler
"C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.23.28105/bin/Hostx64/x64/cl.exe"
is not able to compile a simple test program.
It fails with the following output:
Change Dir: C:/workspace/corrade/build-emscripten/CMakeFiles/CMakeTmp
Run Build Command(s):C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/MSBuild/Current/Bin/MSBuild.exe cmTC_6bdf8.vcxproj /p:Configuration=Debug /p:Platform=x64 /p:VisualStudioVersion=16.0 /v:m && 用于 .NET Framework 的 Microsoft (R) 生成引擎版本 16.3.0+0f4c62fea
版权所有(C) Microsoft Corporation。保留所有权利。
Microsoft (R) C/C++ Optimizing Compiler Version 19.23.28105.4 for x64
Copyright (C) Microsoft Corporation. All rights reserved.
cl /c /I"C:\workspace\vcpkg\installed\x64-windows\include" /W1 /WX- /diagnostics:column /O2 /D "CMAKE_INTDIR=\"Debug\"" /D _MBCS /Gm- /MD /GS /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /Fo"cmTC_6bdf8.dir\Debug\\" /Fd"cmTC_6bdf8.dir\Debug\vc142.pdb" /Gd /TP /errorReport:queue -s WASM=1 -Wno-warn-absolute-paths "C:\workspace\corrade\build-emscripten\CMakeFiles\CMakeTmp\testCXXCompiler.cxx"
cl : command line error D8021: invalid numeric argument '/Wno-warn-absolute-paths' [C:\workspace\corrade\build-emscripten\CMakeFiles\CMakeTmp\cmTC_6bdf8.vcxproj]
CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
CMakeLists.txt:50 (project)
-- Configuring incomplete, errors occurred!
See also "C:/workspace/corrade/build-emscripten/CMakeFiles/CMakeOutput.log".
See also "C:/workspace/corrade/build-emscripten/CMakeFiles/CMakeError.log".
Hi, I've experienced several times that some features don't work with several accounts, such like group invite. Tried with three accounts for very same group (and the permissions are given to the accounts, with regular viewers they can invite to group).
I try to use them together with CasperLet for rentals. But group invite never seems to work. Here's the (anonymized) log:
2020-12-07 21:24:03,512 DEBUG Corrade - Debug : Received instant message : ******** Resident : ********-*****-****-****-************ : command=version&group=****************&password=************************&callback=http%3A%2F%2Fvend.casperdns.com%2Fcorrade.php&casperRequestID=************************
2020-12-07 21:24:08,232 DEBUG Corrade - Debug : Received instant message : ******** Resident : ********-*****-****-****-************ : command=invite&group=****************&password=************************&agent=********-*****-****-****-************&callback=http%3A%2F%2Fvend.casperdns.com%2Fcorrade.php&casperRequestID=************************
2020-12-07 21:24:14,178 DEBUG Corrade - Debug : Mapping friends
2020-12-07 21:24:14,561 INFO Corrade - Info : Heartbeat : CPU 0% : RAM 84MiB : NET 14413679B : Threads 13 : Uptime 0d:0h:21m : Commands 25 : Behaviours 0
Any idea? As said, I'Ve tried three accounts for Corrade, but not any of them invited my test account to group. Sometimes CasperLEt gets returned group would not be available, sometimes it tells me the bot wouldn't answer (but it does obviously, because otherwise after the version message would be nothing - I've tested that either, with wrong security code etc.).
Just tried to use this instead of my own conan-corrade, and it appears that the cmake scripts in the modules folder aren't properly copied to package. Only file in .conan/data/<package-path>/lib/cmake/Corrade
is UseCorrade.cmake
.
So when building my conan-magnum with corrade/2019.10
(from conan-center) I get:
CMake Error at source_subfolder/CMakeLists.txt:328 (include):
include could not find load file:
C:/.conan/ebef85/1/lib/cmake/Corrade/CorradeLibSuffix.cmake
OS: Windows (can't remember if I've tested on Linux...)
Device: Raspberry PI 3 Model B+
O/S: Raspbian 9 (stretch)
I realise that the Raspberry PI isn't a supported platform but I've noticed an issue and thought I would raise it anyway. The following doesn't generate a correct SHA1 hash on a Raspberry PI.
Utility::Sha1::digest("test").hexString()
I've tested the results against echo -n test | shasum -a 1 | awk '{print $1}'
.
Thanks,
Andy
dpkg-buildpackage fails with next message 👍
signfile corrade_2020.06.dsc
gpg: skipped "Vladimír Vondruš [email protected]": No secret key
gpg: dpkg-sign.dHotbZi1/corrade_2020.06.dsc: clear-sign failed: No secret keydpkg-buildpackage: error: failed to sign .dsc file
I would like to build with clang (llvm-windows). I don't see the options in the CMake to do so though as it defaults to MSVC. Can corrade be built with LLVM's clang?
Currently the support for dynamic plugins on iOS is untested -- dynamic PluginManager "compiles" with dlsym()
and everything, but creating a dynamic plugin causes Xcode to report that given executable type is not supported on iOS. I need to find another way or disable them completely if that is not possible with current design.
Food for thought (from #6, thanks @ytain):
http://opensource.apple.com//source/CF/CF-550/CFBundle.h
It has also additional functions allowing you to load the plugins dynamically like those CFBundleLoadExecutable and CFBundleUnloadExecutable etc.
The test suite example compiles and works fine on macOS 10.14.5, but colors are disabled for some reason. I tried compiling and running the code on Linux and colors are enabled there.
I just can't figure out why it works on one OS and not on the other when both of them use bash by default.
I attached a screenshot to show what I mean. This is not a big deal, but it would be nice to have cool colors working on macOS, Windows and Linux :)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.