[geos-devel] 3.9.0beta + GEOSwift + Linux

Andrew Hershberger andrew.d.hershberger at gmail.com
Tue Dec 1 10:48:30 PST 2020


In case anyone is interested, here's the thread I started on the Swift
forums: https://forums.swift.org/t/confused-about-cxxlanguagestandard/42402

On Tue, Dec 1, 2020 at 12:13 AM Andrew Hershberger <
andrew.d.hershberger at gmail.com> wrote:

> Seems like the macOS builds are getting their <vector> from llvm's libc++
> but that the build in the Swift Docker container is using the GNU C++.
> LLVM's vector
> (Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/vector)
> imports algorithm. The GNU C++ version doesn't (at least not directly). I
> find this Swift Package Manager behavior on Linux strange because the
> GEOSwift/geos package definition specifically requests "cxx11" (as opposed
> to "gnucxx11"). I'll see whether someone from the Swift team can shed
> some light on what's going on here.
>
> On Mon, Nov 30, 2020 at 11:40 PM Andrew Hershberger <
> andrew.d.hershberger at gmail.com> wrote:
>
>> That works. I had to add it to KdTree.cpp as well. Agree that it's
>> strange.
>>
>> On Mon, Nov 30, 2020 at 9:17 PM Paul Ramsey <pramsey at cleverelephant.ca>
>> wrote:
>>
>>>
>>>
>>> > On Nov 30, 2020, at 7:15 PM, Andrew Hershberger <
>>> andrew.d.hershberger at gmail.com> wrote:
>>> >
>>> > Found another issue with the beta when testing GEOSwift on Linux
>>> (specifically, compiling in a Docker container using the Swift Docker
>>> image). Here's what I'm doing:
>>> >
>>> > $ sudo docker run -it --rm swift /bin/bash
>>> > # cd home
>>> > # git clone https://github.com/GEOSwift/GEOSwift.git
>>> > # cd GEOSwift
>>> > # git checkout geos-3.9.0-testing
>>> > # swift test --enable-test-discovery -v
>>> >
>>> > Among other things, this yields the following line for LineLimiter.cpp:
>>> >
>>> > /usr/bin/clang -target x86_64-unknown-linux-gnu -fPIC -g -O0
>>> -DSWIFT_PACKAGE=1 -DDEBUG=1 -fblocks -fmodules -fmodule-name=geos -I
>>> /home/GEOSwift/.build/checkouts/geos/Sources/geos/public
>>> -fmodules-cache-path=/home/GEOSwift/.build/x86_64-unknown-linux-gnu/debug/ModuleCache
>>> -DUSE_UNSTABLE_GEOS_CPP_API
>>> -I/home/GEOSwift/.build/checkouts/geos/Sources/geos/include -MD -MT
>>> dependencies -MF
>>> /home/GEOSwift/.build/x86_64-unknown-linux-gnu/debug/geos.build/src/operation/overlayng/LineLimiter.cpp.d
>>> -std=c++11 -c
>>> /home/GEOSwift/.build/checkouts/geos/Sources/geos/src/operation/overlayng/LineLimiter.cpp
>>> -o
>>> /home/GEOSwift/.build/x86_64-unknown-linux-gnu/debug/geos.build/src/operation/overlayng/LineLimiter.cpp.o
>>> >
>>> > And this corresponding error:
>>> >
>>> >
>>> /home/GEOSwift/.build/checkouts/geos/Sources/geos/src/operation/overlayng/LineLimiter.cpp:121:24:
>>> error: no member named 'unique' in namespace 'std'
>>> >     ptList->erase(std::unique(ptList->begin(), ptList->end()),
>>> ptList->end());
>>>
>>> Add #include <algorithm>
>>> to LineLimiter.cpp see if that helps?
>>>
>>> Not sure why only your version would have this problem. Maybe it's in
>>> different headers sometimes?
>>>
>>>
>>> >                   ~~~~~^
>>> >
>>> > Here's some clang version info:
>>> >
>>> > clang version 10.0.0 (git at github.com:apple/llvm-project.git
>>> 3093af41dd65ad466dcd5603e9289244edfee4f5)
>>> > Target: x86_64-unknown-linux-gnu
>>> > Thread model: posix
>>> > InstalledDir: /usr/bin
>>> >
>>> > Any idea what might be going on here?
>>> >
>>> > _______________________________________________
>>> > geos-devel mailing list
>>> > geos-devel at lists.osgeo.org
>>> > https://lists.osgeo.org/mailman/listinfo/geos-devel
>>>
>>> _______________________________________________
>>> geos-devel mailing list
>>> geos-devel at lists.osgeo.org
>>> https://lists.osgeo.org/mailman/listinfo/geos-devel
>>>
>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/geos-devel/attachments/20201201/980c6552/attachment-0001.html>


More information about the geos-devel mailing list