Summary: | Build breaking due to linking error on clang with libc++ | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Rajaram Gaunker <zimbabao> | ||||||
Component: | WebKitGTK | Assignee: | Nobody <webkit-unassigned> | ||||||
Status: | RESOLVED INVALID | ||||||||
Severity: | Normal | CC: | berto, commit-queue, mrobinson, zan | ||||||
Priority: | P2 | ||||||||
Version: | 528+ (Nightly build) | ||||||||
Hardware: | Unspecified | ||||||||
OS: | Unspecified | ||||||||
Attachments: |
|
Description
Rajaram Gaunker
2014-02-22 19:16:30 PST
Created attachment 224989 [details]
Patch
gtk and gtk-w2 breaks are fixed in another change set attached with https://bugs.webkit.org/show_bug.cgi?id=129229 "Libsupc++ is a support library for g++ that contains functions dealing with run-time type information (RTTI) and exception handling. If you attempt to use either exceptions or RTTI in a C++ kernel you have compiled with a GCC Cross-Compiler you will also need the libsupc++ library." (quoting from http://wiki.osdev.org/Libsupcxx). We shouldn't be using exceptions or RTTI in WebKit, so perhaps this fix isn't correct. I don't see anywhere that atspi_is_initialized is in WebKit, so it's quite likely that the missing symbols might be a bug in your packages. How are you configuring the WebKitGTK+ build? What compiler are you using? What OS/distribution? Can you please attach the config.log file? uname -a : Linux saqi 3.5.0-43-generic #66~precise1-Ubuntu SMP Thu Oct 24 14:52:23 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux $CXX --version clang version 3.5 (http://llvm.org/git/clang.git a7b48ed6e362947101b732f840405b784bf185e0) (http://llvm.org/git/llvm.git f39297678b212ab5ee7885474762fc8c3f6c370f) Target: x86_64-unknown-linux-gnu Thread model: posix $CC --version clang version 3.5 (http://llvm.org/git/clang.git a7b48ed6e362947101b732f840405b784bf185e0) (http://llvm.org/git/llvm.git f39297678b212ab5ee7885474762fc8c3f6c370f) Target: x86_64-unknown-linux-gnu Thread model: posix Created attachment 225045 [details]
config.log file
Attaching config.log file.
gtest uses RTTI. /WebKit/Source/ThirdParty (master)$ grep -r typeid * gtest/include/gtest/internal/gtest-type-util.h.pump: const char* const name = typeid(T).name(); gtest/include/gtest/internal/gtest-type-util.h.pump: // gcc's implementation of typeid(T).name() mangles the type name, gtest/include/gtest/internal/gtest-type-util.h: const char* const name = typeid(T).name(); gtest/include/gtest/internal/gtest-type-util.h: // gcc's implementation of typeid(T).name() mangles the type name, gtest/include/gtest/internal/gtest-port.h:// both the typeid and dynamic_cast features are present. gtest/include/gtest/internal/gtest-port.h: GTEST_CHECK_(typeid(*base) == typeid(Derived)); The imported gtest code is quite old, 1.5.0 was released in April 2010. Still, I can build gtest with Clang 3.4 and libc++ 1.0 (r199600) after applying a small patch: diff --git a/Source/ThirdParty/gtest/include/gtest/internal/gtest-port.h b/Source/ThirdParty/gtest/include/gtest/internal/gtest-port.h index e8c6ae0..3b09af1 100644 --- a/Source/ThirdParty/gtest/include/gtest/internal/gtest-port.h +++ b/Source/ThirdParty/gtest/include/gtest/internal/gtest-port.h @@ -197,7 +197,7 @@ #define GTEST_PROJECT_URL_ "http://code.google.com/p/googletest/" // Determines the version of gcc that is used to compile this. -#ifdef __GNUC__ +#if defined(__GNUC__) && !defined(__clang__) // 40302 means version 4.3.2. #define GTEST_GCC_VER_ \ (__GNUC__*10000 + __GNUC_MINOR__*100 + __GNUC_PATCHLEVEL__) Comment on attachment 224989 [details] Patch Cleared review? from attachment 224989 [details] so that this bug does not appear in http://webkit.org/pending-review. If you would like this patch reviewed, please attach it to a new bug (or re-open this bug before marking it for review again). |