![]() |
#31 |
Evangelist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 440
Karma: 77256
Join Date: Sep 2011
Device: none
|
Trying another part of the build, it seems that qtwebengine is not included. Maybe this note in the qt5 bug report is relevant:
Code:
In src/3rdparty/chromium/third_party/skia/src/opts/SkRasterPipeline_opts.h you change #if defined(JUMPER_IS_NEON) && defined(SK_CPU_ARM64) to not be true (because it does not compile otherwise) |
![]() |
![]() |
![]() |
#32 |
Evangelist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 440
Karma: 77256
Join Date: Sep 2011
Device: none
|
Starting over with Qt5 and verifying that all patches are correctly applied, I encountered this error on Monterey, currently no fix. At least I'm not sure what to do so can wait until someone figures it out.
https://bugreports.qt.io/browse/QTBUG-98826 Qt patches applied are the ones for qtwebengine mentioned above, the relevant ones in the Sigil repo, and these from that repo on building 5.15.x as Universal: https://github.com/crystalidea/qt-build-tools As for the error in the previous post, I found this patch: https://github.com/andfoy/qt-recipe/...t16-conv.patch Last edited by democrite; 12-11-2021 at 05:41 AM. |
![]() |
![]() |
Advert | |
|
![]() |
#33 |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 7,990
Karma: 5449552
Join Date: Nov 2009
Device: many
|
Okay, stat64 has been deprecated on macOS for a long time and finally went away in Monterey. Any call to stat64 should be replaced with a call to stat for newer macOS.
So since that is part of a 3rdparty library I would search Homebrew for a assimp build recipe patch for arm64 and then apply it to the version of assimp inside the qt3d module. |
![]() |
![]() |
![]() |
#34 |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 7,990
Karma: 5449552
Join Date: Nov 2009
Device: many
|
Removed as only wild ass guess
|
![]() |
![]() |
![]() |
#35 |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 7,990
Karma: 5449552
Join Date: Nov 2009
Device: many
|
Based on that bug report error message in miniz.h the wrong branch is being taken for arm64 as it is defining it as follows:
Code:
#elif defined(__GNUC__) && _LARGEFILE64_SOURCE ... #define MZ_FILE_STAT_STRUCT stat64 #define MZ_FILE_STAT stat64 ... Code:
#else ... #define MZ_FILE_STAT_STRUCT stat #define MZ_FILE_STAT stat ... Code:
#define stat64 stat But all of this is a guess based on that bug report error message. You also want to double check that <sys/stat.h> is properly included on arm64 as well. Last edited by KevinH; 12-11-2021 at 01:06 PM. |
![]() |
![]() |
Advert | |
|
![]() |
#36 | |
Evangelist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 440
Karma: 77256
Join Date: Sep 2011
Device: none
|
Thank you Kevin,
I'll look at such in a bit. As an alternative, from what I can tell qt3d isn't used. Couldn't that be excluded with 'configure ... -skip qt3d'? Trying that, I ran into an issue with building qtwebengine on Monterey: Quote:
Last edited by democrite; 12-11-2021 at 02:14 PM. Reason: ed |
|
![]() |
![]() |
![]() |
#37 |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 7,990
Karma: 5449552
Join Date: Nov 2009
Device: many
|
Please use the official QtWebEngine 5.15.7 to replace that same module in the Qt 5.15.2 source tree completely (ie replace the entire QtWebEngine module in your source tree with the newer one before starting). It has all official Qt fixes in it and should make a good base for future patches.
It also has the latest chromium changes. Yes Sigil does not need Qt3D so skipping it should not be an issue. Last edited by KevinH; 12-11-2021 at 04:52 PM. |
![]() |
![]() |
![]() |
#38 |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 7,990
Karma: 5449552
Join Date: Nov 2009
Device: many
|
It appears that Monterey has made even more changes than Big Sir making it a double problem for getting Qt 5.15.x to work for arm64.
Last edited by KevinH; 12-11-2021 at 05:05 PM. |
![]() |
![]() |
![]() |
#39 |
Evangelist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 440
Karma: 77256
Join Date: Sep 2011
Device: none
|
Will do. Indeed the hurdles are piling up. As I still have my old machine, it occurred to me to just try a build on that. It's supposed to be possible, appending this to configure:
Code:
QMAKE_APPLE_DEVICE_ARCHS=arm64 I'll continue with just trying the qt-everywhere-src-5.15.2 download and see how that builds on Big Sur. If that goes ok, then maybe the rest should I hope be without too much more effort. Last edited by democrite; 12-11-2021 at 05:58 PM. Reason: ed |
![]() |
![]() |
![]() |
#40 |
Evangelist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 440
Karma: 77256
Join Date: Sep 2011
Device: none
|
Becoming unpleasant as you can understand.
![]() I forgot what error. Something when trying to compile arm64 on Intel. Maybe some unneeded patch for Big Sur. Forgot. Hard to keep track of everything. MacPorts got QtWebEngine working on Monterey so I'm going with their Qt5. For my purposes, maybe ok. Patches got merged earlier today: https://github.com/macports/macports-ports/pull/12595 So, starting again with Python 3.9. Lost track. Same Unable to generate C++ code with PyQt5. Last time I installed that and PyQtWebEngine with sip, yet without completing Sigil build, at least for me, I'm unsure how that'd turn out. If it's preferable to build PyQt5 + PyQtWebEngine oneself, unable to figure out what sip version to use. MacPorts uses 6.(?), likely newest. Maybe 5.5.0 would work. For either, there's no configure.py, and from a bit of looking (heading out at the moment, but wanted to update), I'm not sure how to build newer sip versions. Docs I could find aren't helpful. Overall, if it is possible to build Apple Silicon on Intel, or for other reasons, would someday you Kevin and DiapDealer consider maintaining forks of Qt5 with all the patches? I have no idea how many others contribute to Sigil. Perhaps it is only me here that is trying first (?) to build for AS, plus Monterey, that there are these unknowns. Maybe whenever you get to building for Apple Silicon - I hope soon if possible (!) -, no one else would need such. Maybe there's no other need for Qt 5.15.2 except such, save when you decide to migrate. Perhaps in preparation, you may try it, and document the needed steps, yet maybe there's no need at the moment, and such is much to ask. Who knows. Just an thought. ![]() For the moment, just curious if PyQt5 + PyQtWebEngine are ok thru pip, or if preferable to compile, a bit of direction to get sip 5+ compiled would be helpful. Last edited by democrite; 12-12-2021 at 03:04 AM. Reason: typo |
![]() |
![]() |
![]() |
#41 |
Evangelist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 440
Karma: 77256
Join Date: Sep 2011
Device: none
|
no luck with PyQt5 via pip. An error is reported here. If I was more familiar with Python, perhaps I'd know. I thought I had it working before with sip 5.5.0, or maybe it was some older 4.x. Didn't note that down so forgot.
https://bugs.kde.org/show_bug.cgi?id=444857 Not giving up but it has been sometime with various detours and setbacks. For now, I'm going to try all dependencies via MacPorts. Despite any lack of patches, maybe it'll work well enough. Otherwise, I might wait a bit before trying again. |
![]() |
![]() |
![]() |
#42 |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 7,990
Karma: 5449552
Join Date: Nov 2009
Device: many
|
No worries. We can host our own Qt 5.15.X tree and collect and commit all of the patches you have found so far. I will update my laptop to Big Sir (I always try to stay one release back any way) and try cross-compiling Qt to arm64.
Alternatively, We have started to modify Sigil master to support both Qt6 and Qt5 from a single codebase. I have opened a tracking bug for that. That way if worst comes to worst, we can try with Qt 6.3.0. So hang on a couple weeks as I can only sit for an hour or so at a time. |
![]() |
![]() |
![]() |
#43 | |||
Evangelist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 440
Karma: 77256
Join Date: Sep 2011
Device: none
|
Very happy to hear that. Thank you Kevin.
Concerning the struggles I've had, perhaps I just needed to step back and think about each problem and where to find more info, rather than sitting there and trying different things without knowing if such would work. Eventually I found a mention of the latest PyQt5 breaking compatibility with sip 4.x. Not fixed yet though it might be in the dev branch, thus it was a bit difficult to discover. Using PyQt5 5.15.5 works, and no issues with PyQtWebEngine 5.15.4. https://groups.google.com/g/linux.de.../c/FdgUVpZ4SWE It was a bit frustrating being unable to find different builds of sip, PyQt5, and PyQtWebEngine. I think various distros might keep archives, such as this I found from MacPorts: https://distfiles.macports.org/py-pyqt5/ Thus, maybe the only issue, at least that I can recall at the moment, is QtWebEngine on Monterey. If the MacPorts edition will work, I'm not sure yet. Perhaps I may try to grab their patches and manually apply them if possible, depending on how I feel in the coming weeks in trying to complete the build. So, thinking that maybe all prerequisites are satisified, I tried the Sigil build. Perhaps such is from an error on my part with building Python 3.9.9, yet I went over it again, yet possibly I still missed something. make -d returns the following error: Quote:
Quote:
Quote:
Getting close. Last edited by democrite; 12-13-2021 at 04:28 AM. Reason: add error info |
|||
![]() |
![]() |
![]() |
#44 |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 7,990
Karma: 5449552
Join Date: Nov 2009
Device: many
|
To use Python 3.9 you will have to modify the sigil_constants.cpp file that looks like this now, changing the 3.8 to 3.9 in the right places.
Code:
#if __APPLE__ const QString PATH_LIST_DELIM = ":"; const QString PYTHON_MAIN_PREFIX = "/Frameworks/Python.framework/Versions/3.8"; const QString PYTHON_MAIN_BIN_PATH = PYTHON_MAIN_PREFIX + "/bin/python3"; const QString PYTHON_LIB_PATH = "/lib/python3.8"; const QString PYTHON_SITE_PACKAGES = PYTHON_MAIN_PREFIX + PYTHON_LIB_PATH + "/site-packages"; const QStringList PYTHON_SYS_PATHS = QStringList () << "/lib-dynload" << "/site-packages"; #endif |
![]() |
![]() |
![]() |
#45 |
Evangelist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 440
Karma: 77256
Join Date: Sep 2011
Device: none
|
Apologies for something I should have been able to figure out.
Good news. Sigil is built. Tested a few things including converting to EPUB 3. So far so good. Earlier, Sigil would crash on start without any log. From a shell, running Sigil.app/Contents/MacOS/Sigil listed some message about not finding the python encoding library. Maybe I missed something still despite going over it several times. Also found a few other refs to Python 3.8 in make files. Within Python.framework, there was no Versions/3.9, only Versions/Python.framework and Versions/Current. Adding a symbolic link fixed that. I ended grabbing the MacPorts QtWebEngine 5.15.7 patches for Monterey mentioned earlier: https://github.com/macports/macports-ports/pull/12595 That compiled fine. QtWebEngine is now at 5.15.8 though I didn't test it. One additional patch was to remove the hardcoded x86_64 build arch from the qmake conf files. There's two listed from MacPorts, for pre- or post-install: https://github.com/macports/macports...aqua/qt5/files Trying to recall prerequisites that didn't compile for arm64, I think it was libpng rather than the xz mentioned earlier. Installed thru homebrew. Besides that, I think all patches are listed above. Quite a bit of trial and error, particularly since I was unfamiliar with the various tools and haven't compiled anything myself in sometime. Yet now all is good and I can return to reading, making, and editing ebooks. Many thanks Kevin and DiapDealer for the assistance. Last edited by democrite; 12-14-2021 at 01:41 AM. Reason: notes |
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Is Calibre compatible with Apple Silicon M1 Macs (using rosetta 2)? | kirk8677 | Calibre | 29 | 01-22-2021 07:39 AM |
Error on running Sigil via Qt-Creator | nirosan | Sigil | 2 | 10-28-2017 08:51 AM |
Trouble running Sigil 0.9.7 | John2011 | Sigil | 11 | 12-29-2016 07:28 AM |
UnicodeWarning when running Sigil plugin | turbulent | Plugins | 9 | 12-17-2014 07:11 AM |
Reporting an error when running Sigil 0.8.2 | turbulent | Sigil | 2 | 12-13-2014 10:23 PM |