Bug 219 - dpkg does not build properly
Summary: dpkg does not build properly
Status: RESOLVED FIXED
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: core (show other bugs)
Version: 0.9
Hardware: x86 Multiple
: Low normal
Target Milestone: 0.9 M4
Assignee: Dongxiao Xu
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2010-08-19 14:17 UTC by Mark Hatle
Modified: 2010-12-21 06:09 UTC (History)
5 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Hatle 2010-08-19 14:17:57 UTC
I experienced a build failure when attempting to set my default package type to package_deb.  While building for a qemuppc machine type:

| checking for unistd.h... (cached) yes
| checking whether sys_siglist is declared... (cached) yes
| checking whether compiler supports __attribute__... yes
| checking for va_copy... configure: error: in `/.../git/poky/build/tmp/work/ppc603e-poky-linux/dpkg-1.14.19-r7/
dpkg-1.14.19':
| configure: error: cannot run test program while cross compiling
| See `config.log' for more details.
| FATAL: oe_runconf failed
NOTE: package dpkg-1.14.19-r7: task do_configure: Failed

I assume this affects other architectures as well as PPC.
Comment 1 Kevin Tian 2010-08-19 23:20:18 UTC
Mark, you may try adding below lines to meta/site/powerpc-common:

dpkg_cv_va_copy=${ac_cv_va_copy=yes}
dpkg_cv___va_copy=${ac_cv___va_copy=yes}

We can't run tests in cross-compile environment, and thus site files jump out to workaround them. Now va_copy is only set for x86 and arm, perhaps because they're only platform previously focused on

Having said that, I don't have idea whether 'yes' or 'no' should be set for powerpc platform. :/ For example, x86 sets va_copy to 'no' while arm sets it to 'yes'. I'm not sure the efficient way to figure it out. You may need check ppc stdarg.h for decision

Richard may comment more here. :-)
Comment 2 Dongxiao Xu 2010-08-30 22:28:15 UTC
Kevin's method could solve this configure error.
I'm also interested in how to set the meta/site files for each platform.
Bug 243 also have similar setting problems. 

Richard, could you give some comments on it?
Comment 3 Richard Purdie 2010-08-31 14:15:17 UTC
Adding entries to the site file is the correct answer. Sometimes you may know the answer and can add the entry. In other cases you can try building the application in a qemu sdk image and then take the correct result from there (or run a test on real hardware if you have it)