# webkit-gtk-2.0.4: error: cannot use typeid with -fno-rtti

## Finswimmer

Hallo,

schon seit langem möchte ich webkit-gtk emergen, aber:

```
ls/TestWebKitAPI/Libraries_libTestWebKitAPIInjectedBundle_la-InjectedBundleMain.lo `test -f 'Tools/TestWebKitAPI/InjectedBundleMain.cpp' || echo './'`Tools/TestWebKitAPI/InjectedBundleMain.cpp

In file included from Tools/TestWebKitAPI/InjectedBundleController.cpp:26:

In file included from ./Tools/TestWebKitAPI/config.h:84:

In file included from ./Source/ThirdParty/gtest/include/gtest/gtest.h:57:

In file included from ./Source/ThirdParty/gtest/include/gtest/internal/gtest-internal.h:40:

./Source/ThirdParty/gtest/include/gtest/internal/gtest-port.h:831:16: error: cannot use typeid with -fno-rtti

  GTEST_CHECK_(typeid(*base) == typeid(Derived));

               ^

./Source/ThirdParty/gtest/include/gtest/internal/gtest-port.h:806:37: note: expanded from macro 'GTEST_CHECK_'

    if (::testing::internal::IsTrue(condition)) \

                                    ^

./Source/ThirdParty/gtest/include/gtest/internal/gtest-port.h:831:33: error: cannot use typeid with -fno-rtti

  GTEST_CHECK_(typeid(*base) == typeid(Derived));

                                ^

./Source/ThirdParty/gtest/include/gtest/internal/gtest-port.h:806:37: note: expanded from macro 'GTEST_CHECK_'

    if (::testing::internal::IsTrue(condition)) \

                                    ^

In file included from Tools/TestWebKitAPI/InjectedBundleController.cpp:26:

In file included from ./Tools/TestWebKitAPI/config.h:84:

In file included from ./Source/ThirdParty/gtest/include/gtest/gtest.h:57:

In file included from ./Source/ThirdParty/gtest/include/gtest/internal/gtest-internal.h:57:

./Source/ThirdParty/gtest/include/gtest/internal/gtest-type-util.h:78:28: error: cannot use typeid with -fno-rtti

  const char* const name = typeid(T).name();

                           ^

libtool: compile:  clang++ -DHAVE_CONFIG_H -I. -isystem ./Source/ThirdParty/gtest/include -I./Tools/TestWebKitAPI -I./Source/ThirdParty/gtest/include -I./DerivedSources/WebKit2/include -Wall -W -Wcast-align -Wchar-subscripts -Wreturn-type -Wformat -Wformat-security -Wno-format-y2k -Wundef -Wmissing-format-attribute -Wpointer-arith -Wwrite-strings -Wno-unused-parameter -Wno-parentheses -fno-exceptions -DBUILDING_CAIRO__ -DBUILDING_GTK__ -DBUILDING_WEBKIT2__ -DENABLE_JIT=1 -I./Source -I./Source/JavaScriptCore -I./Source/JavaScriptCore/API -I./Source/JavaScriptCore/assembler -I./Source/JavaScriptCore/bytecode -I./Source/JavaScriptCore/bytecompiler -I./Source/JavaScriptCore/dfg -I./Source/JavaScriptCore/disassembler -I./Source/JavaScriptCore/heap -I./Source/JavaScriptCore/debugger -I./Source/JavaScriptCore/ForwardingHeaders -I./Source/JavaScriptCore/interpreter -I./Source/JavaScriptCore/jit -I./Source/JavaScriptCore/jit -I./Source/JavaScriptCore/llint -I./Source/JavaScriptCore/parser -I./Source/JavaScriptCore/profiler -I./Source/JavaScriptCore/runtime -I./Source/JavaScriptCore/tools -I./Source/JavaScriptCore/yarr -I./DerivedSources/JavaScriptCore -I./Source/WTF -pthread -I/usr/include/gtk-3.0 -I/usr/include/at-spi2-atk/2.0 -I/usr/include/gtk-3.0 -I/usr/include/gio-unix-2.0/ -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/harfbuzz -I/usr/include/pango-1.0 -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libdrm -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libpng15 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I./DerivedSources/InjectedBundle -pthread -I/usr/include/gtk-3.0 -I/usr/include/at-spi2-atk/2.0 -I/usr/include/gtk-3.0 -I/usr/include/gio-unix-2.0/ -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/harfbuzz -I/usr/include/pango-1.0 -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libdrm -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libpng15 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -fno-rtti -march=native -O2 -pipe -Wno-c++11-compat -Wno-c++11-extensions -stdlib=libstdc++ -Qunused-arguments -MT Tools/TestWebKitAPI/Libraries_libTestWebKitAPIInjectedBundle_la-InjectedBundleMain.lo -MD -MP -MF Tools/TestWebKitAPI/.deps/Libraries_libTestWebKitAPIInjectedBundle_la-InjectedBundleMain.Tpo -c Tools/TestWebKitAPI/InjectedBundleMain.cpp  -fPIC -DPIC -o Tools/TestWebKitAPI/.libs/Libraries_libTestWebKitAPIInjectedBundle_la-InjectedBundleMain.o

In file included from Tools/TestWebKitAPI/InjectedBundleMain.cpp:26:

In file included from ./Tools/TestWebKitAPI/config.h:84:

In file included from ./Source/ThirdParty/gtest/include/gtest/gtest.h:57:

In file included from ./Source/ThirdParty/gtest/include/gtest/internal/gtest-internal.h:40:

./Source/ThirdParty/gtest/include/gtest/internal/gtest-port.h:831:16: error: cannot use typeid with -fno-rtti

  GTEST_CHECK_(typeid(*base) == typeid(Derived));

               ^

./Source/ThirdParty/gtest/include/gtest/internal/gtest-port.h:806:37: note: expanded from macro 'GTEST_CHECK_'

    if (::testing::internal::IsTrue(condition)) \

                                    ^

./Source/ThirdParty/gtest/include/gtest/internal/gtest-port.h:831:33: error: cannot use typeid with -fno-rtti

  GTEST_CHECK_(typeid(*base) == typeid(Derived));

                                ^

./Source/ThirdParty/gtest/include/gtest/internal/gtest-port.h:806:37: note: expanded from macro 'GTEST_CHECK_'

    if (::testing::internal::IsTrue(condition)) \

                                    ^

3 errors generated.

make[1]: *** [Tools/TestWebKitAPI/Libraries_libTestWebKitAPIInjectedBundle_la-InjectedBundleController.lo] Error 1

make[1]: *** Waiting for unfinished jobs....

In file included from Tools/TestWebKitAPI/InjectedBundleMain.cpp:26:

In file included from ./Tools/TestWebKitAPI/config.h:84:

In file included from ./Source/ThirdParty/gtest/include/gtest/gtest.h:57:

In file included from ./Source/ThirdParty/gtest/include/gtest/internal/gtest-internal.h:57:

./Source/ThirdParty/gtest/include/gtest/internal/gtest-type-util.h:78:28: error: cannot use typeid with -fno-rtti

  const char* const name = typeid(T).name();

                           ^

3 errors generated.

make[1]: *** [Tools/TestWebKitAPI/Libraries_libTestWebKitAPIInjectedBundle_la-InjectedBundleMain.lo] Error 1

mv -f Source/WebCore/testing/.deps/libWebCoreInternals_la-InternalSettings.Tpo Source/WebCore/testing/.deps/libWebCoreInternals_la-InternalSettings.Plo

mv -f Source/WebCore/testing/js/.deps/libWebCoreInternals_la-WebCoreTestSupport.Tpo Source/WebCore/testing/js/.deps/libWebCoreInternals_la-WebCoreTestSupport.Plo

mv -f Source/WebCore/testing/.deps/libWebCoreInternals_la-Internals.Tpo Source/WebCore/testing/.deps/libWebCoreInternals_la-Internals.Plo

make[1]: Leaving directory `/var/tmp/portage/net-libs/webkit-gtk-2.0.4/work/webkitgtk-2.0.4'

make: *** [all] Error 2

 * ERROR: net-libs/webkit-gtk-2.0.4 failed (compile phase):

 *   emake failed

```

Das Internet sagt dazu gar nix   :Shocked: 

```
[ebuild  N    ~] net-libs/webkit-gtk-2.0.4:3/25  USE="geoloc gstreamer introspection jit spell webgl (-aqua) -coverage -debug -libsecret {-test}" 0 kB

```

Kann mir jemand helfen?

Vielen Dank

Tobi

----------

## firefly

Du hast anscheinend -fno-rtti in den CFLAGS/CXXFLAGS in der make.conf eingetragen.

dadurch wird rtti (runtime type information) deaktiviert, welches aber von webkit benötigt wird.

Offtopic: Du hast anscheinend clang als default compiler definiert. funktioniert das gut?

----------

## Finswimmer

Hmm.

Das kommt daher:

```
[nomerge       ] games-util/steam-meta-9999::gamerlay 

[nomerge       ]  games-util/steam-launcher-1.0.0.29::gamerlay  USE="-steamruntime" 

[ebuild     U ~]   gnome-extra/zenity-3.8.0::gentoo [3.6.0::gnome] USE="libnotify webkit -debug {-test}" 0 kB

[ebuild  N    ~]    net-libs/webkit-gtk-2.0.4:3/25  USE="geoloc gstreamer introspection jit spell webgl (-aqua) -coverage -debug -libsecret {-test}" 0 kB

```

Und die Version 2.0.4 will:

You need at least GCC 4.7.x or Clang >= 3.0 for C++11-specific compiler flags

Aber das klappt nicht.

Ich nutze nun net-libs/webkit-gtk-1.8.3-r300 und das scheint durchzulaufen.

Ursache:

Portage demaskiert automatisch die höchste Version..Und nicht die niedrigste passende Version.

Danke für den Denkanstoß!

Tobi

----------

