Skip to content

Conversation

@hebasto
Copy link
Member

@hebasto hebasto commented Jan 31, 2020

This is an alternative to #18042:

When cross compiling for macOS with depends, we do not compile with dbus.
...
This fixes the error by always avoiding DBUS notification on macOS.

Another (eventually better) way to fix this would be to avoid detection of host qt pkg-config packages when cross compiling.

@DrahtBot
Copy link
Contributor

DrahtBot commented Jan 31, 2020

The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

Conflicts

No conflicts as of last run.

@jonasschnelli
Copy link
Contributor

Looks like it doesn't fix the issue: https://bitcoinbuilds.org/logs/251e6256-d6a5-455e-aed8-e39338fd1882.log (somehow still compiles with USE_DBUS)

@hebasto hebasto force-pushed the 20200131-macos-qdbus branch from 5e7ddfc to f1b20ea Compare January 31, 2020 18:02
@hebasto
Copy link
Member Author

hebasto commented Jan 31, 2020

@jonasschnelli

Looks like it doesn't fix the issue: https://bitcoinbuilds.org/logs/251e6256-d6a5-455e-aed8-e39338fd1882.log (somehow still compiles with USE_DBUS)

Fixed.

Copy link
Contributor

@jonasschnelli jonasschnelli left a comment

Choose a reason for hiding this comment

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

Tested ACK f1b20ea - there is no need to use dbus on macOS

Copy link
Member

@fanquake fanquake left a comment

Choose a reason for hiding this comment

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

Isn't this just masking the actual issue, which is that configure is finding QtDBus outside of what we've built in depends?

Why are we special casing macOS? Shouldn't this same issue be affecting essentially all targets where we explicitly disable dbus when building qt?

@jonasschnelli
Copy link
Contributor

Kinda agree with @fanquake that fixing the pkg-config path for depends builds should be done.

Though this quick fix does also make sense on its own.

@hebasto
Copy link
Member Author

hebasto commented Feb 1, 2020

Closed in favor of #18051.

@hebasto hebasto closed this Feb 1, 2020
@hebasto hebasto mentioned this pull request Feb 3, 2020
1 task
laanwj added a commit that referenced this pull request Feb 10, 2020
0e519fe build: Fix behavior when ALLOW_HOST_PACKAGES unset (Hennadii Stepanov)

Pull request description:

  On master (f05c1ac) during building with depends host packages are always considered by `pkg-config` regardless of `ALLOW_HOST_PACKAGES` environment variable. This causes issues like #18042.

  This is an alternative to #18042 and #18045.

  On master:
  ```
  $ make HOST=x86_64-apple-darwin16 -C depends
  $ CONFIG_SITE=$PWD/depends/x86_64-apple-darwin16/share/config.site ./configure
  ...
  checking for QT_DBUS... yes
  ...
  checking whether to build GUI with support for D-Bus... yes
  ...
  ```

  ---

  With this PR:
  1) `ALLOW_HOST_PACKAGES` unset
  ```
  $ make HOST=x86_64-apple-darwin16 -C depends
  $ CONFIG_SITE=$PWD/depends/x86_64-apple-darwin16/share/config.site ./configure
  ...
  checking for QT_DBUS... no
  ...
  checking whether to build GUI with support for D-Bus... no
  ...
  ```
  2) `ALLOW_HOST_PACKAGES=1`
  ```
  $ make HOST=x86_64-apple-darwin16 ALLOW_HOST_PACKAGES=1 -C depends
  $ CONFIG_SITE=$PWD/depends/x86_64-apple-darwin16/share/config.site ./configure
  ...
  checking for QT_DBUS... yes
  ...
  checking whether to build GUI with support for D-Bus... yes
  ...
  ```

ACKs for top commit:
  jonasschnelli:
    Tested ACK 0e519fe - After this PR (and after a `make clean` & `make HOST=x86_64-apple-darwin16` in depends), the macOS depends build on a Debian machine with qt as host package worked (it fails on master due to `ENABLE_DBUS=1`).

Tree-SHA512: d11e1c2bc8ce8a07f3f9b465b01c9b2c814afe75b085a8b88aab74fd3a922aa98180c447457dfc4174515513181c5f4edc521978a1d3d0a112106c98b5c73c0e
sidhujag pushed a commit to syscoin/syscoin that referenced this pull request Feb 18, 2020
0e519fe build: Fix behavior when ALLOW_HOST_PACKAGES unset (Hennadii Stepanov)

