-
Notifications
You must be signed in to change notification settings - Fork 47
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
Windows adaptations and installation configuration #80
Windows adaptations and installation configuration #80
Conversation
Add TLS configuration parsing
C++ compatibility update
Fix conditional commands
Thanks for your pull request. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please follow instructions at https://git.k8s.io/community/CLA.md#the-contributor-license-agreement to sign the CLA. It may take a couple minutes for the CLA signature to be fully registered; after that, please reply here with a new comment and we'll verify. Thanks.
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
Add alternative strndup implementation
I signed it |
I signed it |
kubernetes/CMakeLists.txt
Outdated
install(TARGETS ${pkgName} DESTINATION ${CMAKE_INSTALL_PREFIX}) | ||
else() | ||
include(GNUInstallDirs) | ||
install(TARGETS ${pkgName} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cmake ..
will fail in my env:
CMake Error at CMakeLists.txt:1566 (install):
install TARGETS given no LIBRARY DESTINATION for shared library target
"kubernetes".
CMake Error at CMakeLists.txt:1584 (export):
export Export set "kubernetesTargets" not found.
After I changed the line 1655
to
install(TARGETS ${pkgName} DESTINATION ${CMAKE_INSTALL_PREFIX}
It works.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can build and install on both Ubuntu 20.04 and Windows without any problem.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know. But on my env (Ubuntu 18.04 and default cmake), this change is needed. I think "DESTINATION" is required but new version of cmake can ignore it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Requested changes made and a new PR opened OpenAPITools/openapi-generator#10378
The build of libkubernetes.so will fail: /usr/bin/ld: /usr/local/lib/libyaml.a(api.c.o): relocation R_X86_64_PC32 against symbol `yaml_realloc' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: final link failed: Bad value
collect2: error: ld returned 1 exit status
CMakeFiles/kubernetes.dir/build.make:19861: recipe for target 'libkubernetes.so' failed
make[2]: *** [libkubernetes.so] Error 1
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/kubernetes.dir/all' failed
make[1]: *** [CMakeFiles/kubernetes.dir/all] Error 2
Makefile:129: recipe for target 'all' failed
make: *** [all] Error 2 After I rebuilt and installed libyaml to a shared library:
The libkubernetes.so can be built successfully. |
Do you propose making a change here? |
Yes. I suggest updating the readme and actions/workflow to build libyaml as a shared library. cmake -DCMAKE_INSTALL_PREFIX=/usr/local -DBUILD_TESTING=OFF -DBUILD_SHARED_LIBS=1 .. |
Update README.md
Done |
Next I'll make some adaptations for Android, iOS, MacOS and possibly WASM! |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: ahmedyarub, ityuhui The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
@ahmedyarub Thanks to your contribution now the C client library supports Windows ! |
Next I'll work on adaptations for Android, MacOS, iOS, and Emscripten |
Hi @ahmedyarub
|
Should be merged after OpenAPITools/openapi-generator#10326
Includes fixes for Windows and installation configuration.