Skip to contentSkip to conversation

errors in recipe after move from devtool

DISCUSSION Greg Wilson-Lindberg 3 participants 8 messages Oct 10, 2017 – Oct 11, 2017

lore
Share & tools
lore
#0 lore raw

I'm trying to develop a new recipe for zint, barcode generating software. I initially built the recipe under devtool and got it to the point that there were no errors. I then did a devtool finish command to move it to my yocto build tree under our private recipe and now when I build it I get 2 different errors that don't make any sense to me:

ERROR: zint-2.6.1-r0 do_package_qa: QA Issue: non -dev/-dbg/nativesdk- package contains symlink .so: zint path '/work/cortexa7hf-neon-vfpv4-poky-linux-gnueabi/zint/2.6.1-r0/packages-split/ zint/usr/lib/libzint.so'
non -dev/-dbg/nativesdk- package contains symlink .so: zint path '/work/cortexa7hf-neon-vfpv4-poky-linux-gnueabi/zint/2.6.1-r0/packages-split/zint/usr/lib/libQZint.so' [dev-so]
ERROR: zint-2.6.1-r0 do_package_qa: QA Issue: zint: /work/cortexa7hf-neon-vfpv4-poky-linux-gnueabi/zint/2.6.1-r0/packages-split/zint/usr/lib/libzint.so.2.6.1 contains probably-redundant RP ATH /usr/lib
zint: /work/cortexa7hf-neon-vfpv4-poky-linux-gnueabi/zint/2.6.1-r0/packages-split/zint/usr/lib/libQZint.so.2.6.1 contains probably-redundant RPATH /usr/lib [useless-rpaths]
ERROR: zint-2.6.1-r0 do_package_qa: QA run found fatal errors. Please consider fixing them.
ERROR: zint-2.6.1-r0 do_package_qa: Function failed: do_package_qa
ERROR: Logfile of failure stored in: /home/gwilson/Qt-5.9/Yocto-build-RPi3/build-raspberrypi3/tmp/work/cortexa7hf-neon-vfpv4-poky-linux-gnueabi/zint/2.6.1-r0/temp/log.do_package_qa.3282
ERROR: Task (/home/gwilson/Qt-5.9/Yocto-build-RPi3/sources/meta-sakura/recipes-sakura/Scribe-support/zint_2.6.1.bb:do_package_qa) failed with exit code '1'

#1 lore raw

Sorry, hit the wrong button in my mailer and sent this before I was finished.

So to continue, what is the problem with symlinked libraries in a non-dev package, don't most libraries have syslink's to them?

Secondly, the redundant RPATH, most of the links that I've found mentioning this show a link with something like lib/../lib, the error that I'm getting doesn't have that. Any insight would be appreciated.

Regards,

Greg

________________________________
From: Greg Wilson-Lindberg
Sent: Tuesday, October 10, 2017 9:29:11 AM
To: [email protected]
Subject: errors in recipe after move from devtool

I'm trying to develop a new recipe for zint, barcode generating software. I initially built the recipe under devtool and got it to the point that there were no errors. I then did a devtool finish command to move it to my yocto build tree under our private recipe and now when I build it I get 2 different errors that don't make any sense to me:

ERROR: zint-2.6.1-r0 do_package_qa: QA Issue: non -dev/-dbg/nativesdk- package contains symlink .so: zint path '/work/cortexa7hf-neon-vfpv4-poky-linux-gnueabi/zint/2.6.1-r0/packages-split/ zint/usr/lib/libzint.so'
non -dev/-dbg/nativesdk- package contains symlink .so: zint path '/work/cortexa7hf-neon-vfpv4-poky-linux-gnueabi/zint/2.6.1-r0/packages-split/zint/usr/lib/libQZint.so' [dev-so]
ERROR: zint-2.6.1-r0 do_package_qa: QA Issue: zint: /work/cortexa7hf-neon-vfpv4-poky-linux-gnueabi/zint/2.6.1-r0/packages-split/zint/usr/lib/libzint.so.2.6.1 contains probably-redundant RP ATH /usr/lib
zint: /work/cortexa7hf-neon-vfpv4-poky-linux-gnueabi/zint/2.6.1-r0/packages-split/zint/usr/lib/libQZint.so.2.6.1 contains probably-redundant RPATH /usr/lib [useless-rpaths]
ERROR: zint-2.6.1-r0 do_package_qa: QA run found fatal errors. Please consider fixing them.
ERROR: zint-2.6.1-r0 do_package_qa: Function failed: do_package_qa
ERROR: Logfile of failure stored in: /home/gwilson/Qt-5.9/Yocto-build-RPi3/build-raspberrypi3/tmp/work/cortexa7hf-neon-vfpv4-poky-linux-gnueabi/zint/2.6.1-r0/temp/log.do_package_qa.3282
ERROR: Task (/home/gwilson/Qt-5.9/Yocto-build-RPi3/sources/meta-sakura/recipes-sakura/Scribe-support/zint_2.6.1.bb:do_package_qa) failed with exit code '1'

#2 lore raw
Quoted 3 lines · Greg Wilson-Lindberg

So to continue, what is the problem with symlinked libraries in a non-dev package, don't most libraries have syslink's to them?

Typically:

libfoo.so -> libfoo.so.1
libfoo.so.1 -> libfoo.so.1.2
libfoo.so.1.2 is a real file

In this case libfoo.so is *only* used at link time and should be in PN-dev. The other links and the real library are for runtime and should be in PN.

This warning is saying that you have libzint.so in zint instead of zint-dev. This implies that you've been changing FILES_${PN} and it's too broad now.

Ross

#3 lore raw

Hi Ross,

I changed the FILES_${PN}-dev to pick up the .so file and that error went away.

Thanks for the cluebat, the learning curve is a bit steep and I'm still climbing.

I'm still getting the:

ERROR: zint-2.6.1-r0 do_package_qa: QA Issue: zint: /work/cortexa7hf-neon-vfpv4-poky-linux-gnueabi/zint/2.6.1-r0/packages-split/zint/usr/lib/libzint.so.2.6.1 contains probably-redundant RPATH /usr/lib

So If anyone can help me understand what's going on here I'd be appreciative.

Regards,

Greg

________________________________
From: Burton, Ross <[email protected]>
Sent: Tuesday, October 10, 2017 11:18:33 AM
To: Greg Wilson-Lindberg
Cc: [email protected]
Subject: Re: [yocto] errors in recipe after move from devtool

On 10 October 2017 at 17:34, Greg Wilson-Lindberg <[email protected]<mailto:[email protected]>> wrote:

So to continue, what is the problem with symlinked libraries in a non-dev package, don't most libraries have syslink's to them?

Typically:

libfoo.so -> libfoo.so.1
libfoo.so.1 -> libfoo.so.1.2
libfoo.so.1.2 is a real file

In this case libfoo.so is *only* used at link time and should be in PN-dev. The other links and the real library are for runtime and should be in PN.

This warning is saying that you have libzint.so in zint instead of zint-dev. This implies that you've been changing FILES_${PN} and it's too broad now.

Ross

#4 lore raw

Hi Greg,

Quoted 5 lines · NZDT Greg Wilson-Lindberg

I'm still getting the:

ERROR: zint-2.6.1-r0 do_package_qa: QA Issue: zint: /work/cortexa7hf-neon- vfpv4-poky-linux-gnueabi/zint/2.6.1-r0/packages-split/zint/usr/lib/ libzint.so.2.6.1 contains probably-redundant RPATH /usr/lib

There's a short hint about this QA issue in the manual:

http://www.yoctoproject.org/docs/current/ref-manual/ref-manual.html#ref-qa-checks

Ultimately it depends on the build system for the software your recipe is building, but somewhere it will be explicitly adding this rpath to the compiler command line, so you need to figure out the best way to remove that - if the software's build system makes it optional, turn it off, but you may find you need to patch it out. If you don't care about this particular issue, you could alternatively use INSANE_SKIP to ignore it.

Cheers,
Paul

Signature · 2 lines
Paul Eggleton
Intel Open Source Technology Centre
#5 lore raw

Hi Paul,
Thanks for the info, now I understand what is going on. Hopefully I can find a way to get rid of the RPATH, I don't like ignoring errors or warnings.

I've spent some more time looking into this, I haven't been able to find out where the -rpath comes from. If I start a devshell none of the environment variables have it set. In the run.do_compile log none of the environment variables have it set, it's not set in the run.do_configure log. But in the log.do_compile file the command that links the library:

