Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

darwin binaries will not run on freebsd/openbsd #27255

Closed

Conversation

msimerson
Copy link

Summary

Both phantomjs and chromium include freebsd and openbsd as targets on which the Darwin builds can be deployed. This is nonsense as neither of those platforms can run Darwin binaries.

./bin/phantomjs: cannot execute binary file: Exec format error

The result of removing *bsd from the Darwin target is that now kibana will die with this error:

Unsupported platform: freebsd

instead of this error:

Failed to install browser. See kibana logs for more details.

That's much more accurate.

If adding support for FreeBSD and OpenBSD is desirable, the Right Way to do it is to depend on an OS supplied (via ports/packages) binary.

# file /usr/local/bin/phantomjs
/usr/local/bin/phantomjs: ELF 64-bit LSB executable, x86-64, version 1 (FreeBSD), dynamically linked, interpreter /libexec/ld-elf.so.1, for FreeBSD 11.2, FreeBSD-style, stripped
# file /usr/local/bin/chrome
/usr/local/bin/chrome: POSIX shell script, ASCII text executable
# file /usr/local/share/chromium/chrome
/usr/local/share/chromium/chrome: ELF 64-bit LSB shared object, x86-64, version 1 (FreeBSD), dynamically linked, interpreter /libexec/ld-elf.so.1, for FreeBSD 11.2, FreeBSD-style, BuildID[sha1]=8504a6ceab82b1610b42d42b4efb93cb4105f46d, stripped

I have started looking into convincing the reporting module to use an installed binary. If I figure it out before running out of time, I'll create another PR.

Checklist

For maintainers

./bin/phantomjs: cannot execute binary file: Exec format error
@elasticmachine
Copy link
Contributor

Since this is a community submitted pull request, a Jenkins build has not been kicked off automatically. Can an Elastic organization member please verify the contents of this patch and then kick off a build manually?

@msimerson
Copy link
Author

yes

@msimerson msimerson changed the title darwin binaries will not run on free/openbsd darwin binaries will not run on freebsd/openbsd Dec 21, 2018
@msimerson
Copy link
Author

For anyone that really really wants the reporting module to work, I've found a workaround.

It takes advantage of this bug. The trick is to install phantomjs and point Kibana at the FreeBSD compatible binary.

hack

pkg install -y phantomjs
cd /usr/local/www/kibana6/node_modules/x-pack/plugins/reporting/.phantom
fetch https://github.com/Medium/phantomjs/releases/download/v2.1.1/phantomjs-2.1.1-macosx.zip
mkdir -p phantomjs-2.1.1-macosx/bin
ln -s /usr/local/bin/phantomjs phantomjs-2.1.1-macosx/bin/phantomjs

enable reporting module in kibana.yml

xpack.reporting.enabled: true

restart Kibana

service kibana restart

@ltning
Copy link

ltning commented Jan 9, 2019

Please do NOT "fix" this "bug" until support for system-provided phantomjs (as described by @msimerson) has been implemented. We are currently relying on this hack.

@spalger spalger added (Deprecated) Feature:Reporting Use Reporting:Screenshot, Reporting:CSV, or Reporting:Framework instead Team:Monitoring Stack Monitoring team labels Jun 28, 2019
@elasticmachine
Copy link
Contributor

Pinging @elastic/stack-monitoring

@chrisronline chrisronline removed the Team:Monitoring Stack Monitoring team label Mar 10, 2020
@joelgriffith
Copy link
Contributor

Closing in favor of a follow up PR to fix this issue, potentially in the 8.0.0 major

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
💝community (Deprecated) Feature:Reporting Use Reporting:Screenshot, Reporting:CSV, or Reporting:Framework instead
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants