-
-
Notifications
You must be signed in to change notification settings - Fork 176
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
Build fails with Clang #27
Comments
diff --git a/build-mingw-w64.sh b/build-mingw-w64.sh
index e8f2d1d..d6d040d 100755
--- a/build-mingw-w64.sh
+++ b/build-mingw-w64.sh
@@ -120,7 +120,8 @@ cd mingw-w64-tools/widl
for arch in $ARCHS; do
mkdir -p build-$CROSS_NAME$arch
cd build-$CROSS_NAME$arch
- ../configure --prefix=$PREFIX --target=$arch-w64-mingw32 $CONFIGFLAGS LDFLAGS="-Wl,-s"
+ ../configure --prefix=$PREFIX --target=$arch-w64-mingw32 $CONFIGFLAGS LDFLAGS="-Wl,-s" \
+ CC=cc AR=llvm-ar RANLIB=llvm-ranlib DLLTOOL=llvm-dlltool
make -j$CORES
make install
cd ..
@@ -133,3 +134,4 @@ if [ -n "$SKIP_INCLUDE_TRIPLET_PREFIX" ]; then
fi
done
fi
+ This patch seems enough to make it build, but not sure if its the best approach? Possibly it would be best to allow a |
-- The C compiler identification is Clang 9.0.0
-- The CXX compiler identification is Clang 9.0.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - failed
-- Detecting CXX compile features
-- Detecting CXX compile features - failed
-- Found LLVM_CONFIG_PATH as /usr/bin/llvm-config
-- Performing Test C_SUPPORTS_WERROR_DATE_TIME
-- Performing Test C_SUPPORTS_WERROR_DATE_TIME - Success
-- Performing Test CXX_SUPPORTS_WERROR_DATE_TIME
-- Performing Test CXX_SUPPORTS_WERROR_DATE_TIME - Failed
-- Performing Test C_SUPPORTS_WERROR_UNGUARDED_AVAILABILITY_NEW
-- Performing Test C_SUPPORTS_WERROR_UNGUARDED_AVAILABILITY_NEW - Success
-- Performing Test CXX_SUPPORTS_WERROR_UNGUARDED_AVAILABILITY_NEW
-- Performing Test CXX_SUPPORTS_WERROR_UNGUARDED_AVAILABILITY_NEW - Failed
-- Performing Test CXX_SUPPORTS_MISSING_FIELD_INITIALIZERS_FLAG
-- Performing Test CXX_SUPPORTS_MISSING_FIELD_INITIALIZERS_FLAG - Failed
-- Performing Test C_SUPPORTS_COVERED_SWITCH_DEFAULT_FLAG
-- Performing Test C_SUPPORTS_COVERED_SWITCH_DEFAULT_FLAG - Success
-- Performing Test CXX_SUPPORTS_COVERED_SWITCH_DEFAULT_FLAG
-- Performing Test CXX_SUPPORTS_COVERED_SWITCH_DEFAULT_FLAG - Failed
-- Performing Test C_SUPPORTS_DELETE_NON_VIRTUAL_DTOR_FLAG
-- Performing Test C_SUPPORTS_DELETE_NON_VIRTUAL_DTOR_FLAG - Success
-- Performing Test CXX_SUPPORTS_DELETE_NON_VIRTUAL_DTOR_FLAG
-- Performing Test CXX_SUPPORTS_DELETE_NON_VIRTUAL_DTOR_FLAG - Failed
-- Performing Test C_WCOMMENT_ALLOWS_LINE_WRAP
-- Performing Test C_WCOMMENT_ALLOWS_LINE_WRAP - Success
-- Performing Test C_SUPPORTS_STRING_CONVERSION_FLAG
-- Performing Test C_SUPPORTS_STRING_CONVERSION_FLAG - Success
-- Performing Test CXX_SUPPORTS_STRING_CONVERSION_FLAG
-- Performing Test CXX_SUPPORTS_STRING_CONVERSION_FLAG - Failed
-- Looking for fopen in c
-- Looking for fopen in c - not found
-- Performing Test LIBUNWIND_HAS_NODEFAULTLIBS_FLAG
-- Performing Test LIBUNWIND_HAS_NODEFAULTLIBS_FLAG - Success
-- Found compiler-rt library: /media/joao/dev/llvm-mingw/out/lib/clang/9.0.0/lib/windows/libclang_rt.builtins-i386.a
-- Performing Test LIBUNWIND_HAS_FUNWIND_TABLES
-- Performing Test LIBUNWIND_HAS_FUNWIND_TABLES - Success
-- Performing Test LIBUNWIND_HAS_NO_EXCEPTIONS_FLAG
-- Performing Test LIBUNWIND_HAS_NO_EXCEPTIONS_FLAG - Success
-- Performing Test LIBUNWIND_HAS_NO_RTTI_FLAG
-- Performing Test LIBUNWIND_HAS_NO_RTTI_FLAG - Success
-- Performing Test LIBUNWIND_HAS_FSTRICT_ALIASING_FLAG
-- Performing Test LIBUNWIND_HAS_FSTRICT_ALIASING_FLAG - Success
-- Performing Test LIBUNWIND_HAS_NOSTDINCXX_FLAG
-- Performing Test LIBUNWIND_HAS_NOSTDINCXX_FLAG - Success
-- Performing Test LIBUNWIND_HAS_WALL_FLAG
-- Performing Test LIBUNWIND_HAS_WALL_FLAG - Success
-- Performing Test LIBUNWIND_HAS_W_FLAG
-- Performing Test LIBUNWIND_HAS_W_FLAG - Success
-- Performing Test LIBUNWIND_HAS_WNO_UNUSED_FUNCTION_FLAG
-- Performing Test LIBUNWIND_HAS_WNO_UNUSED_FUNCTION_FLAG - Success
-- Performing Test LIBUNWIND_HAS_WUNUSED_VARIABLE_FLAG
-- Performing Test LIBUNWIND_HAS_WUNUSED_VARIABLE_FLAG - Success
-- Performing Test LIBUNWIND_HAS_WUNUSED_PARAMETER_FLAG
-- Performing Test LIBUNWIND_HAS_WUNUSED_PARAMETER_FLAG - Success
-- Performing Test LIBUNWIND_HAS_WSTRICT_ALIASING_FLAG
-- Performing Test LIBUNWIND_HAS_WSTRICT_ALIASING_FLAG - Success
-- Performing Test LIBUNWIND_HAS_WSTRICT_OVERFLOW_FLAG
-- Performing Test LIBUNWIND_HAS_WSTRICT_OVERFLOW_FLAG - Success
-- Performing Test LIBUNWIND_HAS_WWRITE_STRINGS_FLAG
-- Performing Test LIBUNWIND_HAS_WWRITE_STRINGS_FLAG - Success
-- Performing Test LIBUNWIND_HAS_WCHAR_SUBSCRIPTS_FLAG
-- Performing Test LIBUNWIND_HAS_WCHAR_SUBSCRIPTS_FLAG - Success
-- Performing Test LIBUNWIND_HAS_WMISMATCHED_TAGS_FLAG
-- Performing Test LIBUNWIND_HAS_WMISMATCHED_TAGS_FLAG - Success
-- Performing Test LIBUNWIND_HAS_WMISSING_BRACES_FLAG
-- Performing Test LIBUNWIND_HAS_WMISSING_BRACES_FLAG - Success
-- Performing Test LIBUNWIND_HAS_WSHORTEN_64_TO_32_FLAG
-- Performing Test LIBUNWIND_HAS_WSHORTEN_64_TO_32_FLAG - Success
-- Performing Test LIBUNWIND_HAS_WSIGN_CONVERSION_FLAG
-- Performing Test LIBUNWIND_HAS_WSIGN_CONVERSION_FLAG - Success
-- Performing Test LIBUNWIND_HAS_WSIGN_COMPARE_FLAG
-- Performing Test LIBUNWIND_HAS_WSIGN_COMPARE_FLAG - Success
-- Performing Test LIBUNWIND_HAS_WSHADOW_FLAG
-- Performing Test LIBUNWIND_HAS_WSHADOW_FLAG - Success
-- Performing Test LIBUNWIND_HAS_WCONVERSION_FLAG
-- Performing Test LIBUNWIND_HAS_WCONVERSION_FLAG - Success
-- Performing Test LIBUNWIND_HAS_WNEWLINE_EOF_FLAG
-- Performing Test LIBUNWIND_HAS_WNEWLINE_EOF_FLAG - Success
-- Performing Test LIBUNWIND_HAS_WUNDEF_FLAG
-- Performing Test LIBUNWIND_HAS_WUNDEF_FLAG - Success
-- Performing Test LIBUNWIND_HAS_PEDANTIC_FLAG
-- Performing Test LIBUNWIND_HAS_PEDANTIC_FLAG - Success
-- Performing Test LIBUNWIND_HAS_WERROR_FLAG
-- Performing Test LIBUNWIND_HAS_WERROR_FLAG - Success
-- Performing Test LIBUNWIND_HAS_WNO_ERROR_FLAG
-- Performing Test LIBUNWIND_HAS_WNO_ERROR_FLAG - Success
-- Performing Test LIBUNWIND_HAS_WX_FLAG
-- Performing Test LIBUNWIND_HAS_WX_FLAG - Failed
-- Performing Test LIBUNWIND_HAS_NO_WX_FLAG
-- Performing Test LIBUNWIND_HAS_NO_WX_FLAG - Failed
-- Performing Test LIBUNWIND_HAS_EHSC_FLAG
-- Performing Test LIBUNWIND_HAS_EHSC_FLAG - Failed
-- Performing Test LIBUNWIND_HAS_NO_EHS_FLAG
-- Performing Test LIBUNWIND_HAS_NO_EHS_FLAG - Failed
-- Performing Test LIBUNWIND_HAS_NO_EHA_FLAG
-- Performing Test LIBUNWIND_HAS_NO_EHA_FLAG - Failed
-- Performing Test LIBUNWIND_HAS_NO_GR_FLAG
-- Performing Test LIBUNWIND_HAS_NO_GR_FLAG - Failed
-- Performing Test LIBUNWIND_HAS_STD_CXX11
-- Performing Test LIBUNWIND_HAS_STD_CXX11 - Success
-- Looking for dladdr in dl
-- Looking for dladdr in dl - not found
-- Looking for pthread_once in pthread
-- Looking for pthread_once in pthread - found
-- Configuring done
-- Generating done
-- Build files have been written to: /media/joao/dev/llvm-mingw/libunwind/build-i686-shared
Scanning dependencies of target unwind_objects
[ 11%] Building C object src/CMakeFiles/unwind_objects.dir/UnwindLevel1-gcc-ext.c.obj
[ 22%] Building CXX object src/CMakeFiles/unwind_objects.dir/libunwind.cpp.obj
[ 33%] Building C object src/CMakeFiles/unwind_objects.dir/UnwindRegistersRestore.S.obj
[ 44%] Building CXX object src/CMakeFiles/unwind_objects.dir/Unwind-EHABI.cpp.obj
[ 55%] Building C object src/CMakeFiles/unwind_objects.dir/Unwind-sjlj.c.obj
[ 66%] Building CXX object src/CMakeFiles/unwind_objects.dir/Unwind-seh.cpp.obj
[ 77%] Building C object src/CMakeFiles/unwind_objects.dir/UnwindLevel1.c.obj
[ 88%] Building C object src/CMakeFiles/unwind_objects.dir/UnwindRegistersSave.S.obj
In file included from /media/joao/dev/llvm-mingw/libunwind/src/libunwind.cpp:17:
In file included from /media/joao/dev/llvm-mingw/libcxx/include/new:91:
In file included from /media/joao/dev/llvm-mingw/libcxx/include/exception:83:
/media/joao/dev/llvm-mingw/libcxx/include/type_traits:744:56: error: _Float16 is not supported on this target
template <> struct __libcpp_is_floating_point<_Float16> : public true_type {};
^
1 error generated.
src/CMakeFiles/unwind_objects.dir/build.make:63: recipe for target 'src/CMakeFiles/unwind_objects.dir/libunwind.cpp.obj' failed
make[2]: *** [src/CMakeFiles/unwind_objects.dir/libunwind.cpp.obj] Error 1
CMakeFiles/Makefile2:196: recipe for target 'src/CMakeFiles/unwind_objects.dir/all' failed
make[1]: *** [src/CMakeFiles/unwind_objects.dir/all] Error 2
Makefile:129: recipe for target 'all' failed
make: *** [all] Error 2 |
Relevant code from libcxx #ifdef __FLT16_MANT_DIG__
template <> struct __libcpp_is_floating_point<_Float16> : public true_type {};
#endif This preprocessor define is set by Clang itself in DefineFloatMacros(Builder, "FLT16", &TI.getHalfFormat(), "F16"); It seems to always be set, independent of which target is set. Also Clang disables the
// TargetInfo Constructor.
TargetInfo::TargetInfo(const llvm::Triple &T) : TargetOpts(), Triple(T) {
...
HasFloat16 = false;
...
} So it does seem to like a bug in the toolchain based on this info, but surely I am misunderstanding something here? For what is worth, just commenting the relevant check line in However I am not sure what's the best fix here. Any thoughts @mstorsjo? |
How is this environment set up more in detail? What distribution and in which way are they installed as host compiler/linker? By symlinking LLD to Can you provide the output of
Using clang as host compiler is most definitely supported. However, it seems like the version of LLD you have isn't compatible with your GCC frontend. The
I don't feel that merging this patch is necessary, as the root cause is the fact that you do have I'll try to look into the other matter and get back to you on that. |
It's Mint (Debian/Ubuntu-based). I used
I see, thanks for the information. I might be misunderstanding the underlying problem, but it seems that the
|
Yes, the autoconf based tools will prefer using And yes, configuring with |
As for the error about But for clang, you're not using the one I have pinned (from January 23rd), you seem to have one from yesterday or later. The So, either stick strictly with the combination of pinned project versions which I have tested building together, or update all of them to the latest version (which I also test regularly). |
About the first issue, you're right. Looks like my LLD is incompatible with the system GCC. I still think it's weird that this was seemingly the only project that uses About the second issue, I think I know what happened. I remember in my first run, I had an error about missing SVN (when calling Sorry for wasting your time on this. |
I mostly depends on the build systems used; autoconf tests gcc before cc, while others probably try cc first.
Oh, ok, that explains it! Yes, if you have an existing chekout, it doesn't force checking out the pinned version. And git-svn is only needed for getting easy to read SVN versions from clang --version. Normally, there's not too strict dependency between libcxx and the compiler version, this is the first issue of this kind that I've seen.
No problem, I'm glad that we got it resolved. |
Hello.
I am trying to build the project using Clang/LLD as a host compiler on Linux.
Everything seems to go well until
widl
tool is built frommingw-w64-tools/widl
.It fails with:
config.log
:Is using
clang
as host compiler not a supported configuration?The text was updated successfully, but these errors were encountered: