Skip to contentSkip to conversation

Custom recipe - resolving "do_package_qa: QA Issue: -dev package contains non-symlink .so"

DISCUSSION [email protected] 3 participants 6 messages Aug 22, 2017 – Aug 23, 2017

lore
Share & tools
lore
#0 lore raw

I have a custom recipe (for the AWS SDK), which is failing at the package_qa stage.
The recipe is a very basic cmake styley, and on its own seems to begin with:
'bitbake -f -c package aws-sdk' completes without errors.

But for 'bitbake -c package_qa aws-sdk) I get:

ERROR: aws-sdk-1.1.31-r0 do_package_qa: QA Issue: -dev package contains non-symlink .so: aws-sdk-dev path '/work/armv7a-neon-poky-linux-gnueabi/aws-sdk/1.1.31-r0/packages-split/aws-s dk-dev/usr/lib/libaws-cpp-sdk-core.so'
-dev package contains non-symlink .so: aws-sdk-dev path '/work/armv7a-neon-poky-linux-gnueabi/aws-sdk/1.1.31-r0/packages-split/aws-s dk-dev/usr/lib/libaws-cpp-sdk-s3.so' [dev-elf]

I'd appreciate help with resolving this. Thanks.

#1 lore raw
Quoted 2 lines · On 22 August 2017 at 16:43, <[email protected]> wrote:

I have a custom recipe (for the AWS SDK), which is failing at the

package_qa

Quoted 2 lines

stage.
The recipe is a very basic cmake styley, and on its own seems to begin

with:

Quoted 7 lines

'bitbake -f -c package aws-sdk' completes without errors.

But for 'bitbake -c package_qa aws-sdk) I get:

ERROR: aws-sdk-1.1.31-r0 do_package_qa: QA Issue: -dev package contains non-symlink .so: aws-sdk-dev path

'/work/armv7a-neon-poky-linux-gnueabi/aws-sdk/1.1.31-r0/packages-split/aws-s

Quoted 3 lines

dk-dev/usr/lib/libaws-cpp-sdk-core.so'
-dev package contains non-symlink .so: aws-sdk-dev path

'/work/armv7a-neon-poky-linux-gnueabi/aws-sdk/1.1.31-r0/packages-split/aws-s

Quoted 4 lines

dk-dev/usr/lib/libaws-cpp-sdk-s3.so' [dev-elf]

I'd appreciate help with resolving this. Thanks.>

It looks like aws-sdk installs .so files that are actual libraries (and not symlinks to the versioned libraries as would be the usual case). The best solution would be to get aws to install versioned libraries but if that's not an option, you probably want to package the .so files in the actual library package, not the -dev package (which is the default since usually .so are symlinks for development and the actually versioned ).

