macdrevx
(Andrew Hershberger)
September 27, 2024, 11:56pm
1
Not sure what's going on with this one. Do we have to do something new to see types from stdint when building c/c++ projects with Swift Package Manager in Swift 6?
opened 12:31PM - 24 Sep 24 UTC
I'm hosting a Swift app on Heroku using Vapor.
From `Heroku-22` onwards the *… *GEOSwift** package produces the following build errors:
```
[51/1747] Compiling HilbertCode.cpp
In file included from /tmp/build_610d96f0/.build/checkouts/geos/Sources/geos/src/shape/fractal/HilbertEncoder.cpp:15:
/tmp/build_610d96f0/.build/checkouts/geos/Sources/geos/include/geos/shape/fractal/HilbertEncoder.h:40:20: error: unknown type name 'uint32_t'
HilbertEncoder(uint32_t p_level, geom::Envelope& extent);
^
/tmp/build_610d96f0/.build/checkouts/geos/Sources/geos/include/geos/shape/fractal/HilbertEncoder.h:41:5: error: unknown type name 'uint32_t'
uint32_t encode(const geom::Envelope* env);
^
/tmp/build_610d96f0/.build/checkouts/geos/Sources/geos/include/geos/shape/fractal/HilbertEncoder.h:46:5: error: unknown type name 'uint32_t'
uint32_t level;
^
/tmp/build_610d96f0/.build/checkouts/geos/Sources/geos/src/shape/fractal/HilbertEncoder.cpp:29:17: error: out-of-line definition of 'HilbertEncoder' does not match any declaration in 'geos::shape::fractal::HilbertEncoder'
HilbertEncoder::HilbertEncoder(uint32_t p_level, geom::Envelope& extent)
^~~~~~~~~~~~~~
/tmp/build_610d96f0/.build/checkouts/geos/Sources/geos/src/shape/fractal/HilbertEncoder.cpp:86:20: error: no matching constructor for initialization of 'HilbertEncoder'
HilbertEncoder encoder(12, extent);
^ ~~~~~~~~~~
/tmp/build_610d96f0/.build/checkouts/geos/Sources/geos/include/geos/shape/fractal/HilbertEncoder.h:36:16: note: candidate constructor (the implicit copy constructor) not viable: requires 1 argument, but 2 were provided
class GEOS_DLL HilbertEncoder {
^
/tmp/build_610d96f0/.build/checkouts/geos/Sources/geos/include/geos/shape/fractal/HilbertEncoder.h:36:16: note: candidate constructor (the implicit move constructor) not viable: requires 1 argument, but 2 were provided
/tmp/build_610d96f0/.build/checkouts/geos/Sources/geos/include/geos/shape/fractal/HilbertEncoder.h:36:16: note: candidate constructor (the implicit default constructor) not viable: requires 0 arguments, but 2 were provided
5 errors generated.
```
Repro on Swift 6 compiler, swift-tools-version:5.5, Ubuntu 2404:
macdrevx
(Andrew Hershberger)
September 28, 2024, 12:16am
2
I should add that the file in question: geos/Sources/geos/include/geos/shape/fractal/HilbertEncoder.h at f510e634c822116fca615064d889300dba40d761 · GEOSwift/geos · GitHub
does not include stdint, so maybe that's the problem, but I'm curious to understand why this problem wasn't occurring in older versions of swift.