LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices



Reply
 
Search this Thread
Old 07-29-2013, 06:49 PM   #1
stf92
Senior Member
 
Registered: Apr 2007
Location: Buenos Aires.
Distribution: Slackware
Posts: 3,268

Rep: Reputation: 49
-bash: ./z80-asm: No such file or directory: inexplicable message when I try to run


Hi: I ran 'make' with a file Makefile, under Slackware 12.0, which produced the binary z80-asm. I can run it under Slackware 12.0 but, if I try to run it under Slackware 14.0 I get
Code:
semoi@server:~/z80_2013/assemblers/z80-asm-2.3.7$ ls -l z80-asm
-rwxr-xr-x 1 semoi semoi 53091 2013-03-10 19:56 z80-asm*
semoi@server:~/z80_2013/assemblers/z80-asm-2.3.7$ z80-asm      
-bash: ./z80-asm: No such file or directory
What can be the cause? I can post the Makefile if you want. This is the output of the file command:
Code:
z80-asm: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), not stripped

Last edited by stf92; 07-29-2013 at 06:52 PM.
 
Old 07-29-2013, 06:53 PM   #2
Ser Olmy
Senior Member
 
Registered: Jan 2012
Distribution: Slackware
Posts: 2,098

Rep: Reputation: Disabled
What do the file and ldd commands have to say about this executable?

Last edited by Ser Olmy; 07-29-2013 at 06:56 PM.
 
Old 07-29-2013, 06:56 PM   #3
stf92
Senior Member
 
Registered: Apr 2007
Location: Buenos Aires.
Distribution: Slackware
Posts: 3,268

Original Poster
Rep: Reputation: 49
The file output I already posted it. Here it is again, along with that of ldd:
Code:
semoi@server:~/z80_2013/assemblers/z80-asm-2.3.7$ file z80-asm
z80-asm: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), not stripped
semoi@server:~/z80_2013/assemblers/z80-asm-2.3.7$ ldd z80-asm
	not a dynamic executable
semoi@server:~/z80_2013/assemblers/z80-asm-2.3.7$
Using ldd with other options I get the same output.

Last edited by stf92; 07-29-2013 at 07:00 PM.
 
Old 07-29-2013, 07:01 PM   #4
Ser Olmy
Senior Member
 
Registered: Jan 2012
Distribution: Slackware
Posts: 2,098

Rep: Reputation: Disabled
Sorry about missing the file output.

Are you trying to run this file under a 32-bit or a 64-bit version of Slackware 14?

My guess is the executable is trying to open a file that doesn't exist on your new system. You could try strace ./z80-asm.

Last edited by Ser Olmy; 07-29-2013 at 07:30 PM.
 
Old 07-29-2013, 07:11 PM   #5
volkerdi
Slackware Maintainer
 
Registered: Dec 2002
Location: Minnesota
Distribution: Slackware! :-)
Posts: 876

Rep: Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826
Almost certainly this binary was compiled on a 32-bit system, and you're trying to run it on a 64-bit x86_64 system without the supporting libraries installed.
 
1 members found this post helpful.
Old 07-29-2013, 07:11 PM   #6
stf92
Senior Member
 
Registered: Apr 2007
Location: Buenos Aires.
Distribution: Slackware
Posts: 3,268

Original Poster
Rep: Reputation: 49
It's the 64-bit version of Slackware. Running the ldd command under Slackware 12.0 I get
Code:
semoi@local:/usr/local/bin$ ldd -v z80-mon
	linux-gate.so.1 =>  (0xffffe000)
	libc.so.6 => /lib/libc.so.6 (0xb7d8d000)
	/lib/ld-linux.so.2 (0xb7eec000)

	Version information:
	./z80-mon:
		libc.so.6 (GLIBC_2.1) => /lib/libc.so.6
		libc.so.6 (GLIBC_2.3) => /lib/libc.so.6
		libc.so.6 (GLIBC_2.0) => /lib/libc.so.6
	/lib/libc.so.6:
		ld-linux.so.2 (GLIBC_PRIVATE) => /lib/ld-linux.so.2
		ld-linux.so.2 (GLIBC_2.3) => /lib/ld-linux.so.2
		ld-linux.so.2 (GLIBC_2.1) => /lib/ld-linux.so.2
