~cadence/bibliogram-devel

3 3

Re: [NOT A PATCH] I got Bibliogram running successfully on my phone!

Filip Hejsek
Details
Message ID
<CABLkWiQKMuk2CkUnc__i9b61jHj+2TrP=bkaceY8BGqbKF75QA@mail.gmail.com>
DKIM signature
pass
Download raw message
Hi, i also got Bibliogram to run in Termux on my phone, and i managed
to get images working.
The sollution is to not trick Sharp into thinking it's running on
linux (that's really ill-advised, Android uses a completely different
libc and it has no chance to just work), but instead compile and
install an actual real android version of the vips library that sharp
uses. It turns out that it's not very hard to do so, although there
are some small difficulties with the nonstandard paths in Termux (in
Termux, all standard POSIX paths are prefixed).

Normally one would install libraries into /usr/local, but Termux
appears not to have local in usr, and i didn't want to mess with the
usr directory, so i decided to install into $HOME/vips-install.

You should have the following packages installed: build-essential,
pkg-config, glib, libexpat. Also you need some additional packages to
support some image formats, see the libvips documentation.

These are the commands i used :
$ wget https://github.com/libvips/libvips/releases/download/v8.10.5/vips-8.10.5.tar.gz
$ tar -xf vips/vips-8.10.5.tar.gz
$ cd vips-8.10.5/
$ ./configure --prefix=$HOME/vips-install
$ make
$ make install

The make step takes a long time as it needs to compile all the c and
c++ files (and c compilers are slow, especially on mobile devices).
After you complete these steps, you should have vips installed in
$HOME/vips-install.

Because libvips is installed in a nonstandard location, you need to
set some environment variables when installing and running bibliogram:
$ PKG_CONFIG_PATH="$HOME/vips-install/lib/pkgconfig" npm install --no-optional
$ LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$HOME/vips-install/lib" npm start

After running these commands, you should have a fully working
bibliogram instance running on your phone.

As an alternative to setting environment variables, you can install
libvips to the normal termux directories by replacing the configure
step with ./configure --prefix=$PREFIX
The reason i chose to install into a custom directory was that it is
easier to revert in case i messed up.

Re: [NOT A PATCH] I got Bibliogram running successfully on my phone!

Filip Hejsek
Details
Message ID
<CABLkWiQkXdcVKq4XwZ-nKHDP_7atcfk2aMdhvhAEL0FeO_pB0Q@mail.gmail.com>
In-Reply-To
<CABLkWiQKMuk2CkUnc__i9b61jHj+2TrP=bkaceY8BGqbKF75QA@mail.gmail.com> (view parent)
DKIM signature
pass
Download raw message
A small correction - the tar command should be this:
$ tar -xf vips-8.10.5.tar.gz

(It seems my email also wasn't threaded correctly, probably because
gmail didn't include the in-reply-to header from the mailto: url?)

Filip Hejsek

čt 21. 1. 2021 v 14:34 odesílatel Filip Hejsek <filip.hejsek@gmail.com> napsal:
>
> Hi, i also got Bibliogram to run in Termux on my phone, and i managed
> to get images working.
> The sollution is to not trick Sharp into thinking it's running on
> linux (that's really ill-advised, Android uses a completely different
> libc and it has no chance to just work), but instead compile and
> install an actual real android version of the vips library that sharp
> uses. It turns out that it's not very hard to do so, although there
> are some small difficulties with the nonstandard paths in Termux (in
> Termux, all standard POSIX paths are prefixed).
>
> Normally one would install libraries into /usr/local, but Termux
> appears not to have local in usr, and i didn't want to mess with the
> usr directory, so i decided to install into $HOME/vips-install.
>
> You should have the following packages installed: build-essential,
> pkg-config, glib, libexpat. Also you need some additional packages to
> support some image formats, see the libvips documentation.
>
> These are the commands i used :
> $ wget https://github.com/libvips/libvips/releases/download/v8.10.5/vips-8.10.5.tar.gz
> $ tar -xf vips/vips-8.10.5.tar.gz
> $ cd vips-8.10.5/
> $ ./configure --prefix=$HOME/vips-install
> $ make
> $ make install
>
> The make step takes a long time as it needs to compile all the c and
> c++ files (and c compilers are slow, especially on mobile devices).
> After you complete these steps, you should have vips installed in
> $HOME/vips-install.
>
> Because libvips is installed in a nonstandard location, you need to
> set some environment variables when installing and running bibliogram:
> $ PKG_CONFIG_PATH="$HOME/vips-install/lib/pkgconfig" npm install --no-optional
> $ LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$HOME/vips-install/lib" npm start
>
> After running these commands, you should have a fully working
> bibliogram instance running on your phone.
>
> As an alternative to setting environment variables, you can install
> libvips to the normal termux directories by replacing the configure
> step with ./configure --prefix=$PREFIX
> The reason i chose to install into a custom directory was that it is
> easier to revert in case i messed up.

Re: [NOT A PATCH] I got Bibliogram running successfully on my phone!

Details
Message ID
<1ec08367-30c0-432a-a7e1-287bc7a55dd1@disroot.org>
In-Reply-To
<CABLkWiQkXdcVKq4XwZ-nKHDP_7atcfk2aMdhvhAEL0FeO_pB0Q@mail.gmail.com> (view parent)
DKIM signature
pass
Download raw message
Correct, the gmail web ui sadly ignores reply-to from the URL. Here's the 
person to nag about it: 
https://lists.sr.ht/~sircmpwn/sr.ht-discuss/%3C1297c49c-7dab-466a-a036-3310a64284df%40disroot.org%3E#%3CC812KJ1OUDKW.259LO0RQ7C0IE@taiga%3E

Thanks for the correction.

Re: [NOT A PATCH] I got Bibliogram running successfully on my phone!

Kyle Williams
Details
Message ID
<CACn2xWMqX6Apci_OiDNZwbXnwzg_ebRzZYJWGwQP3z2b_GmaBw@mail.gmail.com>
In-Reply-To
<1ec08367-30c0-432a-a7e1-287bc7a55dd1@disroot.org> (view parent)
DKIM signature
pass
Download raw message
Thanks for the assistance, Filip! I knew at some point that I would
have to compile libvips myself in order to get images working, but was
far too lazy to do so myself. I've made edits to my guide [1] and
credited you as well; if you have a GitHub account, I'd be happy to
put that in the gist as well.

Kyle Williams
[1]: https://git.io/JLih1


Kyle Williams


On Fri, Jan 22, 2021 at 6:43 AM Cadence Ember <cadence@disroot.org> wrote:
>
> Correct, the gmail web ui sadly ignores reply-to from the URL. Here's the
> person to nag about it:
> https://lists.sr.ht/~sircmpwn/sr.ht-discuss/%3C1297c49c-7dab-466a-a036-3310a64284df%40disroot.org%3E#%3CC812KJ1OUDKW.259LO0RQ7C0IE@taiga%3E
>
> Thanks for the correction.
Reply to thread Export thread (mbox)