Find the answer to your Linux question:
Results 1 to 9 of 9
hi, I am trying to install avr gcc compiler, I could install the binutils 2.15 first but I am stuck at gcc. I am going through the following document : ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jan 2008
    Posts
    8

    avr-ranlib: Command not found


    hi,
    I am trying to install avr gcc compiler, I could install the binutils 2.15 first but I am stuck at gcc. I am going through the following document :
    http://www.tuxgraphics.org/electroni...ticle352.shtml

    I can run make without any trouble I guess, it reaches to the end but while running make install I got following error:

    avr-ranlib /usr/local/avr/lib/gcc/avr/3.4.2/libgcc.a
    make[2]: avr-ranlib: Command not found
    make[2]: *** [install] Error 127
    make[2]: Leaving directory `/home/oguzhan/Desktop/Oguzhan/gcc-3.4.2/obj-avr/gcc'
    make[1]: *** [install-multilib] Error 2
    make[1]: Leaving directory `/home/oguzhan/Desktop/Oguzhan/gcc-3.4.2/obj-avr/gcc'
    make: *** [install-gcc] Error 2

    avr-ranlib in my path under directory /usr/local/avr/bin and it is executable. What might be the problem with it? I can supply any info related, could you help me to fix?

  2. #2
    Linux Engineer wje_lf's Avatar
    Join Date
    Sep 2007
    Location
    Mariposa
    Posts
    1,192
    Sounds to me as though /usr/local/avr is not part of your PATH environment variable. To find out, do this at the command line:
    Code:
    which avr-ranlib
    echo $PATH
    If you want to add it to PATH, do this:
    Code:
    export PATH=$PATH:/usr/local/avr
    Notice that there's only one dollar sign in that command.

    But this might not be a wise thing to do. I'm sure they've checked out the installation procedure. Perhaps there's a part of it you might have overlooked? If so, just doing the export command above will fix your immediate problem but might still not be enough to make the installation go smoothly.
    --
    Bill

    Old age and treachery will overcome youth and skill.

  3. #3
    Just Joined!
    Join Date
    Jan 2008
    Posts
    8
    thanks for the reply,
    I have alrady checked the PATH, avr-ranlib is under /usr/local/avr/bin and this is added to the PATH, I have tried adding /usr/local/avr too despite I dont see any sense in it. Can it be realeted to the updating linker cache with ldconfig command. I have called it after I installed binutils but I am not sure it worked properly, I rebooted the system but nothing changed.
    Does any one have any idea?

    Are there any other ways to install gcc-core-3.4.2 package to a directory I like? Maybe with aptitude or synaptic package manager?

  4. #4
    drl
    drl is offline
    Linux Engineer drl's Avatar
    Join Date
    Apr 2006
    Location
    Saint Paul, MN, USA / CentOS, Debian, Slackware, {Free, Open, Net}BSD, Solaris
    Posts
    1,288
    Hi.

    I know nothing about the AVR subject, but here are some comments after a quick skim:

    I could not get the document unless I used: tuxgraphics.org: 352, Programming the AVR microcontroller with GCC, libc 1.0.4

    That document advises the PATH be changed with:
    Code:
    export PATH=/usr/local/avr/bin:${PATH}
    which places the added path before the existing path.

    Several places require:
    Code:
    # as root:
    Rebuilding the linker cache with:
    Add the line /usr/local/avr/lib to the file /etc/ld.so.conf and run the command /sbin/ldconfig to rebuild the linker cache.
    should have been been emphasized -- it's very easy to miss it.

    After installation, for compiling, he suggests:
    If needed edit your .bash_profile or .tcshrc and add:
    ...
    Later, in lf231, Hardware: Programming the AVR Microcontroller with GCC
    he suggests, among others:
    Code:
    export PATH=/usr/local/atmel/bin:${PATH}
    export RANLIB=avr-ranlib
    which, if he didn't update the more recent files, might be related to the problem, because the path is different. I think I'd check the files doconf and domake.

    Best wishes, keep us posted ... cheers, drl
    Welcome - get the most out of the forum by reading forum basics and guidelines: click here.
    90% of questions can be answered by using man pages, Quick Search, Advanced Search, Google search, Wikipedia.
    We look forward to helping you with the challenge of the other 10%.
    ( Mn, 2.6.n, AMD-64 3000+, ASUS A8V Deluxe, 1 GB, SATA + IDE, Matrox G400 AGP )

  5. #5
    Just Joined!
    Join Date
    Jan 2008
    Posts
    8
    I have changed the PATH as suggested;
    export PATH=/usr/local/avr/bin:{PATH}

    I did not added the line /usr/local/avr/bin to the /etc/ld.so.conf because it was already there, in a previous try I had added it there. I run the command /etc/ldconfig, it did not show any reports or errors, it just ran.

    Thank you for the other link I haven't seen it before, I could not end the installation so I do not consider editing .bash_profile or .tcshrc for the moment. But maybe I should consider trying export RANLIB=avr-ranlib before installing gcc, should I?

    I dont know what are doconf and domake files but I will search some info about those as well.

    Thanks for the reply.

  6. #6
    drl
    drl is offline
    Linux Engineer drl's Avatar
    Join Date
    Apr 2006
    Location
    Saint Paul, MN, USA / CentOS, Debian, Slackware, {Free, Open, Net}BSD, Solaris
    Posts
    1,288
    Hi.
    Quote Originally Posted by oguzhana View Post
    I have changed the PATH as suggested;
    export PATH=/usr/local/avr/bin:{PATH}

    I did not added the line /usr/local/avr/bin to the /etc/ld.so.conf because it was already there, in a previous try I had added it there. I run the command /etc/ldconfig, it did not show any reports or errors, it just ran.

    Thank you for the other link I haven't seen it before, I could not end the installation so I do not consider editing .bash_profile or .tcshrc for the moment. But maybe I should consider trying export RANLIB=avr-ranlib before installing gcc, should I?

    I dont know what are doconf and domake files but I will search some info about those as well.

    Thanks for the reply.
    Sorry, I cannot give you any knowledgeable answers about the RANLIB setting. I don't know why they would need a different version of ranlib, but the AVR stuff might require it.

    To look at the linker cache, use:
    Code:
    ldconfig -p
    but it does produce a lot of output, almost 800 lines on my system.

    I have often found that I can understand problems better if I explain the situation to a friend over coffee. That makes me look more closely at some things I may have skipped or misunderstood earlier ... cheers, drl
    Welcome - get the most out of the forum by reading forum basics and guidelines: click here.
    90% of questions can be answered by using man pages, Quick Search, Advanced Search, Google search, Wikipedia.
    We look forward to helping you with the challenge of the other 10%.
    ( Mn, 2.6.n, AMD-64 3000+, ASUS A8V Deluxe, 1 GB, SATA + IDE, Matrox G400 AGP )

  7. #7
    Just Joined!
    Join Date
    Jan 2008
    Posts
    8
    Thanks for your reply, I will switch my system from xubuntu to ubuntu, I want to make a fresh start. Thanks again

  8. #8
    drl
    drl is offline
    Linux Engineer drl's Avatar
    Join Date
    Apr 2006
    Location
    Saint Paul, MN, USA / CentOS, Debian, Slackware, {Free, Open, Net}BSD, Solaris
    Posts
    1,288
    Hi.

    I assume your decision is for a number of reasons, not only to try to resolve this problem.

    In any case, I hope you have better luck next time around ... cheers, drl
    Welcome - get the most out of the forum by reading forum basics and guidelines: click here.
    90% of questions can be answered by using man pages, Quick Search, Advanced Search, Google search, Wikipedia.
    We look forward to helping you with the challenge of the other 10%.
    ( Mn, 2.6.n, AMD-64 3000+, ASUS A8V Deluxe, 1 GB, SATA + IDE, Matrox G400 AGP )

  9. #9
    Just Joined!
    Join Date
    Apr 2009
    Posts
    1

    Lightbulb PATH problem

    Hi, I use Ubuntu and had the exact same problem

    avr-libc compiled all right, but I had to run 'make install' with the command sudo. It showed that my PATH became that of the root user. I solved this by switch to root user and then export the PATH again:
    Code:
    $sudo -s -H
    #export PATH=$PATH:/usr/local/AVR/bin
    #make install
    This seems to have worked

    Regards.

Posting Permissions

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