0

http://csapp.cs.cmu.edu/public/labs.html Hi, I have downloaded the datalab from above link. And I would like to use the datalab compiler given by the site. However, I got the error : binary file cannot be executed.

I have tried sudo or su but still doesn't work. Is it because of the 64bits/ 32bits problems?

That file is named as dlc. And should be used like this ./dlc bits.c which check the syntax for my bits.c

Result using file :

 timothy@ubuntu:~/Desktop/15-213/datalab-handout$ file dlc dlc: ELF
 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked
 (uses shared libs), for GNU/Linux 2.6.9, not stripped

Here is the result after using uname -a :

timothy@ubuntu:~/Desktop/15-213/datalab-handout$ uname -a
Linux ubuntu 3.2.0-23-generic-pae #36-Ubuntu SMP Tue Apr 10 22:19:09 UTC 2012 i686 i686 i386 GNU/Linux
5
  • You need to provide more information about the binary file. Whether its a shell script? a .out file, or something else. Moreover the link you gave requires authentication, hence not everyone can doenload the file and see why how to get it work Commented Aug 13, 2013 at 6:18
  • It should be a compiler for c files Commented Aug 13, 2013 at 6:34
  • It checks for the syntax in my c file, I'm not sure what file it is.. Commented Aug 13, 2013 at 6:36
  • what is the output of "file <your executable binary>" command?? Commented Aug 13, 2013 at 6:39
  • Please type file um.exe or file um (whichever is the name of your binary file).see the output may be this happen bcz of 32 or 64 bit difference. Commented Aug 13, 2013 at 6:44

1 Answer 1

4

Please type file um.exe or file um (whichever is the name of your binary file).

As you can see from the output of file um that you posted, your binary is a 64-bit binary.

32 bit systems cannot run 64 bit binaries.

Sign up to request clarification or add additional context in comments.

7 Comments

@timothy : yes. Only Mac OS can run this kind of files without bit problem. windows and Linux won't.With Windows or Linux you can either run the 64 bit kernel and 64 bit drivers (and run both 64 bit and 32 bit programs) or the 32 bit kernel and 32 bit drivers (and run only 32 bit and 16 bit programs).
datalab-handout leungtimothy$ file dlc dlc: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.9, not stripped
datalab-handout leungtimothy$ uname -a Kernel Version 11.4.0: Mon Apr 9 19:32:15 PDT 2012; root:xnu-1699.26.8~1/RELEASE_X86_64 x86_64
@TimothyLeung : As the Mac OS X kernel is a universal binary containing binary code for 32 or 64 bits so it should work but with windows and linux don't. (This worked fine in my case as I faced the same problem before)
ok.. thank you so much.. bad luck, maybe I should try another pc
|

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.