All of lore.kernel.org
 help / color / mirror / Atom feed
* STAGING_BINDIR
@ 2006-11-24 14:13 Richard Purdie
  2006-11-24 14:20 ` STAGING_BINDIR Koen Kooi
  2006-11-26 21:22 ` STAGING_BINDIR Richard Purdie
  0 siblings, 2 replies; 5+ messages in thread
From: Richard Purdie @ 2006-11-24 14:13 UTC (permalink / raw)
  To: openembedded-devel

Hi,

I have hit a problem. At first I thought it was going to be a simple one
but it isn't and raises a question I've wondered about for a long time.

The problem is I had both an x86 build and an arm build in the same tree
with multimachine. In theory, this should work and it very nearly does
except I see odd compile failures in gnutls. The compile failures turn
out to be from x86 assembler. The x86 assembler is creeping in due to
corrupted include parameters from gcc. The corrupted parameters are
coming from running the "libgcrypt-config" binary. 

To make things more interesting, this only happens if you build x86,
then arm. If you build arm first, it all works...

Basically we have a race. Both the armv5te libgcrypt build and the x86
libgcrypt build install the "libgcrypt-config" binary into
STAGING_BINDIR.

from bitbake.conf we see:

STAGING_DIR = "${TMPDIR}/staging"
STAGING_BINDIR = "${STAGING_DIR}/${BUILD_SYS}/bin"
STAGING_LIBDIR = "${STAGING_DIR}/${HOST_SYS}/lib"
STAGING_INCDIR = "${STAGING_DIR}/${HOST_SYS}/include"
STAGING_DATADIR = "${STAGING_DIR}/${HOST_SYS}/share"
STAGING_LOADER_DIR = "${STAGING_DIR}/${HOST_SYS}/loader"
STAGING_FIRMWARE_DIR = "${STAGING_DIR}/${HOST_SYS}/firmware"

which has always struck me as odd - BINDIR uses ${BUILD_SYS} rather than
${HOST_SYS}. I did discuss this a long time ago when I was a lot newer
to OE. multimachine wasn't as widely supported than and it was argued
that since binaries installed there were to be run on ${BUILD_SYS}
rather than ${HOST_SYS}, this was really ok. If we change this to
${HOST_SYS}, my build issues would disappear as the arm and x86 versions
will end up in different places. I think the time has come to do
something about this but its not that simple :)

The -native packages install to ${BUILD_SYS}/bin and the arch specific
ones to ${HOST_SYS}/bin. So we add both to PATH, problem solved?

What happens when we start using packaged staging and ${HOST_SYS}/bin
contains arm binaries? Our staging generally doesn't at the moment but
is likely to in future and we do not want arm binaries in PATH.

My proposal is therefore to use:

STAGING_BINDIR = "${STAGING_DIR}/${BUILD_SYS}/bin/${HOST_SYS}" and have
native.bbclass override this with ${BUILD_SYS}/bin

We'd then add both ${BUILD_SYS}/bin and ${BUILD_SYS}/bin/${HOST_SYS} to
the PATH.

Does anyone see a better way to handle this?

I suspect there are going to be problems with binaries missing from
${STAGING_BINDIR} when we switch to packages staging. I just wonder why
we haven't see those problems with packaged staging yet? Is anyone
actively using/testing it?

Regards,

Richard





^ permalink raw reply	[flat|nested] 5+ messages in thread
* STAGING_BINDIR
@ 2006-11-24 13:01 Richard Purdie
  0 siblings, 0 replies; 5+ messages in thread
From: Richard Purdie @ 2006-11-24 13:01 UTC (permalink / raw)
  To: openembedded-devel

Hi,

I have hit a problem. At first I thought it was going to be a simple one
but it isn't and raises a question I've wondered about for a long time.

The problem is I had both an x86 build and an arm build in the same tree
with multimachine. In theory, this should work and it very nearly does
except I see odd compile failures in gnutls. The compile failures turn
out to be from x86 assembler. The x86 assembler is creeping in due to
corrupted include parameters from gcc. The corrupted parameters are
coming from running the "libgcrypt-config" binary. 

To make things more interesting, this only happens if you build x86,
then arm. If you build arm first, it all works...

Basically we have a race. Both the armv5te libgcrypt build and the x86
libgcrypt build install the "libgcrypt-config" binary into
STAGING_BINDIR.

from bitbake.conf we see:

STAGING_DIR = "${TMPDIR}/staging"
STAGING_BINDIR = "${STAGING_DIR}/${BUILD_SYS}/bin"
STAGING_LIBDIR = "${STAGING_DIR}/${HOST_SYS}/lib"
STAGING_INCDIR = "${STAGING_DIR}/${HOST_SYS}/include"
STAGING_DATADIR = "${STAGING_DIR}/${HOST_SYS}/share"
STAGING_LOADER_DIR = "${STAGING_DIR}/${HOST_SYS}/loader"
STAGING_FIRMWARE_DIR = "${STAGING_DIR}/${HOST_SYS}/firmware"

which has always struck me as odd - BINDIR uses ${BUILD_SYS} rather than
${HOST_SYS}. I did discuss this a long time ago when I was a lot newer
to OE. multimachine wasn't as widely supported than and it was argued
that since binaries installed there were to be run on ${BUILD_SYS}
rather than ${HOST_SYS}, this was really ok. If we change this to
${HOST_SYS}, my build issues would disappear as the arm and x86 versions
will end up in different places. I think the time has come to do
something about this but its not that simple :)

The -native packages install to ${BUILD_SYS}/bin and the arch specific
ones to ${HOST_SYS}/bin. So we add both to PATH, problem solved?

What happens when we start using packaged staging and ${HOST_SYS}/bin
contains arm binaries? Our staging generally doesn't at the moment but
is likely to in future and we do not want arm binaries in PATH.

My proposal is therefore to use:

STAGING_BINDIR = "${STAGING_DIR}/${BUILD_SYS}/bin/${HOST_SYS}" and have
native.bbclass override this with ${BUILD_SYS}/bin

We'd then add both ${BUILD_SYS}/bin and ${BUILD_SYS}/bin/${HOST_SYS} to
the PATH.

Does anyone see a better way to handle this?

I suspect there are going to be problems with binaries missing from
${STAGING_BINDIR} when we switch to packages staging. I just wonder why
we haven't see those problems with packaged staging yet? Is anyone
actively using/testing it?

Regards,

Richard





^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2006-11-27  1:03 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-11-24 14:13 STAGING_BINDIR Richard Purdie
2006-11-24 14:20 ` STAGING_BINDIR Koen Kooi
2006-11-26 21:22 ` STAGING_BINDIR Richard Purdie
2006-11-27  1:03   ` STAGING_BINDIR Richard Purdie
  -- strict thread matches above, loose matches on Subject: below --
2006-11-24 13:01 STAGING_BINDIR Richard Purdie

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.