Solved

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

Posted on 2012-03-29
8
1,841 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
Comment Utility
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
Comment Utility
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)
Comment Utility
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
 

Author Comment

by:crazy4s
Comment Utility
okay just because i used m1 instead of ./m1 it gives me the above error!
anyway thanks, problem solved.
0
Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

 
LVL 76

Expert Comment

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

Expert Comment

by:slightwv (䄆 Netminder)
Comment Utility
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
Comment Utility
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)
Comment Utility
>>other might have the possibility to bump into this error

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

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Summary: This tutorial covers some basics of pointer, pointer arithmetic and function pointer. What is a pointer: A pointer is a variable which holds an address. This address might be address of another variable/address of devices/address of fu…
Why Shell Scripting? Shell scripting is a powerful method of accessing UNIX systems and it is very flexible. Shell scripts are required when we want to execute a sequence of commands in Unix flavored operating systems. “Shell” is the command line i…
The goal of this video is to provide viewers with basic examples to understand and use switch statements in the C programming language.
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.

771 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now