Building 4.6.1 on WIndows

118 views
Skip to first unread message

hgruber

unread,
Aug 27, 2012, 1:48:57 PM8/27/12
to wvstrea...@googlegroups.com
Hi all,

I am trying to build 4.6.1 on Windows, using MSYS/MinGW.
It was a real pain to get ./configure up and running - even had to build OpenSSL from source, then had to copy include-Files and libs to MinGW.

Now, after "make", it keeps complaining about "bin/bash: line 0: cd: /dev/null: Not a directory".
This is really weird.

What am I doing wrong?

Is there a receipe to build under windows?

Kind regards,
Helmut

Avery Pennarun

unread,
Aug 27, 2012, 5:21:39 PM8/27/12
to hgruber, wvstrea...@googlegroups.com
You should consider the wvbuild package from my github repo. It
provides all the extra stuff wvstreams needs in order to build on
Windows.

Personally, I prefer to build wvstreams on Linux using the mingw32
cross compiler, which works fine. I haven't tried building it under
straight msys. You may need to build it under cygwin to provide a
more unix-compatible environment than msys (but after it's built, it
*doesn't* require cygwin, I know that for sure).

Have fun,

Avery

hgruber

unread,
Aug 27, 2012, 6:37:49 PM8/27/12
to wvstrea...@googlegroups.com
Thanks for the quick reply.
I tried two of the ways:

- Plain MSYS under Win32 doesn´t work, as you already described (error: i586-mingwmsvc-gcc not found)

- Inside a virtual wheezy box, it didn´t work either with ming32 crosscompiler:
...
_NO_RC5 -DOPENSSL_NO_MDC2 -DOPENSSL_NO_KRB5 -DOPENSSL_NO_DYNAMIC_ENGINE -DNO_WINDOWS_BRAINDEATH -c  -o x86cpuid-cof.o x86cpuid-cof.s
x86cpuid-cof.s: Assembler messages:
x86cpuid-cof.s:10: Error: unknown pseudo-op: `.def'
x86cpuid-cof.s:10: Error: unknown pseudo-op: `.scl'
x86cpuid-cof.s:10: Error: unrecognized symbol type "32"
x86cpuid-cof.s:10: Error: unknown pseudo-op: `.endef'
x86cpuid-cof.s:44: Error: unknown pseudo-op: `.def'
x86cpuid-cof.s:44: Error: unknown pseudo-op: `.scl'
x86cpuid-cof.s:44: Error: unrecognized symbol type "32"
x86cpuid-cof.s:44: Error: unknown pseudo-op: `.endef'
x86cpuid-cof.s:59: Error: unknown pseudo-op: `.def'
x86cpuid-cof.s:59: Error: unknown pseudo-op: `.scl'
x86cpuid-cof.s:59: Error: unrecognized symbol type "32"
x86cpuid-cof.s:59: Error: unknown pseudo-op: `.endef'
x86cpuid-cof.s:89: Error: unknown pseudo-op: `.def'
x86cpuid-cof.s:89: Error: unknown pseudo-op: `.scl'
x86cpuid-cof.s:89: Error: unrecognized symbol type "32"
x86cpuid-cof.s:89: Error: unknown pseudo-op: `.endef'
x86cpuid-cof.s:117: Error: unknown pseudo-op: `.def'
x86cpuid-cof.s:117: Error: unknown pseudo-op: `.scl'
x86cpuid-cof.s:117: Error: unrecognized symbol type "32"
x86cpuid-cof.s:117: Error: unknown pseudo-op: `.endef'
x86cpuid-cof.s:134: Error: unknown pseudo-op: `.def'
x86cpuid-cof.s:134: Error: unknown pseudo-op: `.scl'
x86cpuid-cof.s:134: Error: unrecognized symbol type "32"
x86cpuid-cof.s:134: Error: unknown pseudo-op: `.endef'
x86cpuid-cof.s:154: Error: unknown pseudo-op: `.def'
x86cpuid-cof.s:154: Error: unknown pseudo-op: `.scl'
x86cpuid-cof.s:154: Error: unrecognized symbol type "32"
x86cpuid-cof.s:154: Error: unknown pseudo-op: `.endef'
make[3]: *** [x86cpuid-cof.o] Fehler 1
make[2]: *** [build_crypto] Fehler 1
make[1]: *** [.stamp-compile] Fehler 2
make: *** [wvports/openssl] Fehler 2

Maybe that is a side-effect of virtualisation? I´m on a MacBook with wheezy indside a Parallels container...

Next days I´m going to try out cygwin, and post the results here.

Regards,
Helmut

Avery Pennarun

unread,
Aug 27, 2012, 6:40:01 PM8/27/12
to hgruber, wvstrea...@googlegroups.com
> - Inside a virtual wheezy box, it didn´t work either with ming32
> crosscompiler:
> ...
> _NO_RC5 -DOPENSSL_NO_MDC2 -DOPENSSL_NO_KRB5 -DOPENSSL_NO_DYNAMIC_ENGINE
> -DNO_WINDOWS_BRAINDEATH -c -o x86cpuid-cof.o x86cpuid-cof.s
> x86cpuid-cof.s: Assembler messages:
> x86cpuid-cof.s:10: Error: unknown pseudo-op: `.def'
> x86cpuid-cof.s:10: Error: unknown pseudo-op: `.scl'

It would have been nice if you had pasted in the entire compile command line :)

Random guesses: maybe that version of openssl doesn't work with newer
versions of gas (you could try upgrading openssl in wvbuild). If in
doubt, you could try an older version of debian in your VM. I'm
pretty sure sarge works (I haven't played with it in a while).

Have fun,

Avery

hgruber

unread,
Aug 29, 2012, 10:24:57 AM8/29/12
to wvstrea...@googlegroups.com, hgruber
Fyi..
Next try: pure cygwin environment in a Win7-Box - failed to compile..
--
Markus@W2P ~/wvstreams-4.6.1
$ make
* Generating CC using c
* Generating CXX using cc
make -C argp
make[1]: Entering directory `/home/Markus/wvstreams-4.6.1/argp'
make  all-recursive
make[2]: Entering directory `/home/Markus/wvstreams-4.6.1/argp'
Making all in .
make[3]: Entering directory `/home/Markus/wvstreams-4.6.1/argp'
make[3]: Leaving directory `/home/Markus/wvstreams-4.6.1/argp'
Making all in testsuite
make[3]: Entering directory `/home/Markus/wvstreams-4.6.1/argp/testsuite'
make[3]: Für das Ziel »all« ist nichts zu tun.
make[3]: Leaving directory `/home/Markus/wvstreams-4.6.1/argp/testsuite'
make[2]: Leaving directory `/home/Markus/wvstreams-4.6.1/argp'
make[1]: Leaving directory `/home/Markus/wvstreams-4.6.1/argp'
./CXX -c utils/wvcont
utils/wvcont.cc:1:0: Warnung: -fPIC für Ziel ignoriert (der gesamte Code ist positionsunabhängig)
In file included from utils/wvcont.cc:9:0:
./include/wvtask.h:27:22: schwerwiegender Fehler: ucontext.h: No such file or directory
Kompilierung beendet.
wvrules.mk:163: recipe for target `utils/wvcont.o' failed
make: *** [utils/wvcont.o] Error 1

Markus@W2P ~/wvstreams-4.6.1

--

My next try will be to setup a debian sarge environment, as suggested [hope it´s still out there somewhere :-) ]

Regards,
Helmut

hgruber

unread,
Aug 29, 2012, 12:46:30 PM8/29/12
to wvstreams-devel
Hi all,

I got a deb sarge running, installed mingw32 as proposed in the
"README.win32" File.

./configure went well, make made all of the "wvports" libraries.

Then however it errored out at /argp:

if i586-mingw32msvc-gcc -DHAVE_CONFIG_H -I. -I../wvsrcdir/argp -I. -
mno-cygwin -I/home/hg/apenwarr-wvbuild-8c479c9/
wvstreams/../wvports/zlib/build/zlib -I/home/hg/apenwarr-
wvbuild-8c479c9/wvstreams/../wvports/openssl/build/openssl/include -I/
home/hg/apenwarr-wvbuild-8c479c9/wvports/boost/build/
boost -I/home/hg/apenwarr-wvbuild-8c479c9/wvstreams/../
wvports/win32api/build/w32api/include -I../wvsrcdir/argp -I../../
wvsrcdir/argp -g -O2 -ggdb3 -Wall -W -Wmissing-prototypes -Wmissing-
declarations -Wstrict-prototypes -Waggregate-return -Wpointer-arith -
Wbad-function-cast -Wnested-externs -fPIC -MT argp-pvh.o -MD -MP -MF
".deps/argp-pvh.Tpo" -c -o argp-pvh.o ../wvsrcdir/argp/argp-pvh.c; \
then mv -f ".deps/argp-pvh.Tpo" ".deps/argp-pvh.Po"; else rm -f ".deps/
argp-pvh.Tpo"; exit 1; fi
../wvsrcdir/argp/argp-pvh.c:1: warning: -fPIC ignored for target (all
code is position independent)
if i586-mingw32msvc-gcc -DHAVE_CONFIG_H -I. -I../wvsrcdir/argp -I. -
mno-cygwin -I/home/hg/apenwarr-wvbuild-8c479c9/
wvstreams/../wvports/zlib/build/zlib -I/home/hg/apenwarr-
wvbuild-8c479c9/wvstreams/../wvports/openssl/build/openssl/include -I/
home/hg/apenwarr-wvbuild-8c479c9/wvports/boost/build/
boost -I/home/hg/apenwarr-wvbuild-8c479c9/wvstreams/../
wvports/win32api/build/w32api/include -I../wvsrcdir/argp -I../../
wvsrcdir/argp -g -O2 -ggdb3 -Wall -W -Wmissing-prototypes -Wmissing-
declarations -Wstrict-prototypes -Waggregate-return -Wpointer-arith -
Wbad-function-cast -Wnested-externs -fPIC -MT mempcpy.o -MD -MP -MF
".deps/mempcpy.Tpo" -c -o mempcpy.o ../wvsrcdir/argp/mempcpy.c; \
then mv -f ".deps/mempcpy.Tpo" ".deps/mempcpy.Po"; else rm -f ".deps/
mempcpy.Tpo"; exit 1; fi
../wvsrcdir/argp/mempcpy.c:1: warning: -fPIC ignored for target (all
code is position independent)
../wvsrcdir/argp/mempcpy.c:14: warning: no previous prototype for
'mempcpy'
if i586-mingw32msvc-gcc -DHAVE_CONFIG_H -I. -I../wvsrcdir/argp -I. -
mno-cygwin -I/home/hg/apenwarr-wvbuild-8c479c9/
wvstreams/../wvports/zlib/build/zlib -I/home/hg/apenwarr-
wvbuild-8c479c9/wvstreams/../wvports/openssl/build/openssl/include -I/
home/hg/apenwarr-wvbuild-8c479c9/wvports/boost/build/
boost -I/home/hg/apenwarr-wvbuild-8c479c9/wvstreams/../
wvports/win32api/build/w32api/include -I../wvsrcdir/argp -I../../
wvsrcdir/argp -g -O2 -ggdb3 -Wall -W -Wmissing-prototypes -Wmissing-
declarations -Wstrict-prototypes -Waggregate-return -Wpointer-arith -
Wbad-function-cast -Wnested-externs -fPIC -MT strndup.o -MD -MP -MF
".deps/strndup.Tpo" -c -o strndup.o ../wvsrcdir/argp/strndup.c; \
then mv -f ".deps/strndup.Tpo" ".deps/strndup.Po"; else rm -f ".deps/
strndup.Tpo"; exit 1; fi
../wvsrcdir/argp/strndup.c:1: warning: -fPIC ignored for target (all
code is position independent)
../wvsrcdir/argp/strndup.c:15: warning: no previous prototype for
'strndup'
if i586-mingw32msvc-gcc -DHAVE_CONFIG_H -I. -I../wvsrcdir/argp -I. -
mno-cygwin -I/home/hg/apenwarr-wvbuild-8c479c9/
wvstreams/../wvports/zlib/build/zlib -I/home/hg/apenwarr-
wvbuild-8c479c9/wvstreams/../wvports/openssl/build/openssl/include -I/
home/hg/apenwarr-wvbuild-8c479c9/wvports/boost/build/
boost -I/home/hg/apenwarr-wvbuild-8c479c9/wvstreams/../
wvports/win32api/build/w32api/include -I../wvsrcdir/argp -I../../
wvsrcdir/argp -g -O2 -ggdb3 -Wall -W -Wmissing-prototypes -Wmissing-
declarations -Wstrict-prototypes -Waggregate-return -Wpointer-arith -
Wbad-function-cast -Wnested-externs -fPIC -MT strchrnul.o -MD -MP -MF
".deps/strchrnul.Tpo" -c -o strchrnul.o ../wvsrcdir/argp/strchrnul.c;
\
then mv -f ".deps/strchrnul.Tpo" ".deps/strchrnul.Po"; else rm -f
".deps/strchrnul.Tpo"; exit 1; fi
../wvsrcdir/argp/strchrnul.c:1: warning: -fPIC ignored for target (all
code is position independent)
../wvsrcdir/argp/strchrnul.c:15: warning: no previous prototype for
'strchrnul'
rm -f libargp.a
: cru libargp.a argp-ba.o argp-eexst.o argp-fmtstream.o argp-help.o
argp-parse.o argp-pv.o argp-pvh.o mempcpy.o strndup.o strchrnul.o
i586-mingw32msvc-ranlib libargp.a
i586-mingw32msvc-ranlib: 'libargp.a': No such file
make all-recursive
make[3]: Entering directory `/home/hg/apenwarr-wvbuild-8c479c9/i586-
mingw32msvc/argp'
Making all in .
make[4]: Entering directory `/home/hg/apenwarr-wvbuild-8c479c9/i586-
mingw32msvc/argp'
rm -f libargp.a
: cru libargp.a argp-ba.o argp-eexst.o argp-fmtstream.o argp-help.o
argp-parse.o argp-pv.o argp-pvh.o mempcpy.o strndup.o strchrnul.o
i586-mingw32msvc-ranlib libargp.a
i586-mingw32msvc-ranlib: 'libargp.a': No such file
if i586-mingw32msvc-gcc -DHAVE_CONFIG_H -I. -I../wvsrcdir/argp -I. -
mno-cygwin -I/home/hg/apenwarr-wvbuild-8c479c9/
wvstreams/../wvports/zlib/build/zlib -I/home/hg/apenwarr-
wvbuild-8c479c9/wvstreams/../wvports/openssl/build/openssl/include -I/
home/hg/apenwarr-wvbuild-8c479c9/wvports/boost/build/
boost -I/home/hg/apenwarr-wvbuild-8c479c9/wvstreams/../
wvports/win32api/build/w32api/include -I../wvsrcdir/argp -I../../
wvsrcdir/argp -g -O2 -ggdb3 -Wall -W -Wmissing-prototypes -Wmissing-
declarations -Wstrict-prototypes -Waggregate-return -Wpointer-arith -
Wbad-function-cast -Wnested-externs -fPIC -MT argp-test.o -MD -MP -MF
".deps/argp-test.Tpo" -c -o argp-test.o ../wvsrcdir/argp/argp-test.c;
\
then mv -f ".deps/argp-test.Tpo" ".deps/argp-test.Po"; else rm -f
".deps/argp-test.Tpo"; exit 1; fi
../wvsrcdir/argp/argp-test.c:1: warning: -fPIC ignored for target (all
code is position independent)
i586-mingw32msvc-gcc -g -O2 -ggdb3 -Wall -W -Wmissing-prototypes -
Wmissing-declarations -Wstrict-prototypes -Waggregate-return -
Wpointer-arith -Wbad-function-cast -Wnested-externs -fPIC -L/home/hg/
apenwarr-wvbuild-8c479c9/wvstreams/../wvports/zlib/build/
zlib -L/home/hg/apenwarr-wvbuild-8c479c9/wvstreams/../
wvports/openssl/build/openssl -L/home/hg/apenwarr-
wvbuild-8c479c9/wvstreams/../wvports/win32api/build/w32api/lib -o argp-
test.exe argp-test.o libargp.a -lwsock32 -lgdi32
i586-mingw32msvc-gcc: libargp.a: Datei oder Verzeichnis nicht gefunden
make[4]: *** [argp-test.exe] Fehler 1
make[4]: Leaving directory `/home/hg/apenwarr-wvbuild-8c479c9/i586-
mingw32msvc/argp'
make[3]: *** [all-recursive] Fehler 1
make[3]: Leaving directory `/home/hg/apenwarr-wvbuild-8c479c9/i586-
mingw32msvc/argp'
make[2]: *** [all] Fehler 2
make[2]: Leaving directory `/home/hg/apenwarr-wvbuild-8c479c9/i586-
mingw32msvc/argp'
make[1]: *** [argp/all] Fehler 2
make[1]: Leaving directory `/home/hg/apenwarr-wvbuild-8c479c9/i586-
mingw32msvc'
make: *** [default] Fehler 2

Regards,
Helmut

PS: If it is that complicated to build the lib for windoze, would you
mind to pubish the binary libs on github?

hgruber

unread,
Aug 31, 2012, 7:21:49 AM8/31/12
to wvstrea...@googlegroups.com
Hi all,

I gave it another try with a fresh install of debian sarge in a parallels container, and after a bit fiddling around with some include files, the library finally compiled.
The output is as file called "libwvstatic.a".

However when I link that file to my projekt, MSVC (Version 2010) complains about not finding any Wv-Classes at all.
Seems that the output of the old-aged mingw32 crosscompiler does not fit to the current Visual Studio 2010 c++ linking format.

Porting all my projects from VS to mingw is not an option for me.
So, after one week of trying to get this working, I´m finally giving up.

Helmut
Reply all
Reply to author
Forward
0 new messages