Skip to contentSkip to conversation

New: pointing to /usr/bin/objcopy old version (x86) instead of the generated one

Buildroot bugzilla at busybox.net 1 participant 12 messages Aug 5, 2015 – Sep 20, 2015

lore
Share & tools
lore
#0 lore raw

https://bugs.busybox.net/show_bug.cgi?id=8256

Summary: pointing to /usr/bin/objcopy old version (x86) instead
of the generated one
Product: buildroot
Version: 2015.05
Platform: PC
OS/Version: Linux
Status: NEW
Severity: minor
Priority: P5
Component: Other
AssignedTo: unassigned at buildroot.uclibc.org
ReportedBy: christophebricout at yahoo.fr
CC: buildroot at uclibc.org
Estimated Hours: 0.0

using the default configuration file to target MINNOWMAX board, buildroot unable to generate x86_64 binary as gmake process points to the host /usr/bin/objcopy (i586 architecture) and not the copyobj generated in the output directory.

Is a option available?
Best Regards

Signature · 3 lines
Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
#1 lore raw

[Buildroot] [Bug 8256] pointing to /usr/bin/objcopy old version (x86) instead of the generated one

https://bugs.busybox.net/show_bug.cgi?id=8256

--- Comment #1 from Thomas Petazzoni <[email protected]> 2015-08-05 13:23:22 UTC --- Thanks for your bug report. Can you first make sure that you can reproduce the
issue after doing a full rebuild, i.e after doing "make clean all" ?

Once you have verified this, could you please give us:

- The Buildroot version you're using
- The exact steps to reproduce the issue

- What you mean exactly by "gmake process points to the host
/usr/bin/objcopy". make doesn't "point" to anything, so this sentence doesn't make a lot of sense.

Also, please attach the last 100 lines of the build output, which contain the build failure you're seeing. Thanks!

Signature · 3 lines
Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
#2 lore raw

[Buildroot] [Bug 8256] pointing to /usr/bin/objcopy old version (x86) instead of the generated one

In reply to bugzilla at busybox.net

https://bugs.busybox.net/show_bug.cgi?id=8256

--- Comment #2 from CB <[email protected]> 2015-08-05 14:05:06 UTC --- Host configuration

    [elinux]$echo ${HOSTTYPE}
    [elinux] i386-linux

Buildroot Inital step:
the .config file is exactly the same as generated by 'gmake minnowboard_max_defconfig'

history:

    10  15:12   gmake
    11  15:41   history

checking if C symbols get an underscore after compilation... no
checking for __bswapsi2... no
checking for __bswapdi2... no
checking for __ashldi3... no
checking for __ashrdi3... no
checking for __lshrdi3... no
checking for __trampoline_setup... no
checking for __ucmpdi2... no
checking for _restgpr_14_x... no
checking for __ia64_trampoline... no
checking for __udivsi3... no
checking for __umoddi3... no
checking for __udivdi3... no
checking for __divsi3... no
checking for __modsi3... no
checking for __umodsi3... no
checking for __moddi3... no
checking for __divdi3... no
checking for __ctzdi2... no
checking for __ctzsi2... no
checking whether target compiler is working... yes
checking whether /usr/bin/objcopy works for absolute addresses... configure:
error: /usr/bin/objcopy cannot create binary files
gmake: *** [/home/elinux/localinstall/buildroot-2015.05/install/buildroot-2015.05/output/build/grub2-2.00/.stamp_configured] Error 1

Further investigation results:

Before launcing gmake, I have now executed the following command

setenv PATH "/home/elinux/localinstall/buildroot-2015.05/install/buildroot-2015.05/output/host/usr/x86_64-buildroot-linux-uclibc/bin:/home/elinu x/localinstall/buildroot-2015.05/install/buildroot-2015.05/output/host/usr/bin:${PATH}"
set PATH = "/home/elinux/localinstall/buildroot-2015.05/install/buildroot-2015.05/output/host/usr/x86_64-buildroot-linux-uclibc/bin:/home/elinux /localinstall/buildroot-2015.05/install/buildroot-2015.05/output/host/usr/bin:${PATH}"

The new result is

checking target system type... x86_64-pc-none
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for x86_64-buildroot-linux-uclibc-strip... /home/elinux/localinstall/buildroot-2015.05/install/buildroot-2015.05/output/host/usr/bin/x86_64-buildroot-linux-uclibc-strip checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for cmp... cmp
checking for bison... bison
checking for x86_64-buildroot-linux-uclibc-ranlib... /home/elinux/localinstall/buildroot-2015.05/install/buildroot-2015.05/output/host/usr/x86_64-buildroot-linux-uclibc/bin/ranlib checking for gawk... (cached) gawk
checking for style of include used by make... GNU
checking for x86_64-buildroot-linux-uclibc-gcc... /home/elinux/localinstall/buildroot-2015.05/install/buildroot-2015.05/output/host/usr/x86_64-buildroot-linux-uclibc/bin/gcc checking whether the C compiler works... no
configure: error: in `/home/elinux/localinstall/buildroot-2015.05/install/buildroot-2015.05/output/build/grub2-2.00':
configure: error: C compiler cannot create executables
See `config.log' for more details
gmake: *** [/home/elinux/localinstall/buildroot-2015.05/install/buildroot-2015.05/output/build/grub2-2.00/.stamp_configured] Error 77

(In reply to comment #1)

Quoted 9 lines

Thanks for your bug report. Can you first make sure that you can reproduce the issue after doing a full rebuild, i.e after doing "make clean all" ?

Once you have verified this, could you please give us:

- The Buildroot version you're using
- The exact steps to reproduce the issue

Quoted 6 lines

- What you mean exactly by "gmake process points to the host
/usr/bin/objcopy". make doesn't "point" to anything, so this sentence doesn't make a lot of sense.

Also, please attach the last 100 lines of the build output, which contain the build failure you're seeing. Thanks!

(In reply to comment #1)

Quoted 15 lines

Thanks for your bug report. Can you first make sure that you can reproduce the issue after doing a full rebuild, i.e after doing "make clean all" ?

Once you have verified this, could you please give us:

- The Buildroot version you're using
- The exact steps to reproduce the issue

- What you mean exactly by "gmake process points to the host
/usr/bin/objcopy". make doesn't "point" to anything, so this sentence doesn't make a lot of sense.

Also, please attach the last 100 lines of the build output, which contain the build failure you're seeing. Thanks!

Signature · 3 lines
Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
#3 lore raw

[Buildroot] [Bug 8256] pointing to /usr/bin/objcopy old version (x86) instead of the generated one

In reply to bugzilla at busybox.net

https://bugs.busybox.net/show_bug.cgi?id=8256

--- Comment #3 from CB <[email protected]> 2015-08-05 14:18:34 UTC --- Created attachment 6131
--> https://bugs.busybox.net/attachment.cgi?id=6131
gmake logfile (issue.txt)

Here the command executed in order to collect the information
===============================
gmake >! issue.txt
configure: WARNING: unrecognized options: --disable-gtk-doc,
--disable-gtk-doc-html, --disable-doc, --disable-docs, --disable-documentation,
--with-xmlto, --with-fop, --enable-ipv6, --disable-debug, --disable-static,
--enable-shared, --enable-liblzma
configure: WARNING: cannot generate manual pages while cross compiling
configure: error: /usr/bin/objcopy cannot create binary files
gmake: *** [/home/elinux/localinstall/buildroot-2015.05/install/buildroot-2015.05/output/build/grub2-2.00/.stamp_configured] Error 1
===============================
The issue.txt file is enclosed.

I am available for futher concerns
Thanks a lot.

Signature · 3 lines
Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
#4 lore raw

[Buildroot] [Bug 8256] pointing to /usr/bin/objcopy old version (x86) instead of the generated one

In reply to bugzilla at busybox.net

https://bugs.busybox.net/show_bug.cgi?id=8256

--- Comment #4 from Thomas Petazzoni <[email protected]> 2015-08-05 21:17:50 UTC --- Why are you using 'gmake' instead of 'make' ? Are you perhaps building on a
non-Linux system? If so, which one?

Signature · 3 lines
Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
#5 lore raw

[Buildroot] [Bug 8256] pointing to /usr/bin/objcopy old version (x86) instead of the generated one

In reply to bugzilla at busybox.net

https://bugs.busybox.net/show_bug.cgi?id=8256

--- Comment #5 from CB <[email protected]> 2015-08-06 12:20:17 UTC --- The OS is RedHat 5 running on a X86 machine (32bits)

I am using "gmake" to build "buildroot 2005.05" but I could use "make". The result should be the same.

For information, I have already build successfully "buildroot" using the same procedure "gmake" and
I sucessfully generated toolchain, Uimage, uboot.bin for others targets like "freescale sabre board" and others.

So, this issue "could be" linked to Minnow Max Target or X86_64 toolchain running on a x86(32bits) host.

Thanks again.

(In reply to comment #4)

Quoted 2 lines

Why are you using 'gmake' instead of 'make' ? Are you perhaps building on a non-Linux system? If so, which one?

Signature · 3 lines
Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
#6 lore raw

[Buildroot] [Bug 8256] pointing to /usr/bin/objcopy old version (x86) instead of the generated one

In reply to bugzilla at busybox.net

https://bugs.busybox.net/show_bug.cgi?id=8256

--- Comment #6 from CB <[email protected]> 2015-08-12 19:48:11 UTC --- (In reply to comment #4)

Quoted 2 lines

Why are you using 'gmake' instead of 'make' ? Are you perhaps building on a non-Linux system? If so, which one?

As you suggested, I executed the MakeFile using "make" instead of "gmake" command.
The result is exactly the same (same reports, same errors).

Do you have an idea for the next steps or experiments I need to do.

Thanks in advance for your support.

Signature · 3 lines
Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
#7 lore raw

[Buildroot] [Bug 8256] pointing to /usr/bin/objcopy old version (x86) instead of the generated one

In reply to bugzilla at busybox.net

https://bugs.busybox.net/show_bug.cgi?id=8256

--- Comment #7 from CB <[email protected]> 2015-08-13 19:43:17 UTC --- Created attachment 6136
--> https://bugs.busybox.net/attachment.cgi?id=6136
configuration execution issue within grub2-2.00 directory

Updating PATH variable before running 'make'.
The compilation go further but an error is still occuring. configure:4778: error: in `<...>/buildroot-2015.05/output/build/grub2-2.00'

Signature · 3 lines
Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
#8 lore raw

[Buildroot] [Bug 8256] pointing to /usr/bin/objcopy old version (x86) instead of the generated one

In reply to bugzilla at busybox.net

https://bugs.busybox.net/show_bug.cgi?id=8256

--- Comment #8 from Arnout Vandecappelle <[email protected]> 2015-08-24 21:15:44 UTC --- (In reply to comment #2)

Quoted 5 lines

Before launcing gmake, I have now executed the following command

setenv PATH "/home/elinux/localinstall/buildroot-2015.05/install/buildroot-2015.05/output/host/usr/x86_64-buildroot-linux-uclibc/bin:/home/elinux/localinstall/buildroot-2015.05/install/buildroot-2015.05/output/host/usr/bin:${PATH}" set PATH = "/home/elinux/localinstall/buildroot-2015.05/install/buildroot-2015.05/output/host/usr/x86_64-buildroot-linux-uclibc/bin:/home/elinux/localinstall/buildroot-2015.05/install/buildroot-2015.05/output/host/usr/bin:${PATH}"

I don't know why you think it's a good idea to add the target binaries to your PATH. Don't do that.

The config.log of attachment 6136 is useless. Could you re-run a clean build without hacking PATH, and then attach the full output/build/grub2-2.00/config.log please?

My conjecture is that grub2 is using the wrong objcopy somewhere in configure. Oh, indeed, now I see: we use HOST_CONFIGURE_OPTS, so it will have OBJCOPY=/usr/bin/objcopy explicitly. I guess we should override that with OBJCOPY=$(TARGET_OBJCOPY), but I'm not sure how that will affect other host,target combinations...

Signature · 3 lines
Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
#9 lore raw

[Buildroot] [Bug 8256] pointing to /usr/bin/objcopy old version (x86) instead of the generated one

In reply to bugzilla at busybox.net

https://bugs.busybox.net/show_bug.cgi?id=8256

--- Comment #9 from CB <[email protected]> 2015-08-25 08:53:03 UTC --- Thanks for your feedback.

I will execute the buildroot as requested and provide you with the config log.

In parallel, I launched buildroot using Virtual Box and CENTOS 7. Buildroot is correcty working as the host 'objcopy' utility is using a compatible version allowing x86_64 binary.
It seem confirm your guess concerning 'objcopy' version differs between Host and Target. This is my case under RedHat Linux 5 (eq Centos 5). This issue doesn't exist under Centos 7.

Thanks again.

(In reply to comment #8)

Quoted 20 lines

(In reply to comment #2)

Quoted 5 lines

Before launcing gmake, I have now executed the following command

setenv PATH "/home/elinux/localinstall/buildroot-2015.05/install/buildroot-2015.05/output/host/usr/x86_64-buildroot-linux-uclibc/bin:/home/elinux/localinstall/buildroot-2015.05/install/buildroot-2015.05/output/host/usr/bin:${PATH}" set PATH = "/home/elinux/localinstall/buildroot-2015.05/install/buildroot-2015.05/output/host/usr/x86_64-buildroot-linux-uclibc/bin:/home/elinux/localinstall/buildroot-2015.05/install/buildroot-2015.05/output/host/usr/bin:${PATH}"

I don't know why you think it's a good idea to add the target binaries to your PATH. Don't do that.

The config.log of attachment 6136 [details] is useless. Could you re-run a clean build without hacking PATH, and then attach the full output/build/grub2-2.00/config.log please?

My conjecture is that grub2 is using the wrong objcopy somewhere in configure. Oh, indeed, now I see: we use HOST_CONFIGURE_OPTS, so it will have OBJCOPY=/usr/bin/objcopy explicitly. I guess we should override that with OBJCOPY=$(TARGET_OBJCOPY), but I'm not sure how that will affect other host,target combinations...

Signature · 3 lines
Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
#10 lore raw

[Buildroot] [Bug 8256] pointing to /usr/bin/objcopy old version (x86) instead of the generated one

In reply to bugzilla at busybox.net

https://bugs.busybox.net/show_bug.cgi?id=8256

--- Comment #10 from CB <[email protected]> 2015-08-25 19:46:13 UTC --- Created attachment 6146
--> https://bugs.busybox.net/attachment.cgi?id=6146
output/build/grub2-2.00/config.log (gzipped) content

Please fine here after the sequence history

    97  20:51   make clean
    98  20:54   make
    99  21:32   cd
/home/elinux/localinstall/buildroot-2015.05/install/buildroot-2015.05/output/build/grub2-2.00
   100  21:32   ls
   101  21:32   more config.log

The attachment is the config.log from grub2-2.00

Available for others experiments if necessary.
Tnanks.

Signature · 3 lines
Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
#11 lore raw

[Buildroot] [Bug 8256] pointing to /usr/bin/objcopy old version (x86) instead of the generated one

In reply to bugzilla at busybox.net

https://bugs.busybox.net/show_bug.cgi?id=8256

Thomas Petazzoni <[email protected]> changed:

What |Removed |Added
----------------------------------------------------------------------------

             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED

--- Comment #11 from Thomas Petazzoni <[email protected]> 2015-09-20 12:56:09 UTC --- Fixed by
http://git.buildroot.net/buildroot/commit/?id=890c9e761b70f28c2f2d6c4cf389e418c6d2b32c.
Thanks Arnout for the investigation and fix!

Signature · 3 lines
Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.