Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

/usr/bin/ld: Relocations in generic ELF (EM: 2)

Posted on 2012-03-29
8
1,980 Views
Last Modified: 2012-06-22
Hi all,
i got this error while doing make (compiling all my files tgt).
Can anybody tell me why is this happening, and how should i solve this?
because my codes runs fine on the other machine but not this.
Thanks in advance:)

$ make
gcc -o m1 matmul_main.o matmul_setup.o matmul_compute.o matmul_output.o -lm -lpthread
/usr/bin/ld: matmul_main.o: Relocations in generic ELF (EM: 2)
matmul_main.o: could not read symbols: File in wrong format
collect2: ld returned 1 exit status
make: *** [m1] Error 1

if my make is up-to-date, it gives me another error:
$ make
make: `m1' is up to date.
$ m1 5 10 5 2
-bash: m1: command not found
0
Comment
Question by:crazy4s
  • 5
  • 3
8 Comments
 
LVL 76

Accepted Solution

by:
slightwv (䄆 Netminder) earned 500 total points
ID: 37786963
I'm responding to a neglected question alert.  My 'make' expertise is pretty rusty.

Is this new code or have you compileed it before?

Have you tried a 'make clean' before the make?

http://lists.xymon.com/oldarchive/2006/09/msg00399.html
0
 

Author Comment

by:crazy4s
ID: 37787516
yes i tried it my university's csa machine, it runs fine. but when i change to this (8core machines), it just give me the errors even after i do make clean.
0
 
LVL 76

Expert Comment

by:slightwv (䄆 Netminder)
ID: 37787529
Do you have the source to:
matmul_main.o
matmul_setup.o
matmul_compute.o
matmul_output.o

or are you just copying them over?
0
Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

 

Author Comment

by:crazy4s
ID: 37787552
okay just because i used m1 instead of ./m1 it gives me the above error!
anyway thanks, problem solved.
0
 
LVL 76

Expert Comment

by:slightwv (䄆 Netminder)
ID: 37787556
Would you like to accept your post as the solution or just have the question deleted?
0
 
LVL 76

Expert Comment

by:slightwv (䄆 Netminder)
ID: 37787564
AS much as I like the points, I don't feel that I earned them.

I would like to unaccept this and let you accept your post as the solution.

Just let me know.
0
 

Author Comment

by:crazy4s
ID: 37787565
hmm is okay other might have the possibility to bump into this error, so i'll just leave it:)
0
 
LVL 76

Expert Comment

by:slightwv (䄆 Netminder)
ID: 37787574
>>other might have the possibility to bump into this error

But my post doesn't help resolve it.  Your post does.
0

Featured Post

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
capture pcap with filtered traffic 1 84
Field name with special character (Ñ) in Oracle 11 87
linux SFTP 8 60
Solaris acount issues 44 27
Setting up Secure Ubuntu server on VMware 1.      Insert the Ubuntu Server distribution CD or attach the ISO of the CD which is in the “Datastore”. Note that it is important to install the x64 edition on servers, not the X86 editions. 2.      Power on th…
This is a short and sweet, but (hopefully) to the point article. There seems to be some fundamental misunderstanding about the function prototype for the "main" function in C and C++, more specifically what type this function should return. I see so…
The goal of this video is to provide viewers with basic examples to understand recursion in the C programming language.
The goal of this video is to provide viewers with basic examples to understand how to create, access, and change arrays in the C programming language.

861 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question