Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 919177 - dev-db/spatialite-5.0.1-r2 - gg_advanced.c: error: implicit declaration of function gaiaSetGeosAuxErrorMsg_r
Summary: dev-db/spatialite-5.0.1-r2 - gg_advanced.c: error: implicit declaration of fu...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Sci-geo Project
URL: https://www.gaia-gis.it/fossil/libspa...
Whiteboard:
Keywords: PullRequest
Depends on:
Blocks: c99-porting gcc-14-stable
  Show dependency tree
 
Reported: 2023-12-04 18:37 UTC by Toralf Förster
Modified: 2025-02-10 09:34 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge-info.txt (emerge-info.txt,18.70 KB, text/plain)
2023-12-04 18:37 UTC, Toralf Förster
Details
dev-db:spatialite-5.0.1-r2:20231204-142000.log (dev-db:spatialite-5.0.1-r2:20231204-142000.log,28.65 KB, text/plain)
2023-12-04 18:37 UTC, Toralf Förster
Details
emerge-history.txt.xz (emerge-history.txt.xz,71.66 KB, application/x-xz)
2023-12-04 18:37 UTC, Toralf Förster
Details
environment (environment,25.45 KB, text/plain)
2023-12-04 18:37 UTC, Toralf Förster
Details
etc.clang.tar.xz (etc.clang.tar.xz,964 bytes, application/x-xz)
2023-12-04 18:37 UTC, Toralf Förster
Details
etc.portage.tar.xz (etc.portage.tar.xz,41.03 KB, application/x-xz)
2023-12-04 18:37 UTC, Toralf Förster
Details
logs.tar.xz (logs.tar.xz,10.86 KB, application/x-xz)
2023-12-04 18:37 UTC, Toralf Förster
Details
qlist-info.txt.xz (qlist-info.txt.xz,73.93 KB, application/x-xz)
2023-12-04 18:37 UTC, Toralf Förster
Details
temp.tar.xz (temp.tar.xz,11.61 KB, application/x-xz)
2023-12-04 18:37 UTC, Toralf Förster
Details
partial port to C23 (spatialite-5.1.0-C23.patch,3.65 KB, patch)
2025-01-06 15:20 UTC, NHO
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Toralf Förster gentoo-dev 2023-12-04 18:37:21 UTC
too long lines were shrinked:

/bin/sh ../../libtool  --tag=CC   --mode=compile x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I../../. -I../.././src/headers/spatialite  -I../../src/headers -O3 -pipe -march=native -fno-diagnostics-color -I/usr/include/libxml2    -O3 -pipe -march=native -fno-diagnostics-color -c -o gg_geometries.lo 
libtool: compile:  x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I../../. -I../.././src/headers/spatialite -I../../src/headers -O3 -pipe -march=native -fno-diagnostics-color -I/usr/include/libxml2 -O3 -pipe -march=native -fno-diagnostics-color -c gg_geodesic.c  -fPIC -DPIC -o .libs/gg_geodesic.o
libtool: compile:  x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I../../. -I../.././src/headers/spatialite -I../../src/headers -O3 -pipe -march=native -fno-diagnostics-color -I/usr/include/libxml2 -O3 -pipe -march=native -fno-diagnostics-color -c gg_advanced.c  -fPIC -DPIC -o .libs/gg_advanced.o
libtool: compile:  x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I../../. -I../.././src/headers/spatialite -I../../src/headers -O3 -pipe -march=native -fno-diagnostics-color -I/usr/include/libxml2 -O3 -pipe -march=native -fno-diagnostics-color -c gg_endian.c  -fPIC -DPIC -o .libs/gg_endian.o
libtool: compile:  x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I../../. -I../.././src/headers/spatialite -I../../src/headers -O3 -pipe -march=native -fno-diagnostics-color -I/usr/include/libxml2 -O3 -pipe -march=native -fno-diagnostics-color -c gg_geometries.c  -fPIC -DPIC -o .libs/gg_geometries.o
gg_advanced.c: In function 'gaiaIsToxic_r':
gg_advanced.c:2308:21: error: implicit declaration of function 'gaiaSetGeosAuxErrorMsg_r'; did you mean 'gaiaSetProjErrorMsg_r'? [-Wimplicit-function-declaration]
 2308 |                     gaiaSetGeosAuxErrorMsg_r
      |                     ^~~~~~~~~~~~~~~~~~~~~~~~

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

  This is an unstable amd64 chroot image at a tinderbox (==build bot)
  name: 17.1_no_multilib-20231127-152538

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

