-
Notifications
You must be signed in to change notification settings - Fork 349
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Compiling under Cygwin result in error "IN6_ADDR
not defined"
#403
Comments
IN6_ADDR
not defined"
And here I was going mad about this. Glad I am not the only one. |
I'm getting the same trying to compile 0.94 under Cygwin 64-bit / Windows 10. I'd try the hack workaround but turns out I don't have a I believe I have install all necessary depends with: First it gives some warnings on
Then errors on
Full paste here: |
does adding
to |
Use a tool like "grep" under unix-os-es to search for the missing define in your development toolchain. I tried looking for your missing define here on LInux but it wasn't found. On closer inspection, the error is thrown in YOUR includes, i.e. the missing define is NOT in the mtr sources anywhere, but your include files seem to be using a macro that is not defined. It is probably defined in another header, that you're supposed to include before the one that called this one. |
I just tried that - it errors earlier with this:
@rewolff I'll be happy to try anything, but I'm not a developer, I'm able to compile basic stuff under Cygwin but once I hit snags like this I'm lost on what to do. But willing to learn. I know it sucks trying to debug someone elses's setup, but this is pretty much a vanilla Cygwin install. But maybe I will try to just do a clean install from base to see if it helps. Edit: Did a clean install of Cygwin 64-bit, also tried adding |
@Pathduck - I have the same issue you are having where So this code snippet:
Became this code in
After this, I was able to run |
@casnix Brilliant, that worked beautifully! Thank you so much! 👍 I still got the same warnings as before but everything seems fine otherwise 😄 |
@casnix Thank you so much - works for me too :) Does anybody know if it's possibe to get mtr working in cmd or PowerShell, i.e. without an xterm? |
It seems to work fine here in Cmder (https://cmder.net) which is cmd so it should be fine as long as it's on the %PATH%. "Nothin' to it but to do it" as they say ;) |
Sorry, I phrased that unclearly. I'm trying to get mtr to run outside a Cygwin environment, i.e. I copied mtr.exe and its dependencies (cygwin1.dll, cygncursesw-10.dll etc.) to a directory and tried to run it in cmd and PowerShell, which results in the following error:
I think this is due to the usage of ncurses. |
@sphr2k Oh yeah I think you'll have a lot of dependecy issues trying that. It might work though, if you get all the dependencies copied. Best to just have I checked with Process Explorer, it seems to load at least:
|
@Pathduck Yep, those are the dependencies I identified as well. Still, mtr throws "Error opening terminal ..." |
I'm not sure how it's working for Pathduck. With a hint from #299 (comment), I ended up doing something like this: $ out="/cygdrive/c/Users/$USER/mtr"
$ mkdir -p "$out/"{terminfo/78,bin}
$ cp mtr/mtr{,-packet}.exe "$out/bin/"
$ cp /bin/cyg{win,ncursesw-10,jansson-4}.dll "$out/bin/"
$ cp /usr/share/terminfo/78/xterm-256color "$out/terminfo/78/" And a slightly simplified version of Matt's batch script: @echo off
set "PATH=%~dp0\bin;%PATH%"
set "TERMINFO=%~dp0\terminfo"
mtr.exe %* |
gcc 10.2.0-1
make 4.3-1
Always receive Error
IN6_ADDR not defined
while make is processingprobe.c
After a few greps, it turns out:
IN6_ADDR
is only defined in/usr/include/w32api/in6_addr.h
as alias ofin6_addr
.But
in6_addr
is declared in both/usr/include/cygwin/in6.h
andw32api/in6_addr.h
together with a flags6_addr
.in6.h
is included priorior to in6_addr.h, and declaress6_addr
in the first place,in6_addr.h
check for flags6_addr
before any declaration. soIN6_ADDR
and its poniters declared inin6_addr.h
are always ignored.Not sure how to fix this properly, so I just added a hack to the head of
/usr/include/w32api/in6_addr.h
before thes6_addr
check.The compilition finished without exception, and the binary seems to work fine.
Does this only happen to installtion ?
The text was updated successfully, but these errors were encountered: