Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

skirmishing w/ emulation

2 views
Skip to first unread message

William A. Mahaffey III

unread,
Jul 18, 2015, 11:39:23 AM7/18/15
to


.... I am beginning to skirmish around w/ running 64-bit Linux (CentOS
5.n) Under NetBSD 6.1.5. The online handbook said that the GENERIC
kernel, which I am using, is already setup for emulation, absent
libraries possibly required at runtime. As my regular user (under tcsh,
if that matters), I tried the following:


[wam@4256EE1, ~, 10:31:50am] 237 % pwd
/home/wam
[wam@4256EE1, ~, 10:31:56am] 238 % lf
bin/
[wam@4256EE1, ~, 10:31:59am] 239 % lf bin/
VectorExe.AMD64.new*
[wam@4256EE1, ~, 10:32:08am] 240 % file bin/VectorExe.AMD64.new
bin/VectorExe.AMD64.new: ELF 64-bit LSB executable, x86-64, version 1
(SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.9, stripped
[wam@4256EE1, ~, 10:32:12am] 241 % rehash
[wam@4256EE1, ~, 10:32:16am] 242 % VectorExe.AMD64.new
VectorExe.AMD64.new: Command not found.
[wam@4256EE1, ~, 10:32:19am] 243 % bin/VectorExe.AMD64.new
bin/VectorExe.AMD64.new: Command not found.
[wam@4256EE1, ~, 10:32:22am] 244 % uname -a
NetBSD 4256EE1.CFD.COM 6.1.5 NetBSD 6.1.5 (GENERIC) amd64
[wam@4256EE1, ~, 10:32:29am] 245 % which VectorExe.AMD64.new
/home/wam/bin/VectorExe.AMD64.new
[wam@4256EE1, ~, 10:34:18am] 246 % echo $path
/home/wam/bin /bin /sbin /usr/bin /usr/sbin /usr/X11R7/bin
/usr/X11R6/bin /usr/pkg/bin /usr/pkg/sbin /usr/games /usr/local/bin
/usr/local/sbin


The file VectorExe... was compiled & statically linked for compiler
libraries (not runtime stuff) on a CentOS 5 VM (kernel 2.6.18 EL) on
another machine. I am puzzled by the result when trying to run it, I
expected messages about various runtime libraries not found, instead I
get the above about command not found. More pilot error I assume, but
I'm not seeing it just now. What am I doing wrong here ? TIA & have a
nice weekend.

--

William A. Mahaffey III

----------------------------------------------------------------------

"The M1 Garand is without doubt the finest implement of war
ever devised by man."
-- Gen. George S. Patton Jr.


--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-...@muc.de

Eric Haszlakiewicz

unread,
Jul 18, 2015, 3:48:57 PM7/18/15
to
On July 18, 2015 11:38:06 AM EDT, "William A. Mahaffey III" <w...@hiwaay.net> wrote:
>[wam@4256EE1, ~, 10:32:08am] 240 % file bin/VectorExe.AMD64.new
>bin/VectorExe.AMD64.new: ELF 64-bit LSB executable, x86-64, version 1
>(SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.9,
>stripped
>[wam@4256EE1, ~, 10:32:12am] 241 % rehash
>[wam@4256EE1, ~, 10:32:16am] 242 % VectorExe.AMD64.new
>VectorExe.AMD64.new: Command not found.
>[wam@4256EE1, ~, 10:32:19am] 243 % bin/VectorExe.AMD64.new
>bin/VectorExe.AMD64.new: Command not found.

In this last particular case you probably need "./bin/VectorExe.AMD64.new", but the previous one should have worked since you have it in your path. To rule out any issues with that I recommend using an absolute path.

>The file VectorExe... was compiled & statically linked for compiler
>libraries (not runtime stuff) on a CentOS 5 VM (kernel 2.6.18 EL) on

Your "file" command says "dynamically linked", which means you need to make sure you've got linux libraries installed. There's pkgsrc packages for this, so try:

pkgin install suse

Which should install a whole slew of packages. Once you do that you can try "/emul/linux/bin/ls" and see if at least that works before running your binary.

Eric

William A. Mahaffey III

unread,
Jul 19, 2015, 10:35:53 AM7/19/15
to
On 07/18/15 14:54, Eric Haszlakiewicz wrote:
> On July 18, 2015 11:38:06 AM EDT, "William A. Mahaffey III" <w...@hiwaay.net> wrote:
>> [wam@4256EE1, ~, 10:32:08am] 240 % file bin/VectorExe.AMD64.new
>> bin/VectorExe.AMD64.new: ELF 64-bit LSB executable, x86-64, version 1
>> (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.9,
>> stripped
>> [wam@4256EE1, ~, 10:32:12am] 241 % rehash
>> [wam@4256EE1, ~, 10:32:16am] 242 % VectorExe.AMD64.new
>> VectorExe.AMD64.new: Command not found.
>> [wam@4256EE1, ~, 10:32:19am] 243 % bin/VectorExe.AMD64.new
>> bin/VectorExe.AMD64.new: Command not found.
> In this last particular case you probably need "./bin/VectorExe.AMD64.new", but the previous one should have worked since you have it in your path. To rule out any issues with that I recommend using an absolute path.
>
>> The file VectorExe... was compiled & statically linked for compiler
>> libraries (not runtime stuff) on a CentOS 5 VM (kernel 2.6.18 EL) on
> Your "file" command says "dynamically linked", which means you need to make sure you've got linux libraries installed. There's pkgsrc packages for this, so try:
>
> pkgin install suse
>
> Which should install a whole slew of packages. Once you do that you can try "/emul/linux/bin/ls" and see if at least that works before running your binary.
>
> Eric
>
>

Thanks for the reply. I figured out that the 'command not found' was
probably 'ld.so' about 30 sec. after I hit return. I notice
compatibility packages for both suse-10 & suse-12. I actually think I
need the suse-10, rather than 12, unless suse-12 is backwards compatible
w/ suse-10, would you have any info on that ? The handbook is mum, &
reflects installing suse-10 compatibility stuff. TIA & have a good one.

William A. Mahaffey III

unread,
Jul 19, 2015, 10:48:01 AM7/19/15
to
Update: I went ahead & did a 'pkgin install suse_base-10 suse_compat-10'
& it installed those packages no sweat. Post install, it said something
about putting an entry in my fstab file mounting procfs as
/emul/linux/proc. I already have a procfs in my fstab file for NetBSD, I
presume. Did it mean an entry in /emul/linux/etc/fstab ? If so, the
message out of the install process is off-base. Please advise & have a

Robert Swindells

unread,
Jul 19, 2015, 12:27:21 PM7/19/15
to

William A. Mahaffey III wrote:
>Update: I went ahead & did a 'pkgin install suse_base-10
>suse_compat-10' & it installed those packages no sweat. Post install,
>it said something about putting an entry in my fstab file mounting
>procfs as /emul/linux/proc. I already have a procfs in my fstab file
>for NetBSD, I presume. Did it mean an entry in /emul/linux/etc/fstab ?
>If so, the message out of the install process is off-base.

The message (and the NetBSD Guide) is correct.

William A. Mahaffey III

unread,
Jul 19, 2015, 1:09:46 PM7/19/15
to
On 07/19/15 11:32, Robert Swindells wrote:
> William A. Mahaffey III wrote:
>> Update: I went ahead & did a 'pkgin install suse_base-10
>> suse_compat-10' & it installed those packages no sweat. Post install,
>> it said something about putting an entry in my fstab file mounting
>> procfs as /emul/linux/proc. I already have a procfs in my fstab file
>> for NetBSD, I presume. Did it mean an entry in /emul/linux/etc/fstab ?
>> If so, the message out of the install process is off-base.
> The message (and the NetBSD Guide) is correct.


Thanks :-). The man page eventually clued me in, sorry for the noise :-/
....

--

William A. Mahaffey III

----------------------------------------------------------------------

"The M1 Garand is without doubt the finest implement of war
ever devised by man."
-- Gen. George S. Patton Jr.


Eric Haszlakiewicz

unread,
Jul 19, 2015, 2:16:52 PM7/19/15
to
On July 19, 2015 10:46:59 AM EDT, "William A. Mahaffey III" <w...@hiwaay.net> wrote:
>On 07/19/15 09:40, William A. Mahaffey III wrote:
>> need the suse-10, rather than 12, unless suse-12 is backwards
>> compatible w/ suse-10, would you have any info on that ?

Sorry, no idea.

>about putting an entry in my fstab file mounting procfs as
>/emul/linux/proc. I already have a procfs in my fstab file for NetBSD,
>I
>presume. Did it mean an entry in /emul/linux/etc/fstab ? If so, the
>message out of the install process is off-base. Please advise & have a
>good one.

No, that really does mean /etc/fstab. The one under /emul/linux won't actually cause anything to be mounted, but many linux programs need a (linux compatible) /proc available so you need to arrange for the normal NetBSD mounts that happen at boot to include that.

Eric
0 new messages