Open NAThompson opened 3 years ago
Had same problem, worked.
I think this was caused by the UTF-8 support, which added this line:
use open qw(:std :utf8);
I deliberately wrote flamegraph to not use dependencies, as it was such a short program that I didn't want to burden end-users. That's why it contains its own embedded SVG library.
Here's what I'd suggest we do here: A) Detect if perl-open is available, and if so, use it otherwise not. So if you want UTF-8 support on RHEL you have to install perl-open.noach, but if you don't have that installed it still works but throws a warning about UTF-8 and the missing package. B) If there's not much functionality of UTF-8 that we need, something that can be made a 20-line function, can we just add it as a function and remove the dependency. Like I did for SVG. C) As a last resort I'd add a "DEPENDENCIES" section to README.md and say RHEL is special and needs perl-open.noarch. Last resort.
I just bumped into this problem. Thanks for documenting the workaround here. While I'm sad that Brendan's suggestions haven't been implemented, I wish I could take the time to fix for any future users. FWIW, if there was a note in the README, I would probably have missed that and found this issue first, so (C) probably wouldn't have helped me. Maybe the existence of this issue is actually a sufficient solution.
When running
flamegraph.pl
on RHEL 8.1, I encounter the following error:For reference, it appears that this issue is the same. It seems strange to me that opening a file requires a supplementary package, but for reference, it appears that
should fix this issue on RHEL.