/home/gwilson/Qt-5.9/Yocto-build-RPi3/build-raspberrypi3/tmp/sysroots/x86_64-linux/usr/bin/arm-poky-linux-gnueabi/arm-poky-linux-gnueabi-gcc -fPIC -march=armv7ve -marm -mfpu=neon-vfpv4 -mfloat-abi=hard -mcpu=cortex-a7 --sysroot=/home/gwilson/Qt-5.9/Yocto-build-RPi3/build-raspberrypi3/tmp/sysroots/raspberrypi3 -O2 -pipe -g -feliminate-unused-debug-types -fdebug-prefix-map=/home/gwilson/Qt-5.9/Yocto-build-RPi3/build-raspberrypi3/tmp/work/cortexa7hf-neon-vfpv4-poky-linux-gnueabi/zint/2.6.1-r0=/usr/src/debug/zint/2.6.1-r0 -fdebug-prefix-map=/home/gwilson/Qt-5.9/Yocto-build-RPi3/build-raspberrypi3/tmp/sysroots/x86_64-linux= -fdebug-prefix-map=/home/gwilson/Qt-5.9/Yocto-build-RPi3/build-raspberrypi3/tmp/sysroots/raspberrypi3= -march=armv7ve -marm -mfpu=neon-vfpv4 -mfloat-abi=hard -mcpu=cortex-a7 --sysroot=/home/gwilson/Qt-5.9/Yocto-build-RPi3/build-raspberrypi3/tmp/sysroots/raspberrypi3 -O2 -g -DNDEBUG -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed -shared -Wl,-soname,libzint.so.2.6 -o libzint.so.2.6.1 CMakeFiles/zint.dir/render.c.o CMakeFiles/zint.dir/ps.c.o CMakeFiles/zint.dir/svg.c.o CMakeFiles/zint.dir/emf.c.o CMakeFiles/zint.dir/bmp.c.o CMakeFiles/zint.dir/pcx.c.o CMakeFiles/zint.dir/gif.c.o CMakeFiles/zint.dir/png.c.o CMakeFiles/zint.dir/tif.c.o CMakeFiles/zint.dir/raster.c.o CMakeFiles/zint.dir/common.c.o CMakeFiles/zint.dir/library.c.o CMakeFiles/zint.dir/large.c.o CMakeFiles/zint.dir/reedsol.c.o CMakeFiles/zint.dir/gs1.c.o CMakeFiles/zint.dir/eci.c.o CMakeFiles/zint.dir/code.c.o CMakeFiles/zint.dir/code128.c.o CMakeFiles/zint.dir/2of5.c.o CMakeFiles/zint.dir/upcean.c.o CMakeFiles/zint.dir/telepen.c.o CMakeFiles/zint.dir/medical.c.o CMakeFiles/zint.dir/plessey.c.o CMakeFiles/zint.dir/rss.c.o CMakeFiles/zint.dir/postal.c.o CMakeFiles/zint.dir/auspost.c.o CMakeFiles/zint.dir/imail.c.o CMakeFiles/zint.dir/code16k.c.o CMakeFiles/zint.dir/codablock.c.o CMakeFiles/zint.dir/dmatrix.c.o CMakeFiles/zint.dir/pdf417.c.o CMakeFiles/zint.dir/qr.c.o CMakeFiles/zint.dir/maxicode.c.o CMakeFiles/zint.dir/composite.c.o CMakeFiles/zint.dir/aztec.c.o CMakeFiles/zint.dir/code49.c.o CMakeFiles/zint.dir/code1.c.o CMakeFiles/zint.dir/gridmtx.c.o CMakeFiles/zint.dir/hanxin.c.o CMakeFiles/zint.dir/dotcode.c.o -lpng -lz -lm -Wl,-rpath,/usr/lib

There it is at the end of the command line.

As you can see the build for zint is based on CMake. Do you have any suggestions as to where I can look to figure out how this is getting set, I've done searches of all of the files in the zint download and the only ones that have -rpath in them are some files that build a tcl based support program that has its own autotools based build system.

I'm very confused at this point.

Regards,
Greg

Quoted 37 lines

-----Original Message-----
From: Paul Eggleton [mailto:[email protected]]
Sent: Tuesday, October 10, 2017 2:16 PM
To: Greg Wilson-Lindberg <[email protected]>
Cc: [email protected]; Burton, Ross <[email protected]>
Subject: Re: [yocto] errors in recipe after move from devtool

Hi Greg,

Quoted 6 lines · NZDT Greg Wilson-Lindberg

I'm still getting the:

