Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Having Mac brew build issues, possibly like others #3

Closed
Pysis868 opened this issue Apr 27, 2020 · 9 comments
Closed

Having Mac brew build issues, possibly like others #3

Pysis868 opened this issue Apr 27, 2020 · 9 comments

Comments

@Pysis868
Copy link

Pysis868 commented Apr 27, 2020

Tried looking at #1 and #2. Mine seems to fail at this when making webkit:

[  7%] Linking CXX static library ../../lib/libANGLESupport.a
cd /tmp/qt5-webkit-20200427-15126-l8mooi/build/release/Source/WebCore && /usr/local/Cellar/cmake/3.17.1/bin/cmake -P CMakeFiles/ANGLESupport.dir/cmake_clean_target.cmake
cd /tmp/qt5-webkit-20200427-15126-l8mooi/build/release/Source/WebCore && /usr/local/Cellar/cmake/3.17.1/bin/cmake -E cmake_link_script CMakeFiles/ANGLESupport.dir/link.txt --verbose=1
[  7%] Built target ANGLESupport
make[2]: *** [all] Error 2
make[1]: *** [first] Error 2
make: *** [sub-Tools-qmake-projects-run_cmake-pro-make_first-ordered] Error 2
/usr/bin/curl --version
/usr/libexec/java_home --xml --failfast
/usr/libexec/java_home --xml --failfast

I see some Python 2.7 hash errors near 6% Generate bytecodes too.

Originally ignored the xcode line because I have had xcode setup on this machine for a while now.
sudo xcode-select -s /Applications/Xcode.app/Contents/Developer

Seeing this error now made me think I had to do another inconvenient macos upgrade since it locks a lot of dependent library versions..

When that didn't work, I also tried large Homebrew upgrade that I had to run several times to clear out some issues.

Tried making a log adding additional redirection:
brew install --verbose --debug qt5-webkit > install.log 2&>1

macOS 10.15.4 Catalina

> brew --version
Homebrew 2.2.13-176-g223b66b
Homebrew/homebrew-core (git revision fffcca; last commit 2020-04-27)
Homebrew/homebrew-cask (git revision 2875ad; last commit 2020-04-27)

> brew tap
homebrew/cask
homebrew/cask-versions
homebrew/core
homebrew/services
joelpurra/joelpurra
markwu/personal
sudar/arduino-mk
@markwu
Copy link
Owner

markwu commented Apr 28, 2020

Since the zealdoc ported to QtWebEngine from yesterday, I already modified the formula to use it.

Would you try again to see if the zealdoc compiled by homebrew with Qt5 and QtWebEngine?

brew install --HEAD zeal

I will remove qt5-webkit formula later and only support head version of zealdoc.

@Pysis868 Pysis868 changed the title Hacing Mac brew build issues, possibly like others Having Mac brew build issues, possibly like others Apr 29, 2020
@Pysis868
Copy link
Author

Pysis868 commented Apr 29, 2020

Same error:

> brew install --HEAD zeal
Updating Homebrew...
...
==> Auto-updated Homebrew!
Updated Homebrew from 223b66bcd to d48d1e5e2.
Updated 3 taps (homebrew/cask-versions, homebrew/core and homebrew/cask).
==> New Formulae
...

==> Installing zeal from markwu/personal
==> Installing dependencies for markwu/personal/zeal: cmake and markwu/personal/qt5-webkit
==> Installing markwu/personal/zeal dependency: cmake
==> Downloading https://homebrew.bintray.com/bottles/cmake-3.17.2.catalina.bottle.tar.gz
==> Downloading from https://akamai.bintray.com/54/5498aed6134742450b1237e0f033ff388831a6c06e9d965
######################################################################## 100.0%
==> Pouring cmake-3.17.2.catalina.bottle.tar.gz
==> Caveats
Emacs Lisp files have been installed to:
  /usr/local/share/emacs/site-lisp/cmake
