PurpleI2P / i2pd-qt

i2pd with Qt based GUI
BSD 3-Clause "New" or "Revised" License
56 stars 10 forks source link

Is it possible to backport it to Qt4, since Qt5 does not build for PowerPC? #54

Closed barracuda156 closed 1 year ago

barracuda156 commented 2 years ago

I am interested in getting i2pd-qt onto PowerPC Macs. The immediate problem is that Qt5 fails for PowerPC. Can this be solved in this manner or another?

orignal commented 2 years ago

Are you able to run i2pd on a PPC since it's Big Endian?

barracuda156 commented 2 years ago

@orignal From the first attempt it did not build through completion, failing with error: invalid conversion from const char*’ to ‘char*’ [-fpermissive] at 75%: https://github.com/PurpleI2P/i2pd/issues/1726 But that was on 10.6.8 via Rosetta.

I will try it on 10.6 PPC and 10.5.8 and see if it builds there. It is in C++ so should build, since we got the latest gcc working on ppc and ppc64 (the latter on 10.5.8).

orignal commented 2 years ago

it would build. But I'm wondering how it works. It worked long time ago on my G3, but that G3 is dead now. And I couldn't find any Big Endian box for testing

barracuda156 commented 2 years ago

@orignal If you happen to have a pre-2013 Intel Mac, you may install 10.6.8 and build soft for PowerPC (ppc32) under Rosetta. Pre-Ivy Bridge Macs should support 10.6.8 out of the box, Ivy Bridge ones require a modified kernel (stock 10.6.8 has no support for Ivy Bridge), but it works. If that is your case, I can explain a procedure I used myself. At the moment I have 10.6.8 with Rosetta on MacMini Server 2012, and building and running ppc32 apps works. (On later OS you can still build for ppc/ppc64, but won’t be able to run.)

barracuda156 commented 2 years ago

it would build. But I'm wondering how it works. It worked long time ago on my G3, but that G3 is dead now. And I couldn't find any Big Endian box for testing

While it has been failing with Bus error on 10.6 PPC, today I have built it on 10.6.8 Rosetta for ppc arch. Looks like the binary is functional. I will have to rebuild it against 10A190 SDK and if that works, install it into 10.6 PPC.

P. S. Looks like the reason to insist on qt5 is not that compelling: https://stackoverflow.com/questions/23979798/include-qtwidgets-not-working-in-qt-4 qt4 might be feasible.

UPD. i2pd itself builds and runs on PPC now, and passes most of tests.

nonlin-lin-chaos-order-etc-etal commented 1 year ago

UI code contains quite a lot of Qt5 API not present in Qt4.

For one example (of the many):

./ui_mainwindow.h:360:29: error: ‘class QScrollArea’ has no member named ‘setSizeAdjustPolicy’; did you mean ‘setSizePolicy’?
  360 |         settingsScrollArea->setSizeAdjustPolicy(QAbstractScrollArea::AdjustIgnored);

So, wontfix, I think. If there will be any working PR with a backport, it would be another thing.

barracuda156 commented 1 year ago

So, wontfix, I think. If there will be any working PR with a backport, it would be another thing.

@r4sas If possible, could you please keep the issue opened though, maybe someone will drop in with an idea. Mark as low-priority or smth.

@nonlin-lin-chaos-order-etc-etal I never worked on anything Qt, so this is not something I can fix myself, not at the moment anyway.

r4sas commented 1 year ago

@barracuda156 no one touched Qt for years but @nonlin-lin-chaos-order-etc-etal. We seen sometimes such "idea people", but no one done anything about their ideas. So I think there is no reason keep it opened.

barracuda156 commented 1 year ago

@barracuda156 no one touched Qt for years but @nonlin-lin-chaos-order-etc-etal. We seen sometimes such "idea people", but no one done anything about their ideas. So I think there is no reason keep it opened.

Ok, fine. If I will have time to sort Qt out, I will open a PR. I would want to, not just for i2pd-qt but also for RStudio, but time is an issue, it is not a several-evenings-and-done thing.