mruby-r3
mruby-r3 copied to clipboard
Can no longer compile using mingw on Debian
Hi,
I can't compile this on Debian using mingw since this commit.
I now get the error:
```* $ MRUBY_CONFIG=mingw rake
GIT https://github.com/katzer/mruby-r3.git -> build/repos/windows/mruby-r3
Cloning into '/home/sean/tmp/mruby/build/repos/windows/mruby-r3'...
remote: Enumerating objects: 40, done.
remote: Counting objects: 100% (40/40), done.
remote: Compressing objects: 100% (38/38), done.
remote: Total 40 (delta 8), reused 12 (delta 0), pack-reused 0
Receiving objects: 100% (40/40), 31.73 KiB | 833.00 KiB/s, done.
Resolving deltas: 100% (8/8), done.
CPP build/repos/windows/mruby-r3/src/mrb_r3.c -> build/windows/mrbgems/mruby-r3/src/mrb_r3.pi
CPP build/repos/windows/mruby-r3/r3/src/asprintf.c -> build/windows/mrbgems/mruby-r3/r3/src/asprintf.pi
CPP build/repos/windows/mruby-r3/r3/src/edge.c -> build/windows/mrbgems/mruby-r3/r3/src/edge.pi
CPP build/repos/windows/mruby-r3/r3/src/match_entry.c -> build/windows/mrbgems/mruby-r3/r3/src/match_entry.pi
CPP build/repos/windows/mruby-r3/r3/src/memory.c -> build/windows/mrbgems/mruby-r3/r3/src/memory.pi
CPP build/repos/windows/mruby-r3/r3/src/node.c -> build/windows/mrbgems/mruby-r3/r3/src/node.pi
/home/sean/tmp/mruby/build/repos/windows/mruby-r3/r3/src/node.c:10:10: fatal error: netinet/in.h: No such file or directory
10 | #include <netinet/in.h>
| ^~~~~~~~~~~~~~
compilation terminated.
rake aborted!
Command failed with status (1): [x86_64-w64-mingw32-gcc-posix -E -P -std=gnu99 -g -O3 -Wall -Wundef -Werror-implicit-function-declaration -Wwrite-strings -DMRB_ARY_LENGTH_MAX=0 -DMRB_STR_LENGTH_MAX=0 -DHAVE_STRDUP -DMRBGEM_MRUBY_R3_VERSION=0.0.0 -DMRB_USE_RATIONAL -DMRB_USE_COMPLEX -DMRB_USE_BIGINT -I"/home/sean/tmp/mruby/include" -I"/home/sean/tmp/mruby/build/repos/windows/mruby-r3/r3/include" -I"/home/sean/tmp/mruby/build/repos/windows/mruby-r3/r3/src" -I"/home/sean/tmp/mruby/build/windows/include" -DMRB_PRESYM_SCANNING -o "/home/sean/tmp/mruby/build/windows/mrbgems/mruby-r3/r3/src/node.pi" "/home/sean/tmp/mruby/build/repos/windows/mruby-r3/r3/src/node.c"]
/home/sean/tmp/mruby/lib/mruby/build/command.rb:33:in `_run'
/home/sean/tmp/mruby/lib/mruby/build/command.rb:95:in `run'
/home/sean/tmp/mruby/lib/mruby/build/command.rb:116:in `block (2 levels) in define_rules'
Tasks: TOP => default => all => gensym => /home/sean/tmp/mruby/build/windows/presym => /home/sean/tmp/mruby/build/windows/mrbgems/mruby-r3/r3/src/node.pi
(See full trace by running task with --trace)
my build config for mruby is:
MRuby::CrossBuild.new("windows") do |conf|
conf.toolchain :gcc
conf.cc.flags += %w[-DMRB_ARY_LENGTH_MAX=0 -DMRB_STR_LENGTH_MAX=0]
conf.host_target = "x86_64-w64-mingw32" # required for `for_windows?` used by `mruby-socket` gem
conf.cc.command = "#{conf.host_target}-gcc-posix"
conf.linker.command = conf.cc.command
conf.archiver.command = "#{conf.host_target}-gcc-ar"
conf.exts.executable = ".exe"
# These are the default libraries
conf.gembox "stdlib"
conf.gembox "stdlib-ext"
conf.gembox "stdlib-io"
conf.gembox "math"
conf.gembox "metaprog"
conf.gem github: "katzer/mruby-r3"
end