Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 931294 - media-libs/mesa-24.0.6 / 24.0.4 compilation fail: redefinition of 'timespec'
Summary: media-libs/mesa-24.0.6 / 24.0.4 compilation fail: redefinition of 'timespec'
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Gentoo X packagers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-05-06 07:49 UTC by deim
Modified: 2024-05-06 12:12 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge --info (emerge_info.txt,7.43 KB, text/plain)
2024-05-06 07:54 UTC, deim
Details
build.log (build.log,32.74 KB, text/x-log)
2024-05-06 08:04 UTC, deim
Details
meson-log.txt (meson-log.txt,268.06 KB, text/plain)
2024-05-06 08:05 UTC, deim
Details

Note You need to log in before you can comment on or make changes to this bug.
Description deim 2024-05-06 07:49:19 UTC
I'm getting this error:

In file included from ../mesa-24.0.6/src/c11/impl/threads_posix.c:37:
In file included from ../mesa-24.0.6/src/c11/threads.h:34:
../mesa-24.0.6/src/c11/time.h:54:8: error: redefinition of 'timespec'
   54 | struct timespec
      |        ^
/usr/include/bits/types/struct_timespec.h:11:8: note: previous definition is here
   11 | struct timespec
      |        ^
1 error generated.

I suppose it's because of config didn't find timespec:
Header "time.h" has symbol "struct timespec" : NO 

Tried recompile linux-headers, glibc and meson didn't help

I actually trying this profile:
default/linux/amd64/23.0/llvm/systemd

Reproducible: Always

Steps to Reproduce:
1. emerge -av1 media-libs/mesa
Actual Results:  
In file included from ../mesa-24.0.6/src/c11/impl/threads_posix.c:37:
In file included from ../mesa-24.0.6/src/c11/threads.h:34:
../mesa-24.0.6/src/c11/time.h:54:8: error: redefinition of 'timespec'
   54 | struct timespec
      |        ^
/usr/include/bits/types/struct_timespec.h:11:8: note: previous definition is here
   11 | struct timespec
      |        ^
1 error generated.

Expected Results:  
flawless compilation
Comment 1 deim 2024-05-06 07:54:41 UTC
Created attachment 892338 [details]
emerge --info
Comment 2 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-05-06 07:59:55 UTC
Please include the full build.log and also meson-log.txt.
Comment 3 deim 2024-05-06 08:04:46 UTC
Created attachment 892339 [details]
build.log
Comment 4 deim 2024-05-06 08:05:13 UTC
Created attachment 892340 [details]
meson-log.txt
Comment 5 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-05-06 08:08:18 UTC
Running compile:
Working directory:  /var/tmp/portage/media-libs/mesa-24.0.6/work/mesa-24.0.6-abi_x86_64.amd64/meson-private/tmpgotn493z
Code:
 
        #include <time.h>
        int main(void) {
            /* If it's not defined as a macro, try to use as a symbol */
            #ifndef struct timespec
                struct timespec;
            #endif
            return 0;
        }
-----------
Command line: `clang-18 /var/tmp/portage/media-libs/mesa-24.0.6/work/mesa-24.0.6-abi_x86_64.amd64/meson-private/tmpgotn493z/testfile.c -o /var/tmp/portage/media-libs/mesa-24.0.6/work/mesa-24.0.6-abi_x86_64.amd64/meson-private/tmpgotn493z/output.obj -c -march=core2 -mmmx -msse -msse2 -msse3 -mssse3 -mcx16 -mfxsr -msahf --param l1-cache-size=32 --param l1-cache-line-size=64 --param l2-cache-size=2048 -mtune=core2 -fcf-protection -O2 -pipe -fomit-frame-pointer -D_FILE_OFFSET_BITS=64 -O0 -Werror=implicit-function-declaration -Werror=unknown-warning-option -Werror=unused-command-line-argument -Werror=ignored-optimization-argument -std=c11` -> 1
stderr:
clang-18: error: argument unused during compilation: '--param l1-cache-size=32' [-Werror,-Wunused-command-line-argument]
clang-18: error: argument unused during compilation: '--param l1-cache-line-size=64' [-Werror,-Wunused-command-line-argument]
clang-18: error: argument unused during compilation: '--param l2-cache-size=2048' [-Werror,-Wunused-command-line-argument]
-----------

Clang doesn't do --param ..., try dropping those.
Comment 6 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-05-06 08:09:10 UTC
I tend to say it's therefore invalid, but CCing Eli as I know the whole unused-commandline-arg thing is a tricky thing for build systems.
Comment 7 deim 2024-05-06 08:18:48 UTC
indeed, after removal of all --param compilation continues. Thank You!
Comment 8 Eli Schwartz 2024-05-06 12:12:32 UTC
Yeah, all the "supports compiler flag" checks at minimum are going to invalidly report that clang supports no flags because we have to use that exact "argument unused" error to detect them.