foresterre / fork.wren

The Wren Programming Language
http://munificent.github.io/wren/
MIT License
0 stars 0 forks source link

Windows build fails on libuv (mingw) #1

Open foresterre opened 8 years ago

foresterre commented 8 years ago

TODO When building with MinGW, the windows build fails on the libuv build

Probably caused by building libuv with "vcbuild.bat", which builds libuv with visual studio. Therefor the libuv.a can not be found.

Building libuv with nuwen mingw also fails: make.exe -f .\Makefile.mingw

Current progress:

foresterre commented 8 years ago

libuv error with nuwen mingw:

cc -Wall -Wextra -Wno-unused-parameter -Iinclude -Isrc -Isrc/win -DWIN32_LEAN_AND_MEAN -D_WIN32_WINNT= process_begin: CreateProcess(NULL, cc -Wall -Wextra -Wno-unused-parameter -Iinclude -Isrc -Isrc/win -D make (e=2): The system cannot find the file specified. makefile:84: recipe for target 'src/fs-poll.o' failed make: *\ [src/fs-poll.o] Error 2

foresterre commented 8 years ago

see https://bugs.chromium.org/p/v8/issues/detail?id=2197 (2012)

foresterre commented 8 years ago

When substituting gcc.exe for cc.exe, and build with make.exe -f .\Makefile.mingw, build succeeds.

foresterre commented 8 years ago
PS \\wren> D:\Tools\Nuwen\MinGW\bin\mingw32-make.exe all
mingw32-make[1]: Entering directory '\\wren'
['-Dtarget_arch=ia32', '-Duv_library=static_library', '.\\uv.gyp', '-I', '.\\common.gypi', '--depth=.', '-Dhost_arch=AMD64', '-Dcomponent=static_library']
Failed to create vc project files.

util/wren.mk:205: recipe for target 'build/libuv.a' failed
mingw32-make[1]: *** [build/libuv.a] Error 1
mingw32-make[1]: Leaving directory '\\wren'
makefile:14: recipe for target 'debug' failed
mingw32-make: *** [debug] Error 2'

It would be nice if I somehow could get full paths because, I've no clue where build/libuv.a should be located. I do have a libuv.a in the deps/libuv directory.

foresterre commented 8 years ago
PS \\wren> D:\Tools\Nuwen\MinGW\bin\make.exe -f .\Makefile
make[1]: Entering directory '\\wren'
       GCC bin/wren                       -O3 -std=c99
d:/tools/nuwen/mingw/bin/../lib/gcc/x86_64-w64-mingw32/5.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lpthread
d:/tools/nuwen/mingw/bin/../lib/gcc/x86_64-w64-mingw32/5.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lrt
collect2.exe: error: ld returned 1 exit status
util/wren.mk:143: recipe for target 'bin/wren' failed
make[1]: *** [bin/wren] Error 1
make[1]: Leaving directory '\\wren'
.\Makefile:9: recipe for target 'release' failed
make: *** [release] Error 2

lpthread is not used by mingw see https://www.sourceware.org/pthreads-win32/

lrt, no information

foresterre commented 8 years ago

Full make --debug=v log at https://gist.github.com/foresterre/46b6e36dee5ca38ba95b