Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 938126 - dev-build/meson-1.5.1 test fail: frameworks: 15 llvm
Summary: dev-build/meson-1.5.1 test fail: frameworks: 15 llvm
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords: TESTFAILURE
Depends on:
Blocks:
 
Reported: 2024-08-18 02:07 UTC by Arniii
Modified: 2024-08-18 03:16 UTC (History)
2 users (show)

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


Attachments
how_it_was_called.txt emerge_--info.txt /var/tmp/portage/dev-build/meson-1.5.1/{build-info/**,files/**,temp/**,work/**.log} /var/lib/portage/ /etc/portage/ elog (meson-1.5.1_llvm_test_fail.tar.lz,192.53 KB, application/x-lzip)
2024-08-18 02:12 UTC, Arniii
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Arniii 2024-08-18 02:07:28 UTC
I guess there's two different problem :

let's look at
  -> frameworks: 15 llvm    (method=combination link-static=False)

from build.log:
```
========= frameworks: 15 llvm    (method=combination link-static=False) ========


Failed during: configure
Reason: Generating the build system failed.


...


CMake TRACE: /var/tmp/portage/dev-build/meson-1.5.1/work/meson-1.5.1/b 41b8edb84f/meson-private/cmake_LLVM/CMakeFiles/CMakeScratch/TryCompile-KAtSFr/CMakeLists.txt:25 target_link_libraries(['cmTC_6d115', ''])
Guessed CMake target 'LLVM'
CMake TARGET:
  -- name:      LLVM
  -- type:      SHARED
  -- imported:  True
  -- properties: {
      'IMPORTED_CONFIGURATIONS': ['RELWITHDEBINFO']
      'IMPORTED_LOCATION_RELWITHDEBINFO': ['/usr/lib/llvm/18/lib64/libLLVM.so.18.1']
      'IMPORTED_SONAME_RELWITHDEBINFO': ['libLLVM.so.18.1']
     }
  -- tline: CMake TRACE: /usr/lib/llvm/18/lib64/cmake/llvm/LLVMExports.cmake:321 add_library(['LLVM', 'SHARED', 'IMPORTED'])
Include Dirs:         []
Compiler Options:     []
Libraries:            ['/usr/lib/llvm/18/lib64/libLLVM.so.18.1']
Run-time dependency LLVM found: YES 18.1.8
llvm-config binary missing from cross or native file, or env var undefined.
Trying a default llvm-config fallback at llvm-config
Trying a default llvm-config fallback at llvm-config-18.1
Trying a default llvm-config fallback at llvm-config18.1
Trying a default llvm-config fallback at llvm-config-18
Trying a default llvm-config fallback at llvm-config18
Trying a default llvm-config fallback at llvm-config-17
Trying a default llvm-config fallback at llvm-config17
Trying a default llvm-config fallback at llvm-config-16
Trying a default llvm-config fallback at llvm-config16
Trying a default llvm-config fallback at llvm-config-15
Trying a default llvm-config fallback at llvm-config15
Trying a default llvm-config fallback at llvm-config-14
Trying a default llvm-config fallback at llvm-config14
Trying a default llvm-config fallback at llvm-config-13
Trying a default llvm-config fallback at llvm-config13
Trying a default llvm-config fallback at llvm-config-12
Trying a default llvm-config fallback at llvm-config12
Trying a default llvm-config fallback at llvm-config-11
Trying a default llvm-config fallback at llvm-config11
Trying a default llvm-config fallback at llvm-config-10
Trying a default llvm-config fallback at llvm-config10
Trying a default llvm-config fallback at llvm-config-9
Trying a default llvm-config fallback at llvm-config90
Trying a default llvm-config fallback at llvm-config-8
Trying a default llvm-config fallback at llvm-config80
Trying a default llvm-config fallback at llvm-config-7
Trying a default llvm-config fallback at llvm-config70
Trying a default llvm-config fallback at llvm-config-6.0
Trying a default llvm-config fallback at llvm-config60
Trying a default llvm-config fallback at llvm-config-5.0
Trying a default llvm-config fallback at llvm-config50
Trying a default llvm-config fallback at llvm-config-4.0
Trying a default llvm-config fallback at llvm-config40
Trying a default llvm-config fallback at llvm-config-3.9
Trying a default llvm-config fallback at llvm-config39
Trying a default llvm-config fallback at llvm-config-3.8
Trying a default llvm-config fallback at llvm-config38
Trying a default llvm-config fallback at llvm-config-3.7
Trying a default llvm-config fallback at llvm-config37
Trying a default llvm-config fallback at llvm-config-3.6
Trying a default llvm-config fallback at llvm-config36
Trying a default llvm-config fallback at llvm-config-3.5
Trying a default llvm-config fallback at llvm-config35
Trying a default llvm-config fallback at llvm-config-19
Trying a default llvm-config fallback at llvm-config-devel
Trying a default llvm-config fallback at llvm-config-64
llvm-config found: YES (/usr/lib/llvm/20/bin/llvm-config) 20.0.0


...


CMake TARGET:
  -- name:      LLVM
  -- type:      SHARED
  -- imported:  True
  -- properties: {
      'IMPORTED_CONFIGURATIONS': ['RELWITHDEBINFO']
      'IMPORTED_LOCATION_RELWITHDEBINFO': ['/usr/lib/llvm/18/lib64/libLLVM.so.18.1']
      'IMPORTED_SONAME_RELWITHDEBINFO': ['libLLVM.so.18.1']
     }
  -- tline: CMake TRACE: /usr/lib/llvm/18/lib64/cmake/llvm/LLVMExports.cmake:321 add_library(['LLVM', 'SHARED', 'IMPORTED'])
Include Dirs:         []
Compiler Options:     []
Libraries:            ['/usr/lib/llvm/18/lib64/libLLVM.so.18.1']
Run-time dependency LLVM (modules: LLVM) found: YES 18.1.8

test cases/frameworks/15 llvm/meson.build:56:2: ERROR: Assert failed: config-tool and cmake returns different major versions




Traceback (most recent call last):
  File "/var/tmp/portage/dev-build/meson-1.5.1/work/meson-1.5.1/run_tests.py", line 304, in run_configure_inprocess
    returncode = mesonmain.run(commandlist, get_meson_script())
  File "/var/tmp/portage/dev-build/meson-1.5.1/work/meson-1.5.1/mesonbuild/mesonmain.py", line 279, in run
    return CommandLineParser().run(args)
  File "/var/tmp/portage/dev-build/meson-1.5.1/work/meson-1.5.1/mesonbuild/mesonmain.py", line 190, in run
    return errorhandler(e, command)
  File "/var/tmp/portage/dev-build/meson-1.5.1/work/meson-1.5.1/mesonbuild/mesonmain.py", line 31, in errorhandler
    raise e
  File "/var/tmp/portage/dev-build/meson-1.5.1/work/meson-1.5.1/mesonbuild/mesonmain.py", line 188, in run
    return options.run_func(options)
  File "/var/tmp/portage/dev-build/meson-1.5.1/work/meson-1.5.1/mesonbuild/msetup.py", line 364, in run
    app.generate()
  File "/var/tmp/portage/dev-build/meson-1.5.1/work/meson-1.5.1/mesonbuild/msetup.py", line 187, in generate
    return self._generate(env, capture, vslite_ctx)
  File "/var/tmp/portage/dev-build/meson-1.5.1/work/meson-1.5.1/mesonbuild/msetup.py", line 226, in _generate
    intr.run()
  File "/var/tmp/portage/dev-build/meson-1.5.1/work/meson-1.5.1/mesonbuild/interpreter/interpreter.py", line 3032, in run
    super().run()
  File "/var/tmp/portage/dev-build/meson-1.5.1/work/meson-1.5.1/mesonbuild/interpreterbase/interpreterbase.py", line 169, in run
    self.evaluate_codeblock(self.ast, start=1)
  File "/var/tmp/portage/dev-build/meson-1.5.1/work/meson-1.5.1/mesonbuild/interpreterbase/interpreterbase.py", line 195, in evaluate_codeblock
    raise e
  File "/var/tmp/portage/dev-build/meson-1.5.1/work/meson-1.5.1/mesonbuild/interpreterbase/interpreterbase.py", line 187, in evaluate_codeblock
    self.evaluate_statement(cur)
  File "/var/tmp/portage/dev-build/meson-1.5.1/work/meson-1.5.1/mesonbuild/interpreterbase/interpreterbase.py", line 219, in evaluate_statement
    return self.evaluate_if(cur)
  File "/var/tmp/portage/dev-build/meson-1.5.1/work/meson-1.5.1/mesonbuild/interpreterbase/interpreterbase.py", line 309, in evaluate_if
    self.evaluate_codeblock(i.block)
  File "/var/tmp/portage/dev-build/meson-1.5.1/work/meson-1.5.1/mesonbuild/interpreterbase/interpreterbase.py", line 195, in evaluate_codeblock
    raise e
  File "/var/tmp/portage/dev-build/meson-1.5.1/work/meson-1.5.1/mesonbuild/interpreterbase/interpreterbase.py", line 187, in evaluate_codeblock
    self.evaluate_statement(cur)
  File "/var/tmp/portage/dev-build/meson-1.5.1/work/meson-1.5.1/mesonbuild/interpreterbase/interpreterbase.py", line 201, in evaluate_statement
    return self.function_call(cur)
  File "/var/tmp/portage/dev-build/meson-1.5.1/work/meson-1.5.1/mesonbuild/interpreterbase/interpreterbase.py", line 528, in function_call
    res = func(node, func_args, kwargs)
  File "/var/tmp/portage/dev-build/meson-1.5.1/work/meson-1.5.1/mesonbuild/interpreterbase/decorators.py", line 250, in wrapper
    return f(*nargs, **wrapped_kwargs)
  File "/var/tmp/portage/dev-build/meson-1.5.1/work/meson-1.5.1/mesonbuild/interpreterbase/decorators.py", line 62, in wrapped
    return f(*wrapped_args, **wrapped_kwargs)
  File "/var/tmp/portage/dev-build/meson-1.5.1/work/meson-1.5.1/mesonbuild/interpreter/interpreter.py", line 744, in func_assert
    raise InterpreterException('Assert failed: ' + message)
mesonbuild.interpreterbase.exceptions.InterpreterException: Assert failed: config-tool and cmake returns different major versions

```

Also:
```
  │  ~  equery l llvm
 * Searching for llvm ...
[IP-] [  ] sys-devel/llvm-17.0.6:17/17
[IP-] [  ] sys-devel/llvm-18.1.8-r1:18/18.1
[IP-] [  ] sys-devel/llvm-19.1.0_rc2:19/19.1
[IP-] [  ] sys-devel/llvm-20.0.0_pre20240808:20/20.0.0_pre20240808

```

Also:
```
  │  ~  llvm-config --version
20.0.0gitfd7d7882
```

Also there's no `llvm-config-18` or whatever major version:
```
  │  ~  fzf --walker-root=/usr/ --walker-skip="src,share,gcc,qt5,qt6" -f llvm-config                                                                              ✔ │ root@localhost │ 02:05:25
/usr/lib/llvm/19/bin/llvm-config
/usr/lib/llvm/18/bin/llvm-config
/usr/lib/llvm/17/bin/llvm-config
/usr/lib/llvm/20/bin/llvm-config
/usr/lib/llvm/17/lib/cmake/llvm/LLVM-Config.cmake
/usr/lib/llvm/18/lib/cmake/llvm/LLVM-Config.cmake
/usr/lib/llvm/17/include/llvm/Config/llvm-config.h
/usr/lib/llvm/20/include/llvm/Config/llvm-config.h
/usr/lib/llvm/18/include/llvm/Config/llvm-config.h
/usr/lib/llvm/19/include/llvm/Config/llvm-config.h
/usr/lib/llvm/17/lib64/cmake/llvm/LLVM-Config.cmake
/usr/lib/llvm/20/lib64/cmake/llvm/LLVM-Config.cmake
/usr/lib/llvm/19/lib64/cmake/llvm/LLVM-Config.cmake
/usr/lib/llvm/18/lib64/cmake/llvm/LLVM-Config.cmake
/usr/lib/llvm/18/include/i686-pc-linux-gnu/llvm/Config/llvm-config.h
/usr/lib/llvm/17/include/i686-pc-linux-gnu/llvm/Config/llvm-config.h
/usr/lib/llvm/17/include/x86_64-pc-linux-gnu/llvm/Config/llvm-config.h
/usr/lib/llvm/18/include/x86_64-pc-linux-gnu/llvm/Config/llvm-config.h
/usr/lib/llvm/20/include/x86_64-pc-linux-gnu/llvm/Config/llvm-config.h
/usr/lib/llvm/19/include/x86_64-pc-linux-gnu/llvm/Config/llvm-config.h
/usr/lib/llvm/18/bin/i686-pc-linux-gnu-llvm-config
/usr/lib/llvm/17/bin/i686-pc-linux-gnu-llvm-config
/usr/lib/llvm/18/bin/x86_64-pc-linux-gnu-llvm-config
/usr/lib/llvm/19/bin/x86_64-pc-linux-gnu-llvm-config
/usr/lib/llvm/17/bin/x86_64-pc-linux-gnu-llvm-config
/usr/lib/llvm/20/bin/x86_64-pc-linux-gnu-llvm-config
/usr/lib/llvm/18/include/i686-pc-linux-gnu/clang/Config/config.h
/usr/lib/llvm/17/include/i686-pc-linux-gnu/clang/Config/config.h
/usr/lib/llvm/17/include/x86_64-pc-linux-gnu/clang/Config/config.h
/usr/lib/llvm/18/include/x86_64-pc-linux-gnu/clang/Config/config.h
/usr/lib/llvm/20/include/x86_64-pc-linux-gnu/clang/Config/config.h
/usr/lib/llvm/19/include/x86_64-pc-linux-gnu/clang/Config/config.h
```

Also:
```
  │  ~  echo $PATH
/usr/local/sbin /usr/local/bin /usr/sbin /usr/bin /sbin /bin /opt/bin /usr/lib/llvm/20/bin /usr/lib/llvm/19/bin /usr/lib/llvm/18/bin /usr/lib/llvm/17/bin /etc/eselect/wine/bin /opt/cuda/bin /opt/cuda/libnvvp
```

That's why first `llvm-config` if for llvm-20.0.0 .
Comment 1 Arniii 2024-08-18 02:10:19 UTC
Now let's look at another test fail:

from build.log:
```
========================== cmake: 24 mixing languages ==========================


Failed during: build
Reason: Compiling source code failed.

...


FAILED: subprojects/cmTest/libcmTest.a.p/cmTest.m.o
ccache clang -Isubprojects/cmTest/libcmTest.a.p -Isubprojects/cmTest '-I../test cases/cmake/24 mixing languages/subprojects/cmTest' -Isubprojects/cmTest/__CMake_build '-I../test cases/cmake/24 mixing languages/subprojects/cmTest/__CMake_build' -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -O0 -g -fPIE -O3 -pipe -march=alderlake -mabm -mno-cldemote -mno-kl -mno-pconfig -mno-sgx -mno-widekl -mshstk --param=l1-cache-line-size=64 --param=l1-cache-size=48 --param=l2-cache-size=30720 -Werror=odr -Werror=lto-type-mismatch -Werror=strict-aliasing -fgraphite-identity -floop-interchange -floop-strip-mine -floop-nest-optimize -ggdb3 -frecord-gcc-switches -g -DSOME_MAGIC_DEFINE=42 -MD -MQ subprojects/cmTest/libcmTest.a.p/cmTest.m.o -MF subprojects/cmTest/libcmTest.a.p/cmTest.m.o.d -o subprojects/cmTest/libcmTest.a.p/cmTest.m.o -c '../test cases/cmake/24 mixing languages/subprojects/cmTest/cmTest.m'
clang: error: unknown argument '-mabm'; did you mean '-marm'?
clang: error: unknown argument: '-fgraphite-identity'
clang: error: unknown argument: '-floop-interchange'
clang: error: unknown argument: '-floop-strip-mine'
clang: error: unknown argument: '-floop-nest-optimize'
[3/5] Compiling C object subprojects/cmTest/libcmTest.a.p/cmTest.c.o
ninja: build stopped: subcommand failed.
```

Looks like it doesn't strip compilation flags somewhere. IDK how it should be solved ideally.
Comment 2 Arniii 2024-08-18 02:12:25 UTC
Created attachment 900503 [details]
how_it_was_called.txt emerge_--info.txt /var/tmp/portage/dev-build/meson-1.5.1/{build-info/**,files/**,temp/**,work/**.log} /var/lib/portage/ /etc/portage/ elog
Comment 3 Arniii 2024-08-18 02:14:01 UTC
> That's why first `llvm-config` if for llvm-20.0.0 .

... is* for...
Comment 4 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-08-18 02:37:54 UTC
I don't get why it doesn't find the plain `llvm-config` in PATH with 'Trying a default llvm-config fallback at llvm-config'.

I think we should analyse the issues separately. Let's keep this bug for LLVM-related CMake vs *-config test failure(s). Please file new bugs for other issues.