You are not logged in.

#1 2012-04-23 01:22:10

mcmillan
Member
Registered: 2006-04-06
Posts: 703

[solved] lib32-aspell can't find dictionary

I'm trying to make a lib32-aspell package to get spell check to work with the scrivener package on a 64-bit system.  I've mostly just been trying to copy other lib32 packages since I've had trouble finding a good explanation on the wiki. The closest I could find were the a section of Arch64 and Using 32-bit applications on Arch64, neither of which seemed completely relevant. If there's a more detailed walk-through people can point me to I'd appreciate it.  But this is what I've come up so far (NOTE: Working PKGBUILD in post below)

# Contributor: Jochem Kossen <j.kossen@home.nl>
# Contributor: dorphell <dorphell@archlinux.org>
# Contributor: Thayer Williams <thayer@archlinux.org>
# Contributor: Daniel J Griffiths <ghost1227@archlinux.us>
# Maintainer : Andy McMillan <awmcmillan@gmail.com

_pkgbasename=aspell
pkgname=lib32-$_pkgbasename
pkgver=0.60.6.1
_pkgmajorver=0.60
pkgrel=1
pkgdesc="A spell checker designed to eventually replace Ispell"
arch=('x86_64')
url="http://aspell.net/"
license=('LGPL')
depends=('gcc-libs-multilib' 'lib32-ncurses' 'aspell')
optdepends=('perl: to import old dictionaries')
options=('!libtool')
source=(ftp://ftp.gnu.org/gnu/${_pkgbasename}/${_pkgbasename}-${pkgver}.tar.gz)
sha1sums=('ff1190db8de279f950c242c6f4c5d5cdc2cbdc49')

build() {
  export CC="gcc -m32"
  export CXX="g++ -m32"
  export PKG_CONFIG_PATH="/usr/lib32/pkgconfig"

  cd "${srcdir}/${_pkgbasename}-${pkgver}"
  ./configure --prefix=/usr --sysconfdir=/etc --libdir=/usr/lib32
  make
}

package() {
  cd "${srcdir}/${_pkgbasename}-${pkgver}"
  make DESTDIR="${pkgdir}" install
  ln -s ${_pkgbasename}-${_pkgmajorver} "${pkgdir}/usr/lib32/${_pkgbasename}"
  rm -rf "${pkgdir}"/usr/{include,share,bin}
}

This seems to compile, but spell check still doesn't work. On the other hand I earlier tried copying a PKGBUILD from some packages that just copy files from the 32-bit package, and that seems to work fine, though that doesn't seem to be the proper way to do things. diff tells me that a few of my compiled libs are different from both the 64-bit libs and the precompiled 32-bit ones, making me think I have some weird intermediate configuration so I must have missed something in the PKGBUILD. I have both base-devel and multilib-devel installed and I haven't had problems building other lib32 packages, so doesn't seem to be a problem with my compiler setup.

Any hints about where I may be going wrong?

Also wouldn't mind some comments for other general PKGBUILD issues I might have missed. Specifically I wasn't sure about whether aspell needs to be a dependency - though I suspect it's not too useful without /usr/bin/aspell. Also I dropped the aspell.install from the normal package as it also seems to be doing things that seem to only be needed for the normal aspell package.

Last edited by mcmillan (2012-04-24 07:10:43)

Offline

#2 2012-04-23 06:36:27

bernarcher
Forum Fellow
From: Germany
Registered: 2009-02-17
Posts: 2,273

Re: [solved] lib32-aspell can't find dictionary

Moving from "AUR Issues, Discussion & PKGBUILD Requests" to "Creating & Modifying Packages" on mcmillan's request..


To know or not to know ...
... the questions remain forever.

Offline

#3 2012-04-23 18:01:53

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 4,664

Re: [solved] lib32-aspell can't find dictionary

rm -rf "${pkgdir}"/usr/{include,share,bin}

I assume the lib32-package uses  the files provided by aspell  ?
If so, you definitely should have aspell as dependency.

You might want to add something like "lib32-version" to the description to make the difference between this package and aspell clearer.


Booting with apg Openrc, NOT systemd.
Automounting : not needed, i prefer pmount
Aur helpers : makepkg + my own local repo === rarely need them

Offline

#4 2012-04-24 00:18:15

mcmillan
Member
Registered: 2006-04-06
Posts: 703

Re: [solved] lib32-aspell can't find dictionary

Thanks Lone_Wolf, I thought I had added the lib32 to the description, guess I missed it. And I agree about the apparent need for aspell, just was a bit confused by some packages I came across that seemed to leave that out even if it was removing bin files. May not be necessary for all packages, but seems to be the case for this one anyway.

As for the original issue I'm closer to figuring that out. Looks like since I'm compiling aspell into /usr/lib32, that's also where it looks for the dictionary. Just copying files from the precompiled 32-bit aspell still has the compiled configuration of /usr/lib and has no problem using that since it seems architecture independent, while my self-compiled one can't find the dictionary.  Now I need to do some reading about if/how I can change that, or if I'll need a lib32-dictionary as well.

Offline

#5 2012-04-24 07:07:14

mcmillan
Member
Registered: 2006-04-06
Posts: 703

Re: [solved] lib32-aspell can't find dictionary

I think I have it working now. 

# Contributor: Jochem Kossen <j.kossen@home.nl>
# Contributor: dorphell <dorphell@archlinux.org>
# Contributor: Thayer Williams <thayer@archlinux.org>
# Contributor: Daniel J Griffiths <ghost1227@archlinux.us>
# Maintainer : Andy McMillan <awmcmillan@gmail.com

pkgname=lib32-aspell
_pkgbasename=aspell
pkgver=0.60.6.1
_pkgmajorver=0.60
pkgrel=1
pkgdesc="A spell checker designed to eventually replace Ispell (32-bit libraries)"
arch=('x86_64')
url="http://aspell.net/"
license=('LGPL')
depends=('gcc-libs-multilib' 'lib32-ncurses' 'aspell')
optdepends=('perl: to import old dictionaries')
options=('!libtool')
source=(ftp://ftp.gnu.org/gnu/${_pkgbasename}/${_pkgbasename}-${pkgver}.tar.gz)
sha1sums=('ff1190db8de279f950c242c6f4c5d5cdc2cbdc49')
build() {
  export CC="gcc -m32"
  export CXX="g++ -m32"
  export PKG_CONFIG_PATH="/usr/lib32/pkgconfig"

  cd "${srcdir}/${_pkgbasename}-${pkgver}"
  ./configure --prefix=/usr --sysconfdir=/etc --libdir=/usr/lib32 --enable-dict-dir=/usr/lib/aspell-"${_pkgmajorver}"
  make
}

package() {
  cd "${srcdir}/${_pkgbasename}-${pkgver}"
  make DESTDIR="${pkgdir}" install
  rm -rf "${pkgdir}"/usr/{include,share,bin,lib} #remove files that are being provided by original aspell
}

Editing the title to better reflect what the issue was.  I'm calling this solved unless someone points out other issues.

Offline

#6 2012-04-24 15:20:00

josephg
Member
From: Brazil
Registered: 2009-09-28
Posts: 92

Re: [solved] lib32-aspell can't find dictionary

@mcmillan: Haven't tested it, but 2 things I notice: you should add makedepends=('gcc-multilib') and can remove "${srcdir}" from "cd ..." as it is not needed anymore.

Offline

#7 2012-08-01 21:06:59

CharBar
Member
Registered: 2011-05-27
Posts: 10

Re: [solved] lib32-aspell can't find dictionary

Thanks mcmillan! It's working fine on my 64-bit laptop with yesterday's beta.

One question: When I run spellcheck, many common words (e.g. introduction, relationship, organization, etc.) are coming up. The spellcheck will offer several suggestions, including the word with the exact same spelling used in the document. So, the word is obviously in the dictionary- Any idea why it would be underlined in the document and come up in the spellcheck?

Offline

#8 2012-08-05 02:45:44

mcmillan
Member
Registered: 2006-04-06
Posts: 703

Re: [solved] lib32-aspell can't find dictionary

Thesis writing and moving across the country to start a new job have led me to neglecting this, but I finally got around uploading this to the AUR here.

CharBar: unfortunately I don't have much ideas about that issue, though I can reproduce it, and it seems to be a 64-bit issue, since my 32-bit netbook behaves correctly. I might try some investigating tomorrow.

Offline

#9 2012-08-15 21:11:14

CharBar
Member
Registered: 2011-05-27
Posts: 10

Re: [solved] lib32-aspell can't find dictionary

I appreciate you looking into it! Let me know if there's anything I can do to help out.

Offline

Board footer

Powered by FluxBB