Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Issues compiling hunspell from source on windows

Reply
Thread Tools

Issues compiling hunspell from source on windows

 
 
Akshay Kayastha
Guest
Posts: n/a
 
      06-30-2013
Hi I am trying to compile a python module called hunspell from the following [source](https://pypi.python.org/pypi/hunspell).

But I get the following error message.

C:\Users\KURO\Desktop\hunspell-0.1>setup.py install
running install
running build
running build_ext
building 'hunspell' extension
C:\mingw\bin\gcc.exe -mno-cygwin -mdll -O -Wall -D_LINUX -I/usr/include/hunspell
-IC:\Python27\include -IC:\Python27\PC -c hunspell.c -o build\temp.win-amd64-2.
7\Release\hunspell.o -Wall
writing build\temp.win-amd64-2.7\Release\hunspell.def
C:\mingw\bin\gcc.exe -mno-cygwin -shared -s build\temp.win-amd64-2.7\Release\hun
spell.o build\temp.win-amd64-2.7\Release\hunspell.def -LC:\Python27\libs -LC:\Py
thon27\PCbuild\amd64 -lhunspell-1.2 -lpython27 -lmsvcr90 -o build\lib.win-amd64-
2.7\hunspell.pyd
c:/mingw/bin/../lib/gcc/mingw32/4.3.3/../../../../mingw32/bin/ld.exe: cannot fin
d -lhunspell-1.2
collect2: ld returned 1 exit status
error: command 'gcc' failed with exit status 1

I tried downloading libhunspell-1.2-0.dll and put it into my system. But I still get the same error message. How do I deal with this? I have Windows 7 and [mingw](http://www.develer.com/oss/GccWinBinaries)
 
Reply With Quote
 
 
 
 
rusi
Guest
Posts: n/a
 
      06-30-2013
On Sunday, June 30, 2013 9:24:46 PM UTC+5:30, Akshay Kayastha wrote:
> Hi I am trying to compile a python module called hunspell from the following
> [source](https://pypi.python.org/pypi/hunspell).
>


According to
http://docs.python.org/2/extending/windows.html
you need to use the same compiler for the extension as used to compile python.

That means one of
1. Use the MSC version used for your python
2. Recompile python from source using mingw
3. Switch to linux
 
Reply With Quote
 
 
 
 
Akshay Kayastha
Guest
Posts: n/a
 
      06-30-2013
Haha... nooo I already use Linux. But I am currently doing a project that required me to run my script on Windows as well as Linux. TO be precise I amsupposed to create a stand alone executable for my script which runs greaton Linux, but to create one for Windows I need to be able to run the script first. My script runs fine on Linux as its hella easy to install the module, but on windows I cant seem to be able to get the module working

 
Reply With Quote
 
David Robinow
Guest
Posts: n/a
 
      06-30-2013
It appears you are using a 32 bit compiler with a 64-bit python.
Install a 32 bit python.

On Sun, Jun 30, 2013 at 11:54 AM, Akshay Kayastha <(E-Mail Removed)> wrote:
> Hi I am trying to compile a python module called hunspell from the following [source](https://pypi.python.org/pypi/hunspell).
>
> But I get the following error message.
>
> C:\Users\KURO\Desktop\hunspell-0.1>setup.py install
> running install
> running build
> running build_ext
> building 'hunspell' extension
> C:\mingw\bin\gcc.exe -mno-cygwin -mdll -O -Wall -D_LINUX -I/usr/include/hunspell
> -IC:\Python27\include -IC:\Python27\PC -c hunspell.c -o build\temp.win-amd64-2.
> 7\Release\hunspell.o -Wall
> writing build\temp.win-amd64-2.7\Release\hunspell.def
> C:\mingw\bin\gcc.exe -mno-cygwin -shared -s build\temp.win-amd64-2.7\Release\hun
> spell.o build\temp.win-amd64-2.7\Release\hunspell.def -LC:\Python27\libs -LC:\Py
> thon27\PCbuild\amd64 -lhunspell-1.2 -lpython27 -lmsvcr90 -o build\lib.win-amd64-
> 2.7\hunspell.pyd
> c:/mingw/bin/../lib/gcc/mingw32/4.3.3/../../../../mingw32/bin/ld.exe: cannot fin
> d -lhunspell-1.2
> collect2: ld returned 1 exit status
> error: command 'gcc' failed with exit status 1
>
> I tried downloading libhunspell-1.2-0.dll and put it into my system. But I still get the same error message. How do I deal with this? I have Windows 7 and [mingw](http://www.develer.com/oss/GccWinBinaries)
> --
> http://mail.python.org/mailman/listinfo/python-list

 
Reply With Quote
 
Akshay Kayastha
Guest
Posts: n/a
 
      07-01-2013
I installed a 32 bit python and it still gives me the same error.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: Is there any way to get the raw image data from a Nikon Coolpix S8200 P&S camera? Tony Cooper Digital Photography 16 04-17-2013 07:49 PM
From IrfanView to Desktop wallpaper? Terry Pinnell Digital Photography 5 04-10-2013 11:11 PM
Re: retrieving data from a plot in python. Gary Herron Python 0 04-09-2013 06:00 PM
retrieving data from a plot in python. Debashish Saha Python 1 04-09-2013 05:58 PM
when I read gzipped response from web-servers, GzipReader returnssometimes 'invalid compressed data -- crc error' henry.jykim@gmail.com Ruby 0 04-08-2013 03:51 PM



Advertisments