Hi Jose,
as far as I can see, it works like this. With an empty PACKAGECONFIG it
is disabled:
~/build/poky/build-intel/tmp/work/corei7-64-poky-linux/llvm/14.0.4-r0/build$
grep -r LLVM_HAVE_OPT_VIEWER_MODULES .
./lib/cmake/llvm/LLVMConfig.cmake:set(LLVM_HAVE_OPT_VIEWER_MODULES 0)
./cmake/modules/CMakeFiles/LLVMConfig.cmake:set(LLVM_HAVE_OPT_VIEWER_MODULES
0)
and if taking the option it gets set to 1.
And you are right about that we need to provide python3-native. If done
so do_configure.log looks like this:
-- Found Python module pygments
-- Could NOT find Python module pygments.lexers.c_cpp
-- Found Python module yaml
and LLVM_HAVE_OPT_VIEWER_MODULES gets set to 0 also.
If its just about to avoid building OPT_VIEWER_MODULES it would be
enough to just use the second patch i've sent.
Markus
Am 22.06.22 um 19:52 schrieb Jose Quaresma:
Hi Markus,
Markus Volk <[email protected]> escreveu no dia quarta, 22/06/2022
à(s) 16:28:
I had not tried it, but in the meantime I did and it works with
PACKAGECONFIG ?= ""
PACKAGECONFIG[optviewer] = "-DPY_PYGMENTS_FOUND=ON
-DPY_PYGMENTS_LEXERS_C_CPP_FOUND=ON
-DPY_YAML_FOUND=ON,-DPY_PYGMENTS_FOUND=OFF,,python3-pygments
python3-pyyaml"
As said previously and if it is contaminated by the host python
packages we need to provide the native version
so cmake will search for it on native systroot. if the tools are not
there it will use the host version again.
Is this right or I missing something?
Jose
Markus
Am 22.06.22 um 17:06 schrieb Stefan Herbrechtsmeier:
> Hi Markus,
>
> Am 22.06.2022 um 16:18 schrieb Markus Volk via
lists.openembedded.org <http://lists.openembedded.org>:
>> Hi,
>>
>> couldn't we just do it like this?
>>
>> PACKAGECONFIG ?= ""
>> PACKAGECONFIG[optviewer] =
>>
"-DLLVM_HAVE_OPT_VIEWER_MODULES=ON,-DLLVM_HAVE_OPT_VIEWER_MODULES=OFF,,python3-pygments
>> python3-pyyaml"
>>
>> Depending on wether the PACKAGECONFIG option is taken it looks
like
>> this in CMakeCache.txt:
>>
>> //No help, variable specified on the command line.
>> LLVM_HAVE_OPT_VIEWER_MODULES:UNINITIALIZED=OFF
>>
>> //No help, variable specified on the command line.
>> LLVM_HAVE_OPT_VIEWER_MODULES:UNINITIALIZED=ON
>
> Have you test it? The config-ix.cmake file sets the
> LLVM_HAVE_OPT_VIEWER_MODULES variable [1].
>
> Instead of LLVM_HAVE_OPT_VIEWER_MODULES I would set
PY_PYGMENTS_FOUND,
> PY_PYGMENTS_LEXERS_C_CPP_FOUND and PY_YAML_FOUND.
>
> [1]
>
https://github.com/llvm/llvm-project/blob/main/llvm/cmake/config-ix.cmake#L693
>
> Regards
> Stefan
>
>> Am 22.06.22 um 15:54 schrieb Stefan Herbrechtsmeier:
>>> Hi Richard,
>>>
>>> Am 22.06.2022 um 15:10 schrieb Richard Purdie via
>>> lists.openembedded.org <http://lists.openembedded.org>:
>>>> There is a reproducibility issue which shouldn't be too hard
to fix if
>>>> someone had a few minutes to help out:
>>>>
>>>> https://bugzilla.yoctoproject.org/show_bug.cgi?id=14845
>>>>
>>>> It is in llvm and is a cmake configuration issue. Rather than
setting
>>>> that option based on the presence of python modules (with
python from
>>>> the host), we should add a configuration option to force it to be
>>>> disabled in our case. Should be upstreamable with the right
patch.
>>>
>>> I'm not able to test it at the moment but it should be
possible to
>>> set the variables (PY_PYGMENTS_FOUND,
PY_PYGMENTS_LEXERS_C_CPP_FOUND
>>> and PY_YAML_FOUND) to OFF via EXTRA_OECMAKE:
>>>
>>> -DPY_PYGMENTS_FOUND=OFF
>>>
>>> The find_python_module function in config-ix.cmake returns
early if
>>> the variable PY_${module_upper}_FOUND is defined.
>>>
>>> Regards
>>> Stefan
>>>
>
>
>
--
Best regards,
José Quaresma
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#167248):
https://lists.openembedded.org/g/openembedded-core/message/167248
Mute This Topic: https://lists.openembedded.org/mt/91921251/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-