-
-
Notifications
You must be signed in to change notification settings - Fork 605
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
[BUG] Build broken on Catalina and below: linking errors, unconditional usage of non-existing headers #682
Comments
I had the same error when I tested the CI file for the cmake build. I don't remember exactly what thw issue was, but from the top of my head I would say your linker doesn't know where your standard C++ library is. When you install |
@imwints If that was the case, the build would fail on all macOS versions, but it does not: https://ports.macports.org/port/btop/details (see port health) |
Mmh yeah,I didn't look close enough. I reproduces a similar report with another |
And for the first issue, I'd be interested if the error is reproducible with cmake aswell, because in comparison to the make build cmake adds some macOS sdk paths by default Edit: |
@imwints MacOS from 10.7 onwards has it own native Normally the compiler will pick correct flags to link with its standard runtime library. If it was not the case, everything would direly fail to link, and we would need to pass flags manually every time. (It is not impossible however that specifically here something breaks linking, or triggers some obscure bug in clang etc.) |
You can have a look here for LLVM I still would try to be verbose about some options, probably
and have a look if properly linked with |
@imwints The link you refer is a build on macOS-12 (for some reason using mismatching SDK), unless I miss something. We have no failures on macOS-12, so it is not expected to fail. Could you confirm the build works on 10.15 on your end with any compiler? |
That is good to know, I have no experience with macOS at all, I just played around in CI with it and got it working somehow. (I also feel a bit unqualified answering here). I don't know how I would update or change the SDK. From the github docs I read that there are only runners for macOS 11 through 13 and I don't have access to Apple hardware... :( |
@imwints My point was that we cannot infer from success of builds on macOS 11+ (which are successful both on your CI and our buildbots) that anything prior to macOS 11 shall automatically work, and if it does not, there is something wrong with Macports setup (something could be wrong, as always, but AFAICT it is unlikely here). |
@barracuda156 Not sure if @joske got it to build on anything lower back then? Might be that changes made since then to for example sensor detection for M1 macs might have hardened the dependencies even more. I have however never documented a minimum requierd MacOS version, since I haven't invested enough time in exploring if it's possible to get it compiling on Mojave and below. |
I don't remember what version of macOS I was using at the time. I don't have access to anything below Monterrey ATM. I do have an old El Capitan macbook, but it just can't compile btop (IIRC could not install dependencies via brew, as El Capitan is just too old and unsupported). |
So immediate issues are the following:
Missing 32-bit defines here:
And some apparently missing headers here:
Does it have some more generic Unix fallback? That could potentially work on older macOS. |
|
@barracuda156 But I'm guessing there will be a wall at some point because of compiler compatibility (needs C++20 support). |
We have C++20 up to macOS 10.5 via GCC, and so far it is supported by upstream (PowerPC and Intel, 32- and 64-bit). I use gcc13 on my 10.6 system. |
Well, having support for all but the first 5 versions should probably be good enough 😉 Ping me if you get stuck on anything and I'll try to help when I've got time. Good luck 👍 |
On a quick look (short on time tonight), it will not suffice just to fix compilation, since CPU detection has to be re-implemented for PowerPC. Not sure to what extent related info can be pulled from the system (some functions are restricted to the kernel), but given that apps like MenuMeters somehow work, rather detailed info can be collected. For Intel is should be far easier; one thing which may be causing linking errors is that apparently |
I tried building with |
For the El Capitan issue, Edit: see #690 |
Fails to build on Catalina and below: https://trac.macports.org/ticket/68871
On El Capitan down this fails (at least):
On Catalina through Sierra linking fails:
I will test on PowerPC tomorrow, but expect the same headers errors at the very least.
The text was updated successfully, but these errors were encountered: