-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
qt5-kde on MacOS 12.6.2 , SDK 13.1 #92
Comments
Thanks. Could you try to revert the out-commenting and putting the following below the `set SDK ...` line:
```
if {${SDK} >= 12} {
# on this (and newer?) OS versions we need to use `-sdk macosx`
# see #92
set SDK ""
}
```
The code around it is for figuring out the SDK to use on older OS versions, and also provides a hook for the user to override the SDK via the commandline.
|
hmmm.. doesn't seem to work. This is what I did:
and I get this in the configure step: |
well, it turns out it doesn't even get to that. I see:
How is 'sdkroot' set? |
On Tuesday January 03 2023 20:02:18 Hamid wrote:
hmmm.. doesn't seem to work. This is what I did:
if {[catch {exec xcrun --show-sdk-path -sdk macosx${SDK}} result]} {
...
and I get this in the configure step:
`Project ERROR: Could not resolve SDK --show-sdk-path for 'macosx12'`
It looks like the modification did not do what I intended, i.e. removing the `12` from `macosx12`.
What output do you get from adding the following line under the `set SDK ...` command?
`ui_msg "SDK='${SDK}'"`
|
I won't even see that messgage, because the if in line 719 passes with true (configure.sdkroot is not empty). So it won't even get into the else clause. |
I won't even see that messgage, because the if in line 719 passes with true (configure.sdkroot is not empty). So it won't even get into the else clause.
Doh, of course. But you could move the `set SDK ...` line with the subsequent `ui_msg` command above the if. That shouldn't make a difference.
BTW, can you confirm that `os.major` is indeed `12` on your system?
I'm not passing the sdkroot, and it is not an env variable on my system.
if I understand correctly, line 851 clears configure.sdkroot , correct? If that is correct, how is sdkroot set for the 'if' in line 719?
I'm guessing it's being set by "base", and it's being cleared *after* line 719 has been seen. This is probably to avoid it being used the usual way.
|
oh, sure. I've put this before the if:
and this is the message it prints out : I'm on MacOS Monterey, v12.6.2 |
On Wednesday January 04 2023 13:23:56 Hamid wrote:
oh, sure. I've put this before the if:
```
set SDK [exec xcrun -show-sdk-version]
ui_msg "SDK='${SDK}' , os.major='${os.major}'"
```
and this is the message it prints out :
`SDK='13.1' , os.major='21'`
My bad, I should have asked you to (also) add the `if` block intended to reset SDK before the printout, to see if that somehow fails.
If you want to know whether `configure.sdkroot` (or any other variable) is set by "base", the simplest way would be to create a file called `Portfile` (in a directory which doesn't already have one ;)), containing
```
PortSystem 1.0
name foo
version 1
ui_msg ${configure.sdkroot}
```
Then, executing `port info` inside that directory will print out the value of the variable.
|
you mean something like this?
If I add that, I get: Now, as mentioned above, sdkroot is set to
|
also, since we're talking about this port, I had to apply this patch again for it to build. Not sure if that should be included or not, just fyi. |
OK, I think I understand now. The error about a macosx12 SDK that you get is printed by the configure script, I should probably have realised that earlier. That probably also means you're on one of those OS versions which does not by default have the SDK corresponding to its own version ... and really that |
also, since we're talking about this port, I had to apply [this patch](#88 (comment)) again for it to build. Not sure if that should be included or not, just fyi.
Did you pull since xmas? I fixed that issue that day, from what I can see (or at least tried).
I'm about to push a tentative fix for the current issue; if not successful feel free to reopen!
|
I did. This is a new laptop, so I pulled the latest. qt-everywhere still failed to build, and I applied that patch to fix it. |
That's weird, so you pulled the ports tree AND did a `port clean qt5-kde` or at least a `port-redo-install-phase -patch qt5-kde`? The patch should have been applied automatically in that case!
|
I just saw that I had forgotten (stupidly) that |
fyi, just upgraded to 12.6.7 and rebuilt qt5-kde, the patch was automatically applied. I did run into another issue, where it tries to compile a VERSION file, and complains about 'This' not being a defined type! |
Not sure why, but I do run into that here and there with different ports.
What do you mean with "with different ports"? Not just the qt5-kde ports? And what do those files contain?
My `qt-everywhere-opensource-src-5.9.8/qtscript/src/3rdparty/javascriptcore/VERSION` contains non-code that should never be compiled:
```
This is a snapshot of JavaScriptCore from
git://gitorious.org/qtwebkit/qtwebkit.git
The commit imported was from the
javascriptcore-snapshot-27012011 branch/tag
and has the sha1 checksum
3ab0f621048fbeb480b687a28ed31d92d8506150
```
It'd be interesting to see the logfile around where that error occurs, next time you run into it!
|
Honestly, it might have been this port before, I just don't remember it. Would need to check my notes.
Mine as well! that's the thing. It throws an error saying 'This' is not defined in file qtscript/src/3rdparty/javascriptcore/version , where that file shouldn't even be included in the compilation list! as soon as I put that entire file in /* */, the error goes away and all is fine. |
'This' is not defined in file qtscript/src/3rdparty/javascriptcore/version
Wait, `version`, not `VERSION` - are you building on a case-insensitive filesystem? Not that I can find a file with the name in all-lowercase letters but who knows if the presence of such a file is taken into account in some way...
|
Judging by the fact that issue is resolved by commenting out the VERSION file, I would say no. It is the same file. |
Well, that's logical on a case-insensitive filesystem! `VERSION` and `version` would both point to the same file.
I've already run into aliasing problems like this with C++ headers in KDE where the devs thought it was clever to put them in include/Foo/ and the C headers in include/foo or some scheme like that.
Anyway, I don't see any evidence in the build system that it would use a file called VERSION (nor version) so I'd really need the relevant part of your `main.log` in order to triage this further.
|
SO, had to rebuild today, and got a chance to copy the main.log file. Here is the first error caused by the version file (line 538151):
I can send you the log file, if it would be useful. |
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.1.sdk/usr/include/c++/v1/cstddef:37:
:info:build /opt/local/var/macports/build/_opt_local_site-ports_aqua_qt5-kde/qt5-kde/work/qt-everywhere-opensource-src-5.9.8/qtscript/src/3rdparty/javascriptcore/version:1:1: error: unknown type
Hah! You did find a "bug": clearly qtscript predates the existence of the C++ `version` headerfile of which I had no idea. Or before that file got included indirectly via one of the headerfiles required for building `javascriptcore`.
In Qt 5.12 that `src/3rdparty/javascriptcore/version` file is called VERSION.TXT; I'll have to do a renaming. Can I ask you do that on your end and see if that doesn't lead to other issues?
Thanks!
|
Looking at this a bit more I see I *was* right about the fact that this was related to using a case-insensitive filesystem!
Officially that file is called `qt-everywhere-opensource-src-5.9.8/qtscript/src/3rdparty/javascriptcore/VERSION` so on a "normal" build system the file would never be included through `#include <version>` !
|
FWIW, this is the change that I'd commit if you can confirm it doesn't break anything:
```
diff --git a/aqua/qt5-kde/Portfile b/aqua/qt5-kde/Portfile
index 798267d5..c8cecdd3 100644
--- a/aqua/qt5-kde/Portfile
+++ b/aqua/qt5-kde/Portfile
@@ -1079,6 +1079,11 @@ if { (${subport} eq ${name}) || (${subport} eq "${name}-x11") } {
}
}
}
+ # rename a file that can alias a C++ headerfile on case-insensitive filesystems
+ # see #92
+ file delete -force ${worksrcpath}/qtscript/src/3rdparty/javascriptcore/VERSION.TXT
+ file rename ${worksrcpath}/qtscript/src/3rdparty/javascriptcore/VERSION \
+ ${worksrcpath}/qtscript/src/3rdparty/javascriptcore/VERSION.TXT
}
if {${os.platform} eq "darwin" && ${os.major} < 17} {
```
|
Just rebuilt the port with these changes, all went well. I think you're good to merge that. |
Thanks, will do (when I'm done with updating port:libcxx ...)
|
Aha, found the other one! same thing happens to the 'qgpgme' port. |
You mean |
yup, that's the one. |
… on case-insensitive filesystems Closes: #92 Committed from host : Bola
…sensitive filesystems Closes: #92 Committed from host : Portia.local
Been having a bit of an issue when trying to install qt5-kde on a fresh install of Monterey 12.6.2
Installed XCode 14.2 which comes with SDK 13.1
When I get to configure part of qt5-kde, it complains about not finding the SDK for 'macosx12'. I tracked that down to line 719 of the Portfile. 'xcrun --show-sdk-path -sdk macosx12' indeed fails on this system, so I tried 'xcrun --show-sdk-path -sdk macosx' and 'xcrun --show-sdk-path -sdk macosx13.1', they both work fine.
I commented everything out from line 719 to line 742 (simply didn't put enough time to understand why it breaks! sorry.) except for this part:
That did fix the configure part.
The text was updated successfully, but these errors were encountered: