Bug 1326

Summary: Function 'BUILDSPEC' failed for libpthread-stubs
Product: [Build System, Metadata & Runtime] OE-Core Reporter: Jiajun Xu <jiajun.xu>
Component: coreAssignee: Dongxiao Xu <dongxiao.xu>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: Medium CC: dvhart, ke.yu, mark.hatle, meta.mr.watcher, meta.watcher, msm-oss, richard.purdie, sgw, shane.wang
Version: unspecified   
Target Milestone: 1.2   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: ---

Description Jiajun Xu 2011-08-03 20:07:07 UTC
Poky/Branch: master
Commit: 5fbac72eb8c3cddf10876cf007aff54180c7264e

Latest tree has BUILDSPEC failed for libpthread-stubs against qemux86 build.
The complete log is on http://autobuilder.pokylinux.org:8010/builders/nightly-external/builds/61/steps/shell_6/logs/stdio.

######
NOTE: Running task 3794 of 4668 (ID: 3890, /srv/home/pokybuild/poky-slave/nightly-external/build/meta/recipes-graphics/xcb/libxcb_1.7.bb, do_package_write_rpm)
NOTE: package libice-1_1.0.7-r0: task do_package_write_rpm: Started
ERROR: Function 'BUILDSPEC' failed (see /srv/home/pokybuild/poky-slave/nightly-external/build/build/tmp/work/i586-poky-linux/libpthread-stubs-0.3-r0/temp/log.do_package_write_rpm.28367 for further information)
ERROR: Logfile of failure stored in: /srv/home/pokybuild/poky-slave/nightly-external/build/build/tmp/work/i586-poky-linux/libpthread-stubs-0.3-r0/temp/log.do_package_write_rpm.28367
Log data follows:
| NOTE: Creating RPM package for libpthread-stubs-dbg
| NOTE: Not creating empty RPM package for libpthread-stubs
| NOTE: Not creating empty RPM package for libpthread-stubs-doc
| NOTE: Creating RPM package for libpthread-stubs-dev
| NOTE: Not creating empty RPM package for libpthread-stubs-staticdev
| NOTE: Not creating empty RPM package for libpthread-stubs-locale
| ERROR: Function 'BUILDSPEC' failed (see /srv/home/pokybuild/poky-slave/nightly-external/build/build/tmp/work/i586-poky-linux/libpthread-stubs-0.3-r0/temp/log.do_package_write_rpm.28367 for further information)
| Building target platforms: i586-poky-linux-gnu
| Processing files: libpthread-stubs-dbg-0.3-r0.i586
| Finding  Provides: /srv/home/pokybuild/poky-slave/nightly-external/build/build/tmp/work/i586-poky-linux/libpthread-stubs-0.3-r0/libpthread-stubs.requires
| Finding  Requires: /srv/home/pokybuild/poky-slave/nightly-external/build/build/tmp/work/i586-poky-linux/libpthread-stubs-0.3-r0/libpthread-stubs.requires
| Processing files: libpthread-stubs-dev-0.3-r0.i586
| Finding  Provides: /srv/home/pokybuild/poky-slave/nightly-external/build/build/tmp/work/i586-poky-linux/libpthread-stubs-0.3-r0/libpthread-stubs.requires
| Finding  Requires: /srv/home/pokybuild/poky-slave/nightly-external/build/build/tmp/work/i586-poky-linux/libpthread-stubs-0.3-r0/libpthread-stubs.requires
| Provides: pkgconfig(pthread-stubs) = 0.3
| Requires: pkgconfig(pthread-stubs) = 0.3
| Provides: pkgconfig(pthread-stubs) = 0.3
| Requires: pkgconfig(pthread-stubs) = 0.3
| Checking for unpackaged file(s): /srv/home/pokybuild/poky-slave/nightly-external/build/build/tmp/sysroots/x86_64-linux/usr/lib/rpm/check-files /srv/home/pokybuild/poky-slave/nightly-external/build/build/tmp/work/i586-poky-linux/libpthread-stubs-0.3-r0/package
| warning: Could not canonicalize hostname: autobuilder
| error: Unable to open temp file.
| 
| 
| RPM build errors:
|     Could not canonicalize hostname: autobuilder
|     Unable to open temp file.
NOTE: package libpthread-stubs-0.3-r0: task do_package_write_rpm: Failed
ERROR: Task 3980 (/srv/home/pokybuild/poky-slave/nightly-external/build/meta/recipes-graphics/xcb/libpthread-stubs_0.3.bb, do_package_write_rpm) failed with exit code '1'
NOTE: Running task 3795 of 4668 (ID: 3720, /srv/home/pokybuild/poky-slave/nightly-external/build/meta/recipes-support/libusb/libusb1_1.0.8.bb, do_package_write_rpm)
######
Comment 1 Dongxiao Xu 2011-08-04 01:42:25 UTC
I tried it locally, however could not reproduce this bug in my environment. bitbake libpthread-stubs works OK.
Comment 2 Saul Wold 2011-08-05 08:03:44 UTC
Mark, any hints as to why this occurs randomly?
Comment 3 Saul Wold 2011-08-07 10:52:55 UTC
Another case of this issue, with a different package

