I am looking to install OSS inside a FreeBSD jail with no sound card on the system. Basically I have another application that needs to link to libasound (linux-ALSA drivers). I am on a Virtual BSD server however, and cannot link a native BSD app with a linux lib.

I head that OSS has a compatible library, so I am looking to install. However:
- I am inside the Jail and thus, linking /dev/dsp isn't supported.
- There is no sound card in this server.

I've attempted to install the BSD package, however I receive the following error:

1) Maybe libdssialsacompat will be good enough for the application? The OSS libsalsa requires ALSA headers to compile, and it's based on pretty old version of libasound anyway...
libsalsa binary is not compiled by default in the FreeBSD package, so you'll have to hack the source tree to compile it manually (e.g. edit lib/libsalsa/.config and remove "targetos" line to make the build system try to compile it under FreeBSD). See here for general building instructions.

2) It'll be much better to install OSS on the host. There's a nice port too. Isn't there a FreeBSD equivalent of "mount --bind" to export a directory to chroot? Maybe unionfs can be used for this? If you're not comfortable with exporting /dev, you can settle for exporting /dev/oss directory to the jail and creating a /dev/dsp symlink manually inside (Not having /dev/mixer that way is annoying though).

3) You can create a virtual soundcard with oss_userdev or possibly oss_audioloop drivers. For some reason the first isn't compiled in the FreeBSD package by default (you can edit kernel/drv/oss_userdev/.config and remove "forgetos" line).

1) libdssialsacompat does not come with a version of libasound.so which is the file I need to link with my application.

2) I am merely a user of the Jail, not the owner of the host. While I can petition the host owners to install OSS, I think that will be an uphill battle. Justifying a sound system on server-farm machine is tough, and no idea how the licensing of that would work is 4Front (Would the hosting company buy a license per-jail?)

3) I don't really NEED a sound card, I do not plan to play any audio. What I am trying to do is get a text-to-speech engine installed, I will be producing sound to WAV files, but the compile requires the library.

In fact, if someone out there emailed me a compile libasound (or equivalent) compiled for FreeBSD 7.1 amd64 I may be able to install it and be done. I just don't know where to get the file.

-pete

NOTE: I do have the following file:
/usr/local/lib/ao/plugins-2/liboss.so

1) Well, you could create a symlink to libasound.so.2. No idea if the required symbols are exported though.

2) You can install OSS on a machine/VM with a similiar kernel and then copy the modules or put the kernel source inside the jail and do the install inside, but it looks weird to me - I don't think you have permission(s) to load kernel modules from inside a jail... It's easy to breakout once it's possible. I think license questions can be ignored for now.

3) A libasound2 plugin which will capture to file would also do the job, not requiring emulating /dev/dsp or a kernel module. I don't know if one exists, but it should.