Closed ahmedyarub closed 2 years ago
Thanks for your pull request. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).
:memo: 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.
I signed it
I signed it
All requested changes are made @ityuhui
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:
user@machine:~/libyaml/build# cmake .. -DBUILD_SHARED_LIBS=1
sudo make install
The libkubernetes.so can be built successfully.
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:
user@machine:~/libyaml/build# cmake .. -DBUILD_SHARED_LIBS=1 sudo make install
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 ..
-DBUILD_SHARED_LIBS=
Done
Next I'll make some adaptations for Android, iOS, MacOS and possibly WASM!
/lgtm /approve
[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
@ahmedyarub Thanks to your contribution now the C client library supports Windows !
@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 https://github.com/OpenAPITools/openapi-generator/pull/10326 Includes fixes for Windows and installation configuration.