Skip to contentSkip to conversation

Change the prefer binutils of micro.conf from 2.19.51 to 2.18

PATCH In review Guo Hongruan 3 participants 7 messages Jan 17, 2010

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Change the prefer binutils of micro.conf from 2.19.51 to 2.18

* the previous default version of binutils (2.19.51) in micro.conf cause the default version of glibc failed to build

---
 conf/distro/micro.conf |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
conf/distro/micro.conf +1 -1
index d9fc595..4991620 100644
@@ -61,7 +61,7 @@ MACHINE_KERNEL_VERSION = "2.6"
 # TOOLCHAIN
 #############################################################################
 LIBC ?= "eglibc"
-PREFERRED_BINUTILS = "2.19.51"
+PREFERRED_BINUTILS = "2.18"
 PREFERRED_ARM_INSTRUCTION_SET ?= "thumb"
 require conf/distro/include/sane-toolchain.inc
 
Signature · 1 line
1.5.4.3
#1 lore raw
Quoted 2 lines · On Sunday 17 January 2010 04:22:21 Guo Hongruan wrote:

* the previous default version of binutils (2.19.51) in micro.conf cause the default version of glibc failed to build

In which way? Link error? missing symbols? bad relocations? Your commit message should indicate what the problem is, e.g. when someone else updates binutils he should be able to verify that your problem does not exist in 2.19.52.

So a good message should include:
- The configuration you are building for (not only micro but also the machine)
- The actual error you have seen
- A indication that it is caused by binutils.

z.

#2 lore raw
In reply to Guo Hongruan

conf/distro/micro.conf MACHINE_KERNEL_VERSION = "2.6" · line 64

Quoted 6 lines · Guo Hongruan

* the previous default version of binutils (2.19.51) in micro.conf cause the default version of glibc failed to build

conf/distro/micro.conf +1 -1
-PREFERRED_BINUTILS = "2.19.51"
+PREFERRED_BINUTILS = "2.18"

No, this is not acceptable. Moving binutils forwards to 2.20{.1} would probably be OK, but going back to 2.18 is no good since that version does not work correctly with Thumb code.

What is the specific problem you are experiencing with glibc?

p.

#3 lore raw
Quoted 11 lines · 在 Sun, 17 Jan 2010 19:00:23 +0800,Phil Blundell <[email protected]> 写道:

conf/distro/micro.conf MACHINE_KERNEL_VERSION = "2.6" · line 64

Quoted 6 lines · Guo Hongruan

* the previous default version of binutils (2.19.51) in micro.conf cause the default version of glibc failed to build

conf/distro/micro.conf +1 -1
-PREFERRED_BINUTILS = "2.19.51"
+PREFERRED_BINUTILS = "2.18"

No, this is not acceptable. Moving binutils forwards to 2.20{.1} would probably be OK, but going back to 2.18 is no good since that version does not work correctly with Thumb code.

the toolchain setting in micro.conf is incompatible, which caused this problem. For the preferred version of glibc is 2.6.1 which is set in conf/distro/include/sane-toolchain.inc, I think it is better to change the binutils preferred version which is set in conf/distro/micro.conf.

see http://bugs.openembedded.org/show_bug.cgi?id=5365 to get to know what I have tried.

Quoted 2 lines

What is the specific problem you are experiencing with glibc?

When building glibc-2.6.1 with bintuils-2.19.51, the linker report the following error

