undefined reference to symbol '_end'

E

Eric

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
 
I

Ian Collins

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.
 
K

Keith Thompson

Eric said:
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.
 
B

Ben Bacarisse

Ian Collins said:
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.
 
A

Angel

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.
 
V

Vincenzo Mercuri

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,954
Messages
2,570,116
Members
46,704
Latest member
BernadineF

Latest Threads

Top