NetBSD-Users archive

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

Re: Linux emulation: Compiling with binary distributed libraries



On Sat, Apr 01, 2023 at 08:17:36PM +0200, Martin Husemann wrote:
> Yes, and I'm not quite sure I understand the "how". It depends how you
> run the Vivado stuff, one easy way would be to use a chroot to a
> full Linux userland, and there it just would use the C compiler from that
> userland.
> 
> The other option is to have enough libs installed in the emul dir and use
> Vivado w/o chroot, then you could place the linux gcc wherever you like
> and just point at it (via $PATH or whatever mechanisms Vivado offers
> for configuration).

As far as running things not involving compilation is concerned, I have
just kept vivado installation under /opt/xilinx (outside /emul) and it
seems to work fine.

For usage involving compilation, unfortunately Vivado has hard coded the
path /usr/bin/gcc in some binary component. So chroot will be the option.

I have installed Void Linux on a qemu disk and installed gcc on it. Now
after switching off the VM, I have mounted the disk using vnconfig.

Now if I try to run the binaries e.g. /mnt/void/usr/bin/ls, it says No
such file or directory. I have even set /mnt/void/usr/lib (which soft
links to lib64) in LD_LIBRARY_PATH, but that doesn't seem to help.

Do I need to be mounting this somewhere under /emul/linux? (I think I have
tried even that, but that led to the same error.)

Basically, given I have a raw disk image of Void Linux mounted on NetBSD,
what is a good way to run things from its /usr/bin on NetBSD?

-- 
Mayuresh


Home | Main Index | Thread Index | Old Index