gcc-config -l:
 [1] x86_64-pc-linux-gnu-10
 [2] x86_64-pc-linux-gnu-14 *
clang/llvm (if any):
clang version 17.0.6
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/lib/llvm/17/bin
Configuration file: /etc/clang/x86_64-pc-linux-gnu-clang.cfg
/usr/lib/llvm/17
17.0.6
Python 3.11.6
Available Rust versions:
  [1]   rust-bin-1.73.0 *
The following VMs are available for generation-2:
1)	OpenJDK 17.0.8.1_p1 [openjdk-17]
2)	OpenJDK 21.0.1_p12 [openjdk-21]
3)	OpenJDK 8.382_p05 [openjdk-8]
4)	Eclipse Temurin JDK 17.0.8.1_p1 [openjdk-bin-17]
*)	Eclipse Temurin JDK 21.0.1_p12 [openjdk-bin-21]
Available Java Virtual Machines:
  [1]   openjdk-8 
  [2]   openjdk-17 
  [3]   openjdk-21 
  [4]   openjdk-bin-17 
  [5]   openjdk-bin-21  system-vm

The Glorious Glasgow Haskell Compilation System, version 9.2.8
php cli (if any):
go version go1.21.4 linux/amd64

  HEAD of ::gentoo
commit 5595c770b27ab2ef8d39d239965f7c4a992d1aa2
Author: Repository mirror & CI <repomirrorci@gentoo.org>
Date:   Mon Dec 4 14:02:03 2023 +0000

    2023-12-04 14:02:02 UTC

emerge -qpvO dev-db/spatialite
[ebuild  N    ] dev-db/spatialite-5.0.1-r2  USE="iconv proj xml -geos -rttopo -test -xls"
Comment 1 Toralf Förster gentoo-dev 2023-12-04 18:37:22 UTC
Created attachment 876728 [details]
emerge-info.txt
Comment 2 Toralf Förster gentoo-dev 2023-12-04 18:37:24 UTC
Created attachment 876729 [details]
dev-db:spatialite-5.0.1-r2:20231204-142000.log
Comment 3 Toralf Förster gentoo-dev 2023-12-04 18:37:25 UTC
Created attachment 876730 [details]
emerge-history.txt.xz
Comment 4 Toralf Förster gentoo-dev 2023-12-04 18:37:26 UTC
Created attachment 876731 [details]
environment
Comment 5 Toralf Förster gentoo-dev 2023-12-04 18:37:27 UTC
Created attachment 876732 [details]
etc.clang.tar.xz
Comment 6 Toralf Förster gentoo-dev 2023-12-04 18:37:28 UTC
Created attachment 876733 [details]
etc.portage.tar.xz
Comment 7 Toralf Förster gentoo-dev 2023-12-04 18:37:29 UTC
Created attachment 876734 [details]
logs.tar.xz
Comment 8 Toralf Förster gentoo-dev 2023-12-04 18:37:30 UTC
Created attachment 876735 [details]
qlist-info.txt.xz
Comment 9 Toralf Förster gentoo-dev 2023-12-04 18:37:31 UTC
Created attachment 876736 [details]
temp.tar.xz
Comment 10 NHO 2025-01-05 12:39:46 UTC
fixed in 5.1.0-r1
Comment 11 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2025-01-06 01:54:42 UTC
(In reply to NHO from comment #10)
> fixed in 5.1.0-r1

Huh, are you sure? I reported https://www.gaia-gis.it/fossil/libspatialite/tktview/d5c8f926be74723c7bea6d4886a54eb2daa892a2 against 5.1.0.
Comment 12 NHO 2025-01-06 12:48:56 UTC
No, I am not sure. Apparently, I built it with wrong USE flags.
Patch for the problem is to follow.
Comment 13 NHO 2025-01-06 13:12:59 UTC
alloc_cache.c: In function ‘spatialite_alloc_connection’:
alloc_cache.c:705:26: error: implicit declaration of function ‘pj_ctx_alloc’ [-Wimplicit-function-declaration]
  705 |     cache->PROJ_handle = pj_ctx_alloc ();
      |                          ^~~~~~~~~~~~
alloc_cache.c:705:24: error: assignment to ‘void *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
  705 |     cache->PROJ_handle = pj_ctx_alloc ();
      |                        ^
alloc_cache.c: In function ‘spatialite_alloc_connection’:
alloc_cache.c:705:26: error: implicit declaration of function ‘pj_ctx_alloc’ [-Wimplicit-function-declaration]
  705 |     cache->PROJ_handle = pj_ctx_alloc ();
      |                          ^~~~~~~~~~~~
alloc_cache.c:705:24: error: assignment to ‘void *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
  705 |     cache->PROJ_handle = pj_ctx_alloc ();


okay, that's an actual bug that also needs to be reported upstream
pj_ctx_alloc() was fine in proj 6 and 7, but from proj 8 they moved to proj_context_create(), if I'm reading code correctly.
Comment 14 NHO 2025-01-06 14:46:43 UTC
Now, for C23:
gg_sqlaux.c: In function ‘gaiaIsReservedSqliteName’:
gg_sqlaux.c:196:15: error: implicit declaration of function ‘strcasecmp’; did you mean ‘strncmp’? [-Wimplicit-function-declaration]
  196 |           if (strcasecmp (name, *pw) == 0)
      |               ^~~~~~~~~~
      |               strncmp
make[3]: *** [Makefile:419: gg_sqlaux.lo] Error 1 shuffle=1206148328
make[3]: *** Waiting for unfinished jobs....
gg_sqlaux.c: In function ‘gaiaIsReservedSqliteName’:
gg_sqlaux.c:196:15: error: implicit declaration of function ‘strcasecmp’; did you mean ‘strncmp’? [-Wimplicit-function-declaration]
  196 |           if (strcasecmp (name, *pw) == 0)
      |               ^~~~~~~~~~
      |               strncmp
Comment 15 NHO 2025-01-06 15:17:37 UTC
That is fixed with autoreconf
But I can't fix this:
In file included from gg_vanuatu.c:1824:
lex.VanuatuWkt.c: In function 'VanuatuWkt_init_buffer':
lex.VanuatuWkt.c:1861:48: error: implicit declaration of function 'fileno' [-Wimplicit-function-declaration]
 1861 |         b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
      |  

It's autogenerated file that's apparently not regenerated, but I can't appear to find a good place to put #define _POSIX_C_SOURCE anywhere. It still imports stdio.h somewhere without fileno()
Partial C23 patch attached.
Comment 16 NHO 2025-01-06 15:20:02 UTC
Created attachment 915991 [details, diff]
partial port to C23
Comment 17 Andreas Sturmlechner gentoo-dev 2025-01-10 17:21:36 UTC
(In reply to NHO from comment #16)
> Created attachment 915991 [details, diff] [details, diff]
> partial port to C23

Is this patch submitted upstream? If not, please do, and add the upstream reference in the patch file.
Comment 19 Larry the Git Cow gentoo-dev 2025-02-10 09:13:58 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1e5c143b1d6f57d4fc3c55bbe9aad3d2eb46c298

commit 1e5c143b1d6f57d4fc3c55bbe9aad3d2eb46c298
Author:     NHOrus <jy6x2b32pie9@yahoo.com>
AuthorDate: 2025-01-06 14:20:21 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2025-02-10 09:13:17 +0000

    dev-db/spatialite: fix compile errors
    
    Upstream forgot to:
    1. remove usage of functions whose existence depends on USE=geos
    2. add modern interfaces for PROJ.6+ in all places where fallback
    to PROJ.4 existed.
    
    Bug: https://bugs.gentoo.org/919177
    Signed-off-by: NHOrus <jy6x2b32pie9@yahoo.com>
    Closes: https://github.com/gentoo/gentoo/pull/40009
    Signed-off-by: Sam James <sam@gentoo.org>

 .../files/spatialite-5.1.0-macro-surgery.patch     | 80 ++++++++++++++++++++++
 dev-db/spatialite/spatialite-5.1.0-r2.ebuild       | 63 +++++++++++++++++
 2 files changed, 143 insertions(+)