==> Summary
🍺  /usr/local/Cellar/cmake/3.17.2: 6,156 files, 58MB
==> Installing markwu/personal/zeal dependency: markwu/personal/qt5-webkit
==> Cloning https://github.com/qt/qtwebkit.git
Updating /Users/Pysis/Library/Caches/Homebrew/qt5-webkit--git
==> Checking out branch 5.212
Already on '5.212'
Your branch is up to date with 'origin/5.212'.
HEAD is now at 10cd6a1 Import QtWebKit commit 5da2323bd009bfd234e86c2552b7d9d4138652fe
==> Downloading https://raw.githubusercontent.com/markwu/homebrew-personal/master/Formula/qt5-webk
Already downloaded: /Users/Pysis/Library/Caches/Homebrew/downloads/6ce28d45e0ab3a9db4b3c732cc1b5128b8bfca034f891e95fb54bfac5e982c14--qt5-webkit.diff
==> Patching
==> Applying qt5-webkit.diff
patching file Source/WTF/wtf/spi/darwin/XPCSPI.h
patching file Tools/qmake/projects/run_cmake.pro
==> /usr/local/opt/qt/bin/qmake ../WebKit.pro -config release -spec macx-clang
==> make
...
[  7%] Built target ANGLESupport
make[2]: *** [all] Error 2
make[1]: *** [first] Error 2
make: *** [sub-Tools-qmake-projects-run_cmake-pro-make_first-ordered] Error 2

If reporting this issue please do so at (not Homebrew/brew or Homebrew/core):
  https://github.com/markwu/homebrew-personal/issues

Please create pull requests instead of asking for help on Homebrew's GitHub,
Discourse, Twitter or IRC.

@markwu
Copy link
Owner

markwu commented Apr 29, 2020

Ah ... Sorry, I forgot your qt5-webkit does not exist. I updated the formula and remove the patch and qt5-webkit dependency. Can you try it again?

$ brew update
$ brew install --HEAD zeal

@Pysis868
Copy link
Author

Pysis868 commented Apr 30, 2020

Now I get this:

> brew install --HEAD zeal
Updating Homebrew...
==> Auto-updated Homebrew!
Updated 1 tap (homebrew/cask).
==> Updated Casks
iexplorer

==> Installing zeal from markwu/personal
==> Cloning https://github.com/zealdocs/zeal.git
Cloning into '/Users/Pysis/Library/Caches/Homebrew/zeal--git'...
==> Checking out branch master
Already on 'master'
Your branch is up to date with 'origin/master'.
==> cmake ..
==> make
Last 15 lines from /Users/Pysis/Library/Logs/Homebrew/zeal/02.make:
[ 97%] Building CXX object src/app/CMakeFiles/App.dir/main.cpp.o
cd /tmp/zeal-20200430-19614-9rtidi/build/src/app && /usr/local/Homebrew/Library/Homebrew/shims/mac/super/clang++ ...
...
/usr/local/opt/qt/lib/QtGui.framework/QtGui /usr/local/opt/qt/lib/QtCore.framework/QtCore
clang: error: unable to execute command: Segmentation fault: 11
clang: error: linker command failed due to signal (use -v to see invocation)
make[2]: *** [bin/Zeal.app/Contents/MacOS/Zeal] Error 254
make[1]: *** [src/app/CMakeFiles/App.dir/all] Error 2
make: *** [all] Error 2

With verbose and debug on:

Undefined symbols for architecture x86_64:
  "Zeal::Core::Application::executeQuery(Zeal::Registry::SearchQuery const&, bool)", referenced from:
      QtPrivate::QFunctorSlotObject<main::$_17, 1, QtPrivate::List<QByteArray const&>, void>::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**, bool*) in main.cpp.o
      QtPrivate::QFunctorSlotObject<main::$_18, 0, QtPrivate::List<>, void>::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**, bool*) in main.cpp.o
  "Zeal::Core::Application::Application(QObject*)", referenced from:
      _main in main.cpp.o
  "Zeal::Core::ApplicationSingleton::sendMessage(QByteArray&, int)", referenced from:
      _main in main.cpp.o
  "Zeal::Core::ApplicationSingleton::messageReceived(QByteArray const&)", referenced from:
      _main in main.cpp.o
  "Zeal::Core::ApplicationSingleton::staticMetaObject", referenced from:
      _main in main.cpp.o
  "Zeal::Core::ApplicationSingleton::ApplicationSingleton(QObject*)", referenced from:
      _main in main.cpp.o
  "Zeal::Registry::SearchQuery::setKeywords(QStringList const&)", referenced from:
      parseCommandLine(QStringList const&) in main.cpp.o
  "Zeal::Registry::SearchQuery::setQuery(QString const&)", referenced from:
      parseCommandLine(QStringList const&) in main.cpp.o
  "Zeal::Core::ApplicationSingleton::isSecondary() const", referenced from:
      _main in main.cpp.o
  "Zeal::Registry::SearchQuery::isEmpty() const", referenced from:
      _main in main.cpp.o
  "operator<<(QDataStream&, Zeal::Registry::SearchQuery const&)", referenced from:
      _main in main.cpp.o
  "operator>>(QDataStream&, Zeal::Registry::SearchQuery&)", referenced from:
      QtPrivate::QFunctorSlotObject<main::$_17, 1, QtPrivate::List<QByteArray const&>, void>::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**, bool*) in main.cpp.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [bin/Zeal.app/Contents/MacOS/Zeal] Error 1
make[1]: *** [src/app/CMakeFiles/App.dir/all] Error 2

Possible solution:
nlohmann/json#285
But cannot switch to using ++ compiler as it is already being used.

https://stackoverflow.com/questions/18751868/undefined-symbols-for-architecture-x86-64-compiling-problems

Seems maybe some code fixes are required.

@markwu
Copy link
Owner

markwu commented Apr 30, 2020

I am not sure what's going on, do you want to try build it from scratch, instead of using homebrew? Here comes the detail steps:

# Before you build zeal, please setup the env vars according to your system
# (make sure you have qt5 and libarchive installed, maybe you can try re-install them 
# from homebrew bottle again)

$ brew install qt
$ brew install libarchive
$ export CMAKE_PREFIX_PATH=/usr/local/opt/qt5:/usr/local/opt/libarchive

# Build start

$ git clone git clone https://github.com/zealdocs/zeal.git
$ cd zeal
$ mkdir build
$ cd build
$ cmake ..
$ make

That's it. To see if you can build manually.

Can you try if it works?

@Pysis868
Copy link
Author

Pysis868 commented May 1, 2020

Hm, that seems to work, and I was doing this before I found the homebrew formula I think, but had a problem, and now I can't remember what that was. Wonder if it started with that qtwebkit package before and after working with homebrew.

