Bug 13732 - eSDK: getting error "xmlcatalog: not found" installing SDK
Summary: eSDK: getting error "xmlcatalog: not found" installing SDK
Status: RESOLVED FIXED
Alias: None
Product: Meta-yocto
Classification: Build System, Metadata & Runtime
Component: meta-yocto (show other bugs)
Version: 3.0.1
Hardware: x86 Multiple
: Medium+ normal
Target Milestone: 3.2 M4
Assignee: Chen Qi
QA Contact:
URL:
Whiteboard: Backport to 3.0.2
Depends on:
Blocks:
 
Reported: 2020-01-10 21:07 UTC by anon2313
Modified: 2020-10-05 08:13 UTC (History)
3 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: Don't know


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description anon2313 2020-01-10 21:07:02 UTC
I receive the same failure trying to install the eSDK as described in this email.
https://www.mail-archive.com/yocto@yoctoproject.org/msg45415.html

From that email:
Exception: subprocess.CalledProcessError: Command 
'/workdir/sdk/rpi/tmp/sysroots/x86_64/usr/bin/postinst-docbook-xsl-stylesheets-native-xmlcatalog'
 returned non-zero exit status 127.

Subprocess output:
/workdir/sdk/rpi/tmp/sysroots/x86_64/usr/bin/postinst-docbook-xsl-stylesheets-native-xmlcatalog:
 5: 
/workdir/sdk/rpi/tmp/sysroots/x86_64/usr/bin/postinst-docbook-xsl-stylesheets-native-xmlcatalog:
 xmlcatalog: not found
/workdir/sdk/rpi/tmp/sysroots/x86_64/usr/bin/postinst-docbook-xsl-stylesheets-native-xmlcatalog:
 8: 
/workdir/sdk/rpi/tmp/sysroots/x86_64/usr/bin/postinst-docbook-xsl-stylesheets-native-xmlcatalog:
 xmlcatalog: not found

When I try to install the eSDK built by populate_sdk_ext and install it I get the same error.

In the shell I was using to run the install script it shows that it does know how to run xmlcatalog.

i7-lab-sff:/swdev/XXX/dev/mesa$ which xmlcatalog
/swdev/XXX/dev/simple_sdk/tmp/sysroots/x86_64/usr/bin/xmlcatalog

I am currently trying to build a stock Poky image and eSDK to see if the errors comes from the layers I am using.  I don't recall having this issue with the regular SDK.
Comment 1 anon2313 2020-01-10 23:12:04 UTC
I haven't tracked it down.  The only layer I am using is the one that defines our distro.  It does tweak the standard poky distro by changing the name.  I'll try to provide more information when I have a chance.
Comment 2 anon2313 2020-01-11 14:29:41 UTC
Also the problem doesn't happen with every eSDK that I've tried building using my layer.  So far it has been just one of the images that is loosely based of off core-image-x11. Building and installing an eSDK for core-image-x11 doesn't have this error.
Comment 3 Randy MacLeod 2020-01-16 15:39:41 UTC
Do you have extended documentation enabled as a DISTRO_FEATURE?
Comment 4 anon2313 2020-01-29 21:38:03 UTC
No, I tweaked POKY_DEFAULT_DISTRO_FEATURES. 

# Override standard features in poky based distros
POKY_DEFAULT_DISTRO_FEATURES = "largefile opengl multiarch x11"

Then it looks like it resolves to:

DISTRO_FEATURES="acl alsa argp bluetooth ext2 ipv4 ipv6 largefile pcmcia usbgadget usbhost wifi xattr nfs zeroconf pci 3g nfc x11 largefile opengl multiarch x11 pulseaudio sysvinit gobject-introspection-data"
Comment 5 anon2313 2020-01-30 14:16:54 UTC
It seems to be an intermittent issue for me. I started to use the buildhistory log.  When I first tried building the eSDK it failed.  I made some minor changes to one of my applications.  Then I built the SDK for that and it was fine.  Then I built the eSDK and it worked.
Comment 6 anon2313 2020-01-30 14:38:21 UTC
My apologies.  I confused myself because I ran into an error with building the eSDK. Even when the eSDK can be built it has the "xmlcatalog: not found" error.
Comment 7 Chen Qi 2020-09-28 18:38:11 UTC
This has been fixed by the following commit.

commit fdee2d49fc9139ff7e0b5a8b1b6476224540ca57
Author: Alexander Kanavin <alex.kanavin@gmail.com>
Date:   Mon Jun 8 09:46:59 2020 +0200

    build-sysroots: add sysroot paths with native binaries to PATH
    
    staging_populate_sysroot_dir() collects postinsts from the sysroot
    and executes them. These postinsts, in turn, may call binaries that
    are only available from the sysroot. This works fine with recipe-specific
    sysroots, as all necessary paths are already in PATH, but breaks down
    in this recipe which imitates the old global sysroot way but doesn't adjust
    the PATH to include the binary paths from global sysroot.
    
    To reproduce the failure:
    
    $ bitbake docbook-xml-dtd4-native
    $ bitbake -c build_native_sysroot build-sysroots