08-07-2023, 11:14 AM | #16 |
Sigil Developer
Posts: 8,251
Karma: 5568412
Join Date: Nov 2009
Device: many
|
odamizu,
If you had an earlier version of Doitsu's Markdown plugin installed and its prefs are not empty, then it will assume it knows the path to the cmark executable and will not run os.chmod on the binary. The easiest approach it to temporarily rename the Markdown preferences folder once. Then fire up Markdown and it will look for the new cmark executable and properly chmod it to be executable. You should be able to put the renamed Markdown prefs folder back or just set new preferences. This worked for me. I will build a universal binary for macOS and provide it to Doitsu when I am home and have access to my arm64 machine. |
08-07-2023, 11:41 AM | #17 |
Sigil Developer
Posts: 8,251
Karma: 5568412
Join Date: Nov 2009
Device: many
|
Unfortunately, this same problem will exist every time this plugin is updated on macOS. And I do not think a preference setting will help. FWIW, since a chmod is cheap, in plugins I simply just use os.chmod for macOS binaries on every run. We did this in flightcrew and in AccessAide. Not sure how to detect the plugin changed when the preferences did not.
Perhaps include a new datetime value hardcoded in every plugin and check if prefs version of that value is different from current and run os.chmod if not equal. Of course reinstalls of the same version would still fail. The only other approach would be to run os.stat and get the st_mod bits and check if execute permissions are set and if not set them. But just setting them each time is easier which is what we ended up doing. Last edited by KevinH; 08-07-2023 at 11:46 AM. |
Advert | |
|
08-07-2023, 01:49 PM | #18 |
Sigil Developer
Posts: 8,251
Karma: 5568412
Join Date: Nov 2009
Device: many
|
@Doitsu,
Okay, I figured out how to build a universal binary (arm64, x86_64) from just my x86_64 laptop statically linked for cmark-gfm I have attached it as a zip to this post. See cmark-gfm.zip lipo shows this binary supports both arm64 and x86_64. I tested the x86_64 side by install your MarkdownImport plugin, replacing the binary with the unzipped cmark-gfm, and then manually removing the MarkdownImport.json from its Preferences to force the os.chmod to be done. It worked just fine. I do think at some point we need to add a post plugin install interface call out to the plugin so that one time initialization can be done. I will think about adding something like that to the plugin interface for a future release. Take care, KevinH |
08-07-2023, 03:07 PM | #19 |
Grand Sorcerer
Posts: 5,647
Karma: 23456789
Join Date: Dec 2010
Device: Kindle PW2
|
Thanks! I've replaced the macOS binary in the MarkdownImport plugin .zip file with your version and attached it to first post in the MarkdownImport plugin thread.
|
08-07-2023, 03:44 PM | #20 |
just an egg
Posts: 1,719
Karma: 6653246
Join Date: Mar 2015
Device: Kindle, iOS
|
Thanks Doitsu! Thanks KevinH!
I downloaded the new latest MarkdownImport plugin (0.1.5.4), did the thing with the preferences folder, and all is good on Sigil 1.9.30 on macOS Ventura ETA: I installed Sigil 2.0.0-Beta-Mc-x86_64.txz and have been playing with it, running plugins, etc. So far so good Last edited by odamizu; 08-08-2023 at 02:23 AM. |
Advert | |
|
11-16-2023, 05:48 AM | #21 |
Junior Member
Posts: 9
Karma: 10
Join Date: Nov 2023
Device: Sigil
|
Has anyone perhaps hit this snag?
I'm getting a PySide6 Missing from the testplugin_v020.zip, after installing PySide6: $ pip3 install PySide6 Defaulting to user installation because normal site-packages is not writeable Requirement already satisfied: PySide6 in /home/derrick/.local/lib/python3.10/site-packages (6.6.0) Requirement already satisfied: PySide6-Addons==6.6.0 in /home/derrick/.local/lib/python3.10/site-packages (from PySide6) (6.6.0) Requirement already satisfied: shiboken6==6.6.0 in /home/derrick/.local/lib/python3.10/site-packages (from PySide6) (6.6.0) Requirement already satisfied: PySide6-Essentials==6.6.0 in /home/derrick/.local/lib/python3.10/site-packages (from PySide6) (6.6.0) The specific exceptions are: Python Package: PySide6 Missing /usr/lib/x86_64-linux-gnu/libQt6DBus.so.6: undefined symbol: _ZN9QtPrivate23CompatPropertySafePointC1EP14QBindi ngStatusP20QUntypedPropertyData, version Qt_6 Python Package: PySide6 QtWebEngineWidgets Missing /usr/lib/x86_64-linux-gnu/libQt6DBus.so.6: undefined symbol: _ZN9QtPrivate23CompatPropertySafePointC1EP14QBindi ngStatusP20QUntypedPropertyData, version Qt_6 |
11-16-2023, 06:06 AM | #22 |
Junior Member
Posts: 9
Karma: 10
Join Date: Nov 2023
Device: Sigil
|
Following the Dependencies section of https://pypi.org/project/PySide6/ doesn't seem to fix it:
LLVM_INSTALL_DIR=/opt/clang/libclang |
11-16-2023, 06:39 AM | #23 |
Grand Sorcerer
Posts: 28,077
Karma: 199770456
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
That environment variable is only relevant when building PySide6.
I've not had much experience with a Sigil plugin Python environment that includes packages installed to a user site directory instead of the system one. Can you show me what the test p!gain shows for sys.path locations? It should be some of the very first output when running the testplugin. The fact that Debian/Ubuntu doesn't yet supply their own PySide6 packages (to be installed via apt-get) is unfortunate. Problems like yours are not likely to go away until they do. One quick thing to try is to skip the sigil launch script in /usr/local/bin and launch sigil directly from a command prompt using: /usr/local/lib/sigil/sigil If Sigil starts ok, try running the test plugin again. Last edited by DiapDealer; 11-16-2023 at 06:59 AM. |
11-16-2023, 10:47 AM | #24 | |
Junior Member
Posts: 9
Karma: 10
Join Date: Nov 2023
Device: Sigil
|
Quote:
Code:
Wrapped: /opt/sigil/bin/sigil Status: success Verify sys.path settings manually /opt/sigil/share/sigil/plugin_launchers/python /usr/lib/python310.zip /usr/lib/python3.10 /usr/lib/python3.10/lib-dynload /home/derrick/.local/lib/python3.10/site-packages /usr/local/lib/python3.10/dist-packages /usr/lib/python3/dist-packages /home/derrick/.local/share/sigil-ebook/sigil/plugins/testplugin Verifying proper Python packages are available Checking GUI modules Python Package: PySide6 Missing /usr/lib/x86_64-linux-gnu/libQt6DBus.so.6: undefined symbol: _ZN9QtPrivate23CompatPropertySafePointC1EP14QBindingStatusP20QUntypedPropertyData, version Qt_6 Python Package: PySide6 QtWebEngineWidgets Missing /usr/lib/x86_64-linux-gnu/libQt6DBus.so.6: undefined symbol: _ZN9QtPrivate23CompatPropertySafePointC1EP14QBindingStatusP20QUntypedPropertyData, version Qt_6 Python Package: tkinter (/usr/lib/python3.10/tkinter/__init__.py) Found Python Package: PIL (/usr/lib/python3/dist-packages/PIL/__init__.py) Found Python Package: cssselect (/usr/lib/python3/dist-packages/cssselect/__init__.py) Found Python Package: css-parser (/usr/lib/python3/dist-packages/css_parser/__init__.py) Found Python Package: html5lib (/usr/lib/python3/dist-packages/html5lib/__init__.py) Found Python Package: lxml (/usr/lib/python3/dist-packages/lxml/__init__.py) Found Python Package: regex (/usr/lib/python3/dist-packages/regex/__init__.py) Found Python Package: chardet (/usr/lib/python3/dist-packages/chardet/__init__.py) Found Python Package: six (/usr/lib/python3/dist-packages/six.py) Found Python Package: dulwich (/usr/lib/python3/dist-packages/dulwich/__init__.py) Found Python Package: urllib3 (/usr/lib/python3/dist-packages/urllib3/__init__.py) Found Verifying Sigil Python Libraries can be found/loaded Sigil Python library: epub_utils Found Sigil Python library: quickparser Found Sigil Python library: hrefutils Found Sigil Python library: compatibility_utils Found Sigil Python library: sigil_bs4 Found Verifying Hunspell Spell Checking Hunspell en_US affix file and dictionary Found Hunspell shared library Found Hunspell spellchecking works True Verifying Sigil Gumbo Library operation Sigil Gumbo BS4 Adapter library Found Sigil BS4/Gumbo Parser works True Verifying selected basic plugin interface elements bk.text_iter() works True Listing manifested files... Text/Section0001.xhtml toc.ncx bk.manifest_iter() works True bk.spine_iter() works True bk.other_iter() works True reading a non-manifest book file works True reading a specific OPF manifest id works True writing to a specific OPF manifest id works True Launcher Version 20231026 ePub Version 2.0 adding your own file to the manifest works True basename to id mapping works True deleting our added file works True Failure - 2 Tests of Plugin Operations Failed Raw: /opt/sigil/lib/sigil/sigil Status: success Verify sys.path settings manually /opt/sigil/share/sigil/plugin_launchers/python /usr/lib/python310.zip /usr/lib/python3.10 /usr/lib/python3.10/lib-dynload /home/derrick/.local/lib/python3.10/site-packages /usr/local/lib/python3.10/dist-packages /usr/lib/python3/dist-packages /home/derrick/.local/share/sigil-ebook/sigil/plugins/testplugin Verifying proper Python packages are available Checking GUI modules Python Package: PySide6 QtWebEngine PySide6 Python bindings found. (/home/derrick/.local/lib/python3.10/site-packages/PySide6/QtWidgets.abi3.so) Found Python Package: PySide6 QtWebEngineWidgets (/home/derrick/.local/lib/python3.10/site-packages/PySide6/QtWebEngineWidgets.abi3.so) Found Python Package: tkinter (/usr/lib/python3.10/tkinter/__init__.py) Found Python Package: PIL (/usr/lib/python3/dist-packages/PIL/__init__.py) Found Python Package: cssselect (/usr/lib/python3/dist-packages/cssselect/__init__.py) Found Python Package: css-parser (/usr/lib/python3/dist-packages/css_parser/__init__.py) Found Python Package: html5lib (/usr/lib/python3/dist-packages/html5lib/__init__.py) Found Python Package: lxml (/usr/lib/python3/dist-packages/lxml/__init__.py) Found Python Package: regex (/usr/lib/python3/dist-packages/regex/__init__.py) Found Python Package: chardet (/usr/lib/python3/dist-packages/chardet/__init__.py) Found Python Package: six (/usr/lib/python3/dist-packages/six.py) Found Python Package: dulwich (/usr/lib/python3/dist-packages/dulwich/__init__.py) Found Python Package: urllib3 (/usr/lib/python3/dist-packages/urllib3/__init__.py) Found Verifying Sigil Python Libraries can be found/loaded Sigil Python library: epub_utils Found Sigil Python library: quickparser Found Sigil Python library: hrefutils Found Sigil Python library: compatibility_utils Found Sigil Python library: sigil_bs4 Found Verifying Hunspell Spell Checking Hunspell en_US affix file and dictionary Found Hunspell shared library Found Hunspell spellchecking works True Verifying Sigil Gumbo Library operation Sigil Gumbo BS4 Adapter library Found Sigil BS4/Gumbo Parser works True Verifying selected basic plugin interface elements bk.text_iter() works True Listing manifested files... Text/Section0001.xhtml toc.ncx bk.manifest_iter() works True bk.spine_iter() works True bk.other_iter() works True reading a non-manifest book file works True reading a specific OPF manifest id works True writing to a specific OPF manifest id works True Launcher Version 20231026 ePub Version 2.0 adding your own file to the manifest works True basename to id mapping works True deleting our added file works True Success - All Tests of Plugin Operations Passed |
|
11-16-2023, 10:54 AM | #25 |
Grand Sorcerer
Posts: 28,077
Karma: 199770456
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
What did you use for an install prefix when configuring Sigil? And why? I'm a little concerned that Sigil has been installed to /opt rather than the typical /usr/local. You're changing things that really shouldn't be altered if you don't know exactly what you're doing.
I've never seen this output from Sigil's test plugin before: Code:
Wrapped: /opt/sigil/bin/sigil Last edited by DiapDealer; 11-16-2023 at 10:57 AM. |
11-16-2023, 11:23 AM | #26 | |
Junior Member
Posts: 9
Karma: 10
Join Date: Nov 2023
Device: Sigil
|
Quote:
The install prefix was: Code:
-DCMAKE_INSTALL_PREFIX=/opt/sigil By the way, if I just remove the QTLIB_DIR definition in that wrapper script: Code:
#QTLIB_DIR="/usr/lib/x86_64-linux-gnu" QTLIB_DIR="" Thanks for the heads-up about the wrapper. |
|
11-16-2023, 12:12 PM | #27 | |
Grand Sorcerer
Posts: 28,077
Karma: 199770456
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Quote:
Just know that if you ever rebuild/install, you'll need to diddle that wrapper again. I may look into adding functionality (through an environment variable) that will avoid adding the QTLIB_DIR to the LD_LIBRARY_PATH in the first place. It's not need when using the system Qt, and as you've now noticed: it interferes with a PyPi installed PySide6 (which comes with its own Qt libs). Adding QT_LIBS to LD_LIBRARY_PATH was necessary when custom versions of Qt were being installed and used to build Sigil with. Sorry about the wrapped/raw confusion. I didn't scroll down far enough to see that there were two separate outputs generated. Last edited by DiapDealer; 11-16-2023 at 12:14 PM. |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[GUI Plugin] KindleUnpack - The Plugin | DiapDealer | Plugins | 495 | 10-19-2024 07:06 AM |
[GUI Plugin] Noosfere_util, a companion plugin to noosfere DB | lrpirlet | Plugins | 2 | 08-18-2022 04:15 PM |
[GUI Plugin] Save Virtual Libraries To Column (GUI) | chaley | Plugins | 14 | 04-04-2021 06:25 AM |
[GUI Plugin] Plugin Updater **Deprecated** | kiwidude | Plugins | 159 | 06-19-2011 01:27 PM |