Solved

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

Posted on 2012-03-29
8
2,125 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
[X]
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
  • 5
  • 3
8 Comments
 
LVL 77

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 77

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
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 

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 77

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 77

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 77

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

Don't Cry: How Liquid Web is Ensuring Security

WannaCry is just the start. Read how Liquid Web is protecting itself and its customers against new threats.

Question has a verified solution.

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

Windows programmers of the C/C++ variety, how many of you realise that since Window 9x Microsoft has been lying to you about what constitutes Unicode (http://en.wikipedia.org/wiki/Unicode)? They will have you believe that Unicode requires you to use…
In part one, we reviewed the prerequisites required for installing SQL Server vNext. In this part we will explore how to install Microsoft's SQL Server on Ubuntu 16.04.
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
The goal of this video is to provide viewers with basic examples to understand opening and reading files in the C programming language.
Suggested Courses

624 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