On FreeBSD 13 AMD64 I have some Linux binaries (wkhtmltopdf in this case), who are running fine from a standard shell. But who fails to run from within a Ruby
How could I proceed to make Ruby execute this binary in Linux emulation mode?
exec()
statement.- I am using Linux binaries because the FreeBSD builds for that specific package are broken.
- It is my understanding that FreeBSD is normally detecting the ELF file type and redirects all necessary files (like linked libraries) to
/compat/linux/...
- This seems not to happen when run from within an
exec()
statement. - The execution fails with:
/usr/local/bin/wkhtmltopdf: error while loading shared libraries: /usr/local/lib/libpng16.so.16: ELF file OS ABI invalid
/compat/linux/bin/bash -c '/usr/local/bin/wkhtmltopdf'
How could I proceed to make Ruby execute this binary in Linux emulation mode?