NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Linux emulation: "Inappropriate file type or format" error



On Sat, Jul 07, 2012 at 11:01:50AM -0400, Christos Zoulas wrote:
> You really need to make the the linux library paths appear to be to start
> from /emul/linux (or if you are running 32 bit binaries on 64 bit hosts
> /emul/linux32). The emulation system depends on it to work properly.

Well, I have already mentioned so. I tried to do that in two ways - soft
linking /emul/linux with my dump - which did not work.

Now I have actually kept the dump in /emul/linux itself. There is no way
any library is referred without prefix /emul/linux this way.


The issue is with minor revision number of the .so files.

E.g. if I try to run rpm from this dump (with explicit path and
LD_LIBRARY_PATH pointing to the dump's library directories) I get error
that library librpm.so.2 not found.

Then I find that the library is present with a different revision
librpm.so.2.0.2

Now I soft link librpm.so.2 to the above (within the dump) and this error
goes away.

Only thing is it is not feasible to go on manually soft linking this way.

Also, as I mentioned, I can run binaries like bash from the dump without
any problems since they do not have library revision number issue.

If there is a way the loader can understand it can accept (as in above
example) .so.2.0.2 as .so.2, the emulation will work fine. Perhaps Linux
loader has this behavior (since the dump is of a working Linux live cd.)

Mayuresh.


Home | Main Index | Thread Index | Old Index