semoi@local:/usr/local/bin$
Under Slackware 14.0:
Code:
semoi@server:~/z80_2013/assemblers/z80-asm-2.3.7$ strace z80-asm
execve("./z80-asm", ["z80-asm"], [/* 53 vars */]) = -1 ENOENT (No such file or directory)
dup(2)                                  = 3
fcntl(3, F_GETFL)                       = 0x8002 (flags O_RDWR|O_LARGEFILE)
fstat(3, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 0), ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fbb7199a000
lseek(3, 0, SEEK_CUR)                   = -1 ESPIPE (Illegal seek)
write(3, "strace: exec: No such file or di"..., 40strace: exec: No such file or directory
) = 40
close(3)                                = 0
munmap(0x7fbb7199a000, 4096)            = 0
exit_group(1)                           = ?
semoi@server:~/z80_2013/assemblers/z80-asm-2.3.7$
Under 12.0:
Code:
semoi@local:/usr/local/bin$ strace z80-asm
execve("/usr/local/bin/z80-asm", ["z80-asm"], [/* 35 vars */]) = 0
brk(0)                                  = 0x8074000
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7fad000
access("/etc/ld.so.preload", R_OK)      = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY)      = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=113193, ...}) = 0
mmap2(NULL, 113193, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb7f91000
close(3)                                = 0
open("/lib/libc.so.6", O_RDONLY)        = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0@_\1\000"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=1528742, ...}) = 0
mmap2(NULL, 1316260, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb7e4f000
mmap2(0xb7f8b000, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x13c) = 0xb7f8b000
mmap2(0xb7f8e000, 9636, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xb7f8e000
close(3)                                = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7e4e000
set_thread_area({entry_number:-1 -> 6, base_addr:0xb7e4e6c0, limit:1048575, seg_32bit:1, contents:0, read_exec_only:0, limit_in_pages:1, seg_not_present:0, useable:1}) = 0
mprotect(0xb7f8b000, 4096, PROT_READ)   = 0
munmap(0xb7f91000, 113193)              = 0
exit_group(0)                           = ?
Process 8267 detached
semoi@local:/usr/local/bin$
 
Old 07-29-2013, 07:13 PM   #7
stf92
Senior Member
 
Registered: Apr 2007
Location: Buenos Aires.
Distribution: Slackware
Posts: 3,268

Original Poster
Rep: Reputation: 49
Quote:
Originally Posted by volkerdi View Post
Almost certainly this binary was compiled on a 32-bit system, and you're trying to run it on a 64-bit x86_64 system without the supporting libraries installed.
You are right. I think that is the case. My mistake. Thanks.
 
Old 07-29-2013, 07:14 PM   #8
volkerdi
Slackware Maintainer
 
Registered: Dec 2002
Location: Minnesota
Distribution: Slackware! :-)
Posts: 876

Rep: Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826
Copy those libraries that you see listed from the ldd output on Slackware 12.0 into your /usr/local/lib and it should start working (maybe after running ldconfig).
 
Old 07-29-2013, 07:31 PM   #9
stf92
Senior Member
 
Registered: Apr 2007
Location: Buenos Aires.
Distribution: Slackware
Posts: 3,268

Original Poster
Rep: Reputation: 49
Thanks Patrick.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] error: asm/ppc_asm.h: No such file or directory and error: asm/processor.h: No such f Thirupathip Linux - Newbie 3 01-25-2013 04:02 AM
asm/posix_types.h: No such file or directory DiBosco Linux - Software 0 07-24-2009 06:34 AM
chroot: cannot run command `/bin/bash': No such file or directory Toadman Linux - Software 9 03-26-2009 03:36 AM
chroot: cannot run command `/bin/bash': No such file or directory hubabuba Slackware 5 03-23-2008 06:37 PM
linux command error message bash: /usr/bin/find: No such file or directory sundaram123 Linux - General 8 04-02-2002 08:18 AM


All times are GMT -5. The time now is 12:44 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration