Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old 12-01-2021, 11:57 AM   #16
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 7,651
Karma: 5433388
Join Date: Nov 2009
Device: many
Also FWIW ... I am not a big fan of universal builds. It just bloats code and downloads with no real benefit. So when I finally do get an M1 machine, I will be building and releasing separate "x86_64" and "arm64" versions of Sigil and not "universal builds".

I also saw that these key arm64 on macOS patches have also been been committed to the last Qt 5.12.12 release. So that tree should be buildable on macOS arm64 as well and it is fully available under the opensource license.
KevinH is offline   Reply With Quote
Old 12-01-2021, 05:26 PM   #17
democrite
Evangelist
democrite will give the Devil his due.democrite will give the Devil his due.democrite will give the Devil his due.democrite will give the Devil his due.democrite will give the Devil his due.democrite will give the Devil his due.democrite will give the Devil his due.democrite will give the Devil his due.democrite will give the Devil his due.democrite will give the Devil his due.democrite will give the Devil his due.
 
Posts: 425
Karma: 77256
Join Date: Sep 2011
Device: none
Many thanks Kevin.

I had gotten as far as grabbing the 5.15.X release from Qt and QtWebEngine 5.15.7. Looking at the QtWebEngine patch instructions mentioned – not understanding the code but searching around for that code block –, it seemed that QtWebEngine may have already been patched.

One shipment delay, awaiting customs, went thru earlier so I may get it soon or tomorrow. I've grab the code and will give it a try soon.

I'm also not necessarily always a fan of universal builds. I can understand its use for certain releases such as on App Store or elsewhere for ease for the average user, though I kind of prefer like you minimal download size and used space.

Hope to report back in a couple of days. Thank you.
democrite is offline   Reply With Quote
Advert
Old 12-06-2021, 11:09 PM   #18
democrite
Evangelist
democrite will give the Devil his due.democrite will give the Devil his due.democrite will give the Devil his due.democrite will give the Devil his due.democrite will give the Devil his due.democrite will give the Devil his due.democrite will give the Devil his due.democrite will give the Devil his due.democrite will give the Devil his due.democrite will give the Devil his due.democrite will give the Devil his due.
 
Posts: 425
Karma: 77256
Join Date: Sep 2011
Device: none
Ok. I've made some progress. Qt5 plus qtwebengine are built. There was some error when trying to compile the KDE patches and I didn't look at it at the time. Trying the canonical edition, same error, ended up being an issue with compiling on Monterey:

https://code.qt.io/cgit/qt/qtbase.gi...b1b3680e34a547

Qt Patches: some as you know are already in 5.15.x, others or at least one the changes were a bit different, one seemed to also be already patched. I'll try to collect info or retry once I get closer to complete or it's done.

Trying some of the prerequisites, from what I recall xz didn't compile, though I haven't looked at it. I think most of them were fine. Some I had installed with Homebrew though may go back to redo later.

Trying to compile Python, is it possible, at least for this compile, to use a non-embedded Python? Maybe that'll be a secondary option. For Apple Silicon, as you can guess, the target would be 11.0 which I believe is supported with Python 3.8.12+ (patches were backported). That's compiles fine as well as sip 4.19.25 (unsure if correct version).

Stuck on compiling PyQt5. A quick look, it's hard to determine from the change log which version I should use. Maybe other libraries have some mis-match. Still investigating.
democrite is offline   Reply With Quote
Old 12-07-2021, 07:40 AM   #19
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 7,651
Karma: 5433388
Join Date: Nov 2009
Device: many
Great work! I have recently built Python 3.9.8 for x86_64 and I have the instructions to do that. But you will need xz, openssl1.1.1l and a few other pieces built. Homebrew should work for those.

I will dig those new build instructions up tonight and pass them along.
KevinH is offline   Reply With Quote
Old 12-07-2021, 10:25 AM   #20
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 27,552
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
If using Qt5.15.x, I'd probably go with the latest PyQt5 (5.15.6 right now) and the latest sip 6.5.0. Why diddle, right?

That might require editing Sigil's various python bundling scripts on macOS/Windows, but that shouldn't be too, too involved.
DiapDealer is offline   Reply With Quote
Advert
Old 12-08-2021, 01:18 AM   #21
democrite
Evangelist
democrite will give the Devil his due.democrite will give the Devil his due.democrite will give the Devil his due.democrite will give the Devil his due.democrite will give the Devil his due.democrite will give the Devil his due.democrite will give the Devil his due.democrite will give the Devil his due.democrite will give the Devil his due.democrite will give the Devil his due.democrite will give the Devil his due.
 
Posts: 425
Karma: 77256
Join Date: Sep 2011
Device: none
Thank you Kevin and DiapDealer.

From a quick look, the PyQt5 compile error may be from the used sip version.

As for Python 3.9, perhaps that indicates you are preparing to soon migrate. Such could be better if possible. I don’t use Python too much these days so I don’t keep up. Seems 3.9 is the recommended version. Plus there is this fix for Monterey in 3.9.8:

Quote:
bpo-44828: Avoid tkinter file dialog failure on macOS 12 Monterey when using the Tk 8.6.11 provided by python.org macOS installers. Patch by Marc Culler of the Tk project.
And from 3.9.7 which I didn’t check if backported:

Quote:
bpo-44689: ctypes.util.find_library() now works correctly on macOS 11 Big Sur even if Python is built on an older version of macOS. Previously, when built on older macOS systems, find_library was not able to find macOS system libraries when running on Big Sur due to changes in how system libraries are stored
If other issues, I do not know. Perhaps one or both of you are aware of such and or other issues thus were already planning on it.
democrite is offline   Reply With Quote
Old 12-09-2021, 10:33 AM   #22
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 7,651
Karma: 5433388
Join Date: Nov 2009
Device: many
Attached are my joint build instructions for Tk and Python-3.9.8 to make a fully relocatable python for Sigil. You should be able to use HomeBrew to grab all of the dependency libraries and can ignore the 10.12 build target and the python-3.9.8 build patch since you will be building a release for either Monterray or Big Sir as your target. These will need to be adapted for arm64 but these should help (he said hopefully).

You may also want to use Homebrew to get Tk 8.6.12 (which should have the required Monterray patches already in place) and then skip building an internal one (more like the Python-3.8 instructions) and rely on an external one installed by Homebrew.
Attached Files
File Type: zip Python_398_build_instructions.zip (4.9 KB, 116 views)

Last edited by KevinH; 12-09-2021 at 12:44 PM.
KevinH is offline   Reply With Quote
Old 12-09-2021, 12:52 PM   #23
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 7,651
Karma: 5433388
Join Date: Nov 2009
Device: many
Actually, I would definitely skip the whole Tk part of these instructions and use Homebrew to install Tk. The problem is that current master does not have the changes needed to get Tk fully working since for Sigil 1.8 and 1.9 I built an external TclTk Framework installer to enable backwards compatibility with all Sigil builds.

Ended up breaking my ankle on Tuesday when I fell due to unexpected ice on stairs. Need 4-6 weeks in an aircast. Also fell on my butt so hard that my tailbone is bruised too, so I can not sit for any length of time either. So standing and sitting are out until I heal enough to do some sitting and can work on my laptop. Thank god for my old ipad!

If you get build failures, simply post the build log error message here and I can try to help.

Last edited by KevinH; 12-09-2021 at 12:55 PM.
KevinH is offline   Reply With Quote
Old 12-09-2021, 03:16 PM   #24
democrite
Evangelist
democrite will give the Devil his due.democrite will give the Devil his due.democrite will give the Devil his due.democrite will give the Devil his due.democrite will give the Devil his due.democrite will give the Devil his due.democrite will give the Devil his due.democrite will give the Devil his due.democrite will give the Devil his due.democrite will give the Devil his due.democrite will give the Devil his due.
 
Posts: 425
Karma: 77256
Join Date: Sep 2011
Device: none
Thank you Kevin.

I had started trying to build Python 3.9 the other day. That part is ok though I will look at your instructions to see if any changes are needed.

Except for an untried Tk, I think I have everything built (save xz and maybe one or another prerequisite which I installed thru homebrew), save the final steps for Python.

It was PyQt5 I was stuck on, and the step afterwards I didn't get to yet. Save any differences in your guide, I think that is all before trying the Sigil build.

Maybe the PyQt5 error is related to sip (using 4.19.15). I see you specify a different version.

Quote:
The interpreter used by pyuic5 is python3.9.
Generating the C++ source for the QtCore module...
Error: Unable to create the C++ code.
I'll look at your notes soon when I get chance. I'll likely just follow what you did, as that would be easiest. Diap mentions trying the newest sip though I think that didn't have a configure.py and I didn't look too much about figuring out how to build. Yet maybe such isn't too necessary, so I can stick with what has been tried.

Last edited by democrite; 12-09-2021 at 03:19 PM.
democrite is offline   Reply With Quote
Old 12-09-2021, 03:22 PM   #25
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 7,651
Karma: 5433388
Join Date: Nov 2009
Device: many
Those instructions are still for PyQt5 and sip for Qt 5.12.x. I would follow what versions DiapDealer recommended to try to build them for Qt 5.15.x
KevinH is offline   Reply With Quote
Old 12-09-2021, 04:07 PM   #26
democrite
Evangelist
democrite will give the Devil his due.democrite will give the Devil his due.democrite will give the Devil his due.democrite will give the Devil his due.democrite will give the Devil his due.democrite will give the Devil his due.democrite will give the Devil his due.democrite will give the Devil his due.democrite will give the Devil his due.democrite will give the Devil his due.democrite will give the Devil his due.
 
Posts: 425
Karma: 77256
Join Date: Sep 2011
Device: none
DiapDialer seems to recommend using the newest sip, 6.x. If such requires some other changes, I do not know. Or any benefits, I’m not familiar enough with to comment. Since you’re sticking with 4.x, I’ll go with that. For the moment, getting it to build without too much extra effort is preferable.

I’ll give it a try either later today or soon after. Seems like it should go ok this time, as you’ve already done it.
democrite is offline   Reply With Quote
Old 12-09-2021, 06:10 PM   #27
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 7,651
Karma: 5433388
Join Date: Nov 2009
Device: many
FYI, sip and PyQt5 have to be effectively matched or newer than the Qt5 version being used ... in your case Qt 5.15.x.
KevinH is offline   Reply With Quote
Old 12-09-2021, 06:50 PM   #28
democrite
Evangelist
democrite will give the Devil his due.democrite will give the Devil his due.democrite will give the Devil his due.democrite will give the Devil his due.democrite will give the Devil his due.democrite will give the Devil his due.democrite will give the Devil his due.democrite will give the Devil his due.democrite will give the Devil his due.democrite will give the Devil his due.democrite will give the Devil his due.
 
Posts: 425
Karma: 77256
Join Date: Sep 2011
Device: none
Then I think it was indeed the used sip version that caused the compile error. I didn’t pay attention to the sip patch. Maybe that was for getting it to work with PyQt 5+. I’ll try again soon. Thanks.
democrite is offline   Reply With Quote
Old 12-09-2021, 08:04 PM   #29
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 27,552
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
It may be different on macOS, but I honestly don't bother trying to build sip to build the latest PyQt5 on Windows. I just install PyQt5-builder from pypi using pip (which will install sip as a dependency), download the PyQt5.15 source, change to its top-level directory and issue the sip-install command.

Then the PyQtWebEngine (5.15.5) source can be downloaded and built in a similar manner if desired.

Before you can use the newly built/installed PyQt5, you'll need to build the PyQt5.sip module. You can download the latest source from pypi (PyQt5-sip) and build/install it using Python's setuptools (python setup.py).

The pip-installed SIP/PyQt5-build build-only tools should be able to be removed (leaving only your compiled PyQt5 and PyQt5.sip) if cleaning up the python installation is important.

I'm sure SIP 6.5 and its PyQt5-builder extension can also be built from source, but I don't think there's any real need/benefit in this particular case. Not when Sigil will neither use, nor distribute, any of their components.

Last edited by DiapDealer; 12-09-2021 at 08:24 PM.
DiapDealer is offline   Reply With Quote
Old 12-10-2021, 04:03 AM   #30
democrite
Evangelist
democrite will give the Devil his due.democrite will give the Devil his due.democrite will give the Devil his due.democrite will give the Devil his due.democrite will give the Devil his due.democrite will give the Devil his due.democrite will give the Devil his due.democrite will give the Devil his due.democrite will give the Devil his due.democrite will give the Devil his due.democrite will give the Devil his due.
 
Posts: 425
Karma: 77256
Join Date: Sep 2011
Device: none
Thank you Kevin and DiapDealer.

Maybe it is that I am trying to build on macos-arm64 that there are these issues.

Trying pyqt5.15.2, there is no arm64 support. With pyqt5.15.6, I get the following error with configure:

Quote:
Generating the C++ source for the QtCore module...
/Users/user/sigil-devtools/libraries/Frameworks/Python.framework/Versions/3.9/bin/sip5 -w -n PyQt5.sip -t WS_MACX -t Qt_5_15_0 -f -P -c /Users/user/sigil-devtools/PyQt5-5.15.6/QtCore -I sip -I /Users/user/sigil-devtools/PyQt5-5.15.6/sip /Users/user/sigil-devtools/PyQt5-5.15.6/sip/QtCore/QtCoremod.sip
sip5: /Users/user/sigil-devtools/PyQt5-5.15.6/sip/QtCore/QtCoremod.sip:23: syntax error
which points to this line:

Quote:
%Module(name=PyQt5.QtCore, call_super_init=True, default_VirtualErrorHandler=PyQt5, keyword_arguments="Optional", use_limited_api=True, py_ssize_t_clean=True)
To get PyQt5 configure to work, 'Error: Unable to create the C++ code.' occurred with any sip 4.x and 6.x I tried. Many mentions such. One stated sip 5.5.0 worked so that's what I used and it was ok. Yet no arm64 in 5.15.2. Maybe some other 5.15+ would work.

Btw, I couldn't find any place to find older sip source code files, so I either installed with pip or grabbed it from the Mercurial repo.

Last edited by democrite; 12-10-2021 at 05:27 AM.
democrite is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
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


All times are GMT -4. The time now is 07:22 AM.


MobileRead.com is a privately owned, operated and funded community.