chroot environment. Sounds like overkill, but then again “yak-shaving” is my middle name.
I’ve become a little bit fond of the false-positives in the spell checker. It seems to be falsely picking up -ly and -ing words, which, as you may know, are on the undesirable list for strong fiction prose. If only it was consistent in its false-positives. I don’t think it has picked up a noun falsely.
I was keeping a list of the words that Scrivener’s spellcheck doesn’t pick up on. They’re all recognized as correctly spelled via aspell on the command line.
Is there a defect list for the Linux stuff? Honestly, the impression I got was all they were doing was recompiling the Windows version to Linux and they weren’t supporting it in any way beyond that at this point. Maybe at some point in the future, but I assumed there was no active development for Linux at all right now.
This Scrivener on Linux forum is “user supported” at this time. That is made clear in the forum dialogue: “Meeting area for those running the unofficial Linux version of Scrivener (please note that there is no official Linux version as yet, so Linux versions are community-supported only).”
The developers have graciously made the Linux port of Scrivener freely available, on the terms that they cannot be expected to provide support at this time.
Hopefully some Linux guru might come along with an answer to the 32/64 bit spell check problems. Until then, perhaps “Artha” or another spell check/dictionary might provide an alternate solution?
The libaspell-dev package just creates a symink from /usr/lib/libaspell.so to /usr/lib/libaspell.so.15.2.0 . I tried this and had no luck (64-bit Ubuntu 12.04 LTS).
I downloaded the 32-bit .deb file for libaspell15, extracted it, and copied contents of usr/lib in the package to /usr/lib/i386-linux-gnu . I then created a symlink from /usr/lib/i386-linux-gnu/libaspell.so to /usr/lib/i386-linux-gnu/libaspell.so.15.2.0 .
This got me a bit farther: the system dictionaries show up in Options->Correction, and I can change dictionaries, but Autocheck and Spelling (Ctrl+:) do not work. Using the command line
LD_DEBUG=libs scrivener &
confirms that the 32-bit library is being loaded instead of the 64-bit.
The files in /var/lib/aspell are supposed to be architecture-independent, so switching libraries should not be a problem. According to https://help.ubuntu.com/community/OperaBrowser , adding the 32-bit library (to /usr/lib32 for Opera; to /usr/lib/i386-linux-gnu for Scrivener) is all that is necessary.
Something is rotten in the state of aspell
UPDATE: I replaced the .so files and the executables (ispell and spell) in /usr/lib/aspell with the 32-bit versions, then re-installed the .deb for aspell-en (aspell-en_6.0-0-6ubuntu2_all.deb). The postinst script for the .deb file rebuilt the dictionaries, and spelling (including Autocorrect) became functional in Scrivener.
After replacing the aspell binaries in /usr/bin with 32-bit versions, spelling continues to work in other applications (which was rather unexpected). This seems to be due to the fact that the 64-bit libraries can read the 32-bit dictionary files, but not vice-versa (see http://aspell.net/0.61/man-html/Using-32_002dBit-Dictionaries-on-a-64_002dBit-System.html), although it doesn’t explain why the 32-bit .so files in /usr/lib/aspell fail to cause conflicts.
It turns out, however, that it does. The environment variable ASPELL_CONF can be used to supply config options at runtime, one of which is the prefix option. A quick test (by reverting /usr/lib/aspell to 64-bit, and moving the 32-bit version into /usr/local/lib) proved successful.
This of course depends on 32-bit dictionaries, but it does mean that a 32-bit and a 64-bit aspell installation can live side by side.
I’ll have to spend some time thinking about (and writing shell commands) how to do this properly, but it looks like the basic procedure is more or less as follows:
download and extract 32-bit aspell and libaspell
copy the contents of usr/bin and /usr/lib from these packages into the Scrivener directory tree (under bin/ and lib/, or possible aspell/bin aspell/lib)
symlink /usr/lib/i386-linux-gnu/libaspell.so to the .so in the scrivener directory tree
generate 32-bit versions of the dictionaries under the Scrivener directory tree
create a launcher (e.g. scrivener.64.sh) that invokes Scrivener with the ASPELL_CONF env variable set correctly
#4 is going to be the most tricky, but the postinst script for aspell-en.deb shows that it’s a simple command-line call … which can be done with the ASPELL_CONF variable.
Should be a good project for the train on Monday. UPDATE: It wasn’t so bad. Instructions have been added to the thread “A Mostly Complete Guide to Installing Scrivener on Linux”, linked to above.
I went through the very detail procedure fromthe other thread (thanks), but I keep getting an error when trying to generate the 32bit dictionary files.
It seems the aspell bin, from the 32 bit debian package won’t run on my system (Ubuntu 12.10) even though i have the 32 bit library support installed (ia32-libs).
Anyone have any ideas? Or even had it running on 12.10?
This error indicates that you are running the 32-bit version of the aspell utility, but it is trying to load or link to the 64-bit libraries.
In order to run the 32-bit executables (to generate 32-bit dictionaries), you have to set the environment variables AC_CONF, LD_LIBRARY_PATH, and PATH.
It sounds like either AC_CONF or LD_LIBRARY_PATH is not set correctly when you are generating the dictionaries – I’d mess around with those to try getting it to work. Also, use LD_DEBUG=libs in order to see where the libraries are being loaded from.
Thanks for the help. That allowed me to create the dictionary files. I can now see 3 English dictionary options in my spell-checking section, but its not doing any spell-checking…ho-hum.
But you are a scholar and a gentleman for providing the help you have
Make sure, when you start scrivener, that it is using the 32-bit libraries and support files (especially the dictionaries).
This requires that the ASPELL_CONF environment variable be set to /usr/share/scrivener . I put the modifications to /usr/share/scrivener/bin/scrivener.sh in the other thread, but here they are again:
…although the 32-bit library directory may be very different on your system. I only had to do this during testing though; the LD_LIBRARY_PATH setting in /usr/share/scrivener/bin/scrivener.sh should take care of this.
When I had the choice of dictionaries in scrivener, and there was no actual spell-checking, it was because the 64-bit dictionaries were being used (instead of the 32-bit ones).
Take a look at /usr/share/scrivener/lib/aspell, and make sure the .rws files are not symlinks to /var/lib/aspell. Ideally, there should be 64-bit dictionaries in /var/lib/aspell and 32-bit dictionaries in /usr/share/scrivener/lib/aspell.
Note that the 64-bit aspell can read 32-bit dictionaries (but not vice-versa), so it is possible to just generate 32-bit dictionaries in /var/lib/. These will get overwritten the next time the aspell dictionary packes are upgraded, though.
Hmm. Maybe I compiled the dictionaries as 64 bit. Would they have the same physiical size as the 32 bit ones? Because the ones i have in my scrivener aspell library are exactly the same size as those in /var/lib/aspell (they aren’t simlinks btw)
I’m probably doing something stupid. It is Friday after all.
I think the shell script starts of with default environment variables, so the command line exports I made had no real effect and I was using the 64bit aspell to compile the libraries So I added the LD_LIBRARY, PATH etc exports you mentioned into the script and I now have red squiggly lines
Once again. Thanks for all your help. You are a gentleman, a scholar, and now a connoisseur of fine wines