[devlibs-gtk3] Compile Aspell with GCC-4.8.1

Bug #1252711 reported by jazzynico on 2013-11-19
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Inkscape Devlibs

Bug Description

Aspell is not part of the Opensuse 13.1 cross-platforms libraries. Thus we need to compile it by ourself, and it doesn't seem to be a piece of cake (at least for me). Otherwise, we can't enable the spell checker.

jazzynico (jazzynico) on 2013-11-19
Changed in inkscape-devlibs:
importance: Undecided → Medium
jazzynico (jazzynico) wrote :

Here's what I've tried:

1. Download aspell- from http://aspell.net/.
2. Patch the files with the attached diff.
3. Launch configure with the following options: --enable-win32-relocatable LDFLAGS="-L/z/dl3/lib -lpthreadGC2"
4. make fails with the following error:
/bin/sh ./libtool --tag=CXX --mode=link g++ -g -O2 -fno-exceptions -L/z/dl3/lib -lpthreadGC2 -o aspell.exe prog/aspell.o prog/check_funs.o prog/checker_string.o libaspell.la
libtool: link: g++ -g -O2 -fno-exceptions -o aspell.exe prog/aspell.o prog/check_funs.o prog/checker _string.o -L/z/dl3/lib ./.libs/libaspell.a -lpthreadGC2 -lintl
z:/mingw32-4.8.1/bin/../lib/gcc/mingw32/4.8.1/../../../libpthread.a(libwinpthread_la-mutex.o):mutex.c:(.text+0x498): multiple definition of `pthread_mutex_unlock'
z:/dl3/lib/libpthreadGC2.a(dtvbs00054.o):(.text+0x0): first defined here z:/mingw32-4.8.1/bin/../lib/gcc/mingw32/4.8.1/../../../libpthread.a(libwinpthread_la-mutex.o):mutex.c:(.text+0x55c): multiple definition of `pthread_mutex_init'
z:/dl3/lib/libpthreadGC2.a(dtvbs00050.o):(.text+0x0): first defined here z:/mingw32-4.8.1/bin/../lib/gcc/mingw32/4.8.1/../../../libpthread.a(libwinpthread_la-mutex.o):mutex.c:(.text+0x924): multiple definition of `pthread_mutex_lock'
z:/dl3/lib/libpthreadGC2.a(dtvbs00051.o):(.text+0x0): first defined here z:/mingw32-4.8.1/bin/../lib/gcc/mingw32/4.8.1/../../../libpthread.a(libwinpthread_la-mutex.o):mutex.c:(.text+0xa18): multiple definition of `pthread_mutex_destroy'
z:/dl3/lib/libpthreadGC2.a(dtvbs00049.o):(.text+0x0): first defined here collect2.exe: error: ld returned 1 exit status
make[1]: *** [aspell.exe] Error 1
make[1]: Leaving directory `/z/devlibs-local/src/aspell-'
make: *** [all-recursive] Error 1
I understand there's a conflict between devlibs' pthreadGC2.a and Mingw32's pthread.a. I've tried to use -lpthread instead of -lpthreadGC2, but it also fails some lines before.

Any idea?

jazzynico (jazzynico) wrote :

Without the patch, #make doesn't even finish to compile...

jazzynico (jazzynico) on 2013-11-19
summary: - Compile Aspell with GCC-4.8.1
+ [devlibs-gtk3] Compile Aspell with GCC-4.8.1
jazzynico (jazzynico) wrote :

It seems that the compilation issue is due to our removal of include/pthread.h and lib/libpthread.a. The linker finds a version in the mingw folder and tried to use it, leading to conflicts.
On the other hand, the lib/libpthread.a file from the opensuse package is incorrect and looks like a link to another lib (it only contains a text with libpthreadGC2.a). Replacing it with a copy of libpthreadGC2.a and reintroducing include/pthread.h fixed the issue for me and aspell compiled correctly.

I'm now trying to compile Inkscape with Aspell activated.

jazzynico (jazzynico) wrote :

Off course, you need to rename include/pthread.h and lib/libpthread.a once aspell is done so that Inkscape compile as expected.

My local Inkscape build has aspell activated, but it doesn't find any word list so the UI is just unusable. Investigation in progress...

Changed in inkscape-devlibs:
assignee: nobody → jazzynico (jazzynico)
jazzynico (jazzynico) wrote :

It now works! The word lists were missing with the default Aspell installation. Fixed by reusing the lists from the old devlibs.
Some extra tests, and it should be fixed in the devlibs-gtk3 in a day or two.

Changed in inkscape-devlibs:
assignee: jazzynico (jazzynico) → nobody
status: Triaged → In Progress
jazzynico (jazzynico) wrote :

Fixed in devlibs-gtk3, revision 31.

Documentation also updated (How-to compile Aspell with devlibs-gtk3).

Changed in inkscape-devlibs:
assignee: nobody → jazzynico (jazzynico)
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Bug attachments