JDK-8089942 : OpenJFX fails to build native webkit code
  • Type: Bug
  • Component: javafx
  • Sub-Component: web
  • Priority: P4
  • Status: Closed
  • Resolution: Cannot Reproduce
  • Submitted: 2013-08-13
  • Updated: 2024-11-23
  • Resolved: 2024-11-23
Related Reports
Blocks :  
Description
I tried to build OpenJFX with OpenJDK using the following command:

gradle -PCOMPILE_WEBKIT=true -PCOMPILE_GSTREAMER=true -PBUILD_NATIVES=true -PCOMPILE_PANGO=true -PBINARY_STUB=/Users/miho/jdk8_b102_ext/jfxrt.jar

I get the following error:

rc/main/native/Source/WTF/unicode -I/Users/miho/installs/javafx/openjfx/rt/modules/web/src/main/native/Source/WTF/java -I../../../Source/JavaScriptCore/yarr -I../../../Source/JavaScriptCore/API -I../../../Source/JavaScriptCore/ForwardingHeaders -I../../../../../../build/generated-src/headers -I../../../Source/WTF/wtf -I../../../Source/WTF/wtf/java -I../../../Source/WebCore/platform -I../../../Source/JavaScriptCore -I. -x c++-header -c ../../../Source/JavaScriptCore/javascriptcorejava_pch.h -o obj/JavaScriptCoreJava.gch/c++
Creating hashtable for ../../../Source/JavaScriptCore/parser/Keywords.table
In file included from ../../../Source/JavaScriptCore/javascriptcorejava_pch.h:31:
In file included from ../../../Source/WTF/wtf/Deque.h:37:
In file included from ../../../Source/WTF/wtf/PassTraits.h:33:
../../../Source/WTF/wtf/RefPtr.h:157:30: error: no member named 'move' in namespace 'std'
In file included from ../../../Source/JavaScriptCore/javascriptcorejava_pch.h:31:
In file included from ../../../Source/WTF/wtf/Deque.h:37:
In file included from ../../../Source/WTF/wtf/PassTraits.h:33:
../../../Source/WTF/wtf/RefPtr.h:157:30: error: no member named 'move' in namespace 'std'
        RefPtr<T> ptr = std::move(o);
                        ~~~~~^
        RefPtr<T> ptr = std::move(o);
                        ~~~~~^
../../../Source/WTF/wtf/RefPtr.h:164:30: error: no member named 'move' in namespace 'std'
        RefPtr<T> ptr = std::move(o);
                        ~~~~~^
../../../Source/WTF/wtf/RefPtr.h:164:30: error: no member named 'move' in namespace 'std'
        RefPtr<T> ptr = std::move(o);
                        ~~~~~^
2 errors generated.
2 errors generated.
make[1]: *** [obj/JavaScriptCoreJava.gch/c++] Error 1
make[1]: *** Waiting for unfinished jobs....
make[1]: *** [obj/JavaScriptCoreJava.gch/objective-c++] Error 1
make: *** [sub-JavaScriptCore-JavaScriptCoreJava-pro-make_default-ordered] Error 2
:web:compileNative FAILED

FAILURE: Build failed with an exception.

* Where:
Build file '/Users/miho/installs/javafx/openjfx/rt/build.gradle' line: 2130
Comments
This is an old bug. We can build WebKit on all platforms.
23-11-2024

Ok. Makes sense. But which compiler is officially supported on OS X? Maybe you should update the OpenJFX documentation to make clear which g++ to choose. The documentation currently only states that Xcode + command line tools should be installed.
16-08-2013

This post sheds some light: http://cplusplusmusings.wordpress.com/2012/07/05/clang-and-standard-libraries-on-mac-os-x/ Unfortunately there's no easy way to pass the compiler options into the build, other than by editing makefiles such as modules/web/src/main/native/Source/WebKitJava.pri
16-08-2013

Well, my command line is: g++ -pipe -Wreturn-type -fno-strict-aliasing -O3 -O3 -fPIC -w -arch x86_64 -Xarch_x86_64 -mmacosx-version-min=10.7 -DIMAGEIO=1 -DNDEBUG -DBUILDING_JAVA__ -DUSE_SYSTEM_MALLOC -DSTATICALLY_LINKED_WITH_WebCore -DSTATICALLY_LINKED_WITH_JavaScriptCore -DBUILDING_JavaScriptCore -DBUILDING_WTF -DBUILD_WEBKIT -DBUILDING_WTF -DSTATICALLY_LINKED_WITH_WTF -I/usr/local/Qt4.8/mkspecs/macx-g++ -I../../../Source/JavaScriptCore -I/Users/Peter/work/fx/jdk8/include -I/Users/Peter/work/fx/jdk8/include/darwin -Igenerated -I../../../Source/JavaScriptCore -I../../../Source -I../../../Source/JavaScriptCore/assembler -I../../../Source/JavaScriptCore/bytecode -I../../../Source/JavaScriptCore/bytecompiler -I../../../Source/JavaScriptCore/heap -I../../../Source/JavaScriptCore/dfg -I../../../Source/JavaScriptCore/debugger -I../../../Source/JavaScriptCore/disassembler -I../../../Source/JavaScriptCore/interpreter -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/WTF -I../../../Source/WTF/wtf -I/Users/Peter/work/fx/ws/8/rt/modules/web/src/main/native/Source/WTF/gobject -I/Users/Peter/work/fx/ws/8/rt/modules/web/src/main/native/Source/WTF/unicode -I/Users/Peter/work/fx/ws/8/rt/modules/web/src/main/native/Source/WTF/java -I../../../Source/JavaScriptCore/yarr -I../../../Source/JavaScriptCore/API -I../../../Source/JavaScriptCore/ForwardingHeaders -I../../../../../../build/generated-src/headers -I../../../Source/WTF/wtf -I../../../Source/WTF/wtf/java -I../../../Source/WebCore/platform -I../../../Source/JavaScriptCore -I. -x c++-header -c ../../../Source/JavaScriptCore/javascriptcorejava_pch.h -o obj/JavaScriptCoreJava.gch/c++ So it seems c++11 is on by default. But I'm using gcc and not clang.
16-08-2013

I used the newest g++ on OS X that comes with Xcode. Do you use the -std=c++11 parameter in the makefile? Maybe c++11 is deactivated if it isn't activated manually.
14-08-2013

This is a C++11 construct. You probably have an old compiler.
14-08-2013