<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<p>Hello Francesco,</p>
<p><br>
</p>
<p>Please hit the reply-all button, otherwise I wont be getting
notified when you reply.</p>
<p><br>
</p>
<p>I think you're doing something very specific since you're
building on target and tweaking the build system so to help you
more I would need to take a look at the recipes you are using.<br>
</p>
<p><br>
</p>
<p>Alejandro<br>
</p>
<br>
<div class="moz-cite-prefix">On 05/04/2018 01:19 AM, Francesco
Giancane wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CAEQ58sj_699mSB4zaZ2e6APP7aKR2siZ7+j3qyxfCanPNZSgDw@mail.gmail.com">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<div dir="ltr">Hi Alejandro,
<div><br>
</div>
<div>Thank you for your response.</div>
<div>I know that openblas recipe is a pain, given that its
Makefile is not correctly written with respect to
cross-compilation. However, the library has been built locally
on the target (sigh!) and then it is being deployed with a
recipe which unpacks the built binary and copy them into the
sys root.</div>
<div><br>
</div>
<div>So, from the openblas side, everything is OK.</div>
<div><br>
</div>
<div>What is actually wrong is the configuration step for
python3-numpy and python3-scipy: in the setup.py they are
instructed to search for some libraries (namely, openblas
amongst them) but they fail to search for them given that the
path they are searching for is the sysroot-native, rather than
sysroot. (you can see it clearly from the logs attached in the
first message).</div>
<div><br>
</div>
<div>Installing the packages using pip3 install scipy numpy on
the target results on a correct execution (and libraries are
properly found and linked).</div>
<div><br>
</div>
<div>Thank you,</div>
<div>
<div>
<div dir="ltr" class="gmail_signature"
data-smartmail="gmail_signature">
<div dir="ltr">
<div dir="ltr">
<div>
<div dir="ltr">Francesco Giancane</div>
<div dir="ltr"><br>
</div>
</div>
<div><dd
style="margin:0px;padding:0px;border:0px;font-style:inherit;font-family:inherit;vertical-align:top;line-height:inherit;display:inline-block"><span
style="margin:0px;padding:0px;border:0px;font-style:inherit;font-family:inherit;vertical-align:baseline;line-height:inherit;direction:ltr"><br>
</span></dd>
</div>
</div>
</div>
</div>
</div>
<br>
</div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr">Il giorno ven 4 mag 2018 alle ore 03:01 Alejandro
Enedino Hernandez Samaniego <<a
href="mailto:alejandr@xilinx.com" moz-do-not-send="true">alejandr@xilinx.com</a>>
ha scritto:<br>
</div>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
<div link="#0563C1" vlink="#954F72" lang="EN-US">
<div class="m_-8611667753301666364WordSection1">
<p class="MsoNormal">Hello Francesco,</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">It would be helpful if you could
provide more information about this, e.g. access to your
layer or your recipes, to make sure they are actually
being built correctly, also I would start by manually
linking it against the built library to see if the error
is just not having them on the correct path, but I seem
to remember a lot of issues when trying to cross compile
openblas, specially for an arm MACHINE.</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">Alejandro</p>
<p class="MsoNormal"><a
name="m_-8611667753301666364__MailEndCompose"
moz-do-not-send="true"> </a></p>
<span></span>
<p class="MsoNormal"><b>From:</b> <a
href="mailto:openembedded-core-bounces@lists.openembedded.org"
target="_blank" moz-do-not-send="true">openembedded-core-bounces@lists.openembedded.org</a>
[mailto:<a
href="mailto:openembedded-core-bounces@lists.openembedded.org"
target="_blank" moz-do-not-send="true">openembedded-core-bounces@lists.openembedded.org</a>]
<b>On Behalf Of </b>Francesco Giancane<br>
<b>Sent:</b> Wednesday, May 2, 2018 2:33 PM<br>
<b>To:</b> OE-core <<a
href="mailto:openembedded-core@lists.openembedded.org"
target="_blank" moz-do-not-send="true">openembedded-core@lists.openembedded.org</a>><br>
<b>Subject:</b> [OE-core] python recipes with extensions
fail to find/link with proper libraries</p>
<p class="MsoNormal"> </p>
<div>
<p class="MsoNormal">Hi Everyone,</p>
<div>
<p class="MsoNormal">I found a problem working with
python(3) and C extensions.</p>
</div>
<div>
<p class="MsoNormal"> </p>
</div>
<div>
<p class="MsoNormal">The use-case is the recipe for
python(3)-numpy, which can be linked against a
BLAS/LAPACK library to use accelerated matricial and
vectorial operations.</p>
</div>
<div>
<p class="MsoNormal"> </p>
</div>
<div>
<p class="MsoNormal">As it is currently shipped, the
recipe fails to find any proper library and then
does not use extensions.</p>
</div>
<div>
<p class="MsoNormal"> </p>
</div>
<div>
<p class="MsoNormal">I wrote a custom recipe for
openblas which is correctly built & deploy using
standard commands.</p>
</div>
<div>
<p class="MsoNormal">openblas is also added as a
DEPENDS in a bbappend file for numpy.</p>
</div>
<div>
<p class="MsoNormal"> </p>
</div>
<div>
<p class="MsoNormal">However, the do_compile phase
cannot find the aforementioned library.</p>
</div>
<div>
<p class="MsoNormal"> </p>
</div>
<div>
<p class="MsoNormal">Log attached:</p>
</div>
<div>
<p class="MsoNormal"> </p>
</div>
<div>
<div>
<p class="MsoNormal">DEBUG: Executing shell function
do_compile</p>
</div>
<div>
<p class="MsoNormal">blas_opt_info:</p>
</div>
<div>
<p class="MsoNormal">blas_mkl_info:</p>
</div>
<div>
<p class="MsoNormal">customize UnixCCompiler</p>
</div>
<div>
<p class="MsoNormal"> libraries mkl_rt not found in
['/home/fgp/poky/rpi3_64/tmp/work/cortexa7hf-neon-vfpv4-poky-linux-gnueabi/python3-numpy/1.14.2-r0/recipe-sysroot-native/usr/lib']</p>
</div>
<div>
<p class="MsoNormal"> NOT AVAILABLE</p>
</div>
<div>
<p class="MsoNormal"> </p>
</div>
<div>
<p class="MsoNormal">blis_info:</p>
</div>
<div>
<p class="MsoNormal">customize UnixCCompiler</p>
</div>
<div>
<p class="MsoNormal"> libraries blis not found in
['/home/fgp/poky/rpi3_64/tmp/work/cortexa7hf-neon-vfpv4-poky-linux-gnueabi/python3-numpy/1.14.2-r0/recipe-sysroot-native/usr/lib']</p>
</div>
<div>
<p class="MsoNormal"> NOT AVAILABLE</p>
</div>
<div>
<p class="MsoNormal"> </p>
</div>
<div>
<p class="MsoNormal">openblas_info:</p>
</div>
<div>
<p class="MsoNormal">customize UnixCCompiler</p>
</div>
<div>
<p class="MsoNormal">customize UnixCCompiler</p>
</div>
<div>
<p class="MsoNormal"> libraries openblas not found
in
['/home/fgp/poky/rpi3_64/tmp/work/cortexa7hf-neon-vfpv4-poky-linux-gnueabi/python3-numpy/1.14.2-r0/recipe-sysroot-native/usr/lib']</p>
</div>
<div>
<p class="MsoNormal"> NOT AVAILABLE</p>
</div>
<div>
<p class="MsoNormal"> </p>
</div>
<div>
<p class="MsoNormal">atlas_3_10_blas_threads_info:</p>
</div>
<div>
<p class="MsoNormal">Setting PTATLAS=ATLAS</p>
</div>
<div>
<p class="MsoNormal">customize UnixCCompiler</p>
</div>
<div>
<p class="MsoNormal"> libraries tatlas not found in
['/home/fgp/poky/rpi3_64/tmp/work/cortexa7hf-neon-vfpv4-poky-linux-gnueabi/python3-numpy/1.14.2-r0/recipe-sysroot-native/usr/lib']</p>
</div>
<div>
<p class="MsoNormal"> NOT AVAILABLE</p>
</div>
<div>
<p class="MsoNormal"> </p>
</div>
<div>
<p class="MsoNormal">atlas_3_10_blas_info:</p>
</div>
<div>
<p class="MsoNormal">customize UnixCCompiler</p>
</div>
<div>
<p class="MsoNormal"> libraries satlas not found in
['/home/fgp/poky/rpi3_64/tmp/work/cortexa7hf-neon-vfpv4-poky-linux-gnueabi/python3-numpy/1.14.2-r0/recipe-sysroot-native/usr/lib']</p>
</div>
<div>
<p class="MsoNormal"> NOT AVAILABLE</p>
</div>
<div>
<p class="MsoNormal"> </p>
</div>
<div>
<p class="MsoNormal">atlas_blas_threads_info:</p>
</div>
<div>
<p class="MsoNormal">Setting PTATLAS=ATLAS</p>
</div>
<div>
<p class="MsoNormal">customize UnixCCompiler</p>
</div>
<div>
<p class="MsoNormal"> libraries
ptf77blas,ptcblas,atlas not found in
['/home/fgp/poky/rpi3_64/tmp/work/cortexa7hf-neon-vfpv4-poky-linux-gnueabi/python3-numpy/1.14.2-r0/recipe-sysroot-native/usr/lib']</p>
</div>
<div>
<p class="MsoNormal"> NOT AVAILABLE</p>
</div>
<div>
<p class="MsoNormal"> </p>
</div>
<div>
<p class="MsoNormal">atlas_blas_info:</p>
</div>
<div>
<p class="MsoNormal">customize UnixCCompiler</p>
</div>
<div>
<p class="MsoNormal"> libraries f77blas,cblas,atlas
not found in
['/home/fgp/poky/rpi3_64/tmp/work/cortexa7hf-neon-vfpv4-poky-linux-gnueabi/python3-numpy/1.14.2-r0/recipe-sysroot-native/usr/lib']</p>
</div>
<div>
<p class="MsoNormal"> NOT AVAILABLE</p>
</div>
<div>
<p class="MsoNormal"> </p>
</div>
<div>
<p class="MsoNormal">blas_info:</p>
</div>
<div>
<p class="MsoNormal">customize UnixCCompiler</p>
</div>
<div>
<p class="MsoNormal"> libraries blas not found in
['/home/fgp/poky/rpi3_64/tmp/work/cortexa7hf-neon-vfpv4-poky-linux-gnueabi/python3-numpy/1.14.2-r0/recipe-sysroot-native/usr/lib']</p>
</div>
<div>
<p class="MsoNormal"> NOT AVAILABLE</p>
</div>
<div>
<p class="MsoNormal"> </p>
</div>
<div>
<p class="MsoNormal">blas_src_info:</p>
</div>
<div>
<p class="MsoNormal"> NOT AVAILABLE</p>
</div>
<div>
<p class="MsoNormal"> </p>
</div>
<div>
<p class="MsoNormal"> NOT AVAILABLE</p>
</div>
<div>
<p class="MsoNormal"> </p>
</div>
<div>
<p class="MsoNormal">...And it is correct for it to
fail as it is searching for openblas in the wrong
path (sysroot-native vs sysroot).</p>
</div>
<div>
<p class="MsoNormal"> </p>
</div>
<div>
<p class="MsoNormal">I would assume that this is a
setuptools.bbclass issue, does anyone know what to
do? Is it trivial to fix?</p>
</div>
<div>
<p class="MsoNormal"> </p>
</div>
<div>
<p class="MsoNormal">I noticed that all the shipped
python extensions were built as if we were
building for x86, even though the MACHINE is an
arm target.</p>
</div>
<div>
<p class="MsoNormal"> </p>
</div>
<div>
<p class="MsoNormal">Thank you for your attention,</p>
</div>
<div>
<p class="MsoNormal"><br clear="all">
</p>
<div>
<div>
<div>
<div>
<div>
<div>
<p class="MsoNormal">Francesco Giancane</p>
</div>
</div>
<div>
<p class="MsoNormal"
style="margin-left:.5in;vertical-align:top"><span
style="font-family:"inherit",serif"> </span></p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</blockquote>
</div>
</blockquote>
<br>
</body>
</html>