ERROR: zint-2.6.1-r0 do_package_qa: QA Issue: zint:
/work/cortexa7hf-neon- vfpv4-poky-linux-gnueabi/zint/2.6.1-r0/packages-split/zint/usr/lib/ libzint.so.2.6.1 contains probably-redundant RPATH /usr/lib

There's a short hint about this QA issue in the manual:

http://www.yoctoproject.org/docs/current/ref-manual/ref-
manual.html#ref-qa-checks

Ultimately it depends on the build system for the software your recipe is building, but somewhere it will be explicitly adding this rpath to the compiler command line, so you need to figure out the best way to remove that - if the software's build system makes it optional, turn it off, but you may find you need to patch it out. If you don't care about this particular issue, you could alternatively use INSANE_SKIP to ignore it.

Cheers,
Paul

--

Paul Eggleton
Intel Open Source Technology Centre

#6 lore raw
Quoted 13 lines · NZDT Greg Wilson-Lindberg

Thanks for the info, now I understand what is going on. Hopefully I can find a way to get rid of the RPATH, I don't like ignoring errors or warnings.

I've spent some more time looking into this, I haven't been able to find out where the -rpath comes from. If I start a devshell none of the environment variables have it set. In the run.do_compile log none of the environment variables have it set, it's not set in the run.do_configure log. But in the log.do_compile file the command that links the library:

/home/gwilson/Qt-5.9/Yocto-build-RPi3/build-raspberrypi3/tmp/sysroots/ x86_64-linux/usr/bin/arm-poky-linux-gnueabi/arm-poky-linux-gnueabi-gcc ... -Wl,-rpath,/usr/lib

Quoted 7 lines

There it is at the end of the command line.

As you can see the build for zint is based on CMake. Do you have any suggestions as to where I can look to figure out how this is getting set, I've done searches of all of the files in the zint download and the only ones that have -rpath in them are some files that build a tcl based support program that has its own autotools based build system.

This seems to be something that CMake handles itself. From a quick google which found the CMake wiki page on the subject [1], you may perhaps set CMAKE_SKIP_RPATH? In theory you could do that via EXTRA_OECMAKE in the recipe i.e.

EXTRA_OECMAKE += "-DCMAKE_SKIP_RPATH=TRUE"

Cheers,
Paul

[1] https://cmake.org/Wiki/CMake_RPATH_handling

Signature · 2 lines
Paul Eggleton
Intel Open Source Technology Centre
#7 lore raw

Hi Paul,

That did the trick. Thanks, you've been more than helpful.

Cheers,
Greg

Quoted 48 lines

-----Original Message-----
From: Paul Eggleton [mailto:[email protected]]
Sent: Wednesday, October 11, 2017 12:56 PM
To: Greg Wilson-Lindberg <[email protected]>
Cc: [email protected]; Burton, Ross <[email protected]>
Subject: Re: [yocto] errors in recipe after move from devtool

Quoted 2 lines · NZDT Greg Wilson-Lindberg

Thanks for the info, now I understand what is going on. Hopefully I can find a way to get rid of the RPATH, I don't like ignoring errors or

warnings.

Quoted 6 lines

I've spent some more time looking into this, I haven't been able to find out where the -rpath comes from. If I start a devshell none of the environment variables have it set. In the run.do_compile log none of the environment variables have it set, it's not set in the run.do_configure log. But in the log.do_compile file the command that links

the library:

Quoted 3 lines

/home/gwilson/Qt-5.9/Yocto-build-RPi3/build-raspberrypi3/tmp/sysroots/ x86_64-linux/usr/bin/arm-poky-linux-gnueabi/arm-poky-linux-gnueabi-gcc

...

Quoted 9 lines

-Wl,-rpath,/usr/lib

There it is at the end of the command line.

As you can see the build for zint is based on CMake. Do you have any suggestions as to where I can look to figure out how this is getting set, I've done searches of all of the files in the zint download and the only ones that have -rpath in them are some files that build a tcl based support program that has its own autotools based build system.

This seems to be something that CMake handles itself. From a quick google which found the CMake wiki page on the subject [1], you may perhaps set CMAKE_SKIP_RPATH? In theory you could do that via EXTRA_OECMAKE in the recipe i.e.

EXTRA_OECMAKE += "-DCMAKE_SKIP_RPATH=TRUE"

Cheers,
Paul

[1] https://cmake.org/Wiki/CMake_RPATH_handling

--

Paul Eggleton
Intel Open Source Technology Centre