(master=) > make
Scanning dependencies of target Browser_autogen
[  1%] Automatic MOC and UIC for target Browser
[  1%] Built target Browser_autogen
Scanning dependencies of target Browser
[  2%] Building CXX object src/libs/browser/CMakeFiles/Browser.dir/Browser_autogen/mocs_compilation.cpp.o
[  4%] Building CXX object src/libs/browser/CMakeFiles/Browser.dir/searchtoolbar.cpp.o
[  5%] Building CXX object src/libs/browser/CMakeFiles/Browser.dir/urlrequestinterceptor.cpp.o
[  7%] Building CXX object src/libs/browser/CMakeFiles/Browser.dir/webbridge.cpp.o
[  8%] Building CXX object src/libs/browser/CMakeFiles/Browser.dir/webcontrol.cpp.o
[ 10%] Building CXX object src/libs/browser/CMakeFiles/Browser.dir/webpage.cpp.o
[ 11%] Building CXX object src/libs/browser/CMakeFiles/Browser.dir/webview.cpp.o
[ 13%] Linking CXX static library libBrowser.a
[ 13%] Built target Browser
Scanning dependencies of target Util_autogen
[ 14%] Automatic UIC for target Util
[ 14%] Built target Util_autogen
Scanning dependencies of target Util
[ 15%] Building CXX object src/libs/util/CMakeFiles/Util.dir/plist.cpp.o
[ 17%] Building CXX object src/libs/util/CMakeFiles/Util.dir/sqlitedatabase.cpp.o
[ 18%] Linking CXX static library libUtil.a
[ 18%] Built target Util
Scanning dependencies of target Widgets_autogen
[ 20%] Automatic MOC and UIC for target Widgets
[ 20%] Built target Widgets_autogen
Scanning dependencies of target Widgets
[ 21%] Building CXX object src/libs/ui/widgets/CMakeFiles/Widgets.dir/Widgets_autogen/mocs_compilation.cpp.o
[ 23%] Building CXX object src/libs/ui/widgets/CMakeFiles/Widgets.dir/layouthelper.cpp.o
[ 24%] Building CXX object src/libs/ui/widgets/CMakeFiles/Widgets.dir/searchedit.cpp.o
[ 26%] Building CXX object src/libs/ui/widgets/CMakeFiles/Widgets.dir/shortcutedit.cpp.o
[ 27%] Building CXX object src/libs/ui/widgets/CMakeFiles/Widgets.dir/toolbarframe.cpp.o
[ 28%] Linking CXX static library libWidgets.a
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: libWidgets.a(layouthelper.cpp.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: libWidgets.a(layouthelper.cpp.o) has no symbols
[ 28%] Built target Widgets
Scanning dependencies of target Registry_autogen
[ 30%] Automatic MOC and UIC for target Registry
[ 30%] Built target Registry_autogen
Scanning dependencies of target Registry
[ 31%] Building CXX object src/libs/registry/CMakeFiles/Registry.dir/Registry_autogen/mocs_compilation.cpp.o
[ 33%] Building CXX object src/libs/registry/CMakeFiles/Registry.dir/docset.cpp.o
[ 34%] Building CXX object src/libs/registry/CMakeFiles/Registry.dir/docsetmetadata.cpp.o
[ 36%] Building CXX object src/libs/registry/CMakeFiles/Registry.dir/docsetregistry.cpp.o
[ 37%] Building CXX object src/libs/registry/CMakeFiles/Registry.dir/listmodel.cpp.o
[ 39%] Building CXX object src/libs/registry/CMakeFiles/Registry.dir/searchmodel.cpp.o
[ 40%] Building CXX object src/libs/registry/CMakeFiles/Registry.dir/searchquery.cpp.o
[ 42%] Linking CXX static library libRegistry.a
[ 42%] Built target Registry
Scanning dependencies of target Sidebar_autogen
[ 43%] Automatic MOC and UIC for target Sidebar
[ 43%] Built target Sidebar_autogen
Scanning dependencies of target Sidebar
[ 44%] Building CXX object src/libs/sidebar/CMakeFiles/Sidebar.dir/Sidebar_autogen/mocs_compilation.cpp.o
[ 46%] Building CXX object src/libs/sidebar/CMakeFiles/Sidebar.dir/container.cpp.o
[ 47%] Building CXX object src/libs/sidebar/CMakeFiles/Sidebar.dir/proxyview.cpp.o
[ 49%] Building CXX object src/libs/sidebar/CMakeFiles/Sidebar.dir/view.cpp.o
[ 50%] Building CXX object src/libs/sidebar/CMakeFiles/Sidebar.dir/viewprovider.cpp.o
[ 52%] Linking CXX static library libSidebar.a
[ 52%] Built target Sidebar
Scanning dependencies of target QxtGlobalShortcut_autogen
[ 53%] Automatic MOC and UIC for target QxtGlobalShortcut
[ 53%] Built target QxtGlobalShortcut_autogen
Scanning dependencies of target QxtGlobalShortcut
[ 55%] Building CXX object src/libs/ui/qxtglobalshortcut/CMakeFiles/QxtGlobalShortcut.dir/QxtGlobalShortcut_autogen/mocs_compilation.cpp.o
[ 56%] Building CXX object src/libs/ui/qxtglobalshortcut/CMakeFiles/QxtGlobalShortcut.dir/qxtglobalshortcut.cpp.o
[ 57%] Building CXX object src/libs/ui/qxtglobalshortcut/CMakeFiles/QxtGlobalShortcut.dir/qxtglobalshortcut_mac.cpp.o
[ 59%] Linking CXX static library libQxtGlobalShortcut.a
[ 59%] Built target QxtGlobalShortcut
Scanning dependencies of target Ui_autogen
[ 60%] Automatic MOC and UIC for target Ui
[ 60%] Built target Ui_autogen
Scanning dependencies of target Ui
[ 62%] Building CXX object src/libs/ui/CMakeFiles/Ui.dir/Ui_autogen/mocs_compilation.cpp.o
[ 63%] Building CXX object src/libs/ui/CMakeFiles/Ui.dir/aboutdialog.cpp.o
[ 65%] Building CXX object src/libs/ui/CMakeFiles/Ui.dir/browsertab.cpp.o
[ 66%] Building CXX object src/libs/ui/CMakeFiles/Ui.dir/docsetlistitemdelegate.cpp.o
[ 68%] Building CXX object src/libs/ui/CMakeFiles/Ui.dir/docsetsdialog.cpp.o
[ 69%] Building CXX object src/libs/ui/CMakeFiles/Ui.dir/mainwindow.cpp.o
[ 71%] Building CXX object src/libs/ui/CMakeFiles/Ui.dir/searchitemdelegate.cpp.o
[ 72%] Building CXX object src/libs/ui/CMakeFiles/Ui.dir/searchsidebar.cpp.o
[ 73%] Building CXX object src/libs/ui/CMakeFiles/Ui.dir/settingsdialog.cpp.o
[ 75%] Building CXX object src/libs/ui/CMakeFiles/Ui.dir/sidebarviewprovider.cpp.o
[ 76%] Linking CXX static library libUi.a
[ 76%] Built target Ui
Scanning dependencies of target Core_autogen
[ 78%] Automatic MOC and UIC for target Core
[ 78%] Built target Core_autogen
Scanning dependencies of target Core
[ 79%] Building CXX object src/libs/core/CMakeFiles/Core.dir/Core_autogen/mocs_compilation.cpp.o
[ 81%] Building CXX object src/libs/core/CMakeFiles/Core.dir/application.cpp.o
[ 82%] Building CXX object src/libs/core/CMakeFiles/Core.dir/applicationsingleton.cpp.o
[ 84%] Building CXX object src/libs/core/CMakeFiles/Core.dir/extractor.cpp.o
[ 85%] Building CXX object src/libs/core/CMakeFiles/Core.dir/filemanager.cpp.o
[ 86%] Building CXX object src/libs/core/CMakeFiles/Core.dir/httpserver.cpp.o
[ 88%] Building CXX object src/libs/core/CMakeFiles/Core.dir/networkaccessmanager.cpp.o
[ 89%] Building CXX object src/libs/core/CMakeFiles/Core.dir/settings.cpp.o
[ 91%] Linking CXX static library libCore.a
[ 91%] Built target Core
Scanning dependencies of target App_autogen
[ 92%] Automatic MOC and UIC for target App
[ 92%] Built target App_autogen
[ 94%] Generating qrc_zeal.cpp
Scanning dependencies of target App
[ 95%] Building CXX object src/app/CMakeFiles/App.dir/App_autogen/mocs_compilation.cpp.o
[ 97%] Building CXX object src/app/CMakeFiles/App.dir/main.cpp.o
[ 98%] Building CXX object src/app/CMakeFiles/App.dir/qrc_zeal.cpp.o
[100%] Linking CXX executable ../../bin/Zeal.app/Contents/MacOS/Zeal
Copying OS X content bin/Zeal.app/Contents/Resources/zeal.icns
[100%] Built target App

~/s/z/build (master=) > ls bin
total 0
drwxr-xr-x 3 Pysis staff 96 2020-04-30 19:18 Zeal.app

@markwu
Copy link
Owner

markwu commented May 1, 2020

Then, there must be something wrong with your homebrew configuration.

I have no idea what is it.

@Pysis868
Copy link
Author

Pysis868 commented May 1, 2020

Wish I knew too. Based on some points in this discussion, seems there are some recent changes. Whatever the new instructions are, this may need to be updated https://github.com/zealdocs/zeal/wiki/Build-Instructions-for-macOS.

@markwu
Copy link
Owner

markwu commented May 9, 2020

Thanks, I already update the wiki page.

I'll close this issue.

@markwu markwu closed this as completed May 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants