i386 jail undex amd64: libkvm

Julian Elischer julian at elischer.org
Thu Jun 26 20:02:52 UTC 2008

Dmitry Morozovsky wrote:
> Dear colleagues,
> it seems this question had been arised several times, but I failed to find any 
> solution (yet).
> What is (and is there?) the proper way to compile libkvm-related binaries (and 
> libkvm itself) to assure 32bit binaries work with amd64 kernel structures?
> Straight way with installing i386 world, or cross-compile with TARGET=i386 
> leads to empty result with ps and

you can not do this.

there are a small number of system utilities that can not be run 
across the 386/amd64 chasm. Anything that uses libkvm on the riunning 
system is one of them.

teh asnwer is to have a small numebr of 64 bit utilities in your
"32 bit" jail.
Netstat, ps and some others are examples (top, systat).
you could put the 64 bit shared libs in your jail, or you could grab
static versions from /rescue.

It's just the way it has to be.. (unless we have special code to 
translate proc structure fields. which probably wouldn't make sense 

> kvm_open: kinfo_proc size mismatch (expected 768, got 1088)
> top: Out of memory.
> with top.
> I tried to play with lib32 libraries and different system headers, but did not 
> succeed.
> Any clues?
> Thank you in advance.
> Sincerely,
> D.Marck                                     [DM5020, MCK-RIPE, DM3-RIPN]
> [ FreeBSD committer:                                 marck at FreeBSD.org ]
> ------------------------------------------------------------------------
> *** Dmitry Morozovsky --- D.Marck --- Wild Woozle --- marck at rinet.ru ***
> ------------------------------------------------------------------------
> _______________________________________________
> freebsd-hackers at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
> To unsubscribe, send any mail to "freebsd-hackers-unsubscribe at freebsd.org"

More information about the freebsd-hackers mailing list