/opt/testslave/oe_oe_inc_nightly_glibc/build/tmp/work/i686-oe-linux/glibc-2.6.1-r35.0/build-i686-oe-linux/elf/librtld.os: In function `_dl_start':
rtld.c:(.text+0xac5): undefined reference to `_begin'
/opt/testslave/oe_oe_inc_nightly_glibc/build/tmp/cross/i686/lib/gcc/i686-oe-linux/4.4.2/../../../../i686-oe-linux/bin/ld: /opt/testslave/oe_oe_inc_nightly_glibc/build/tmp/work/i686-oe-linux/glibc-2.6.1-r35.0/build-i686-oe-linux/elf/librtld.os: relocation R_386_GOTOFF against undefined hidden symbol `_begin' can not be used when making a shared object /opt/testslave/oe_oe_inc_nightly_glibc/build/tmp/cross/i686/lib/gcc/i686-oe-linux/4.4.2/../../../../i686-oe-linux/bin/ld: final link failed: Bad value
collect2: ld returned 1 exit status

See http://tinderbox.openembedded.net/packages/427429/ for more detailed information

Quoted 9 lines

p.

_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel

Signature · 4 lines
Guo Hongruan, Embedded Linux Consultant
Skype: camelguo
Twitter: camelguo
http://www.gulessoft.com
#4 lore raw
Quoted 15 lines · Guo Hongruan
Quoted 4 lines · 在 Sun, 17 Jan 2010 19:00:23 +0800,Phil Blundell <[email protected]> 写道:
Quoted 3 lines · Guo Hongruan

* the previous default version of binutils (2.19.51) in micro.conf cause the default version of glibc failed to build

Quoted 8 lines

conf/distro/micro.conf MACHINE_KERNEL_VERSION = "2.6" · line 64

Quoted 4 lines
conf/distro/micro.conf +1 -1
-PREFERRED_BINUTILS = "2.19.51"
+PREFERRED_BINUTILS = "2.18"

No, this is not acceptable. Moving binutils forwards to 2.20{.1} would probably be OK, but going back to 2.18 is no good since that version does not work correctly with Thumb code.

Quoted 3 lines

the toolchain setting in micro.conf is incompatible, which caused this problem. For the preferred version of glibc is 2.6.1 which is set in conf/distro/include/sane-toolchain.inc,

Isn't micro using eglibc? I wouldn't have expected that you should be seeing glibc built at all for that DISTRO.

Quoted 2 lines

I think it is better to change the
binutils preferred version which is set in conf/distro/micro.conf.

As I said before, binutils 2.18 is not acceptable in general because this version cannot do Thumb code. Glibc 2.6.1 is pretty old and, if it is incompatible with newer toolchains, I would suggest updating to a newer version of glibc (e.g. 2.10) rather than trying to wind the toolchain backwards.

As a last resort we could make the binutils version be architecture-specific, and select 2.18 for i386, but I really don't think this ought to be necessary.

p.

#5 lore raw
Quoted 17 lines · 在 Sun, 17 Jan 2010 19:55:18 +0800,Phil Blundell <[email protected]> 写道:
Quoted 16 lines · Guo Hongruan
Quoted 10 lines · 在 Sun, 17 Jan 2010 19:00:23 +0800,Phil Blundell <[email protected]> 写道:

conf/distro/micro.conf MACHINE_KERNEL_VERSION = "2.6" · line 64

Quoted 7 lines · Guo Hongruan

* the previous default version of binutils (2.19.51) in micro.conf cause the default version of glibc failed to build

conf/distro/micro.conf +1 -1
-PREFERRED_BINUTILS = "2.19.51"
+PREFERRED_BINUTILS = "2.18"

No, this is not acceptable. Moving binutils forwards to 2.20{.1}

would

Quoted 2 lines

probably be OK, but going back to 2.18 is no good since that version does not work correctly with Thumb code.

Quoted 6 lines
Quoted 3 lines

the toolchain setting in micro.conf is incompatible, which caused this problem. For the preferred version of glibc is 2.6.1 which is set in conf/distro/include/sane-toolchain.inc,

Isn't micro using eglibc? I wouldn't have expected that you should be seeing glibc built at all for that DISTRO.

I set LIBC=glibc in shell environment.

Quoted 9 lines
Quoted 3 lines

I think it is better to change the
binutils preferred version which is set in conf/distro/micro.conf.

As I said before, binutils 2.18 is not acceptable in general because this version cannot do Thumb code. Glibc 2.6.1 is pretty old and, if it is incompatible with newer toolchains, I would suggest updating to a newer version of glibc (e.g. 2.10) rather than trying to wind the toolchain backwards.

Yes, I think so. Several days ago, I submitted a patch to update glibc to 2.10 in conf/distro/include/sane-toolchain.inc, but was rejected and the reason was that it may break other buildings and had not full tested.

Quoted 4 lines

As a last resort we could make the binutils version be architecture-specific, and select 2.18 for i386, but I really don't think this ought to be necessary.

I agree with you

Quoted 8 lines

p.

_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel

Signature · 4 lines
Guo Hongruan, Embedded Linux Consultant
Skype: camelguo
Twitter: camelguo
http://www.gulessoft.com
#6 lore raw
Quoted 1 line · Guo Hongruan

I set LIBC=glibc in shell environment.

Okay. In that case, you are going off-piste to some extent and there is certainly no guarantee that the default DISTRO config will be suitable. The settings within micro.conf are designed to be internally consistent, i.e. the toolchain is intended to work with the selected version of eglibc but there are no promises about other C libraries.

So, to that extent, I don't really consider it a bug in micro that glibc 2.6.1 is unbuildable. If we can fix the glibc build without breaking anything else then that would be fine, but this has to take second place to ensuring that the default configuration goes on working correctly.

Quoted 3 lines

Yes, I think so. Several days ago, I submitted a patch to update glibc to 2.10 in conf/distro/include/sane-toolchain.inc, but was rejected and the reason was that it may break other buildings and had not full tested.

If you would like to make a patch to set the glibc version to 2.10 for micro only (i.e. put a suitable PREFERRED_VERSION in micro.conf) then I will happily apply it.

p.