Summary: | app-arch/zstd-1.4.5 fails to compile on alpha | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Christopher May-Townsend <chris> |
Component: | Current packages | Assignee: | Patrick Lauer <patrick> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | alpha |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | Alpha | ||
OS: | Linux | ||
See Also: | https://www.sourceware.org/bugzilla/show_bug.cgi?id=27042 | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | 759001 | ||
Bug Blocks: | |||
Attachments: |
zstd error
emerge info patch for alpha architecture patch for programs/util.c: fix build without st_mtime |
Created attachment 652806 [details]
emerge info
I have the same issue on my UP1100. At line 152 in programs/util.c of zstd-1.4.5, it is determined whether macro PLATFORM_POSIX_VERSION is 200809L or more and whether struct stat has member st_mtim by whether macro st_mtime is defined. If __USE_XOPEN2K8 is defined and built with gcc version 3.3 or higher, Alpha architecture does not define macro st_mtime by adding both members st_mtim and st_mtime to struct stat by using union.(/usr/include/bits/stat.h) In programs/platform.h, macro PLATFORM_POSIX_VERSION is defined equal to _POSIX_VERSION. Since __USE_XOPEN2K8 is defined in /usr/include/features.h, _POSIX_VERSION is 200809L in /usr/include/unistd.h. On Linux/alpha with __USE_XOPEN2K8 defined (in /usr/include/features.h), I think it can be said that struct stat will include member st_mtim even if macro st_mtime is not defined. A simple solution is to treat Linux/alpha specially, but if there is a good way to easily determine if a structure contains a member, I'd prefer it. I was able to build with a attached patch that allows Linux/alpha if PLATFORM_POSIX_VERSION is 200809L or higher. Created attachment 656624 [details, diff]
patch for alpha architecture
Created attachment 674845 [details, diff] patch for programs/util.c: fix build without st_mtime I've noticed that this compiling failure issue has already been addressed upstream. https://github.com/facebook/zstd/commit/26d01bdb26f1c7487ad4ba0151221dfe28cd878d#diff-bdd9ed58a64f99d68ed71c774eade698deeaefcf10da2c8bd2764269a916f53c I attach a patch similar to upstream. In debugging a glib build failure, I realized that the cause is actually the cause of this build failure as well. See bug 759001. Now fixed in glibc-2.32-r6. (In reply to Matt Turner from comment #7) > Now fixed in glibc-2.32-r6. Nice perseverance Matt (and OP for reporting)! |
Created attachment 652804 [details] zstd error attached is the output snippet of the error