ERROR: Function 'BUILDSPEC' failed (see /srv/home/pokybuild/poky-slave/nightly-external/build/build/tmp/work/qemux86-poky-linux/base-files-3.0.14-r69/temp/log.do_package_write_rpm.4851 for further information)
ERROR: Logfile of failure stored in: /srv/home/pokybuild/poky-slave/nightly-external/build/build/tmp/work/qemux86-poky-linux/base-files-3.0.14-r69/temp/log.do_package_write_rpm.4851
Log data follows:
| NOTE: Creating RPM package for base-files-doc
| NOTE: Creating RPM package for base-files
| NOTE: Creating RPM package for base-files
| NOTE: Creating EMPTY RPM Package for base-files-dev
| NOTE: Creating EMPTY RPM Package for base-files-dbg
| ERROR: Function 'BUILDSPEC' failed (see /srv/home/pokybuild/poky-slave/nightly-external/build/build/tmp/work/qemux86-poky-linux/base-files-3.0.14-r69/temp/log.do_package_write_rpm.4851 for further information)
| Building target platforms: qemux86-poky-linux-gnu
| Processing files: base-files-3.0.14-r69.qemux86
| Finding  Provides: /srv/home/pokybuild/poky-slave/nightly-external/build/build/tmp/work/qemux86-poky-linux/base-files-3.0.14-r69/base-files.requires
| Finding  Requires: /srv/home/pokybuild/poky-slave/nightly-external/build/build/tmp/work/qemux86-poky-linux/base-files-3.0.14-r69/base-files.requires
| Processing files: base-files-doc-3.0.14-r69.qemux86
| Finding  Provides: /srv/home/pokybuild/poky-slave/nightly-external/build/build/tmp/work/qemux86-poky-linux/base-files-3.0.14-r69/base-files.requires
| Finding  Requires: /srv/home/pokybuild/poky-slave/nightly-external/build/build/tmp/work/qemux86-poky-linux/base-files-3.0.14-r69/base-files.requires
| Processing files: base-files-dev-3.0.14-r69.qemux86
| Processing files: base-files-dbg-3.0.14-r69.qemux86
| Checking for unpackaged file(s): /srv/home/pokybuild/poky-slave/nightly-external/build/build/tmp/sysroots/x86_64-linux/usr/lib/rpm/check-files /srv/home/pokybuild/poky-slave/nightly-external/build/build/tmp/work/qemux86-poky-linux/base-files-3.0.14-r69/package
| warning: Could not canonicalize hostname: autobuilder
| error: Unable to open temp file.
| 
| 
| RPM build errors:
|     Could not canonicalize hostname: autobuilder
|     Unable to open temp file.
NOTE: package base-files-3.0.14-r69: task do_package_write_rpm: Failed
ERROR: Task 658 (/srv/home/pokybuild/poky-slave/nightly-external/build/meta/recipes-core/base-files/base-files_3.0.14.bb, do_package_write_rpm) failed with exit code '1'
Comment 4 Darren Hart 2011-08-11 15:27:55 UTC
Jiajin, we haven't been able to reproduce, have you seen this since reporting it?
Comment 5 Jiajun Xu 2011-08-15 00:42:09 UTC
(In reply to comment #4)
> Jiajin, we haven't been able to reproduce, have you seen this since reporting
> it?

I could not reproduce the bug on local machine with same M3 commit. Meanwhile, we do not find same issue on autobuilder.
I suggest to mark the bug as "WORKSFORME". If we meet the issue again, we could reopen it.
Comment 6 Jiajun Xu 2011-08-15 00:42:29 UTC
Verify the bug as WORKSFORME according the last comments.
Comment 7 Dongxiao Xu 2011-08-31 18:53:55 UTC
Occasionally I met this issue within my build, however rebuild it will pass. 
Reopen this bug!

NOTE: Creating RPM package for update-rc.d-dbg
NOTE: Creating RPM package for update-rc.d
NOTE: Creating RPM package for update-rc.d
NOTE: Not creating empty RPM package for update-rc.d-doc
NOTE: Creating EMPTY RPM Package for update-rc.d-dev
NOTE: Not creating empty RPM package for update-rc.d-staticdev
NOTE: Not creating empty RPM package for update-rc.d-locale
Building target platforms: all-poky-linux
Processing files: update-rc.d-0.7-r4.all
Finding  Provides: /distro/dongxiao/build-lib/tmp/work/all-poky-linux/update-rc.d-0.7-r4/update-rc.d.requires
Finding  Requires: /distro/dongxiao/build-lib/tmp/work/all-poky-linux/update-rc.d-0.7-r4/update-rc.d.requires
Processing files: update-rc.d-dbg-0.7-r4.all
Finding  Provides: /distro/dongxiao/build-lib/tmp/work/all-poky-linux/update-rc.d-0.7-r4/update-rc.d.requires
Finding  Requires: /distro/dongxiao/build-lib/tmp/work/all-poky-linux/update-rc.d-0.7-r4/update-rc.d.requires
Processing files: update-rc.d-dev-0.7-r4.all
Checking for unpackaged file(s): /distro/dongxiao/build-lib/tmp/sysroots/x86_64-linux/usr/lib/rpm/check-files /distro/dongxiao/build-lib/tmp/work/all-poky-linux/update-rc.d-0.7-r4/package
error: Unable to open temp file.


RPM build errors:
    Unable to open temp file.
ERROR: Function 'BUILDSPEC' failed (see /distro/dongxiao/build-lib/tmp/work/all-poky-linux/update-rc.d-0.7-r4/temp/log.do_package_write_rpm.16183 for further information)
Comment 8 Matthew McClintock 2011-10-07 09:03:42 UTC
I'm seeing this error too! I will note that it happens when my sstate-cache is being tested so a few things have taken place:

1) A lot of the recipes are built out of cache
2) The directory structure and paths have changed from the build environment where the sstate-cache was created

