Librasterlite2

78 views
Skip to first unread message

Caiden Kehrer

unread,
Aug 12, 2022, 5:38:49 PM8/12/22
to SpatiaLite Users
Compiling gives errors on windows using mingw.
 
checking for jpeglib.h... no
configure: error: cannot find jpeglib.h, bailing out.

Does anyone have a better step-by-step for a beginner trying to get the c libraries compiled? I am trying to just get these compiled so I can use them in a sqlite database. I have been stuck for a very long time trying to get this to compile. OR is there a place I can get the pre-compiled versions of librasterlite2 spatialite and any other libraries? 

Chris Smith

unread,
Aug 12, 2022, 10:10:01 PM8/12/22
to SpatiaLite Users
It appears that libjpeg sources are available here:


But this is the "detective" challenge of the do-it-yourself approach.

One good means of leveling up that I recommend to all, if you have enough resources for a VirtualBox instance, is to do a https://linuxfromscratch.org/lfs/ project.

This is completely off-topic from your question, but will be a boon to your skillz.

Cheers,
Chris

a.fu...@lqt.it

unread,
Aug 13, 2022, 12:38:43 AM8/13/22
to spatiali...@googlegroups.com
On Fri, 12 Aug 2022 19:10:01 -0700 (PDT), Chris Smith wrote:
> It appears that libjpeg sources are available here:
>
> https://sourceforge.net/projects/libjpeg/files/libjpeg/6b/
>

wrong: this is very outdated and really slow old implementation

a much better and more modern option is libjpeg-turbo:

https://sourceforge.net/projects/libjpeg-turbo/files/


> But this is the "detective" challenge of the do-it-yourself approach.
>

there is absolutely no need to face any "detective" challenge;
you simply have to follow the very detailed and regularly updated
instructions for building on Windows/MinGW the whole SpatiaLite
and RasterLite2 stack that you can read from here:

32 bit: https://www.gaia-gis.it/gaia-sins/mingw32_how_to.html
64 bit: https://www.gaia-gis.it/gaia-sins/mingw64_how_to.html

bye Sandro

Chris Smith

unread,
Aug 13, 2022, 8:30:29 AM8/13/22
to SpatiaLite Users
Sandro,
  Thank you for the correction, sir.
Cheers,
Chris

Caiden Kehrer

unread,
Aug 15, 2022, 12:15:10 PM8/15/22
to SpatiaLite Users
Do you have to build them in those steps. I only need librasterlite2 at the moment. Do I need to go through all the steps for all the other builds as well?

Caiden 

a.fu...@lqt.it

unread,
Aug 15, 2022, 1:18:12 PM8/15/22
to spatiali...@googlegroups.com
On Mon, 15 Aug 2022 09:15:09 -0700 (PDT), Caiden Kehrer wrote:
> Do you have to build them in those steps. I only need librasterlite2
> at the moment. Do I need to go through all the steps for all the
> other
> builds as well?
>


Hi Caiden,

librasterlite2 has a lot of dependecies.
mixing at random binary code built adopting different configurations,
may be of different generations/versions and (pure horror) compiled
by different compilers is an almost sure recipe for disasters
(most notably on Windows if you are planning to use DLLs).

let's quickly see the minimal set of packages required by
rasterlite2:

- libiconv: required by libspatialite
- libz: required by both libspatialite and librasterlite2
- libjpeg: required by librasterlite2
- libpng: required by librasterlite2
- giflib: required by librasterlite2
- liblzma: required by librasterlite2
- liblz4: required by librasterlite2
- libzstd: required by librasterlite2
- libtiff: required by both libproj and librasterlite2
- libwebp: required by librasterlite2
- libsqlite: required by both libspatialite and librasterlite2
- OpenSSL: required by librasterlite2
- libcurl: required by librasterlite2
- libproj: required by libspatialite
- libgeotiff: required by librasterlite2
- libgeos: required by libspatialite
- libexpat: required by both libspatialite and librasterlite2
- minizip: required by libspatialite
- FreeXL: required by libspatialite
- libxml2: required by both libspatialite and librasterlite2
- librttopo: required by libspatialite
- libspatialite: required by librasterlite2
- libfreetype: required by libcairo
- libfontconfig: required by libcairo
- libpixman: required by libcairo
- libcairo: required by librasterlite2
- lcms2: required by OpenJpeg
- OpenJpeg-2: required by librasterlite2
- Leptonica: required by librasterlite2

well, after building and installing all these libraries
you'll finally be ready for building libstasterlite2
having the certainty that everything has been produced
by the same compiler in the same way, so to be sure that
everything can safely run together without triggering
conflicts or instabilities.

bye Sandro

Caiden Kehrer

unread,
Aug 15, 2022, 6:01:09 PM8/15/22
to SpatiaLite Users
Ok so I have changed to trying to do this on ubuntu when I run ./configure now I get this error  "error: 'libopenjp2' (v2.1 or later) is required but it doesn't seem to be installed on this system."

However, I have run apt install for libopenjp2-7-dev as well as libopenjp2-7. Is there a different library I am not installing correctly? 

Caiden

a.fu...@lqt.it

unread,
Aug 16, 2022, 12:48:35 AM8/16/22
to spatiali...@googlegroups.com
On Mon, 15 Aug 2022 15:01:08 -0700 (PDT), Caiden Kehrer wrote:
> Ok so I have changed to trying to do this on ubuntu when I run
> ./configure now I get this error "error: 'libopenjp2' (v2.1 or later)
> is required but it doesn't seem to be installed on this system."
>
> However, I have run apt install for libopenjp2-7-dev as well as
> libopenjp2-7. Is there a different library I am not installing
> correctly?
>

Hi Caiden,

I'm not an Ubuntu user, so I've checked on Debian assuming that
the packages should be the same because both Debian and Ubuntu
adopt the same packaging system based on apt-get.

yes, libopenjp2-7 and libopenjp2-7-dev are the right packages
supporting OpenJpeg-2 on these systems.

but the ./configure script deployed by libraserlite2 strictly
depends on pkg-config, an helper tool that you probably
have not installed (or configured incorrectly).

you can check it directly by running the following command
from the shell:

pgk-config --libs --cflags libopenjp2

the expected output is something like this:

-I/usr/include/openjpeg-2.4 -lopenjp2

-------------------------------------------

a) if it actually works then I've no idea why the
./configure script of librasterlite2 is failing
because it should positively work

b) if it fails then the error message will help
you to undestand why this is happening.

bye Sandro

Caiden Kehrer

unread,
Aug 16, 2022, 11:43:20 AM8/16/22
to spatiali...@googlegroups.com

Thank you all for your help! I am getting so much closer with this.

 

Caiden Kehrer

--

You received this message because you are subscribed to a topic in the Google Groups "SpatiaLite Users" group.

To unsubscribe from this topic, visit https://groups.google.com/d/topic/spatialite-users/CL4yXjhvmO4/unsubscribe.

To unsubscribe from this group and all its topics, send an email to spatialite-use...@googlegroups.com.

To view this discussion on the web visit https://groups.google.com/d/msgid/spatialite-users/a58397202cb9228462f6b3eded7c5b40%40lqt.it.

 

Reply all
Reply to author
Forward
0 new messages