Skip to contentSkip to conversation

Why not use config.guess in conf/bitbake.conf ?

DISCUSSION Esben Haabendal 2 participants 4 messages Nov 6, 2007 – Nov 7, 2007

lore
Share & tools
lore
#0 lore raw

What is the reason that conf/bitbake.conf is relying directly on the 'uname' output for generating the BUILD_SYS string?

I am trying to get OE building on Cygwin, and on my machine bitbake.conf generates a BUILD_SYS that is not supported by config.sub, which breaks a autotools packages.

$ uname -a
CYGWIN_NT-5.1 PC_K_EHA 1.5.24(0.156/4/2) 2007-01-31 10:57 i686 Cygwin

As bitbake.conf takes the first field as BUILD_OS, and the 5th field as BUILD_ARCH and then set BUILD_SYS to ${BUILD_ARCH}-${BUILD_OS} I end up with i686-cygwin_nt-5.1
which breaks config.sub due to the '-' in the os string.

Using a current config.guess on this system, I get i686-pc-cygwin
which is fine.
On my laptop (running gutsy) it would give me a BUILD_SYS i686-pc-linux-gnu

Another workaround is to use the last field (also output from 'uname -o') as BUILD_OS which give i686-cygwin
On my laptop (still running gutsy) it would also give me a BUILD_SYS i686-pc-linux-gnu

To keep paths short and nice, I can see it would be prefereable to end up with i686-cygwin and i686-linux. On the other hand, using the output from config.guess migt warrant some more consistency.

Anyway, the current solution just don't work for cygwin, so I would like to hear what kind of solution would fit OE the best.

P.S. No, I cannot just use coLinux.

/Esben

Signature · 3 lines
Esben Haabendal
Embedded Software Consultant
Doré Development ApS
#1 lore raw

Am 06.11.2007 um 12:19 schrieb Esben Haabendal:

Quoted 12 lines

What is the reason that conf/bitbake.conf is relying directly on the 'uname' output for generating the BUILD_SYS string?

I am trying to get OE building on Cygwin, and on my machine bitbake.conf generates a BUILD_SYS that is not supported by config.sub, which breaks a autotools packages.

$ uname -a
CYGWIN_NT-5.1 PC_K_EHA 1.5.24(0.156/4/2) 2007-01-31 10:57 i686 Cygwin

As bitbake.conf takes the first field as BUILD_OS, and the 5th field as BUILD_ARCH and then set BUILD_SYS to ${BUILD_ARCH}-${BUILD_OS} I end up with i686-cygwin_nt-5.1
which breaks config.sub due to the '-' in the os string.

Quoted 5 lines

Using a current config.guess on this system, I get i686-pc-cygwin
which is fine.
On my laptop (running gutsy) it would give me a BUILD_SYS i686-pc-linux-gnu

A sane OS does return something sane on uname. But e.g. check build/Power\ Macintosh-darwin.conf on what can be done for none sane operating systems... So create your file for cygwin and send a patch ;)

z.

#2 lore raw
Quoted 25 lines · Holger Freyther

Am 06.11.2007 um 12:19 schrieb Esben Haabendal:

Quoted 17 lines

What is the reason that conf/bitbake.conf is relying directly on the 'uname' output for generating the BUILD_SYS string?

I am trying to get OE building on Cygwin, and on my machine bitbake.conf generates a BUILD_SYS that is not supported by config.sub, which breaks a autotools packages.

$ uname -a
CYGWIN_NT-5.1 PC_K_EHA 1.5.24(0.156/4/2) 2007-01-31 10:57 i686 Cygwin

As bitbake.conf takes the first field as BUILD_OS, and the 5th field as BUILD_ARCH and then set BUILD_SYS to ${BUILD_ARCH}-$ {BUILD_OS} I end up with
i686-cygwin_nt-5.1
which breaks config.sub due to the '-' in the os string.

Quoted 5 lines

Using a current config.guess on this system, I get i686-pc-cygwin
which is fine.
On my laptop (running gutsy) it would give me a BUILD_SYS i686-pc-linux-gnu

Quoted 3 lines

A sane OS does return something sane on uname. But e.g. check build/ Power\ Macintosh-darwin.conf on what can be done for none sane operating systems... So create your file for cygwin and send a patch ;)

Ah, nice approach. Didn't notice that.

But.... this file will be included after
* build-${BUILD_OS} is added to OVERRIDES
* STAGING_DIR_NATIVE is set to ${STAGING_DIR}/${BUILD_SYS}

So these will still be set to non-sane values, although the ${BUILD_OS} and ${BUILD_SYS} values will be sane.

Wouldn't it make more sense to include conf/build/${BUILD_SYS}.conf right after constructing ${BUILD_SYS} from uname? At least for now, it is not used for anything else than altering these values.

/Esben

Signature · 3 lines
Esben Haabendal
Embedded Software Consultant
Doré Development ApS
#3 lore raw

Am 07.11.2007 um 08:30 schrieb Esben Haabendal:

Quoted 5 lines

Ah, nice approach. Didn't notice that.

But.... this file will be included after
* build-${BUILD_OS} is added to OVERRIDES
* STAGING_DIR_NATIVE is set to ${STAGING_DIR}/${BUILD_SYS}

Consult your bitbake manual. The variables are not expanded at this time, at least they shouldn't. Do they get expanded for you? And when?

z.