neraliu / tainted-phantomjs

Tainted PhantomJS
BSD 3-Clause "New" or "Revised" License
53 stars 12 forks source link

cannot compile the phantomjs on mac 10.9 #21

Closed neraliu closed 10 years ago

neraliu commented 10 years ago

i got the following compilation error from phantomjs

src/qt/src> make
cd tools/bootstrap/ && make -f Makefile 
make[1]: Nothing to be done for `first'.
cd tools/moc/ && make -f Makefile 
make[1]: Nothing to be done for `first'.
cd tools/rcc/ && make -f Makefile 
make[1]: Nothing to be done for `first'.
cd tools/uic/ && make -f Makefile 
make[1]: Nothing to be done for `first'.
cd corelib/ && make -f Makefile 
make -f Makefile.Release
make[2]: Nothing to be done for `first'.
cd xml/ && make -f Makefile 
make -f Makefile.Release
make[2]: Nothing to be done for `first'.
cd network/ && make -f Makefile 
make -f Makefile.Release
make[2]: Nothing to be done for `first'.
cd gui/ && make -f Makefile 
make -f Makefile.Release
g++ -c -pipe -fno-exceptions -Xarch_i386 -mmacosx-version-min=10.4 -fconstant-cfstrings -O2 -arch i386 -fvisibility=hidden -fvisibility-inlines-hidden -Wall -W -fPIC -DQT_NO_GRAPHICSVIEW -DQT_NO_GRAPHICSEFFECT -DQT_NO_STYLESHEET -DQT_NO_STYLE_CDE -DQT_NO_STYLE_CLEANLOOKS -DQT_NO_STYLE_MOTIF -DQT_NO_STYLE_PLASTIQUE -DQT_BUILD_GUI_LIB -DQT_NO_USING_NAMESPACE -DQT_NO_CAST_TO_ASCII -DQT_ASCII_CAST_WARNINGS -DQT_MOC_COMPAT -DQT_USE_QSTRINGBUILDER -DQT_USE_BUNDLED_LIBPNG -DPNG_NO_ASSEMBLER_CODE -DQT_NO_CUPS -DQT_NO_LPR -DQT_NO_OPENTYPE -DQT_NO_STYLE_WINDOWSVISTA -DQT_NO_STYLE_WINDOWSXP -DQT_NO_STYLE_GTK -DQT_NO_STYLE_WINDOWSCE -DQT_NO_STYLE_WINDOWSMOBILE -DQT_NO_STYLE_S60 -DQ_INTERNAL_QAPP_SRC -DQT_NO_DEBUG -DQT_CORE_LIB -DQT_HAVE_MMX -DQT_HAVE_3DNOW -DQT_HAVE_SSE -DQT_HAVE_MMXEXT -DQT_HAVE_SSE2 -DQT_HAVE_SSE3 -DQT_HAVE_SSSE3 -DQT_HAVE_SSE4_1 -DQT_HAVE_SSE4_2 -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -I../../mkspecs/macx-g++ -I. -I../../include/QtCore -I../../include -I../../include/QtGui -I.rcc/release-static -Iimage -I../3rdparty/libpng -I../3rdparty/libjpeg -I../3rdparty/harfbuzz/src -Idialogs -I.moc/release-static -I.uic/release-static -I. dialogs/qcolordialog_mac.mm -o .obj/release-static/qcolordialog_mac.o -fexceptions
In file included from ../../include/QtCore/qglobal.h:1,
                 from ../../include/QtCore/../../src/corelib/global/qnamespace.h:45,
                 from ../../include/QtCore/qnamespace.h:1,
                 from ../../include/QtCore/../../src/corelib/kernel/qobjectdefs.h:45,
                 from ../../include/QtCore/qobjectdefs.h:1,
                 from ../../include/QtGui/../../src/gui/kernel/qwindowdefs.h:45,
                 from ../../include/QtGui/qwindowdefs.h:1,
                 from ../../include/QtGui/../../src/gui/kernel/qwidget.h:46,
                 from ../../include/QtGui/qwidget.h:1,
                 from ../../include/QtGui/private/../../../src/gui/kernel/qwidget_p.h:56,
                 from ../../include/QtGui/private/qwidget_p.h:1,
                 from ../../include/QtGui/private/../../../src/gui/dialogs/qdialog_p.h:56,
                 from ../../include/QtGui/private/qdialog_p.h:1,
                 from dialogs/qcolordialog_p.h:57,
                 from dialogs/qcolordialog_mac.mm:42:
../../include/QtCore/../../src/corelib/global/qglobal.h:331:6: warning: #warning "This version of Mac OS X is unsupported"
In file included from /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:161,
                 from /System/Library/Frameworks/Cocoa.framework/Headers/Cocoa.h:12,
                 from ../../include/QtGui/../../src/gui/kernel/qmacdefines_mac.h:113,
                 from ../../include/QtGui/qmacdefines_mac.h:1,
                 from ../../include/QtGui/../../src/gui/kernel/qwindowdefs.h:99,
                 from ../../include/QtGui/qwindowdefs.h:1,
                 from ../../include/QtGui/../../src/gui/kernel/qwidget.h:46,
                 from ../../include/QtGui/qwidget.h:1,
                 from ../../include/QtGui/private/../../../src/gui/kernel/qwidget_p.h:56,
                 from ../../include/QtGui/private/qwidget_p.h:1,
                 from ../../include/QtGui/private/../../../src/gui/dialogs/qdialog_p.h:56,
                 from ../../include/QtGui/private/qdialog_p.h:1,
                 from dialogs/qcolordialog_p.h:57,
                 from dialogs/qcolordialog_mac.mm:42:
/System/Library/Frameworks/Foundation.framework/Headers/NSUserNotification.h:16: error: expected `}' before ‘__attribute__’
/System/Library/Frameworks/Foundation.framework/Headers/NSUserNotification.h:16: error: expected unqualified-id before ‘=’ token
/System/Library/Frameworks/Foundation.framework/Headers/NSUserNotification.h:17: error: expected declaration before ‘}’ token
make[2]: *** [.obj/release-static/qcolordialog_mac.o] Error 1
make[1]: *** [release] Error 2
make: *** [sub-gui-make_default] Error 2
yukinying commented 10 years ago

