Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C Programming > undefined reference to symbol '_end'

Reply
Thread Tools

undefined reference to symbol '_end'

 
 
Eric
Guest
Posts: n/a
 
      09-02-2012
Hi

I am getting the following linker error, however I do not have any _end
function or variable in my code.

Can anyone help?

Thanks

/usr/bin/ld: /usr/lib64/libphobos2.a(memory_350_620.o): undefined
reference to symbol '_end'
/lib64/libcom_err.so.2: could not read symbols: Invalid operation
collect2: ld returned 1 exit status
 
Reply With Quote
 
 
 
 
Ian Collins
Guest
Posts: n/a
 
      09-02-2012
On 09/ 3/12 08:44 AM, Eric wrote:
> Hi
>
> I am getting the following linker error, however I do not have any _end
> function or variable in my code.
>
> Can anyone help?
>
> Thanks
>
> /usr/bin/ld: /usr/lib64/libphobos2.a(memory_350_620.o): undefined
> reference to symbol '_end'
> /lib64/libcom_err.so.2: could not read symbols: Invalid operation
> collect2: ld returned 1 exit status


Something somewhere calls a function called end (the leading underscore
is added by the compiler). You don't provide enough information for a
decent answer, but this often happens when

a) you forget to declare a function
b) your library header doesn't match the actual library on your machine.

--
Ian Collins
 
Reply With Quote
 
 
 
 
Keith Thompson
Guest
Posts: n/a
 
      09-02-2012
Eric <(E-Mail Removed)> writes:
> I am getting the following linker error, however I do not have any _end
> function or variable in my code.
>
> Can anyone help?
>
> Thanks
>
> /usr/bin/ld: /usr/lib64/libphobos2.a(memory_350_620.o): undefined
> reference to symbol '_end'
> /lib64/libcom_err.so.2: could not read symbols: Invalid operation
> collect2: ld returned 1 exit status


I get 145 hits on a Google search for "undefined reference to symbol '_end'".
It's likely one or more of them will point you in the right direction.

It appears to be related to /lib64/libcom_err.so.2, whatever that is.

A good approach is to narrow down your program to the smallest example
that reproduces the problem.

--
Keith Thompson (The_Other_Keith) http://www.velocityreviews.com/forums/(E-Mail Removed) <http://www.ghoti.net/~kst>
Will write code for food.
"We must do something. This is something. Therefore, we must do this."
-- Antony Jay and Jonathan Lynn, "Yes Minister"
 
Reply With Quote
 
Ben Bacarisse
Guest
Posts: n/a
 
      09-02-2012
Ian Collins <(E-Mail Removed)> writes:

> On 09/ 3/12 08:44 AM, Eric wrote:
>> Hi
>>
>> I am getting the following linker error, however I do not have any _end
>> function or variable in my code.
>>
>> Can anyone help?
>>
>> Thanks
>>
>> /usr/bin/ld: /usr/lib64/libphobos2.a(memory_350_620.o): undefined
>> reference to symbol '_end'
>> /lib64/libcom_err.so.2: could not read symbols: Invalid operation
>> collect2: ld returned 1 exit status

>
> Something somewhere calls a function called end (the leading
> underscore is added by the compiler). You don't provide enough
> information for a decent answer, but this often happens when
>
> a) you forget to declare a function
> b) your library header doesn't match the actual library on your
> machine.


It's being referred to by a library function and one from a module that
relates to memory at that. I strongly suspect old Unix code that refers
to an extern called end. New code might refer to it as well, but it
shouldn't!

To the OP: you might try asking in comp.unix.programmer.

--
Ben.
 
Reply With Quote
 
Angel
Guest
Posts: n/a
 
      09-02-2012
On 2012-09-02, Keith Thompson <(E-Mail Removed)> wrote:
> Eric <(E-Mail Removed)> writes:
>> I am getting the following linker error, however I do not have any _end
>> function or variable in my code.
>>
>> Can anyone help?
>>
>> Thanks
>>
>> /usr/bin/ld: /usr/lib64/libphobos2.a(memory_350_620.o): undefined
>> reference to symbol '_end'
>> /lib64/libcom_err.so.2: could not read symbols: Invalid operation
>> collect2: ld returned 1 exit status

>
> I get 145 hits on a Google search for "undefined reference to symbol '_end'".
> It's likely one or more of them will point you in the right direction.
>
> It appears to be related to /lib64/libcom_err.so.2, whatever that is.


It's a library that was originally part of the ext2/ext3/ext4 filesystem
utilities, but is used by some other filesystem-related utilities as
well. So my guess is that the threat starter is on some brand of Linux.


--
"C provides a programmer with more than enough rope to hang himself.
C++ provides a firing squad, blindfold and last cigarette."
- seen in comp.lang.c
 
Reply With Quote
 
Vincenzo Mercuri
Guest
Posts: n/a
 
      09-02-2012
Il 9/2/2012 10:44 PM, Eric ha scritto:
> Hi
>
> I am getting the following linker error, however I do not have any _end
> function or variable in my code.
>
> Can anyone help?
>
> Thanks
>
> /usr/bin/ld: /usr/lib64/libphobos2.a(memory_350_620.o): undefined
> reference to symbol '_end'
> /lib64/libcom_err.so.2: could not read symbols: Invalid operation
> collect2: ld returned 1 exit status
>


Phobos is the standard runtime library that comes with the D language
compiler "dmd". You should ask in another newsgroup:
http://www.digitalmars.com/NewsGroup.html

However, I found this thread where quite the same error message is
reported, the suggested solution could apply to your case as well:
http://goo.gl/eVVMo

--
Vincenzo Mercuri
 
Reply With Quote
 
 
 
Reply

Thread Tools

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

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
(Encryption Package) error: cannot find symbol symbol: class BaseNCode clusardi2k@aol.com Java 6 08-29-2012 08:33 PM
Why ":symbol" failed but 'symbol' successed with JRuby 1.0.3? Song Ma Ruby 2 07-20-2008 04:08 AM
Compiler adds undefined symbol reference for virtual functions.... trond.norbye@gmail.com C++ 3 09-29-2006 08:41 PM
JNI:"undefined symbol" in "shared-library" Kenneth Kahl Java 2 02-22-2006 03:52 PM
what's differnece between #ifdef symbol and #if defined(symbol) baumann@pan C Programming 1 04-15-2005 08:25 AM



Advertisments