PerlAlien / Alien-Hunspell

Install hunspell
0 stars 1 forks source link

Strawberry support #1

Closed plicease closed 8 years ago

plicease commented 8 years ago

There is a mingw port here:

https://github.com/zdenop/hunspell-mingw

But I would rather get it working with the original source if possible. This gets it to compile under whatever strawberry that I am using:

https://github.com/plicease/hunspell/commit/48ecac66b929f77215ac89c5f9528556f6e1945f

But then it barfs on link like this:

straw-N:\home\ollisg\dev\hunspell\src\hunspell>gmake
gmake
N:/home/ollisg/perl5/strawberry/x86/5.20.1/lib/perl5/auto/share/dist/Alien-MSYS/msys/1.0/bin/sh.exe ../../libtool  --tag=CXX   --mode=link g++ -fvisibility=hidden -DBUILDING_LIBHUNSPELL -g -O2 -no-undefined  -o libhunspell-1.3.la -rpath /usr/local/lib affentry.lo affixmgr.lo csutil.lo dictmgr.lo hashmgr.lo hunspell.lo suggestmgr.lo phonet.lo filemgr.lo hunzip.lo replist.lo  
libtool: link: warning: library `n:/lang/perl/strawberry/x86/5.20.1/c/bin/../lib/gcc/i686-w64-mingw32/4.8.3/libstdc++.la' was moved.
libtool: link: g++ -shared -nostdlib n:/lang/perl/strawberry/x86/5.20.1/c/bin/../lib/gcc/i686-w64-mingw32/4.8.3/../../../../i686-w64-mingw32/lib/../lib/dllcrt2.o n:/lang/perl/strawberry/x86/5.20.1/c/bin/../lib/gcc/i686-w64-mingw32/4.8.3/crtbegin.o  .libs/affentry.o .libs/affixmgr.o .libs/csutil.o .libs/dictmgr.o .libs/hashmgr.o .libs/hunspell.o .libs/suggestmgr.o .libs/phonet.o .libs/filemgr.o .libs/hunzip.o .libs/replist.o   -L/opt/build/i686-483-posix-sjlj-rt_v3/mingw32/opt/lib -L/opt/build/prerequisites/i686-zlib-static/lib -L/opt/build/prerequisites/i686-w64-mingw32-static/lib' -Ln:/lang/perl/strawberry/x86/5.20.1/c/bin/../lib/gcc/i686-w64-mingw32/4.8.3 -Ln:/lang/perl/strawberry/x86/5.20.1/c/bin/../lib/gcc -Ln:/lang/perl/strawberry/x86/5.20.1/c/bin/../lib/gcc/i686-w64-mingw32/4.8.3/../../../../i686-w64-mingw32/lib/../lib -Ln:/lang/perl/strawberry/x86/5.20.1/c/bin/../lib/gcc/i686-w64-mingw32/4.8.3/../../../../lib -Ln:/lang/perl/strawberry/x86/5.20.1/c/bin/../lib/gcc/i686-w64-mingw32/4.8.3/../../../../i686-w64-mingw32/lib -Ln:/lang/perl/strawberry/x86/5.20.1/c/bin/../lib/gcc/i686-w64-mingw32/4.8.3/../../.. n:/lang/perl/strawberry/x86/5.20.1/c/bin/../lib/gcc/i686-w64-mingw32/4.8.3/libstdc++.dll.a -L/opt/build/i686-483-posix-sjlj-rt_v3/build/gcc-4.8.3/i686-w64-mingw32/libstdc++-v3/src -L/opt/build/i686-483-posix-sjlj-rt_v3/build/gcc-4.8.3/i686-w64-mingw32/libstdc++-v3/src/.libs -L/mingw32/i686-w64-mingw32/lib -L/mingw32/mingw/lib -lmingw32 -lgcc_s -lgcc -lmoldname -lmingwex -lmsvcrt -lpthread -ladvapi32 -lshell32 -luser32 -lkernel32 -liconv -lmingw32 -lgcc_s -lgcc -lmoldname -lmingwex -lmsvcrt n:/lang/perl/strawberry/x86/5.20.1/c/bin/../lib/gcc/i686-w64-mingw32/4.8.3/crtend.o    -o .libs/libhunspell-1.3-0.dll -Wl,--enable-auto-image-base -Xlinker --out-implib -Xlinker .libs/libhunspell-1.3.dll.a
../../libtool: eval: line 7860: unexpected EOF while looking for matching `''
../../libtool: eval: line 7861: syntax error: unexpected end of file
Makefile:492: recipe for target 'libhunspell-1.3.la' failed
gmake: *** [libhunspell-1.3.la] Error 1

The underlying problem seems to be is that it is creating a libtool for the MSYS (using the Alien::MSYS share version) rather than the gcc/g++ that came with Strawberry. So once again the incomplete strawberry toolkit strikes again. Or fails to strike.

plicease commented 8 years ago

Monkey patching libtool 2.4 seems to get it to compile too!

plicease commented 8 years ago

This is now working and should go to CPAN as 0.03.