I don't have this error. Are you running the latest xcode (clang)?

src/qt/src/gui on rhel64-64-devel* $ g++ -c -pipe -fno-exceptions -Xarch_i386 -mmacosx-version-min=10.4 -fconstant-cfstrings -O2 -arch i386 -fvisibility=hidden -fvisibility-inlines-hidden -Wall -W -fPIC -DQT_NO_GRAPHICSVIEW -DQT_NO_GRAPHICSEFFECT -DQT_NO_STYLESHEET -DQT_NO_STYLE_CDE -DQT_NO_STYLE_CLEANLOOKS -DQT_NO_STYLE_MOTIF -DQT_NO_STYLE_PLASTIQUE -DQT_BUILD_GUI_LIB -DQT_NO_USING_NAMESPACE -DQT_NO_CAST_TO_ASCII -DQT_ASCII_CAST_WARNINGS -DQT_MOC_COMPAT -DQT_USE_QSTRINGBUILDER -DQT_USE_BUNDLED_LIBPNG -DPNG_NO_ASSEMBLER_CODE -DQT_NO_CUPS -DQT_NO_LPR -DQT_NO_OPENTYPE -DQT_NO_STYLE_WINDOWSVISTA -DQT_NO_STYLE_WINDOWSXP -DQT_NO_STYLE_GTK -DQT_NO_STYLE_WINDOWSCE -DQT_NO_STYLE_WINDOWSMOBILE -DQT_NO_STYLE_S60 -DQ_INTERNAL_QAPP_SRC -DQT_NO_DEBUG -DQT_CORE_LIB -DQT_HAVE_MMX -DQT_HAVE_3DNOW -DQT_HAVE_SSE -DQT_HAVE_MMXEXT -DQT_HAVE_SSE2 -DQT_HAVE_SSE3 -DQT_HAVE_SSSE3 -DQT_HAVE_SSE4_1 -DQT_HAVE_SSE4_2 -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -I../../mkspecs/macx-g++ -I. -I../../include/QtCore -I../../include -I../../include/QtGui -I.rcc/release-static -Iimage -I../3rdparty/libpng -I../3rdparty/libjpeg -I../3rdparty/harfbuzz/src -Idialogs -I.moc/release-static -I.uic/release-static -I. dialogs/qcolordialog_mac.mm -o .obj/release-static/qcolordialog_mac.o -fexceptions
In file included from dialogs/qcolordialog_mac.mm:42:
In file included from dialogs/qcolordialog_p.h:57:
In file included from ../../include/QtGui/private/qdialog_p.h:1:
In file included from ../../include/QtGui/private/../../../src/gui/dialogs/qdialog_p.h:56:
In file included from ../../include/QtGui/private/qwidget_p.h:1:
In file included from ../../include/QtGui/private/../../../src/gui/kernel/qwidget_p.h:56:
In file included from ../../include/QtGui/qwidget.h:1:
In file included from ../../include/QtGui/../../src/gui/kernel/qwidget.h:46:
In file included from ../../include/QtGui/qwindowdefs.h:1:
In file included from ../../include/QtGui/../../src/gui/kernel/qwindowdefs.h:45:
In file included from ../../include/QtCore/qobjectdefs.h:1:
In file included from ../../include/QtCore/../../src/corelib/kernel/qobjectdefs.h:45:
In file included from ../../include/QtCore/qnamespace.h:1:
In file included from ../../include/QtCore/../../src/corelib/global/qnamespace.h:45:
In file included from ../../include/QtCore/qglobal.h:1:
../../include/QtCore/../../src/corelib/global/qglobal.h:331:6: warning: "This version of Mac OS X is unsupported"
      [-W#warnings]
#    warning "This version of Mac OS X is unsupported"
     ^
In file included from dialogs/qcolordialog_mac.mm:42:
In file included from dialogs/qcolordialog_p.h:57:
In file included from ../../include/QtGui/private/qdialog_p.h:1:
In file included from ../../include/QtGui/private/../../../src/gui/dialogs/qdialog_p.h:56:
In file included from ../../include/QtGui/private/qwidget_p.h:1:
../../include/QtGui/private/../../../src/gui/kernel/qwidget_p.h:597:48: warning: unused parameter 'widget'
      [-Wunused-parameter]
    static QRect screenGeometry(const QWidget *widget)
                                               ^
In file included from dialogs/qcolordialog_mac.mm:42:
In file included from dialogs/qcolordialog_p.h:57:
In file included from ../../include/QtGui/private/qdialog_p.h:1:
In file included from ../../include/QtGui/private/../../../src/gui/dialogs/qdialog_p.h:56:
In file included from ../../include/QtGui/private/qwidget_p.h:1:
In file included from ../../include/QtGui/private/../../../src/gui/kernel/qwidget_p.h:66:
In file included from ../../include/QtGui/qgraphicsproxywidget.h:1:
In file included from ../../include/QtGui/../../src/gui/graphicsview/qgraphicsproxywidget.h:45:
In file included from ../../include/QtGui/qgraphicswidget.h:1:
In file included from ../../include/QtGui/../../src/gui/graphicsview/qgraphicswidget.h:46:
In file included from ../../include/QtGui/qgraphicslayoutitem.h:1:
In file included from ../../include/QtGui/../../src/gui/graphicsview/qgraphicslayoutitem.h:47:
In file included from ../../include/QtGui/qevent.h:1:
In file included from ../../include/QtGui/../../src/gui/kernel/qevent.h:52:
In file included from ../../include/QtGui/qmime.h:1:
../../include/QtGui/../../src/gui/kernel/qmime.h:119:10: warning: private field 'type' is not used
      [-Wunused-private-field]
    char type;
         ^
3 warnings generated.

src/qt/src/gui on rhel64-64-devel* $ ls .obj/release-static/qcolordialog_mac.o
.obj/release-static/qcolordialog_mac.o
neraliu commented 10 years ago

what is ur version of xcode? my version is "Version 5.1.1 (5B1008)"

neraliu commented 10 years ago

and here is clang and gcc version

clang --version Apple clang version 4.1 (tags/Apple/clang-421.11.66) (based on LLVM 3.1svn) Target: x86_64-apple-darwin13.1.0 Thread model: posix gcc i686-apple-darwin11-llvm-gcc-4.2: no input files g++ i686-apple-darwin11-llvm-g++-4.2: no input files

yukinying commented 10 years ago
$ clang --version
Apple LLVM version 5.1 (clang-503.0.40) (based on LLVM 3.4svn)
Target: x86_64-apple-darwin13.1.0
Thread model: posix
neraliu commented 10 years ago

resolved after installing the latest command tools from apple for mac 10.9

skepticfx commented 10 years ago

Worked like a charm. Thanks :)