andelf / go-curl

golang curl(libcurl) binding.
Apache License 2.0
485 stars 131 forks source link

No Windows 7 x64 Support #48

Closed fraenky8 closed 7 years ago

fraenky8 commented 8 years ago

Running in Windows 7 x64

go get -v github.com/andelf/go-curl

gives the error

cc1.exe: sorry, unimplemented: 64-bit mode not compiled in

and therefore cant be used.

Gcc-Version: gcc.exe (GCC) 4.9.3

andelf commented 8 years ago

Your MingW environment is 32bit?

fraenky8 commented 8 years ago

Does the following ouput help?

$ gcc -v
Using built-in specs.
COLLECT_GCC=D:\Programme\MinGW\bin\gcc.exe
COLLECT_LTO_WRAPPER=d:/programme/mingw/bin/../libexec/gcc/mingw32/4.9.3/lto-wrapper.exe
Target: mingw32
Configured with: ../src/gcc-4.9.3/configure --build=x86_64-pc-linux-gnu --host=mingw32 --prefix=/mingw --disable-win32-registry --target=mingw32 --with-arch=i586 --enable-languages=c,c++,objc,obj-c++,fortran,ada --enable-static --enable-shared --enable-threads --with-dwarf2 --disable-sjlj-exceptions --enable-version-specific-runtime-libs --enable-libstdcxx-debug --with-tune=generic --enable-nls
Thread model: win32
gcc version 4.9.3 (GCC)

Guess of line Target: mingw32 it is 32bit?

fraenky8 commented 8 years ago

Just installed ming-w64 and repeated go get:

$ go get -v github.com/andelf/go-curl
github.com/andelf/go-curl
# github.com/andelf/go-curl
D:\EigeneDateien\Coding\go\src\github.com\andelf\go-curl\multi.go:140: undefined: syscall.FdSet

gcc info:

$ gcc -v
Reading specs from d:/programme/mingw-w64/bin/../lib64/gcc/x86_64-w64-mingw32/4.8.3/specs
COLLECT_GCC=D:\Programme\MingW-w64\bin\gcc.exe
COLLECT_LTO_WRAPPER=d:/programme/mingw-w64/bin/../libexec/gcc/x86_64-w64-mingw32/4.8.3/lto-wrapper.exe
Target: x86_64-w64-mingw32
Configured with: ../gcc-4.8.3/configure --prefix=/opt/windows_64 --with-sysroot=/opt/windows_64 --libdir=/opt/windows_64/lib64 --mandir=/opt/windows_64/man --infodir=/opt/windows_64/info --enable-shared --disable-bootstrap --disable-multilib --enable-threads=posix --enable-languages=c,c++ --enable-checking=release --enable-libgomp --with-system-zlib --with-python-dir=/lib64/python2.7/site-packages --disable-libunwind-exceptions --enable-__cxa_atexit --enable-libssp --with-gnu-ld --verbose --enable-java-home --with-java-home=/opt/windows_64/lib64/jvm/jre --with-jvm-root-dir=/opt/windows_64/lib64/jvm --with-jvm-jar-dir=/opt/windows_64/lib64/jvm/jvm-exports --with-arch-directory=amd64 --with-antlr-jar='/home/adrien/projects/win-builds-1.5/slackware64-current/d/gcc/antlr-*.jar' --disable-java-awt --disable-gtktest --build=x86_64-slackware-linux --host=x86_64-w64-mingw32 --target=x86_64-w64-mingw32
Thread model: posix
gcc version 4.8.3 (GCC)
pm100 commented 8 years ago

i have the same fdset issue. Seems like fdset is not defined for windows

so i put // +build !windows in multi.go

andelf commented 8 years ago

@pm100 can you make a PR for your fix?

fraenky8 commented 7 years ago

Thanks a lot, it works! :)