bat: 'bat cache --build' crashes on armv7
I have been able to add a .tmTheme for Sublime Text with success, but I cannot get this .tmLanguage file working. It is for the configuration file language for Mikrotik routers.
https://github.com/Kentzo/MikrotikScript/blob/master/MikrotikScript.tmLanguage
Is there anything I can do to make this work?
I added the file to ~/.config/bat/syntaxes/ and did bat cache --build, but it didn’t work. Is there anything more I need to do?
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 17 (10 by maintainers)
Commits related to this issue
- Update dependencies fixes #1149 fixes #1477 — committed to sharkdp/bat by sharkdp 3 years ago
- Update dependencies fixes #1149 fixes #1477 — committed to sharkdp/bat by sharkdp 3 years ago
If I pin the version of onig_sys to 69.5.1, I can actually reproduce the crash with
cross run(which is just fantastic: it cross-compiles the code for ARM and then executes it with QEMU):If I use the latest version of onig, I can not reproduce the crash. Seems like this problem has been fixed upstream. This should fix it in
batas well: #1495Ah, I missed that. No, it is not supported. You can use Sublime Text to convert it (see README here: https://github.com/sharkdp/bat/tree/master/assets)
Ahh, damn. That’s not very helpful, unfortunately.
I went ahead and tried to reproduce this on my RPi 3b. I see the exact same crash as well!
Next, I tried to minimize the
mikrotik.sublime-syntaxfile, to see if it is actually related to the content. Turns out it is! This is the “minimal” example which still leads to a crash:This lead me to think that it would be related to the regex engine (oniguruma) - which is actually a C dependency and may very well segfault. Indeed, I was able to reproduce the error with this simple program:
with the following
Cargo.tomlfile:which I cross-compiled via
No, it doesn’t. Is the TextMate format for syntaxes not supported, like it is for themes? I have tried to use a ruby-based converter to turn it into .sublime-syntax format, but I haven’t had any luck with it.