Skip to content
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

testutils won't compile when targeting windows xp #2091

Closed
CommanderBubble opened this issue Aug 27, 2016 · 5 comments
Closed

testutils won't compile when targeting windows xp #2091

CommanderBubble opened this issue Aug 27, 2016 · 5 comments

Comments

@CommanderBubble
Copy link
Contributor

under windows xp, inet_pton is not available, so testutils will not build, erroring on line 339.

additionally, inet_addr is only available for ipv4 addresses, so we don't have access to this method for converting the string to an address for pre-vista systems. (http://msdn.microsoft.com/en-us/library/windows/desktop/ms738563(v=vs.85).aspx)

@bluca
Copy link
Member

bluca commented Aug 27, 2016

The joys of Windows. Sigh. Could you please test this branch for me (I don't have a Windows XP box available):

https://github.com/bluca/libzmq/tree/xp_testutils_ipv6

@CommanderBubble
Copy link
Contributor Author

technically i don't have a windows xp box either, but on windows unless you actually specify your windows version when calling make (at least for an MSYS2 build) with CXXFLAGS="-D_WIN32_WINNT=0x0600" (for vista) it either A) won't autodecect what you are, or B) doesn't care what you are and builds for the minimum available target, ie XP.

if i call make with that argument, then everything builds fine.

that aside, testing now.

I had a look at the changes, will disabling this check affect zmq's ability to run on XP? i had a quick google and XP supports ipv6, but only if you manually installed it, though maybe that changed with one of the later service packs...

@bluca
Copy link
Member

bluca commented Aug 27, 2016

There are other instances checking the WINNT version in the code, in other tests as well, test_heartbeats.cpp has the exact same problem with inet_pton for example, so that should be fine, I haven't looked into it but I think our build systems for Windows handle all of that.

This is just a test, and in that a utility function used to try and detect if IPv6 is available, that is used by one test. I created it for use in our CI system on Travis more than anything else. It will not impact any functionality.

Thanks for giving it a go!

@CommanderBubble
Copy link
Contributor Author

it was more just musing that if ipv6 is available, then we are saying it isn't because we haven't checked.

regardles, just built that branch as well as moving those changes in stable 4.1.5, which is what i was compiling when i found it, and it is able to build, and build the tests as well. though quite a few (18) tests fail, but i assume that is unrelated to this.

@bluca
Copy link
Member

bluca commented Aug 27, 2016

Given XP is EOL I'm not too fussed about skipping that test on it :-)
Thanks for the feedback, I've opened a PR and will backport it to zeromq4-1 once merged here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants