Skip to content

Conversation

@giordano
Copy link
Member

According to https://doc.qt.io/qt-5/macos.html Qt5 should require 10.13, not 10.14, I don't know why this was built with 10.14, let's give it a try? CC @barche

@giordano giordano requested a review from barche September 28, 2022 23:01
@barche
Copy link
Contributor

barche commented Sep 29, 2022

It fails with

Undefined symbols for architecture x86_64:
[23:12:18]   "___isPlatformVersionAtLeast", referenced from:
[23:12:18]       __ZNK16QMacStylePrivate12cocoaControlENS_12CocoaControlE in qmacstyle_mac.o

This is because there is a dynamic SDK check in the cocoa code, which doesn't work when cross-compiling unless you compile with the newest SDK it wants. So Qt compiled on Mac works with 10.13, cross compiled it needs 10.14 so the SDK check passes statically (as far as I understand).

@giordano
Copy link
Member Author

Uhm,if ___isPlatformVersionAtLeast is needed only for compilation, I wonder if we can build against the 10.14 SDK, but set QMAKE_MACOSX_DEPLOYMENT_TARGET=10.13

@giordano giordano marked this pull request as draft September 29, 2022 10:00
@giordano
Copy link
Member Author

That doesn't work either, still choking on ___isPlatformVersionAtLeast undefined symbol. Sigh

@giordano giordano closed this Sep 29, 2022
@giordano giordano deleted the mg/qt5base branch September 29, 2022 10:33
@giordano giordano restored the mg/qt5base branch November 7, 2022 23:11

# Dependencies that must be installed before this package can be built
dependencies = [
BuildDependency("Xorg_libX11_jll"),
Copy link
Member Author

Choose a reason for hiding this comment

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

Reminder to self to filter the dependencies by platform

@giordano giordano force-pushed the mg/qt5base branch 2 times, most recently from 06137bc to c1f11ee Compare November 7, 2022 23:42
@giordano
Copy link
Member Author

giordano commented Nov 8, 2022

@barche do you happen to know what's the spell to pass linker flags? LDFLAGS and LIBS environment variables are clearly not working, they aren't used at all.

@barche
Copy link
Contributor

barche commented Nov 8, 2022

The current iteration adds

-L${libdir}/darwin \
QMAKE_LFLAGS+=-lclang_rt.osx \

to the configure arguments. I think this goes through, but now the M1 build fails with:

ERROR: Cannot compile a minimal program. The toolchain or QMakeSpec is broken.

We'd have to check the config.log to find out why, I'll need to do a local build for that I think.

@giordano
Copy link
Member Author

giordano commented Nov 8, 2022

but now the M1 build fails with:

Doesn't surprise me since libclang_rt.osx isn't available there. I tried to add those flags only for x86_64

@barche barche marked this pull request as ready for review November 8, 2022 16:59
Copy link
Contributor

@barche barche left a comment

Choose a reason for hiding this comment

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

Looks OK!

@giordano
Copy link
Member Author

giordano commented Nov 8, 2022

Awesome, thank you! 🚀

@giordano giordano enabled auto-merge (squash) November 8, 2022 21:57
@giordano giordano merged commit 97069d4 into JuliaPackaging:master Nov 8, 2022
@giordano giordano deleted the mg/qt5base branch November 8, 2022 22:57
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

Successfully merging this pull request may close these issues.

2 participants