https://blogs.gentoo.org/ago/2020/07/04/gentoo-tinderbox/ Issue: app-emulation/open-vm-tools-12.0.5_p19716617 fails to compile (MUSL). Discovered on: amd64 (internal ref: tinderbox_musl) NOTE: This machine uses MUSL libc
Created attachment 796549 [details] build.log build log and emerge --info
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=18e535510c92807c48cf04d8a2a0475fa1ed5e36 commit 18e535510c92807c48cf04d8a2a0475fa1ed5e36 Author: Mike Gilbert <floppym@gentoo.org> AuthorDate: 2022-08-01 16:05:09 +0000 Commit: Mike Gilbert <floppym@gentoo.org> CommitDate: 2022-08-01 16:05:09 +0000 app-emulation/open-vm-tools: fix build error on musl Closes: https://bugs.gentoo.org/862795 Signed-off-by: Mike Gilbert <floppym@gentoo.org> .../files/open-vm-tools-rename-poll.h.patch | 126 +++++++++++++++++++++ .../open-vm-tools-12.0.5_p19716617.ebuild | 1 + 2 files changed, 127 insertions(+)
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=02f23d6cc0c1c5b3757bde216673416da1228027 commit 02f23d6cc0c1c5b3757bde216673416da1228027 Author: Mike Gilbert <floppym@gentoo.org> AuthorDate: 2022-08-01 16:20:48 +0000 Commit: Mike Gilbert <floppym@gentoo.org> CommitDate: 2022-08-01 16:21:36 +0000 Revert "app-emulation/open-vm-tools: fix build error on musl" Bug: https://bugs.gentoo.org/862795 Reverts: 18e535510c92807c48cf04d8a2a0475fa1ed5e36. Signed-off-by: Mike Gilbert <floppym@gentoo.org> .../files/open-vm-tools-rename-poll.h.patch | 126 --------------------- .../open-vm-tools-12.0.5_p19716617.ebuild | 1 - 2 files changed, 127 deletions(-) https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=28a782dbeb2c6c1de0853d307a63164635da4ba9 commit 28a782dbeb2c6c1de0853d307a63164635da4ba9 Author: Mike Gilbert <floppym@gentoo.org> AuthorDate: 2022-08-01 16:19:48 +0000 Commit: Mike Gilbert <floppym@gentoo.org> CommitDate: 2022-08-01 16:21:25 +0000 profiles/features/musl: mask app-emulation/open-vm-tools Bug: https://bugs.gentoo.org/862795 Signed-off-by: Mike Gilbert <floppym@gentoo.org> profiles/features/musl/package.mask | 4 ++++ 1 file changed, 4 insertions(+)
Please, don't close this bug. I was able to compile app-emulation/open-vm-tools for both versions in the Gentoo tree. I'll attach 10 patches. Patches 1-7 come from this pull: https://github.com/vmware/open-vm-tools/pull/557 I wrote patches 8-10.
Created attachment 796687 [details, diff] Do not assume that linux and gnu libc are the same thing Use __GLIBC__ when testing for GNU libc specific things instead of assuming that __linux__ is GNU libc.
Created attachment 796690 [details, diff] Use configure test for struct timespec Use the configure script to test for struct time spec instead of trying to keep track of what platforms has it.
Created attachment 796693 [details, diff] Fix definition of ALLPERMS and ACCESSPERMS The ALLPERMS and ACCESSPERMS defines are not specified in POSIX so assume it is not there instead of testing for specific implementations.
Created attachment 796696 [details, diff] Use configure to test for feature instead of platform Test for various functions instead of trying to keep track of what platform and what version of the given platform has support for what. This should make it easier to port to currently unknown platforms and will solve the issue if a platform add support for a missing feature in the future. The features we test for are: - getifaddrs - getauxval - issetugid - __secure_getenv
Created attachment 796699 [details, diff] Use configure test for sys/stat.h include
Created attachment 796702 [details, diff] Rename poll.h to vm_poll.h musl libc's system headers pulls in open-vm-tools' poll.h. To avoid this we rename poll.h to vm_poll.h.
Created attachment 796705 [details, diff] use off64_t instead of loff_t
Created attachment 796708 [details, diff] Add musl-compatible definitions for res_ninit() and res_nclose() Code found at https://github.com/Xilinx/meta-browser/blob/0439f9cb86f7966b17950b9bd093bf657064b2c8/recipes-browser/chromium/files/musl-support/0010-Define-res_ninit-and-res_nclose-for-non-glibc-platfo.patch
Created attachment 796711 [details, diff] remove <sys/unistd.h> includes
Created attachment 796714 [details, diff] fix uint definitions for musl libc
Created attachment 796720 [details, diff] app-emulation/open-vm-tools: support for musl libc This patch is ready to apply to the Gentoo tree. It contains all the previously attached patches and the modified ebuilds.
Sorry, but I'm not interested in carrying all those patches in Gentoo. Please let me know if/when upstream merges most of the necessary patches, and we can revisit it.