-
Notifications
You must be signed in to change notification settings - Fork 46
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
Graal substitution for Windows #49
Comments
Could you please verify whether #51 fixes the issue for you? |
I like the idea of including a substitution for |
#51 fixes the issue to the extent that the code compiles, however I haven't been able to succesfully create and execute a Graal native-image build of Quarkus on Windows yet. We should probably not merge this until we have verified the runtime behaviour is correct :) |
Finally managed to get a native-image build of Quarkus working on Windows and the hostname is retrieved correctly using the winsock.h substitution :) |
this is fixed in 1.5.4 |
Trying to create a native-image using Quarkus on Windows yields the following error:
Error: Error compiling query code (in C:\tmp\SVM-791803307606723357\NativeInfoDirectives.cpp). Compiler command CL C:\tmp\SVM-791803307606723357\NativeInfoDirectives.cpp /FeC:\tmp\SVM-791803307606723357\NativeInfoDirectives.exe output included error: [NativeInfoDirectives.cpp, C:\tmp\SVM-791803307606723357\NativeInfoDirectives.cpp(32) : fatal error C1083: Cannot open include file: 'unistd.h': No such file or directory]
This seems to occur because the substitution provided in this class requires the POSIX header:
https://github.com/wildfly/wildfly-common/blob/master/src/main/java/org/wildfly/common/net/Substitutions.java
Would it make sense to identify the platform the substitution is being applied under and switch between either <unistd.h> or <winsock.h> as both header files define the gethostname method?
https://pubs.opengroup.org/onlinepubs/009695399/functions/gethostname.html
https://docs.microsoft.com/en-us/windows/win32/api/winsock/nf-winsock-gethostname
The text was updated successfully, but these errors were encountered: