Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old 08-24-2016, 06:13 PM   #1
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,465
Karma: 192992430
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:
-DBUILD_PATCHED_LIBXML2=(0|1) Some newer versions of libxml2 have a bug that causes QtWebKit to render html entities twice. Adding -DBUILD_PATCHED_LIBXML2=1 to the cmake command will clone the libxml2 git repo, checkout a specific commit, patch the source, build it and install it alongside Sigil (does not affect the system version of libxml2). Requires git, libtool, autoconf and automake packages to be installed (as well as a working internet connection). Cmake should notify of any missing programs needed. The default is to NOT build the patched version of libxml2 (-DBUILD_PATCHED_LIBXML2=0).

Last edited by DiapDealer; 09-30-2016 at 04:38 PM.
DiapDealer is offline   Reply With Quote
Old 08-28-2016, 03:10 AM   #2
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,778
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.
kovidgoyal is offline   Reply With Quote
Advert
Old 08-28-2016, 10:41 AM   #3
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,506
Karma: 5433350
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.
KevinH is offline   Reply With Quote
Old 08-28-2016, 11:33 AM   #4
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,465
Karma: 192992430
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.
DiapDealer is offline   Reply With Quote
Old 08-28-2016, 12:03 PM   #5
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
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.
eschwartz is offline   Reply With Quote
Advert
Old 08-28-2016, 12:37 PM   #6
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,778
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.
kovidgoyal is offline   Reply With Quote
Old 08-28-2016, 01:00 PM   #7
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,506
Karma: 5433350
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.
KevinH is offline   Reply With Quote
Old 08-28-2016, 03:43 PM   #8
gbm
Wizard
gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.
 
Posts: 2,080
Karma: 8796704
Join Date: Jun 2010
Device: Kobo Clara HD,Hisence Sero 7 Pro RIP, Nook STR, jetbook lite
Quote:
Originally Posted by DiapDealer View Post
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.
Worked perfect on my Mint 18 system once the human got his act together.

bernie
gbm is offline   Reply With Quote
Old 08-28-2016, 03:51 PM   #9
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,465
Karma: 192992430
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by gbm View Post
Worked perfect on my Mint 18 system once the human got his act together.

bernie
Great! Thanks for the report.
DiapDealer is offline   Reply With Quote
Old 09-02-2016, 07:54 PM   #10
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,465
Karma: 192992430
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.
DiapDealer is offline   Reply With Quote
Old 09-04-2016, 03:53 AM   #11
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
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...
eschwartz is offline   Reply With Quote
Old 09-30-2016, 04:39 PM   #12
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,465
Karma: 192992430
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:
-DBUILD_PATCHED_LIBXML2=(0|1) Some newer versions of libxml2 have a bug that causes QtWebKit to render html entities twice. Adding -DBUILD_PATCHED_LIBXML2=1 to the cmake command will clone the libxml2 git repo, checkout a specific commit, patch the source, build it and install it alongside Sigil (does not affect the system version of libxml2). Requires git, libtool, autoconf and automake packages to be installed (as well as a working internet connection). Cmake should notify of any missing programs needed. The default is to NOT build the patched version of libxml2 (-DBUILD_PATCHED_LIBXML2=0).
DiapDealer is offline   Reply With Quote
Old 06-16-2017, 05:02 PM   #13
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,465
Karma: 192992430
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 ).
DiapDealer is offline   Reply With Quote
Old 06-23-2017, 04:43 PM   #14
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
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)
I opened FS#54482 for Arch Linux to update to that commit, so hopefully that will happen soon-ish.
eschwartz is offline   Reply With Quote
Old 06-28-2017, 06:39 PM   #15
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
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.
eschwartz is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

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


All times are GMT -4. The time now is 03:11 AM.


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