You may have to set both FILES_${PN}-dev and FILES_${PN} (so the former doesn't grab the so files, and the latter does)

HTH,
Jussi

#2 lore raw
Quoted 23 lines · On 22 August 2017 at 15:13 Jussi Kukkonen <[email protected]> wrote:
Quoted 16 lines · On 22 August 2017 at 16:43, <[email protected]> wrote:

I have a custom recipe (for the AWS SDK), which is failing at the package_qa stage.
The recipe is a very basic cmake styley, and on its own seems to begin with:
'bitbake -f -c package aws-sdk'  completes without errors.

But for 'bitbake -c package_qa aws-sdk) I get:

ERROR: aws-sdk-1.1.31-r0 do_package_qa: QA Issue: -dev package contains non-symlink .so: aws-sdk-dev path '/work/armv7a-neon-poky-linux-gnueabi/aws-sdk/1.1.31-r0/packages-split/aws-s dk-dev/usr/lib/libaws-cpp-sdk-core.so'
-dev package contains non-symlink .so: aws-sdk-dev path '/work/armv7a-neon-poky-linux-gnueabi/aws-sdk/1.1.31-r0/packages-split/aws-s dk-dev/usr/lib/libaws-cpp-sdk-s3.so' [dev-elf]

Quoted 2 lines

I'd appreciate help with resolving this. Thanks.>

Quoted 6 lines

It looks like aws-sdk installs .so files that are actual libraries (and not symlinks to the versioned libraries as would be the usual case). The best solution would be to get aws to install versioned libraries but if that's not an option, you probably want to package the .so files in the actual library package, not the -dev package (which is the default since usually .so are symlinks for development and the actually versioned ).

You may have to set both FILES_${PN}-dev and FILES_${PN} (so the former doesn't grab the so files, and the latter does)

HTH,
  Jussi

Thanks for the tips, Jussi.
I'm managing to get a little further, added
INSANE_SKIP_${PN}-dev += "dev-elf"
FILES_${PN}-dev += "${libdir}/libaws-cpp-sdk-core.so ${libdir}/libaws-cpp-sdk-s3.so" FILES_${PN} += "${libdir}/libaws-cpp-sdk-core.so ${libdir}/libaws-cpp-sdk-s3.so"

and now the package_qa succeeds, but when I try to build the full system image I get:

ERROR: core-image-wg2xx-1.0-r0 do_rootfs: Unable to install packages. Command '/home/colin/fsl-community-bsp/build/tmp/sysroots/x86_64-linux/usr/bin/apt-get install --force-yes --allow-unauthenticated .....' returned 100:
Reading package lists...
Building dependency tree...
Reading state information...
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
packagegroup-my-apps : Depends: aws-sdk but it is not installable
E: Unable to correct problems, you have held broken packages.

Perhaps the INSANE_SKIP is un-necessary/over-zealous, but I didn't yet manage to get through the package_qa without it. (Admittedly, I wasn't *100%* sure of what you were suggesting...)

#3 lore raw
Quoted 36 lines · Colin Helliwell
Quoted 2 lines

On 22 August 2017 at 15:13 Jussi Kukkonen <[email protected]>

Quoted 4 lines · wrote:
Quoted 2 lines · On 22 August 2017 at 16:43, <[email protected]> wrote:

I have a custom recipe (for the AWS SDK), which is failing at the

package_qa

Quoted 2 lines
Quoted 2 lines

stage.
The recipe is a very basic cmake styley, and on its own seems to begin

with:

Quoted 7 lines
Quoted 7 lines

'bitbake -f -c package aws-sdk' completes without errors.

But for 'bitbake -c package_qa aws-sdk) I get:

ERROR: aws-sdk-1.1.31-r0 do_package_qa: QA Issue: -dev package contains non-symlink .so: aws-sdk-dev path '/work/armv7a-neon-poky-linux-gnueabi/aws-sdk/1.1.31-r0/

packages-split/aws-s

Quoted 3 lines
Quoted 3 lines

dk-dev/usr/lib/libaws-cpp-sdk-core.so'
-dev package contains non-symlink .so: aws-sdk-dev path '/work/armv7a-neon-poky-linux-gnueabi/aws-sdk/1.1.31-r0/

packages-split/aws-s

Quoted 6 lines
Quoted 4 lines

dk-dev/usr/lib/libaws-cpp-sdk-s3.so' [dev-elf]

I'd appreciate help with resolving this. Thanks.>

It looks like aws-sdk installs .so files that are actual libraries (and

not symlinks to the versioned libraries as would be the usual case). The best solution would be to get aws to install versioned libraries but if that's not an option, you probably want to package the .so files in the actual library package, not the -dev package (which is the default since usually .so are symlinks for development and the actually versioned ).

Quoted 2 lines

You may have to set both FILES_${PN}-dev and FILES_${PN} (so the former

Quoted 9 lines

doesn't grab the so files, and the latter does)

Quoted 3 lines

HTH,
Jussi

Thanks for the tips, Jussi.
I'm managing to get a little further, added
INSANE_SKIP_${PN}-dev += "dev-elf"

I suggest not doing this. It seems the warning is valid so you should fix the issue, not silence the warning.

FILES_${PN}-dev += "${libdir}/libaws-cpp-sdk-core.so

Quoted 2 lines

${libdir}/libaws-cpp-sdk-s3.so"

${PN}-dev should _not_ contain so files (in your special case). The issue is that the default value contains "${libdir}/lib*.so" already (it's not quite so simple but see meta/conf/bitbake.conf for details if interested). You should be able to just redefine the variable completely:

    FILES_${PN}-dev = "${includedir}"
Quoted 3 lines

FILES_${PN} += "${libdir}/libaws-cpp-sdk-core.so
${libdir}/libaws-cpp-sdk-s3.so"

This looks correct to me.

Jussi

#4 lore raw
Quoted 41 lines · Jussi Kukkonen
Quoted 39 lines · Colin Helliwell
Quoted 38 lines

On 22 August 2017 at 15:13 Jussi Kukkonen <[email protected]> wrote:

Quoted 13 lines · On 22 August 2017 at 16:43, <[email protected]> wrote:

I have a custom recipe (for the AWS SDK), which is failing at the package_qa
stage.
The recipe is a very basic cmake styley, and on its own seems to begin with:
'bitbake -f -c package aws-sdk' completes without errors.

But for 'bitbake -c package_qa aws-sdk) I get:

ERROR: aws-sdk-1.1.31-r0 do_package_qa: QA Issue: -dev package contains
non-symlink .so: aws-sdk-dev path

Quoted 9 lines

'/work/armv7a-neon-poky-linux-gnueabi/aws-sdk/1.1.31-r0/packages-split/aws-s dk-dev/usr/lib/libaws-cpp-sdk-core.so'
-dev package contains non-symlink .so: aws-sdk-dev path

'/work/armv7a-neon-poky-linux-gnueabi/aws-sdk/1.1.31-r0/packages-split/aws-s dk-dev/usr/lib/libaws-cpp-sdk-s3.so' [dev-elf]

I'd appreciate help with resolving this. Thanks.>

It looks like aws-sdk installs .so files that are actual libraries (and not symlinks to the versioned libraries as would be the usual case). The best solution would be to get aws to install versioned libraries but if that's not an option, you probably want to package the .so files in the actual library package, not the -dev package (which is the default since usually .so are symlinks for development and the actually versioned ).

You may have to set both FILES_${PN}-dev and FILES_${PN} (so the former doesn't grab the so files, and the latter does)

HTH,
Jussi

Quoted 6 lines
Quoted 3 lines

Thanks for the tips, Jussi.
I'm managing to get a little further, added
INSANE_SKIP_${PN}-dev += "dev-elf"

I suggest not doing this. It seems the warning is valid so you should fix the issue, not silence the warning.

Right, and especially true for the dev-elf QA check. Putting an actual elf .so file in a -dev package introduces a run-time dependency on the -dev package, which causes header files etc to be pulled into the final image. Trying to disable the "dev-elf" QA test should be QA test failure in itself... :-)

Quoted 10 lines
Quoted 2 lines

FILES_${PN}-dev += "${libdir}/libaws-cpp-sdk-core.so ${libdir}/libaws-cpp-sdk-s3.so"

${PN}-dev should _not_ contain so files (in your special case). The issue is that the default value contains "${libdir}/lib*.so" already (it's not quite so simple but see meta/conf/bitbake.conf for details if interested). You should be able to just redefine the variable completely:

    FILES_${PN}-dev = "${includedir}"

Completely over-riding any of the default packaging rules isn't ideal. To force .so files into main package the following is a little cleaner:

  FILES_SOLIBSDEV = ""
  FILES_${PN} += "${libdir}/*.so"
Quoted 14 lines
Quoted 2 lines

FILES_${PN} += "${libdir}/libaws-cpp-sdk-core.so
${libdir}/libaws-cpp-sdk-s3.so"

This looks correct to me.

Jussi

--
_______________________________________________
yocto mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/yocto

#5 lore raw

Resolved now - thanks for the assistance.

Quoted 91 lines · On 23 August 2017 at 00:45 Andre McCurdy <[email protected]> wrote:

On Tue, Aug 22, 2017 at 12:18 PM, Jussi Kukkonen

Quoted 42 lines · <[email protected]> wrote:
Quoted 39 lines · Colin Helliwell
Quoted 38 lines

On 22 August 2017 at 15:13 Jussi Kukkonen <[email protected]> wrote:

Quoted 13 lines · On 22 August 2017 at 16:43, <[email protected]> wrote:

I have a custom recipe (for the AWS SDK), which is failing at the package_qa
stage.
The recipe is a very basic cmake styley, and on its own seems to begin with:
'bitbake -f -c package aws-sdk' completes without errors.

But for 'bitbake -c package_qa aws-sdk) I get:

ERROR: aws-sdk-1.1.31-r0 do_package_qa: QA Issue: -dev package contains
non-symlink .so: aws-sdk-dev path

Quoted 8 lines

'/work/armv7a-neon-poky-linux-gnueabi/aws-sdk/1.1.31-r0/packages-split/aws-s dk-dev/usr/lib/libaws-cpp-sdk-core.so'
-dev package contains non-symlink .so: aws-sdk-dev path

'/work/armv7a-neon-poky-linux-gnueabi/aws-sdk/1.1.31-r0/packages-split/aws-s dk-dev/usr/lib/libaws-cpp-sdk-s3.so' [dev-elf]

I'd appreciate help with resolving this. Thanks.>

It looks like aws-sdk installs .so files that are actual libraries (and not symlinks to the versioned libraries as would be the usual case). The best solution would be to get aws to install versioned libraries but if that's not an option, you probably want to package the .so files in the actual library package, not the -dev package (which is the default since usually .so are symlinks for development and the actually versioned ).

You may have to set both FILES_${PN}-dev and FILES_${PN} (so the former doesn't grab the so files, and the latter does)

HTH,
Jussi

Quoted 6 lines
Quoted 3 lines

Thanks for the tips, Jussi.
I'm managing to get a little further, added
INSANE_SKIP_${PN}-dev += "dev-elf"

I suggest not doing this. It seems the warning is valid so you should fix the issue, not silence the warning.

Right, and especially true for the dev-elf QA check. Putting an actual elf .so file in a -dev package introduces a run-time dependency on the -dev package, which causes header files etc to be pulled into the final image. Trying to disable the "dev-elf" QA test should be QA test failure in itself... :-)

Quoted 9 lines
Quoted 2 lines

FILES_${PN}-dev += "${libdir}/libaws-cpp-sdk-core.so ${libdir}/libaws-cpp-sdk-s3.so"

${PN}-dev should _not_ contain so files (in your special case). The issue is that the default value contains "${libdir}/lib*.so" already (it's not quite so simple but see meta/conf/bitbake.conf for details if interested). You should be able to just redefine the variable completely:

FILES_${PN}-dev = "${includedir}"

Completely over-riding any of the default packaging rules isn't ideal. To force .so files into main package the following is a little cleaner:

FILES_SOLIBSDEV = ""
FILES_${PN} += "${libdir}/*.so"

Quoted 13 lines
Quoted 2 lines

FILES_${PN} += "${libdir}/libaws-cpp-sdk-core.so
${libdir}/libaws-cpp-sdk-s3.so"

This looks correct to me.

Jussi

--

_______________________________________________
yocto mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/yocto