Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#62358 closed defect (worksforme)

qt5 version 5.15.2 missing TBD files from two frameworks

Reported by: jtressle Owned by: MarcusCalhoun-Lopez (Marcus Calhoun-Lopez)
Priority: Normal Milestone:
Component: ports Version: 2.6.4
Keywords: Cc:
Port: qt5

Description

When trying to import Qt5 frameworks into Xcode, I noticed frameworks "QtRepParser.framework" and "QtUiPlugin.framework" had missing TBD files. Xcode is unable to recognize these two as frameworks because of this.

QT5 version was 5.15.2. I'm running MacOS 10.15.7 (Catalina).

Thanks

Attachments (3)

corefoundation.png (325.3 KB) - added by jtressle 4 years ago.
CoreFoundation Framework contents
qtuiplugin.png (130.6 KB) - added by jtressle 4 years ago.
QtUIPlugin Frameworks
qtsql (157.6 KB) - added by jtressle 4 years ago.
QtSql frameworks

Download all attachments as: .zip

Change History (10)

comment:1 Changed 4 years ago by ryandesign (Ryan Carsten Schmidt)

Keywords: QT5 removed
Milestone: MacPorts 2.7.0
Owner: set to MarcusCalhoun-Lopez
Port: qt5 added; QT5 removed
Status: newassigned

comment:2 Changed 4 years ago by kencu (Ken)

I wasn't aware that any of the qt5 frameworks came with tbd files, but I never looked too closely. Looking in /opt/local/libexec/qt5/lib I don't see any tbd files there.

You know you can make your own with the tapi tool:

/Library/Developer/CommandLineTools/usr/bin/tapi

If this is something useful to have, we can probably figure out some method to use to generate these during the destroot phase.... haven't done that before, but looks easy.

comment:3 Changed 4 years ago by jtressle

I'll check out the tapi tool. It might be a lot easier than building QT5 from scratch.

Regarding the frameworks, all the other QT5 frameworks in the /opt/local/libexec/qt5/lib directory have the .TBD files other than the two mentioned. I added screenshots of the contents of the frameworks on my machine.

Last edited 4 years ago by jtressle (previous) (diff)

Changed 4 years ago by jtressle

Attachment: corefoundation.png added

CoreFoundation Framework contents

Changed 4 years ago by jtressle

Attachment: qtuiplugin.png added

QtUIPlugin Frameworks

Changed 4 years ago by jtressle

Attachment: qtsql added

QtSql frameworks

comment:4 in reply to:  2 Changed 4 years ago by jtressle

I tried doing a tapi stubify, but there's no QtUiPlugin dynamic library.

What steps would I need to do to fix this? Thanks

Replying to kencu:

I wasn't aware that any of the qt5 frameworks came with tbd files, but I never looked too closely. Looking in /opt/local/libexec/qt5/lib I don't see any tbd files there.

You know you can make your own with the tapi tool:

/Library/Developer/CommandLineTools/usr/bin/tapi

If this is something useful to have, we can probably figure out some method to use to generate these during the destroot phase.... haven't done that before, but looks easy.

Last edited 4 years ago by jtressle (previous) (diff)

comment:5 Changed 4 years ago by jtressle

You can close this. Looks like the QT version downloaded from their website has the exact same structure.

comment:6 Changed 4 years ago by mf2k (Frank Schima)

Resolution: worksforme
Status: assignedclosed

comment:7 Changed 4 years ago by kencu (Ken)

You do this:

find the "dylib" which in a framework does not have the extension "dylib" on it.

% file /opt/local/libexec/qt5/lib/QtSql.framework/QtSql
/opt/local/libexec/qt5/lib/QtSql.framework/QtSql: Mach-O 64-bit dynamically linked shared library x86_64

% otool -L /opt/local/libexec/qt5/lib/QtSql.framework/QtSql
/opt/local/libexec/qt5/lib/QtSql.framework/QtSql:
	/opt/local/libexec/qt5/lib/QtSql.framework/Versions/5/QtSql (compatibility version 5.15.0, current version 5.15.2)
	/opt/local/libexec/qt5/lib/QtCore.framework/Versions/5/QtCore (compatibility version 5.15.0, current version 5.15.2)
	/System/Library/Frameworks/DiskArbitration.framework/Versions/A/DiskArbitration (compatibility version 1.0.0, current version 1.0.0)
	/System/Library/Frameworks/IOKit.framework/Versions/A/IOKit (compatibility version 1.0.0, current version 275.0.0)
	/usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 904.4.0)
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1292.0.0)

then once you have the dynamic library, you use tapi to stubify it like this:

sudo tapi stubify /opt/local/libexec/qt5/lib/QtSql.framework/QtSql

and it writes the *.tbd file for you

% ls -la /opt/local/libexec/qt5/lib/QtSql.framework/Versions/5/QtSql.tbd
-rw-r--r--  1 root  admin  24366 25 Feb 20:57 /opt/local/libexec/qt5/lib/QtSql.framework/Versions/5/QtSql.tbd

and so:

% cat /opt/local/libexec/qt5/lib/QtSql.framework/Versions/5/QtSql.tbd
--- !tapi-tbd-v3
archs:           [ x86_64 ]
uuids:           [ 'x86_64: 77798691-0931-3DA6-8987-6B8C1F1B7781' ]
platform:        macosx
install-name:    /opt/local/libexec/qt5/lib/QtSql.framework/Versions/5/QtSql
current-version: 5.15.2
compatibility-version: 5.15
objc-constraint: none
exports:         
  - archs:           [ x86_64 ]
    symbols:         [ __ZN10QSqlDriver11cancelQueryEv, __ZN10QSqlDriver11qt_metacallEN11QMetaObject4CallEiPPv, 
                       __ZN10QSqlDriver11qt_metacastEPKc, __ZN10QSqlDriver12notificationERK7QString, 
                       __ZN10QSqlDriver12notificationERK7QStringNS_18NotificationSourceERK8QVariant, 
                       __ZN10QSqlDriver12setLastErrorERK9QSqlError, __ZN10QSqlDriver12setOpenErrorEb, 
                       __ZN10QSqlDriver16beginTransactionEv, __ZN10QSqlDriver16staticMetaObjectE, 
                       __ZN10QSqlDriver17commitTransactionEv, __ZN10QSqlDriver19rollbackTransaction
...

I can't verify it works as it should, but it works to generate the TBD files.

Please report back if this is useful in some way, etc.

Last edited 4 years ago by kencu (Ken) (previous) (diff)
Note: See TracTickets for help on using tickets.