On Sat, 22 Feb 2025 23:36:45 -0800 (PST), Tobias Schula wrote:
> Hi everyone,
>
> I'm trying to compile spatialite-gui on an up-to-date Tumbleweed
> installation. Opensuse provides all the dependencies, I just had to
> compile librasterlite2 and VirtualPG.
>
> Now, `configure` runs into a warning:
>> checking for pg_config... /usr/bin/pg_config> checking libpq-fe.h
> usability... yes
>> checking libpq-fe.h presence... no
>> configure: WARNING: libpq-fe.h: accepted by the compiler, rejected
> by the preprocessor!
>> configure: WARNING: libpq-fe.h: proceeding with the compiler's
> result
>> checking for libpq-fe.h... yes
>
Hi Tobias,
this is not an error, it's simply a completely harmless warning that
does not cause any discomfort.
it's completely normal that during configuration the compiler and the
processor have conflicting opinions, but this has no consequences
because it's enough that only one of the two is able to understand
where the searched package is.
libpq-fe.h has nothing to do with your issue, it has been correctly
configured; the real problem is the following one.
> Dialogs.cpp:2321:24: error: cannot convert ‘wxString’ to
> ‘const char*’
>> 2321 | dbf = gaiaOpenZipDbf(ZipPath, filename, charset,
> "UTF-8");
>
It's precisely this fatal error that prevents the Dialogs.cpp
source from being compiled.
Your compiler reports a prohibited type conversion.
In my personal experience gained on Winows (minGW) and on Linux
(both Debian and Fedora) the g++ compiler, even the most recent
versions, have never reported anything odd for that instruction,
but on OpenSuse things could be different.
This is actually a someway "dirty" statement that is not entirely
correct, but which is very simple to fix.
open some text editor, go to line 2321 and just replace
"ZipPath" with "zip_path"; save and exit, the try again
to build ... it should finally work.
note: it would simply seem like a trivial oversight in
writing the code, given that the "zip_path" variable is
correctly set up but is then never used.
bye Sandro