-
Notifications
You must be signed in to change notification settings - Fork 22
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
error compiling gamedevframework on ArchLinux ARM with gcc-6.1.1 glibc-2.23-5 #4
Comments
I think |
Is there a test that I can made to confirm this ? I use ARMv7 (32 bits), I know that for example, default float format is float not double in QT tool-kit on this platform, and double on x86 and ARMv8 (64 bits). This can be tested like with this on linux, for both ARM 32bit (v5/v6/v7 I suppose) and ARM 64bit (found in libjpeg-turbo), probably a test for each case is better here. I could at least provide some test/debug on ARMv7, and very probably soon on ARMv8 #if defined GNUC && (defined arm || defined aarch64) There is some explanation about difference in types on both platforms here: |
You can try to compile something like: #include <iostream>
#include <type_traits>
int main() {
std::cout << std::boolalpha;
std::cout << std::is_same<unsigned, std::size_t>::value << '\n';
return 0;
} Compile with I see two possible solutions for this bug:
I do not really like the preprocessor condition based on architecture because this error may happen on other architectures. |
Answered true. So that's the problem :(. I didn't coded in C++ since long time and discover lot of evolutions since last time. |
gcc -o test_validation2 -std=c++11 -lstdc++ test_validation.cpp |
OK. So I will remove the explicit instantiations with std::size_t. Anyway, they are not used in the library. Will come in the next push. |
the problem is with architectures where std::size_t is the same as unsigned, there is a duplicate explicit instantiation that prevents the files to compile
I'm not sure about the part of the system that could be related to this issue ?
The system uses
[alarm@alarm build]$ make
[ 0%] Building CXX object library/CMakeFiles/gf0.dir/Range.cc.o
/home/alarm/misc/gf/library/Range.cc:31:19: error: duplicate explicit instantiation of 'struct gf::v1::Range' [-fpermissive]
template struct Rangestd::size_t;
^~~~~~~~~~~~~~~~~~
make[2]: *** [library/CMakeFiles/gf0.dir/build.make:327: library/CMakeFiles/gf0.dir/Range.cc.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:118: library/CMakeFiles/gf0.dir/all] Error 2
make: *** [Makefile:128: all] Error 2
The text was updated successfully, but these errors were encountered: