7 ms·
Ecosystems are tough. I'd never used meson, so I installed it using apt-get. I tried to build Foliate, and got an error about wrong arguments to `project()`.
by JasonFruit 7y ago
Ecosystems are tough. I'd never used meson, so I installed it using apt-get. I tried to build Foliate, and got an error about wrong arguments to `project()`. Searching for the error brought results about a wrong version, so I uninstalled meson and reinstalled it using pip. The installation completed fine. I went to run Foliate (com.github.johnfactotum.Foliate, if that wasn't somehow obvious), and I got an error from GJS (JS ERROR: SyntaxError: invalid property id @ resource:///com/github/johnfactotum/Foliate/js/main.js:57
JS_EvaluateScript() failed).
If it's obvious to anyone else what's wrong here, it's not obvious to me. Isn't one of the advantages of interpreting the code on the target platform supposed to be portability? If so, why is it I so seldom can can get anything written for GJS, or Node, or a Python program not my own, to install and run without a three-hour yak shave?
I'm sure this is a great project, and I mean no disrespect to the author, who did a better job of installation instructions than most — but I'm tired of installation being such a pain. It's almost, but not quite, enough to make a guy run Windows.
- jgillich 7y agoThis is exactly what Flatpak solves. https://flathub.org/apps/details/com.github.johnfactotum.Foliate https://flathub.org/apps/details/com.github.johnfactotum.Fol...
- matthewbauer 7y agoBut then you can't make changes to the app! You're stuck with a read-only copy.
- johnfactotum 7y agoYou can build your own Flatpaks from source, too. In fact that's probably how a lot of development is done these days around GNOME and its wider community when using Gnome Builder. You make a change, and Gnome Builder builds a Flatpak and runs it for you so you can test it.
- JasonFruit 7y agoYes, I finally installed it via Flatpak. What a fun adventure! First, I had to install Flatpak with apt. Then, I downloaded the Foliate .flatpakref. I installed it with `flatpack install com.github.johnfactotum.Foliate.flatpakref`, which worked the first time! No, it didn't. Of course, Flatpak let me know that my user account didn't have the ability to configure the remote repositories the Foliate flatpakref specified. I could have searched for the right way to do it, but installing as root seemed to work, and it runs fine as a regular user, too! But, of course, it doesn't. It doesn't have the ability to open files from most folders. I see by searching that you set sandbox permissions in an application manifest file, but I'm not sure I'm that attached to doing any more of this.
- lordfrikk 7y agoInstalling it via "flatpak install foliate" didn't work? Downloading the .flatpakref seems like an unnecessary step to me but I'm on a different distro (openSUSE Tumbleweed). edit: I can also open files from anywhere on my PC. Could it be that the flatpak on Debian Stretch is not correctly configured?
- JasonFruit 7y agoI'm pretty sure your edit nails it: flatpak on my moldy Debian doesn't work correctly as a non-root user, and the alternative of running it as root and then running the application as a normal user was neither intended nor foreseen. I did finally install Debian testing, and it looks like the flatpak problems are resolved, but I decided not to bother installing foliate because of the nearly 700MB of dependencies it wanted over my rural satellite connection. C'est la vie.
- JasonFruit 7y agoI went ahead and burned the data: for Science! After the dependencies were all downloaded, it works correctly and completely. It's a fairly nice ebook reader application, and it only took three days and replacing my operating system to get it.
- johnfactotum 7y agoHi, author of Foliate here. It sounds like you're using something like Ubuntu 16.04 or similar? Foliate currently requires GJS >= 1.52 and Meson >= 0.40. There's an open issue here on supporting older systems: https://github.com/johnfactotum/foliate/issues/45 https://github.com/johnfactotum/foliate/issues/45
- knocte 7y agowhy don't you make a configure script that detects and warns about these requirements?
- JasonFruit 7y agoI'm using Debian 9.8 Stretch, released in February.
- jhasse 7y ago> released in February. Yeah, that's not how Debian stable works.
- JasonFruit 7y agoIt's when the point release was done[0]. Obviously not everything was new then. I'm assuming most people who package applications for Linux have an understanding of how Debian works. [0]: https://www.debian.org/News/2019/20190216 https://www.debian.org/News/2019/20190216
- jhasse 7y ago> Obviously not everything was new then. Nothing was! Debian stable doesn't update packages (not even minor releases or bugfixes). They only backport security fixes or very critical bugfixes. Debian 9 was freezed on 2017-02-05. You'll have the version of every package from this date, point release don't change that.
- 7y ago
- jancsika 7y ago> Searching for the error brought results about a wrong version One of the bullet points from the Meson website: > * fun! So if I understand correctly, this modern build tool created to replace all the extant time-wasting build tools got memorialized in Debian in a half-baked state where it's not compatible with future versions. Also-- the fact that you had to leave the hardened bank vault of apt through the screen door of pip... to install a thing to build other things to run on your system. I love it. > If so, why is it I so seldom can can get anything written for GJS, or Node, or a Python program not my own, to install and run without a three-hour yak shave? ... is the question that explains why Electron exists. Every comment on HN about its size, memory usage, and insecurity doubles as a critique of all the problems you just hit with a Linux system. Electron: "Memory and disk space is cheap enough, but your time will never be."
- JasonFruit 7y agoI don't like Electron — I've brought some of my problems on myself by my love of using minimally-capable old hardware — but this is by far the best statement of the argument for it I've ever heard.
- lpcvoid 7y agoI propose on building native tools that have all relevant libraries statically linked. Yeah, executable will grow in size, but it's the best of both world : portability, speed and not using javascript.
- sansnomme 7y agoCongrats on inventing Docker, what flavour of cookie do you want?
- dang 7y agoSnark isn't ok here and personal attacks will get you banned. Would you mind reviewing https://news.ycombinator.com/newsguidelines.html https://news.ycombinator.com/newsguidelines.html and sticking to those rules when posting to HN? We'd be grateful.
- z3t4 7y agoAfter cloning the project, all you should have to do is to ./src/main.js and the shebang should take care of the rest (running gjs, node, python etc). Why complicate things? build-steps are the root of all evil.