Is there a way to see the spec file RPM is complaining about? Any thoughts on making this a higher priority bug?

-M

| RPM build errors:
|     Unable to open temp file.
NOTE: package intltool-0.40.6-r5: task do_package_write_rpm: Failed
ERROR: Function 'BUILDSPEC' failed (see /opt/yocto/cache-test/build_mpc8572ds_release/tmp/work/ppce500v2-fsl-linux-gnuspe/automake-1.11.1-r4/temp/log.do_package_write_rpm.15636 for further information)
ERROR: Logfile of failure stored in: /opt/yocto/cache-test/build_mpc8572ds_release/tmp/work/ppce500v2-fsl-linux-gnuspe/automake-1.11.1-r4/temp/log.do_package_write_rpm.15636
Log data follows:
| NOTE: Creating RPM package for automake-dbg
| NOTE: Creating RPM package for automake
| NOTE: Creating RPM package for automake
| NOTE: Creating RPM package for automake-doc
| NOTE: Creating EMPTY RPM Package for automake-dev
| NOTE: Not creating empty RPM package for automake-staticdev
| NOTE: Not creating empty RPM package for automake-locale
| DEBUG: SITE files ['endian-big', 'bit-32', 'powerpc-common', 'common-linux', 'common-glibc', 'powerpc-linux', 'powerpc32-linux', 'powerpc-linux-gnuspe', 'common']
| ERROR: Function 'BUILDSPEC' failed (see /opt/yocto/cache-test/build_mpc8572ds_release/tmp/work/ppce500v2-fsl-linux-gnuspe/automake-1.11.1-r4/temp/log.do_package_write_rpm.15636 for further information)
| Building target platforms: ppce500v2-fsl-linux-gnuspe
| Processing files: automake-1.11.1-r4.ppce500v2
| Finding  Provides: /opt/yocto/cache-test/build_mpc8572ds_release/tmp/work/ppce500v2-fsl-linux-gnuspe/automake-1.11.1-r4/automake.provides
| Finding  Requires: /opt/yocto/cache-test/build_mpc8572ds_release/tmp/work/ppce500v2-fsl-linux-gnuspe/automake-1.11.1-r4/automake.requires
| Requires(rpmlib): rpmlib(PartialHardlinkSets) <= 4.0.4-1
| Requires: /usr/bin/env /bin/sh
| Requires(rpmlib): rpmlib(PartialHardlinkSets) <= 4.0.4-1
| Requires: /usr/bin/env /bin/sh
| Processing files: automake-dbg-1.11.1-r4.ppce500v2
| Finding  Provides: /opt/yocto/cache-test/build_mpc8572ds_release/tmp/work/ppce500v2-fsl-linux-gnuspe/automake-1.11.1-r4/automake.provides
| Finding  Requires: /opt/yocto/cache-test/build_mpc8572ds_release/tmp/work/ppce500v2-fsl-linux-gnuspe/automake-1.11.1-r4/automake.requires
| Processing files: automake-doc-1.11.1-r4.ppce500v2
| Finding  Provides: /opt/yocto/cache-test/build_mpc8572ds_release/tmp/work/ppce500v2-fsl-linux-gnuspe/automake-1.11.1-r4/automake.provides
| Finding  Requires: /opt/yocto/cache-test/build_mpc8572ds_release/tmp/work/ppce500v2-fsl-linux-gnuspe/automake-1.11.1-r4/automake.requires
| Processing files: automake-dev-1.11.1-r4.ppce500v2
| Checking for unpackaged file(s): /opt/yocto/cache-test/build_mpc8572ds_release/tmp/sysroots/x86_64-linux/usr/lib/rpm/check-files /opt/yocto/cache-test/build_mpc8572ds_release/tmp/work/ppce500v2-fsl-linux-gnuspe/automake-1.11.1-r4/package
| error: Unable to open temp file.
Comment 9 Mark Hatle 2011-10-10 07:30:10 UTC
The issue isn't in the specfile itself.  The specfile doesn't control the creation of the tmp files that are executed by RPM.

Inside of rpm when it processes various commands it generates shell scripts and executes them.  I believe this is where the failure is coming from, but so far I've not been able to reproduce it.  I suspect what we'll have to do is modify RPM to emit more debugging information about the failure when it occurs.