Forked from anonymous/errors_building_cling_with_mingw-w64.txt
Last active
August 29, 2015 14:10
-
-
Save rgoulter/18ea3157d684c99d6a53 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ 98%] Building CXX object tools/cling/lib/Interpreter/CMakeFiles/clingInterpreter.dir/ValuePrinter.cpp.obj | |
In file included from C:\Users\richa_000\cling-build\src\tools\cling\lib\Interpreter\ValuePrinter.cpp:10:0: | |
C:/Users/richa_000/cling-build/src/tools/cling/include/cling/Interpreter/Value.h: In instantiation of 'static T cling::Value::CastFwd<T>::cast(const cling::Value&) [with | |
T = long double]': | |
C:/Users/richa_000/cling-build/src/tools/cling/include/cling/Interpreter/Value.h:209:36: required from 'T cling::Value::simplisticCastAs() const [with T = long double]' | |
C:\Users\richa_000\cling-build\src\tools\cling\lib\Interpreter\ValuePrinter.cpp:213:48: required from here | |
C:/Users/richa_000/cling-build/src/tools/cling/include/cling/Interpreter/Value.h:104:53: error: cast from 'void*' to 'long unsigned int' loses precision [-fpermissive] | |
return (T) (unsigned long) V.getAs<void*>(); | |
^ | |
C:/Users/richa_000/cling-build/src/tools/cling/include/cling/Interpreter/Value.h: In instantiation of 'static T cling::Value::CastFwd<T>::cast(const cling::Value&) [with | |
T = double]': | |
C:/Users/richa_000/cling-build/src/tools/cling/include/cling/Interpreter/Value.h:209:36: required from 'T cling::Value::simplisticCastAs() const [with T = double]' | |
C:\Users\richa_000\cling-build\src\tools\cling\lib\Interpreter\ValuePrinter.cpp:231:44: required from here | |
C:/Users/richa_000/cling-build/src/tools/cling/include/cling/Interpreter/Value.h:104:53: error: cast from 'void*' to 'long unsigned int' loses precision [-fpermissive] | |
C:/Users/richa_000/cling-build/src/tools/cling/include/cling/Interpreter/Value.h: In instantiation of 'static T cling::Value::CastFwd<T>::cast(const cling::Value&) [with | |
T = long long int]': | |
C:/Users/richa_000/cling-build/src/tools/cling/include/cling/Interpreter/Value.h:209:36: required from 'T cling::Value::simplisticCastAs() const [with T = long long int]' | |
C:\Users\richa_000\cling-build\src\tools\cling\lib\Interpreter\ValuePrinter.cpp:234:49: required from here | |
C:/Users/richa_000/cling-build/src/tools/cling/include/cling/Interpreter/Value.h:104:53: error: cast from 'void*' to 'long unsigned int' loses precision [-fpermissive] | |
C:/Users/richa_000/cling-build/src/tools/cling/include/cling/Interpreter/Value.h: In instantiation of 'static T cling::Value::CastFwd<T>::cast(const cling::Value&) [with | |
T = long long unsigned int]': | |
C:/Users/richa_000/cling-build/src/tools/cling/include/cling/Interpreter/Value.h:209:36: required from 'T cling::Value::simplisticCastAs() const [with T = long long unsigned int]' | |
C:\Users\richa_000\cling-build\src\tools\cling\lib\Interpreter\ValuePrinter.cpp:236:58: required from here | |
C:/Users/richa_000/cling-build/src/tools/cling/include/cling/Interpreter/Value.h:104:53: error: cast from 'void*' to 'long unsigned int' loses precision [-fpermissive] | |
C:/Users/richa_000/cling-build/src/tools/cling/include/cling/Interpreter/Value.h: In instantiation of 'static T cling::Value::CastFwd<T>::cast(const cling::Value&) [with | |
T = bool]': | |
C:/Users/richa_000/cling-build/src/tools/cling/include/cling/Interpreter/Value.h:209:36: required from 'T cling::Value::simplisticCastAs() const [with T = bool]' | |
C:\Users\richa_000\cling-build\src\tools\cling\lib\Interpreter\ValuePrinter.cpp:238:43: required from here | |
C:/Users/richa_000/cling-build/src/tools/cling/include/cling/Interpreter/Value.h:104:53: error: cast from 'void*' to 'long unsigned int' loses precision [-fpermissive] | |
tools\cling\lib\Interpreter\CMakeFiles\clingInterpreter.dir\build.make:688: recipe for target 'tools/cling/lib/Interpreter/CMakeFiles/clingInterpreter.dir/ValuePrinter.cpp.obj' failed | |
mingw32-make[2]: *** [tools/cling/lib/Interpreter/CMakeFiles/clingInterpreter.dir/ValuePrinter.cpp.obj] Error 1 | |
CMakeFiles\Makefile2:11223: recipe for target 'tools/cling/lib/Interpreter/CMakeFiles/clingInterpreter.dir/all' failed | |
mingw32-make[1]: *** [tools/cling/lib/Interpreter/CMakeFiles/clingInterpreter.dir/all] Error 2 | |
makefile:135: recipe for target 'all' failed | |
mingw32-make: *** [all] Error 2 |
// Allow simplisticCastAs to be partially specialized.
template<typename T>
struct CastFwd {
static T cast(const Value& V) {
EStorageType storageType = V.getStorageType();
switch (storageType) {
case kSignedIntegerOrEnumerationType:
return (T) V.getAs<long long>();
case kUnsignedIntegerOrEnumerationType:
return (T) V.getAs<unsigned long long>();
case kDoubleType:
return (T) V.getAs<double>();
case kFloatType:
return (T) V.getAs<float>();
case kLongDoubleType:
return (T) V.getAs<long double>();
case kPointerType:
return (T) (unsigned long) V.getAs<void*>();
case kUnsupportedType:
V.AssertOnUnsupportedTypeCast();
}
return T();
}
};
This is complaining about the cast in lines:
case kPointerType:
return (T) (unsigned long) V.getAs<void*>();
Hi,
Include stddef.h and change both occurrences to size_t.
I'm trying to upstream a patch on this
this is why it worked in the past
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I got the same errors when trying a cross-compile from Arch Linux. :| Go figure.
This is when trying to build Cling using Mingw-w64.