Find the answer to your Linux question:
Results 1 to 8 of 8
I am using this version of objcopy Code: objcopy --version GNU objcopy (GNU Binutils for Ubuntu) 2.20.1-system.20100303 Copyright 2009 Free Software Foundation, Inc. This program is free software; you may ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Apr 2011
    Posts
    96

    objcopy problem


    I am using this version of objcopy
    Code:
    objcopy --version
    GNU objcopy (GNU Binutils for Ubuntu) 2.20.1-system.20100303
    Copyright 2009 Free Software Foundation, Inc.
    This program is free software; you may redistribute it under the terms of
    the GNU General Public License version 3 or (at your option) any later version.
    This program has absolutely no warranty.
    I am trying to compile grub-0.9.7

    so I do ./configure which gives me
    Code:
    checking for a BSD-compatible install... /usr/bin/install -c
    checking whether build environment is sane... yes
    checking for gawk... gawk
    checking whether make sets $(MAKE)... yes
    checking build system type... i686-pc-linux-gnu
    checking host system type... i686-pc-linux-gnu
    checking whether to enable maintainer-specific portions of Makefiles... no
    checking for gcc... gcc
    checking for gcc... (cached) gcc
    checking for C compiler default output file name... a.out
    checking whether the C compiler works... yes
    checking whether we are cross compiling... no
    checking for suffix of executables... 
    checking for suffix of object files... o
    checking whether we are using the GNU C compiler... yes
    checking whether gcc accepts -g... yes
    checking for gcc option to accept ANSI C... none needed
    checking for style of include used by make... GNU
    checking dependency style of gcc... gcc3
    checking dependency style of gcc... (cached) gcc3
    checking for ranlib... ranlib
    checking whether optimization for size works... yes
    checking whether gcc has -fno-stack-protector... yes
    checking whether -Wundef works... yes
    checking whether -falign-loops works... yes
    checking for objcopy... objcopy
    checking if C symbols get an underscore after compilation... no
    checking whether objcopy works for absolute addresses... no
    configure: error: GRUB requires a working absolute objcopy; upgrade your binutils
    As you can see
    configure: error: GRUB requires a working absolute objcopy; upgrade your binutils

    I am wondering how I can fix this and beable to compile grub using make.

    My grub directory has this in it

    Code:
    acinclude.m4  config.guess  COPYING	lib	       netboot	TODO
    aclocal.m4    config.h.in   depcomp	MAINTENANCE    NEWS	util
    AUTHORS       config.log    docs	Makefile.am    README
    BUGS	      config.sub    grub	Makefile.in    stage1
    ChangeLog     configure     INSTALL	missing        stage2
    compile       configure.ac  install-sh	mkinstalldirs  THANKS
    I really don't want to download a whole new binutls since I develope using the ones I have so I don't want to mess any of those things up.
    But if I need to download a single objcopy I would be willing to do that the problem is I don't know where or what one would fix the issue?

    Obviously when I issue the make after issueing the ./configure command I get
    Code:
    make: *** No targets specified and no makefile found.  Stop.
    Since their is no Makefile in these directories only
    Makefile.am
    Makefile.in

    Wondering if their is some trick like running mkinstalldirs or something to get around this mess.

  2. #2
    Linux Guru reed9's Avatar
    Join Date
    Feb 2009
    Location
    Boston, MA
    Posts
    4,651
    GRUB-Legacy is no longer being developed, so if there's an issue, it probably won't get fixed. Is there a reason you're trying to build GRUB? What distro are you using?

  3. #3
    Just Joined!
    Join Date
    Apr 2011
    Posts
    96
    well first of all I am just curious why the error and what version of binutls or objcopy do I need if I wanted to fix this problem? (a direct link would be great)

    Then if I had that. I could temporarily set my path to
    PATH = newobjcopydirectory:$PATH

    If I am correct in assuming that linux traverses the path environment variable from left to right. And the left most directory's objcopy will be used instead of any other one's to the right of it.
    Correct me if I am wrong?

  4. $spacer_open
    $spacer_close
  5. #4
    Linux Guru reed9's Avatar
    Join Date
    Feb 2009
    Location
    Boston, MA
    Posts
    4,651
    Well, I'm not a programmer, so I can only take a guess.

    I found this from Ubuntu Karmic (I assume you're using Ubuntu based on the GNU objcopy (GNU Binutils for Ubuntu) 2.20.1-system.20100303 bit you posted).

    * objcopy-absolute.diff: Backport from grub2 (Lubomir Kundrak): take only
    .text section into account, as newer toolchains generate unique build
    ids.
    So they appear to have backported some code from GRUB2 to get GRUB working with the build toolchain in Karmic.

    I can say using Arch with binutils 2.21, the vanilla GRUB built fine for me.
    Code:
    objcopy --version
    GNU objcopy (GNU Binutils) 2.21.0.20110209

  6. #5
    Just Joined!
    Join Date
    Apr 2011
    Posts
    96
    well, forget building it.
    Is their a place where I can download an already built grub.
    That I can use to boot my cd/dvd and harddisk/usb drives.

    I was downloading from the ftp site alpha.gnu.org/gnu/grub/
    Would their be any version that any body knows that won't have the
    Code:
    checking whether objcopy works for absolute addresses... no
    configure: error: GRUB requires a working absolute objcopy; upgrade your binutils
    problem and would let me build it.

    Or if that is not possible a pre-built grub would be nice to download.

  7. #6
    Linux Guru reed9's Avatar
    Join Date
    Feb 2009
    Location
    Boston, MA
    Posts
    4,651
    You didn't confirm whether you were using Ubuntu or not, but pretty much all distros have GRUB available in their repositories.

  8. #7
    Just Joined!
    Join Date
    Apr 2011
    Posts
    96
    yes I am using ubuntu
    did a search and cann't find stage1 or stage2 files.
    I looked in /boot/grub doesn't contain them or menu.lst

    This is the main reason for downloading grub in the first place. The problem is I cann't make it.

    so if their is a pre-built version of these grub that would be great.

  9. #8
    hvs
    hvs is offline
    Just Joined!
    Join Date
    Sep 2012
    Posts
    1
    Quote Originally Posted by sam111 View Post
    yes I am using ubuntu
    did a search and cann't find stage1 or stage2 files.
    I looked in /boot/grub doesn't contain them or menu.lst

    This is the main reason for downloading grub in the first place. The problem is I cann't make it.

    so if their is a pre-built version of these grub that would be great.
    This is an old forum post, but I found it while searching the web for a similar issue. In the interest of completeness for future web surfers, you can find the stage1 and stage2 precompiled files here:

    alpha.gnu.org/gnu/grub/grub-0.97-i386-pc.tar.gz

    Hans

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •