The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > High Level Programming
Google UNIX.COM
Home Forums Register Rules & FAQ Members List Arcade Search Today's Posts Mark Forums Read


High Level Programming Post questions about C, C++, Java, SQL, and other programming languages here.


Other UNIX.COM Threads You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
make[2]: *** [xml] Error 1 praveen_b744 UNIX for Advanced & Expert Users 1 04-14-2008 02:46 AM
Error in issuing a make and make install ahjiefreak Linux 1 03-11-2008 09:32 PM
gcc & make error- Help please moe2266 UNIX for Advanced & Expert Users 10 09-04-2007 08:58 PM
sun solaris 10 make error sunrise SUN Solaris 9 05-29-2007 01:20 AM
Error when running make shashidhara_01 High Level Programming 1 02-02-2007 02:35 PM

Reply
 
Submit Tools LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 04-03-2008
Registered User
 

Join Date: Apr 2008
Posts: 2
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiReddit! Stumble this Post!Spurl this Post!
Exclamation GDB make error: for m68xx toolchain

Hi people who have more of an idea about this than me,

For Uni we have to compile for the m68hc11. So I've set about setting up the toolchain so I can work at home as indicated here.

My problem is a make error when compiling GDB

make[1]: *** No rule to make target `-lm', needed by `gdb'. Stop.
make: *** [all-gdb] Error 2


I'm running os x, gcc 3.3.5 (using gcc_select), gdb-6.2 with 68hc patch as indicated on GCC 68HC11 & 68HC12 Sources Installation

I think this might be referring to the math library, but I'm not sure what to do about it. perhaps add a config option or edit make file???
Reply With Quote
Forum Sponsor
  #2 (permalink)  
Old 04-05-2008
Registered User
 

Join Date: Apr 2008
Posts: 2
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiReddit! Stumble this Post!Spurl this Post!
Thumbs up Solution

Michael Snyder wrote:
> On Fri, 2008-04-04 at 12:42 +1000, No.Spam wrote:
>
>> Michael Snyder wrote:
>>
>>> On Fri, 2008-04-04 at 12:21 +1000, Nathan K wrote:
>>>
>>>> Hi people who have more of an idea about this than me,
>>>>
>>>> For Uni we have to compile for the m68hc11. So I've set about setting up
>>>> the toolchain so I can work at home as indicated here.
>>>>
>>>> My problem is a make error when compiling GDB
>>>>
>>>> make[1]: *** No rule to make target `-lm', needed by `gdb'. Stop.
>>>> make: *** [all-gdb] Error 2
>>>>
>>>> I'm running os x, gcc 3.3.5 (using gcc_select), gdb-6.2 with 68hc patch as
>>>> indicated on GCC 68HC11 & 68HC12 Sources Installation
>>>>
>>>> I think this might be referring to the math library, but I'm not sure what
>>>> to do about it. perhaps add a config option or edit make file???
>>>>
>>>> Thanks in advance for any pointers,
>>>>
>>>> Nathan
>>>>
>>> What's Uni? Oh, university? Heh, you're not at an .edu address...
>>>
>>> Yes, the error message refers to the math library.
>>> "-lm" means "link with libm.a" (or libm.so, depending).
>>> But the -lm directive seems to be misplaced somehow, perhaps from your host/target makefile fragment.
>>>
>>> We're at version 6.8, though -- we can't help you too much
>>> with version 6.2...
>>>
>>>
>>>
>>>
>> Thanks for your response, yeah I use a dumb email address for lists to avoid spam.
>>
>> Could I just go into the Makefile and add the flag? or is it a configure option? Where would this directive normally be?
>>
>> I'd be happy to change to 6.8 but since I'm using it for cross compiling I need to ensure that it will work with the m68hc11.... also this is my first experience setting up a toolchain, so I'm trying to be conservative with what I try (since i'm not sure about what might work and don't want to get in over my head).
>>
>> If anyone know of a toolchain that works with a newer version of GDB please let me know.
>>
>
> The version numbers (6.2 and 6.8) are gdb versions, not toolchain.
> When people talk about a toolchain version, they're usually referring
> to the gcc version number. I don't think that's an issue here.
> The issue is that gdb version 6.2 was a long time ago (2004, actually),
> and the sources that we work with have changed a lot since then. We
> don't generally like to go back in time and help people work with
> old versions of the sources -- the general practice is to say "update
> to the latest release of gdb, then if you still have problems we'll
> help you".
>
> So not to go against precedent, but...
>
> I see that in the source version you are using (6.2), there is a
> file in the source tree, "gdb/config/m68hc11/m68hc11.mt"
> That file is called a "target makefile fragment", and it winds up
> as part of your makefile. And it contains a line that looks like this:
>
> SIM= ../sim/m68hc11/libsim.a -lm
>
> There's your "-lm".
>
> That means it is trying to link the math library (-lm == libm.a)
> into the simulator library.
>
> But rather than worry about fixing it or even why it's wrong, I'll just tell you that that file doesn't even exist in the current source tree, so your problem is likely to go away
> (or at least change form) if you go to a more recent gdb version.
>
> Good luck!
>
>
> From - Sat
>
Thanks Michael. I had a go at changing the compiler to be "gcc -lm" for all cases in the Makefile. However that didn't fix the problem. Also a sample program was compiling fine (using the math library) without -lm included at compile time.

So I took your advice and compiled version 6.8 with no problems. The m6811-gcc seems to be producing binary files without error. Now I just have to wait and try one on the actual embedded device to confirm it is working correctly. But all seems to be functioning as expected.

Thanks for the great support and well written responses.

p.s. I'll post back only if the binary files aren't compiling properly, otherwise assume everything is working ok.

Nathan
Reply With Quote
Google UNIX.COM
Reply



Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -7. The time now is 02:33 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008 The CEP Blog All Rights Reserved -Ad Management by RedTyger

Search Engine Optimization by vBSEO 3.1.0

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102