OSGeo / homebrew-osgeo4mac

Mac homebrew tap for maintaining a stable work environment for the OSGeo.org geospatial toolset
https://git.io/fhh3X
BSD 3-Clause "New" or "Revised" License
363 stars 111 forks source link

Qt-4 Failed to build #275

Closed xanthoes closed 6 years ago

xanthoes commented 7 years ago

I just tried to build qgis2 and could not get past the qt-4 build. After looking at a few older posts I found a suggestion to just build qt-4. Received the same error.

Not sure if this is an issue... but I just did a fresh install of MacOS 10.13 on my laptop.

$ brew install qt-4 ==> Installing qt-4 from osgeo/osgeo4mac ==> Downloading https://download.qt.io/official_releases/qt/4.8/4.8.7/qt-everywhere-opensource-src-4.8.7.tar.gz ==> Downloading from http://qtmirror.ics.com/pub/qtproject/official_releases/qt/4.8/4.8.7/qt-everywhere-opensource-src-4.8.7.tar.gz ######################################################################## 100.0% ==> Downloading https://raw.githubusercontent.com/Homebrew/formula-patches/480b7142c4e2ae07de6028f672695eb927a34875/qt/el-capitan.patch ######################################################################## 100.0% ==> Patching ==> Applying el-capitan.patch patching file src/gui/painting/qpaintengine_mac.cpp ==> ./configure -prefix /usr/local/Cellar/qt-4/4.8.7 -release -opensource -confirm-license -fast -system-zlib -qt-libtiff -qt-libpng -qt-libjpeg -nomake demos -nomake examples -cocoa -platform unsupported/macx-clang-libc++ -no-phonon -openssl-linked -I /usr/local/opt/openssl/include -L /usr/local/opt/openssl/ ==> make Last 15 lines from /Users//Library/Logs/Homebrew/qt-4/02.make: kernel/qt_cocoa_helpers_mac.mm:354:39: error: use of undeclared identifier 'InvalidContext' require_action(inContext != NULL, InvalidContext, err = paramErr); ^ kernel/qt_cocoa_helpers_mac.mm:355:38: error: use of undeclared identifier 'InvalidBounds' require_action(inBounds != NULL, InvalidBounds, err = paramErr); ^ kernel/qt_cocoa_helpers_mac.mm:356:37: error: use of undeclared identifier 'InvalidImage' require_action(inImage != NULL, InvalidImage, err = paramErr); ^ clang -c -pipe -O2 -arch x86_64 -fvisibility=hidden -fvisibility-inlines-hidden -Wall -W -DQT_SHARED -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_ARM_NEON_OPT=0 -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 -DQT_HAVE_AVX -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -I../../mkspecs/unsupported/macx-clang-libc++ -I. -I../../include/QtCore -I../../include -I../../include/QtGui -I.rcc/release-shared -Iimage -I../3rdparty/libpng -I../3rdparty/harfbuzz/src -Idialogs -I.moc/release-shared -I.uic/release-shared -F/private/tmp/qt-4-20170927-69949-6e9qc8/qt-everywhere-opensource-src-4.8.7/lib painting/qprintengine_mac.mm -o .obj/release-shared/qprintengine_mac.o 3 errors generated. make[2]: [.obj/release-shared/qt_cocoa_helpers_mac.o] Error 1 make[2]: Waiting for unfinished jobs.... make[1]: [release] Error 2 make: [sub-gui-make_default-ordered] Error 2

dakcarto commented 7 years ago

Hi @xanthoes, thanks for reporting!

See if editing the qt-4.rb file and adding these patch blocks helps.

xanthoes commented 7 years ago

@dakcarto thanks, if I didn't make any mistakes here is the output:

Paste2.org - screen output

It still failed.

jshermeyer commented 7 years ago

Hangs on the make for me as well, any work arounds?

nickrobison commented 7 years ago

Same issue as @xanthoes, issue with pointer comparison when building QTWebkit

clang++ -c -pipe -stdlib=libc++ -mmacosx-version-min=10.7 -I/usr/local/opt/openssl/include -O2 -arch x86_64 -fPIC -fvisibility=hidden -fvisibility-inlines-hidden -DNDEBUG -DBUILDING_QT__=1 -DNDEBUG -DQT_ASCII_CAST_WARNINGS -DENABLE_XSLT=0 -DENABLE_WEB_TIMING=0 -DENABLE_JAVASCRIPT_DEBUGGER=1 -DENABLE_DATABASE=1 -DENABLE_EVENTSOURCE=1 -DENABLE_OFFLINE_WEB_APPLICATIONS=1 -DENABLE_DOM_STORAGE=1 -DENABLE_ICONDATABASE=1 -DENABLE_CHANNEL_MESSAGING=1 -DENABLE_DIRECTORY_UPLOAD=0 -DENABLE_FILE_SYSTEM=0 -DENABLE_QUOTA=0 -DENABLE_SQLITE=1 -DENABLE_DASHBOARD_SUPPORT=0 -DENABLE_FILTERS=1 -DENABLE_XPATH=1 -DENABLE_WCSS=0 -DENABLE_SHARED_WORKERS=1 -DENABLE_WORKERS=1 -DENABLE_XHTMLMP=0 -DENABLE_DETAILS=1 -DENABLE_METER_TAG=1 -DENABLE_PROGRESS_TAG=1 -DENABLE_BLOB=1 -DENABLE_NOTIFICATIONS=1 -DENABLE_INPUT_SPEECH=0 -DENABLE_INSPECTOR=1 -DENABLE_3D_RENDERING=1 -DENABLE_WEB_AUDIO=0 -DENABLE_WEBGL=0 -DENABLE_MEDIA_STATISTICS=0 -DENABLE_VIDEO_TRACK=0 -DENABLE_TOUCH_ICON_LOADING=0 -DENABLE_ANIMATION_API=0 -DENABLE_SVG=1 -DENABLE_SVG_FONTS=1 -DENABLE_SVG_FOREIGN_OBJECT=1 -DENABLE_SVG_ANIMATION=1 -DENABLE_SVG_AS_IMAGE=1 -DENABLE_SVG_USE=1 -DENABLE_DATALIST=1 -DENABLE_TILED_BACKING_STORE=1 -DENABLE_NETSCAPE_PLUGIN_API=1 -DENABLE_WEB_SOCKETS=1 -DWTF_USE_QT_BEARER=1 -DENABLE_TOUCH_EVENTS=1 -DENABLE_VIDEO=0 -DSQLITE_CORE -DSQLITE_OMIT_LOAD_EXTENSION -DSQLITE_OMIT_COMPLETE -DBUILDING_JavaScriptCore -DBUILDING_WTF -DBUILDING_WEBKIT -DQT_MAKEDLL -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_NETWORK_LIB -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 -DQT_HAVE_AVX -DQT_SHARED -I../../../../../mkspecs/unsupported/macx-clang-libc++ -I. -I../../../../../lib/QtCore.framework/Versions/4/Headers -I../../../../../include/QtCore -I../../../../../lib/QtNetwork.framework/Versions/4/Headers -I../../../../../include/QtNetwork -I../../../../../lib/QtGui.framework/Versions/4/Headers -I../../../../../include/QtGui -I../../../../../include -I../JavaScriptCore -I../../Source -I../ThirdParty -I../JavaScriptCore/assembler -I../JavaScriptCore/bytecode -I../JavaScriptCore/bytecompiler -I../JavaScriptCore/heap -I../JavaScriptCore/dfg -I../JavaScriptCore/debugger -I../JavaScriptCore/interpreter -I../JavaScriptCore/jit -I../JavaScriptCore/parser -I../JavaScriptCore/profiler -I../JavaScriptCore/runtime -I../JavaScriptCore/wtf -I../JavaScriptCore/wtf/gobject -I/private/tmp/qt-4-20171108-71298-o8zgvx/qt-everywhere-opensource-src-4.8.7/src/3rdparty/webkit/Source/JavaScriptCore/wtf/symbian -I../JavaScriptCore/wtf/unicode -I../JavaScriptCore/yarr -I../JavaScriptCore/API -I../JavaScriptCore/ForwardingHeaders -I../JavaScriptCore/generated -Ibridge/qt -Ipage/qt -Iplatform/graphics/qt -Iplatform/network/qt -Iplatform/qt -I../WebKit/qt/Api -I../WebKit/qt/WebCoreSupport -I. -Iaccessibility -Ibindings -Ibindings/generic -Ibridge -Icss -Idom -Idom/default -Iediting -Ifileapi -Ihistory -Ihtml -Ihtml/canvas -Ihtml/parser -Ihtml/shadow -Iinspector -Iloader -Iloader/appcache -Iloader/archive -Iloader/cache -Iloader/icon -Imathml -Inotifications -Ipage -Ipage/animation -Iplatform -Iplatform/animation -Iplatform/audio -Iplatform/graphics -Iplatform/graphics/filters -Iplatform/graphics/filters/arm -Iplatform/graphics/texmap -Iplatform/graphics/transforms -Iplatform/image-decoders -Iplatform/leveldb -Iplatform/mock -Iplatform/network -Iplatform/sql -Iplatform/text -Iplatform/text/transcoder -Iplugins -Irendering -Irendering/mathml -Irendering/style -Irendering/svg -Istorage -Isvg -Isvg/animation -Isvg/graphics -Isvg/graphics/filters -Isvg/properties -Itesting -Iwebaudio -Iwebsockets -I/private/tmp/qt-4-20171108-71298-o8zgvx/qt-everywhere-opensource-src-4.8.7/src/3rdparty/webkit/Source/WebCore/wml -Iworkers -Ixml -Ibridge/jsc -Ibindings/js -I/private/tmp/qt-4-20171108-71298-o8zgvx/qt-everywhere-opensource-src-4.8.7/src/3rdparty/webkit/Source/WebCore/bindings/js/specialization -Ibridge/c -Itesting/js -Igenerated -I../../Source -I../../include -I../include/QtWebKit -I../include -I../../../sqlite -Iplatform/mac -I.moc/release-static -F/private/tmp/qt-4-20171108-71298-o8zgvx/qt-everywhere-opensource-src-4.8.7/lib -o .obj/release-static/HTMLInputElement.o html/HTMLInputElement.cpp html/HTMLImageElement.cpp:77:24: error: ordered comparison between pointer and zero ('const int *' and 'int') if (optionalHeight > 0) ~~~~~~~~~~~~~~ ^ ~

dakcarto commented 7 years ago

Is the bottle for qt-4 not being installed on 10.13?

I think I will be removing support for compiling of this formula on macOS >= 10.13, and only provide prebuilt binaries for 10.12 that are capable of running on higher OS versions.

Reason: Qt4 is fully deprecated and unsupported by Qt for these newer macOS versions, and I do not want to waste any of my time getting Qt4 to compile, i.e. you can continue to submit issues, but I personally will not be working on any fixes. Certainly, patches or PRs to support compilation on macOS >= 10.13 will be considered.

nickrobison commented 7 years ago

The bottle is working great for me. I think it makes sense to just go with that route and avoid the mess of porting old code.