Re: llvm native


Damien LEFEVRE
 

Hi,

I added meta-clang layer and it solved my problem.

Cheers,
-Damien

On Fri, Jun 26, 2020, 11:20 Yann Dirson <yann.dirson@...> wrote:
Oh, and beware of master and dunfell with llvm-config, if your target is multilib.
You may need the patch referenced in https://bugzilla.yoctoproject.org/show_bug.cgi?id=13937

Le ven. 26 juin 2020 à 10:17, Yann Dirson <yann.dirson@...> a écrit :
Did you check that llvm-native is listed in the sysroot-providers folder, and that tmp/sysroots-components/x86_64/llvm-native/ contains the expected files ?

Le jeu. 25 juin 2020 à 19:17, Randy MacLeod <randy.macleod@...> a écrit :
On 2020-06-10 9:10 a.m., Damien LEFEVRE wrote:
> Hi,
>
> I'm trying to build a native package which uses llvm. I never used llvm
> before, so time to learn
>
> I've added
> DEPENDS += "llvm-native"
>
> to my recipe but I still get errors
>
> LLVM_CONFIG:
> | CMake Error at data/shiboken_helpers.cmake:146 (message):
> |   Unable to detect CLANG location by checking LLVM_INSTALL_DIR,
> |   CLANG_INSTALL_DIR or running llvm-config.
> | Call Stack (most recent call first):
> |   CMakeLists.txt:37 (setup_clang)
>
> I looked at the llvm_git.bb <http://llvm_git.bb> file
> do_install_class-native() {
> install -D -m 0755 ${B}/bin/llvm-tblgen ${D}${bindir}/llvm-tblgen${PV}
> install -D -m 0755 ${B}/bin/llvm-config ${D}${bindir}/llvm-config${PV}
> install -D -m 0755 ${B}/lib/libLLVM-${MAJOR_VERSION}.so
> ${D}${libdir}/libLLVM-${MAJOR_VERSION}.so
> }
>
> so I would expect to see llvm-config8.0.0 in
> the recipe-sysroot-native/usr/bin/ inside my package folder but nothing
> llvm related.
>
> What am I missing?

That's odd, I can build:
   llvm-native-9.0.1
using just oe-core from about a week ago. I don't have clang installed
on that builder. Check the git history between your version and master.
I don't see anything below from a quick look.

Can you try building master?

../Randy

oe-core.git $ git log --oneline  meta/recipes-devtools/llvm
80cc6e60b9 llvm: Remove -fcommon
312e9fe3f0 recipes: Use -fcommon explicitly
8413dede13 llvm: Upgrade to 9.0.1 release
2fa183c59c llvm: fix upstream version check
c1efb1772c llvm: rv32/rv64 target builds are not supported yet
85d9348272 llvm: add missing Upstream-Status tags
7f4870132e llvm: Update to 9.0.0
487eb18928 llvm: remove -mlongcall from CXXFLAGS for powerpc
13f9182e72 llvm: use python 3 during builds
3c08b63834 mesa,llvm,meson: Update llvm to 8.0.1 plus define and use
LLVM version globally
5302047be6 llvm: fix link error for powerpc
3b4049157a llvm: fix more places where '8.0' version of llvm was hardcoded
0e7d761b13 llvm: support older toolchains
4405a1793a llvm: update from 8.0.0rc2 to 8.0.0 final release
d8269db061 llvm: don't inherit perlnative
1587475e45 llvm: doesn't actually need pythonnative
8e24164606 llvm: Enable RTTI support in preparation for new mesa
18f565f3ca llvm: switch to the official git repository
96631d53be llvm,mesa: Upgrade to upcoming 8.0.0 release
4b1c0c7d55 meta: Fix Deprecated warnings from regexs
0053740c01 llvm: Enable AMDGPU backend for native/native-sdk builds too
5e6e08512e llvm: Use HOST_ARCH in LLVM_TARGETS_TO_BUILD for builds
865eb1c140 llvm: Use YOCTO_ALTERNATE_MULTILIB_NAME environment variable
in llvm-config
7153a17166 llvm: Point llvm-config to one built with llvm-native
b0783b713e llvm: Update to 6.0.1


> Thanks,
>
>
>


--
# Randy MacLeod
# Wind River Linux



--
Yann Dirson <yann@...>
Blade / Shadow -- http://shadow.tech



--
Yann Dirson <yann@...>
Blade / Shadow -- http://shadow.tech

Join yocto@lists.yoctoproject.org to automatically receive all group messages.