Pull request description:

  On master (f05c1ac) during building with depends host packages are always considered by `pkg-config` regardless of `ALLOW_HOST_PACKAGES` environment variable. This causes issues like bitcoin#18042.

  This is an alternative to bitcoin#18042 and bitcoin#18045.

  On master:
  ```
  $ make HOST=x86_64-apple-darwin16 -C depends
  $ CONFIG_SITE=$PWD/depends/x86_64-apple-darwin16/share/config.site ./configure
  ...
  checking for QT_DBUS... yes
  ...
  checking whether to build GUI with support for D-Bus... yes
  ...
  ```

  ---

  With this PR:
  1) `ALLOW_HOST_PACKAGES` unset
  ```
  $ make HOST=x86_64-apple-darwin16 -C depends
  $ CONFIG_SITE=$PWD/depends/x86_64-apple-darwin16/share/config.site ./configure
  ...
  checking for QT_DBUS... no
  ...
  checking whether to build GUI with support for D-Bus... no
  ...
  ```
  2) `ALLOW_HOST_PACKAGES=1`
  ```
  $ make HOST=x86_64-apple-darwin16 ALLOW_HOST_PACKAGES=1 -C depends
  $ CONFIG_SITE=$PWD/depends/x86_64-apple-darwin16/share/config.site ./configure
  ...
  checking for QT_DBUS... yes
  ...
  checking whether to build GUI with support for D-Bus... yes
  ...
  ```

ACKs for top commit:
  jonasschnelli:
    Tested ACK 0e519fe - After this PR (and after a `make clean` & `make HOST=x86_64-apple-darwin16` in depends), the macOS depends build on a Debian machine with qt as host package worked (it fails on master due to `ENABLE_DBUS=1`).

Tree-SHA512: d11e1c2bc8ce8a07f3f9b465b01c9b2c814afe75b085a8b88aab74fd3a922aa98180c447457dfc4174515513181c5f4edc521978a1d3d0a112106c98b5c73c0e
@hebasto hebasto deleted the 20200131-macos-qdbus branch June 13, 2020 12:32
sidhujag pushed a commit to syscoin-core/syscoin that referenced this pull request Nov 10, 2020
0e519fe build: Fix behavior when ALLOW_HOST_PACKAGES unset (Hennadii Stepanov)

Pull request description:

  On master (f05c1ac) during building with depends host packages are always considered by `pkg-config` regardless of `ALLOW_HOST_PACKAGES` environment variable. This causes issues like bitcoin#18042.

  This is an alternative to bitcoin#18042 and bitcoin#18045.

  On master:
  ```
  $ make HOST=x86_64-apple-darwin16 -C depends
  $ CONFIG_SITE=$PWD/depends/x86_64-apple-darwin16/share/config.site ./configure
  ...
  checking for QT_DBUS... yes
  ...
  checking whether to build GUI with support for D-Bus... yes
  ...
  ```

  ---

  With this PR:
  1) `ALLOW_HOST_PACKAGES` unset
  ```
  $ make HOST=x86_64-apple-darwin16 -C depends
  $ CONFIG_SITE=$PWD/depends/x86_64-apple-darwin16/share/config.site ./configure
  ...
  checking for QT_DBUS... no
  ...
  checking whether to build GUI with support for D-Bus... no
  ...
  ```
  2) `ALLOW_HOST_PACKAGES=1`
  ```
  $ make HOST=x86_64-apple-darwin16 ALLOW_HOST_PACKAGES=1 -C depends
  $ CONFIG_SITE=$PWD/depends/x86_64-apple-darwin16/share/config.site ./configure
  ...
  checking for QT_DBUS... yes
  ...
  checking whether to build GUI with support for D-Bus... yes
  ...
  ```

ACKs for top commit:
  jonasschnelli:
    Tested ACK 0e519fe - After this PR (and after a `make clean` & `make HOST=x86_64-apple-darwin16` in depends), the macOS depends build on a Debian machine with qt as host package worked (it fails on master due to `ENABLE_DBUS=1`).

Tree-SHA512: d11e1c2bc8ce8a07f3f9b465b01c9b2c814afe75b085a8b88aab74fd3a922aa98180c447457dfc4174515513181c5f4edc521978a1d3d0a112106c98b5c73c0e
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Feb 15, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants