This is the mail archive of the cygwin mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: relocation truncated to fit: R_X86_64_PC32 against undefined symbol `len'

cygcheck.out attached, as requested.

On Sat, 5 Apr 2014, Richard wrote:

Hello Everyone,

I recently (two weeks ago or so) upgraded the cygwin installation on an XP 64 bit (corp edition) box and in getting things running on it again I've been having various troubles, even though I was VERY careful to watch for any installation errors - none were noticed. Normally I don't do development on this box but copy over from other systems. I had at least one program that was not behaving correctly - it would apparently hide output sent to stdout among other mysteries. After fiddling with things I decided to just rebuild on that box from sources - it's almost all gnu c. (Note that this code needs to run unchanged on many different platforms.)

At some point I get to the gcc call to bind together three object files into an executable - all the object files having just been built with zero errors - and I get this particular "undefined reference to `len'" error. Of course I went hunting for the use of 'len' - which is a pretty absurd effort as a simple grep matches on coutless noise such as 'filename' or 'strlen', etc. However, a thorough search revealed no uses of just 'len', yet I don't deny I could possibly have overlooked it. Even so, this directory was taken wholesale from a 64 bit system (Win 7) with an older cygwin installation where the code compiles and runs fine. So somehow I don't think it's actually in my code but rather a library reference problem somehow.

The specific set of error output from make is:

$ gcc -o ctjc.exe ctjc.o hashc.o sha1.o;
ctjc.o:ctjc.c:(.text+0x2287): undefined reference to `len'
ctjc.o:ctjc.c:(.text+0x2287): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `len'
/usr/bin/ld: ctjc.o: bad reloc address 0x0 in section `.pdata'
/usr/bin/ld: final link failed: Invalid operation
collect2: error: ld returned 1 exit status

Any assistance greatly appreciated.


Richard Troy, Founder & current President
The Karmann Ghia Club of North America
4200 Park Blvd, #151, Oakland CA 94602, USA,

Attachment: cygcheck.out
Description: Text document

Problem reports:
Unsubscribe info:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]