Opened 4 years ago

Closed 3 years ago

Last modified 20 months ago

#60889 closed defect (fixed)

qt59-qtconnectivity 5.9.9: Fails to build (casting pointers to bool in Bluetooth code)

Reported by: DanielO (Daniel O'Connor) Owned by: MarcusCalhoun-Lopez (Marcus Calhoun-Lopez)
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc: chrstphrchvz (Christopher Chavez), dliessi (Davide Liessi)
Port: qt59-qtconnectivity

Description

Extract from the build log:

:info:build osx/osxbtledeviceinquiry.mm:142:9: error: conversion from 'ObjCScopedPointer<CBCentralManager>' to 'bool' is ambiguous
:info:build osx/osxbtperipheralmanager.mm:316:9: error: conversion from 'ObjCScopedPointer<CBPeripheralManager>' to 'bool' is ambiguous
:info:build osx/osxbtperipheralmanager.mm:381:5: error: conversion from 'ObjCScopedPointer<CBPeripheralManager>' to 'bool' is ambiguous
:info:build qbluetoothlocaldevice_osx.mm:152:12: error: conversion from 'const QBluetoothLocalDevicePrivate::HostController' (aka 'const ObjCScopedPointer<IOBluetoothHostController>') to 'bool' is ambiguous
:info:build qbluetoothdevicediscoveryagent_osx.mm:184:9: error: conversion from 'QBluetoothDeviceDiscoveryAgentPrivate::LEDeviceInquiry' (aka 'ObjCScopedPointer<OSXBTLEDeviceInquiry>') to 'bool' is ambiguous
:info:build qbluetoothdevicediscoveryagent_osx.mm:198:12: error: conversion from 'const QBluetoothDeviceDiscoveryAgentPrivate::HostController' (aka 'const ObjCScopedPointer<IOBluetoothHostController>') to 'bool' is ambiguous
:info:build qbluetoothdevicediscoveryagent_osx.mm:295:9: error: conversion from 'QBluetoothDeviceDiscoveryAgentPrivate::LEDeviceInquiry' (aka 'ObjCScopedPointer<OSXBTLEDeviceInquiry>') to 'bool' is ambiguous
:info:build qbluetoothserviceinfo_osx.mm:175:5: error: conversion from 'QBluetoothServiceInfoPrivate::SDPRecord' (aka 'ObjCScopedPointer<IOBluetoothSDPServiceRecord>') to 'bool' is ambiguous
:info:build qbluetoothtransferreply_osx.mm:139:9: error: conversion from 'QBluetoothTransferReplyOSXPrivate::OBEXSession' (aka 'ObjCScopedPointer<OSXBTOBEXSession>') to 'bool' is ambiguous
:info:build qbluetoothtransferreply_osx.mm:145:22: error: conversion from 'const QBluetoothTransferReplyOSXPrivate::OBEXSession' (aka 'const ObjCScopedPointer<OSXBTOBEXSession>') to 'bool' is ambiguous
:info:build qbluetoothtransferreply_osx.mm:221:5: error: conversion from 'QBluetoothTransferReplyOSXPrivate::OBEXSession' (aka 'ObjCScopedPointer<OSXBTOBEXSession>') to 'bool' is ambiguous
:info:build qbluetoothtransferreply_osx.mm:271:9: error: conversion from 'QBluetoothTransferReplyOSXPrivate::OBEXSession' (aka 'ObjCScopedPointer<OSXBTOBEXSession>') to 'bool' is ambiguous

Attachments (2)

main.log.gz (11.2 KB) - added by DanielO (Daniel O'Connor) 4 years ago.
qt59-qtconnectivity-fix.diff (14.4 KB) - added by DanielO (Daniel O'Connor) 4 years ago.
Patch to fix build

Download all attachments as: .zip

Change History (17)

Changed 4 years ago by DanielO (Daniel O'Connor)

Attachment: main.log.gz added

comment:1 Changed 4 years ago by DanielO (Daniel O'Connor)

Summary: qt59-qtconnectivity 5.9.9: Fails to build (casting points to bool in Bluetooth code)qt59-qtconnectivity 5.9.9: Fails to build (casting pointers to bool in Bluetooth code)

Changed 4 years ago by DanielO (Daniel O'Connor)

Patch to fix build

comment:2 Changed 4 years ago by DanielO (Daniel O'Connor)

I fixed it with the attached patch (which compiles but is not tested at runtime) but afterward I noticed these messages..

Warning: qt5 PortGroup: default Qt for this platform is qt5 but qt59 is installed Warning: Qt dependency is not the latest version but may be the latest supported on your OS

So I assume I am stuck on an old version which is missing build fixes.

comment:3 Changed 4 years ago by jmroot (Joshua Root)

Owner: set to MarcusCalhoun-Lopez
Status: newassigned

comment:4 Changed 4 years ago by chrstphrchvz (Christopher Chavez)

PR opened: https://github.com/macports/macports-ports/pull/8154

Main difference with reporter's patch is that upstream suggested using .data() instead of comparing to nullptr. Reporter's attached patch was also reversed.

This issue applies to earlier Qt5 versions as well; should this ticket be revised to include those versions' ports as well and be kept open until they are addressed?

comment:5 Changed 4 years ago by chrstphrchvz (Christopher Chavez)

Cc: chrstphrchvz added

comment:6 Changed 4 years ago by DanielO (Daniel O'Connor)

I think it makes more sense to use the pull request version - my C++ is very rudimentary.

comment:7 Changed 4 years ago by chrstphrchvz (Christopher Chavez)

In this case it's Objective-C++, which I'm no expert at either.

@DanielO, do you need Qt 5.9 specifically, or could you upgrade to a later version known to work on macOS 10.15?

comment:8 Changed 4 years ago by DanielO (Daniel O'Connor)

No, I don't need that particular version - it was just that was what was on my system when I tried to build this.

comment:9 Changed 3 years ago by dliessi (Davide Liessi)

The same kind of errors seems to affect Qt 5.6 on Mac OS X 10.7, see the buildbot log. Maybe the same fix can be applied there, too.

comment:10 Changed 3 years ago by dliessi (Davide Liessi)

Cc: dliessi added

comment:11 Changed 3 years ago by chrstphrchvz (Christopher Chavez)

Resolution: fixed
Status: assignedclosed

In 499d42f1e253c94af3dc2c0bd129da295d89a9c9/macports-ports (master):

qt59-qtconnectivity: fix for recent Xcode on 10.15

Fixes: #60889

comment:12 Changed 2 years ago by ken-cunningham-webuse

In 679c8264fc3c01cf931b963d55ea3903b8d97cf5/macports-ports (master):

qt56-qtconnectivity: fix for recent compilers

minor modification of patch used in qt59 and upstream
see: #60889

comment:13 Changed 20 months ago by chrstphrchvz (Christopher Chavez)

In 1f4a153bf8c81224be5dc6edfc757baaab455710/macports-ports (master):

qt(55|57|58)-qtconnectivity: fix for recent compilers

See: #60889

[skip ci]

comment:14 Changed 20 months ago by chrstphrchvz (Christopher Chavez)

In 6e7beba699ef3951ef06aac90a24337120caca8e/macports-ports (master):

qt58-qtconnectivity: fix patch

See: #60889
Fixes: #65822

[skip ci]

comment:15 Changed 20 months ago by chrstphrchvz (Christopher Chavez)

In 0b8fe748650a19e0a2edd6f6da0fb2911d3b1fb5/macports-ports (master):

qt511-qtconnectivity: fix for recent compilers

See: #60889

[skip ci]

Note: See TracTickets for help on using tickets.