08-24-2016, 06:13 PM | #1 | |
Grand Sorcerer
Posts: 27,549
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Linux-only libxml2 bug that affects Sigil on newer systems
Linux Sigil Users Only! There's a bug in libxml2-2.9.3 and higher that affects how QtWebKit renders html entities. Which means Sigil is affected on systems which use those versions. To quickly tell if your system is affected: Type a visible html entity (like ©) into Sigil's Code View (epub2). If it appears twice in Sigil's Preview or Book View, then you have the buggy version of libxml2. I've released an executable, makeself Linux-only "updater" that installs a patched version of libxml2 into an existing Sigil installation to work around the issue. NOTE: At no time will your system version of libxml2 be altered/affected by this update. Download the installer (make sure it's executable bit is set) and use: sudo ./sigil_libxml2_update.run to install. You'll have the option to bail out if you get cold feet. See the Github README for more options/explanations. --------- EDIT: The latest git version of Sigil now includes the ability to clone, patch, configure and install a working version of libxml2 alongside Sigil (does not affect the system version of libxml2). To enable it, just add the -DBUILD_PATCHED_LIBXML2=1 option to the initial cmake configuration command. From the documentation: Quote:
Last edited by DiapDealer; 09-30-2016 at 04:38 PM. |
|
08-28-2016, 03:10 AM | #2 |
creator of calibre
Posts: 43,858
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
FYI, as far as I know, libxml2 is an optional dependency of WebKit, you can compile WebKit without it. That will mean that WebKit wont have support for XSLT, but I doubt that is used anywhere Sigil cares about.
|
Advert | |
|
08-28-2016, 10:41 AM | #3 |
Sigil Developer
Posts: 7,644
Karma: 5433388
Join Date: Nov 2009
Device: many
|
AFAIK, it is used by webkit to evaluate named entities which we allow in the source and also to process as you say xslt transformations which are used inside MathJax to handle some of the extended mathml.
So disabling it means a few specific mathml elements will not show properly in Preview. See this bug report for mml3.js not working on builds of Qt without libxml2 https://github.com/pkra/MathJax-single-file/issues/3 KevinH Last edited by KevinH; 08-28-2016 at 10:47 AM. |
08-28-2016, 11:33 AM | #4 |
Grand Sorcerer
Posts: 27,549
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
The bug is really going to affect those Linux users who:
a) Build Sigil themselves on a system with libxml2 2.9.3 or higher. b) Install Sigil from a repo on a system with libxml2 2.9.3 or higher. Those numbers are probably pretty small right now, but those going with method B) are only going to grow more numerous. Their only hope is that Ubuntu patches libxml2 (or that libxml2 gets fixed very quickly), or this workaround. If I can ever get a Linux installer package together that I have a high degree of confidence in, I'll of course include a patched version of libxml2 in it. But I was really hoping the repo version would gain traction and make that step unnecessary. Those using method A) will soon have an option to build/include a patched version of libxml2 while compiling Sigil themselves. I hope anyway ... a few more kinks to work out. |
08-28-2016, 12:03 PM | #5 |
Ex-Helpdesk Junkie
Posts: 19,422
Karma: 85397180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
|
For reference (all you members that see this thread and aren't sure what it is talking about), this was originally discovered in this Sigil bug: https://github.com/Sigil-Ebook/Sigil/issues/232
There is a link there to the upstream libxml2 bug. |
Advert | |
|
08-28-2016, 12:37 PM | #6 |
creator of calibre
Posts: 43,858
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
@KevinH: I'm fairly certain that when libxml2 is absent, webkit uses something else to evaluate named entities. Named entities are common enough that is that were not the case, there would be hundreds of bug reports against Qt WebKit on windows, since as far as I know, Qt WebKit has never linked against libxml2 on windows.
|
08-28-2016, 01:00 PM | #7 |
Sigil Developer
Posts: 7,644
Karma: 5433388
Join Date: Nov 2009
Device: many
|
According to the bug report filed at libxml2 by Apple, it is used by webkit, but if you can build it without, then they must have an alternative way of handling it. Either way, the mml3.js MathJax extension needs xslt for some mathml element support.
And you are right none of those mathml elements work on Windows, and thus the bug report I filed with mathjax to eliminate the use of xslt. KevinH Last edited by KevinH; 08-28-2016 at 01:14 PM. |
08-28-2016, 03:43 PM | #8 | |
Wizard
Posts: 2,082
Karma: 8796704
Join Date: Jun 2010
Device: Kobo Clara HD,Hisence Sero 7 Pro RIP, Nook STR, jetbook lite
|
Quote:
bernie |
|
08-28-2016, 03:51 PM | #9 |
Grand Sorcerer
Posts: 27,549
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
|
09-02-2016, 07:54 PM | #10 |
Grand Sorcerer
Posts: 27,549
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
I got excited to see a new patched version of libxml2-2.9.4 come down the pipe on Arch Linux (2.9.4+0+gbdec218-2 -> 2.9.4+4+g3169602-1), but alas ... it doesn't resolve this issue. It's just a couple of cherry-picked commits from the official libxml2 git repo made since 2.9.4's release.
|
09-04-2016, 03:53 AM | #11 |
Ex-Helpdesk Junkie
Posts: 19,422
Karma: 85397180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
|
Same here.
Perhaps, if someone from the libxml2 development team could actually comment on and/or approve that patch, it could be cherry-picked for Arch as well. But the complete radio silence on that bug is kind of a problem... |
09-30-2016, 04:39 PM | #12 | |
Grand Sorcerer
Posts: 27,549
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
The latest git version of Sigil now includes the ability to clone, patch, configure and install a working version of libxml2 alongside Sigil (does not affect the system version of libxml2). To enable it, just add the -DBUILD_PATCHED_LIBXML2=1 option to the initial cmake configuration command.
From the documentation: Quote:
|
|
06-16-2017, 05:02 PM | #13 |
Grand Sorcerer
Posts: 27,549
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Libxml2 has finally been updated to fix this regression bug. It should make it into libxml2 v2.9.5 at the very latest. But I'm hoping some distros cherry-pick the official commit before that! (I'm lookin' at you Arch ).
|
06-28-2017, 06:39 PM | #15 |
Ex-Helpdesk Junkie
Posts: 19,422
Karma: 85397180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
|
Arch Linux now has libxml2 2.9.4+91+g872fea94-1 in the [testing] repo, and this bug is fixed. It should reach [extra] sometime in the immediate future.
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Bug in Sigil 0.9.5 | PKTC | Sigil | 6 | 04-05-2016 12:33 PM |
Possible Bug in Sigil 0.8.7 | dragon reader | Sigil | 34 | 11-19-2015 11:45 AM |
possible h1 bug in Sigil 0.6.1? | michaelbr | Sigil | 2 | 12-04-2012 07:56 PM |
Newer Kobo desktop than 2.1.7 for linux? | jusmee | Kobo Reader | 0 | 08-15-2012 01:42 AM |
=calibre-0.8.14 Linux No X ebook-convert bug | rogerx | Conversion | 2 | 09-02-2011 07:41 PM |