Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

Install pkg-config on Bitrise #6364

Closed
wants to merge 2 commits into from
Closed

Install pkg-config on Bitrise #6364

wants to merge 2 commits into from

Conversation

1ec5
Copy link
Contributor

@1ec5 1ec5 commented Sep 18, 2016

Bitrise’s Xcode 8 stack doesn’t have pkg-config installed, causing Mason to fail with:

CMake Error at .mason/mason.cmake:149 (message):
  [Mason] Could not get configuration for package glfw 3.1.2:
  /Users/vagrant/git/.mason/mason.sh: line 584: pkg-config: command not found

Call Stack (most recent call first):
  platform/macos/config.cmake:3 (mason_use)
  CMakeLists.txt:46 (include)

This change installs pkg-config it via Homebrew. I didn’t add it to the iOS build bot’s configuration because the iOS targets don’t appear to need it.

/cc @jfirebaugh @brunoabinader

@1ec5 1ec5 added macOS Mapbox Maps SDK for macOS Node.js node-mapbox-gl-native Qt Mapbox Maps SDK for Qt, aka Qt Location Mapbox GL labels Sep 18, 2016
@1ec5 1ec5 self-assigned this Sep 18, 2016
@mention-bot
Copy link

@1ec5, thanks for your PR! By analyzing this pull request, we identified @jfirebaugh and @tmpsantos to be potential reviewers.

@1ec5
Copy link
Contributor Author

1ec5 commented Sep 18, 2016

The Qt5 build bot is still failing on the Homebrew step:

==> Downloading https://homebrew.bintray.com/bottles/cmake-3.6.2.el_capitan.bottle.tar.gz
==> Pouring cmake-3.6.2.el_capitan.bottle.tar.gz
==> Caveats
Emacs Lisp files have been installed to:
  /usr/local/share/emacs/site-lisp/cmake
==> Summary
🍺  /usr/local/Cellar/cmake/3.6.2: 2,028 files, 27.8M
==> Downloading https://homebrew.bintray.com/bottles/pkg-config-0.29.1_1.el_capitan.bottle.tar.gz
==> Pouring pkg-config-0.29.1_1.el_capitan.bottle.tar.gz
🍺  /usr/local/Cellar/pkg-config/0.29.1_1: 10 files, 627.3K
==> Downloading https://homebrew.bintray.com/bottles/qt5-5.6.1-1.el_capitan.bottle.tar.gz
==> Pouring qt5-5.6.1-1.el_capitan.bottle.tar.gz
==> Caveats
We agreed to the Qt opensource license for you.
If this is unacceptable you should uninstall.

This formula is keg-only, which means it was not symlinked into /usr/local.

Qt 5 conflicts Qt 4

Generally there are no consequences of this for you. If you build your
own software and it requires this formula, you'll need to add to your
build variables:

    LDFLAGS:  -L/usr/local/opt/qt5/lib
    CPPFLAGS: -I/usr/local/opt/qt5/include
    PKG_CONFIG_PATH: /usr/local/opt/qt5/lib/pkgconfig


.app bundles were installed.
Run `brew linkapps qt5` to symlink these to /Applications.
==> Summary
🍺  /usr/local/Cellar/qt5/5.6.1-1: 7,494 files, 315.6M
Linking /usr/local/Cellar/qt5/5.6.1-1... 297 symlinks created
Linking: /usr/local/opt/qt5/libexec/Assistant-qt5.app
Linking: /usr/local/opt/qt5/libexec/Designer-qt5.app
Linking: /usr/local/opt/qt5/libexec/Linguist-qt5.app
Linking: /usr/local/opt/qt5/libexec/pixeltool-qt5.app
Linking: /usr/local/opt/qt5/libexec/qml-qt5.app
Linked 5 apps to /Applications
ln: /usr/local/mkspecs: Permission denied

==> Script finished with exit code: 1

@1ec5 1ec5 added the build label Sep 18, 2016
@brunoabinader
Copy link
Member

brunoabinader commented Sep 19, 2016

@zugaldia Qt5 linking issue seems to be a known bug: Homebrew/legacy-homebrew#29938 (comment)

Suggested approach is to manually add symlinks:

$ ln -s /usr/local/Cellar/qt5/5.6.1-1 mkspecs /usr/local/mkspecs
$ ln -s /usr/local/Cellar/qt5/5.6.1-1 plugins /usr/local/plugins

@tobrun
Copy link
Member

tobrun commented Sep 19, 2016

@brunoabinader you mind patching this up? CI seems to be broken for the whole project.

@brunoabinader
Copy link
Member

@brunoabinader you mind patching this up

The manual symlinks are already there:
https://github.com/mapbox/mapbox-gl-native/blob/master/platform/qt/bitrise-qt5.yml#L36-L37

The permission issue seems to be fixed differently:
$ sudo chown -R $USER /usr/local

Not sure if we have super user permissions on Bitrise, but will give it a try 👍

@brunoabinader
Copy link
Member

Adding the chown command made me get the same pkg-config error message as above - adding it to this PR.

Copy link
Member

@tobrun tobrun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The CI integration is passing :shipit:

Copy link
Contributor

@kkaefer kkaefer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of adding pkg-config, we should use packages that don't require pkg-config in the first place. See #6367

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
build macOS Mapbox Maps SDK for macOS Node.js node-mapbox-gl-native Qt Mapbox Maps SDK for Qt, aka Qt Location Mapbox GL
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants