<div dir="ltr">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.<br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Nov 30, 2020 at 11:40 PM Andrew Hershberger <<a href="mailto:andrew.d.hershberger@gmail.com">andrew.d.hershberger@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">That works. I had to add it to KdTree.cpp as well. Agree that it's strange.</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Nov 30, 2020 at 9:17 PM Paul Ramsey <<a href="mailto:pramsey@cleverelephant.ca" target="_blank">pramsey@cleverelephant.ca</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br>
<br>
> On Nov 30, 2020, at 7:15 PM, Andrew Hershberger <<a href="mailto:andrew.d.hershberger@gmail.com" target="_blank">andrew.d.hershberger@gmail.com</a>> wrote:<br>
> <br>
> 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:<br>
> <br>
> $ sudo docker run -it --rm swift /bin/bash<br>
> # cd home<br>
> # git clone <a href="https://github.com/GEOSwift/GEOSwift.git" rel="noreferrer" target="_blank">https://github.com/GEOSwift/GEOSwift.git</a><br>
> # cd GEOSwift<br>
> # git checkout geos-3.9.0-testing<br>
> # swift test --enable-test-discovery -v<br>
> <br>
> Among other things, this yields the following line for LineLimiter.cpp:<br>
> <br>
> /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<br>
> <br>
> And this corresponding error:<br>
> <br>
> /home/GEOSwift/.build/checkouts/geos/Sources/geos/src/operation/overlayng/LineLimiter.cpp:121:24: error: no member named 'unique' in namespace 'std'<br>
>     ptList->erase(std::unique(ptList->begin(), ptList->end()), ptList->end());<br>
<br>
Add #include <algorithm><br>
to LineLimiter.cpp see if that helps?<br>
<br>
Not sure why only your version would have this problem. Maybe it's in different headers sometimes?<br>
<br>
<br>
>                   ~~~~~^<br>
> <br>
> Here's some clang version info:<br>
> <br>
> clang version 10.0.0 (git@github.com:apple/llvm-project.git 3093af41dd65ad466dcd5603e9289244edfee4f5)<br>
> Target: x86_64-unknown-linux-gnu<br>
> Thread model: posix<br>
> InstalledDir: /usr/bin<br>
> <br>
> Any idea what might be going on here?<br>
> <br>
> _______________________________________________<br>
> geos-devel mailing list<br>
> <a href="mailto:geos-devel@lists.osgeo.org" target="_blank">geos-devel@lists.osgeo.org</a><br>
> <a href="https://lists.osgeo.org/mailman/listinfo/geos-devel" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/geos-devel</a><br>
<br>
_______________________________________________<br>
geos-devel mailing list<br>
<a href="mailto:geos-devel@lists.osgeo.org" target="_blank">geos-devel@lists.osgeo.org</a><br>
<a href="https://lists.osgeo.org/mailman/listinfo/geos-devel" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/geos-devel</a><br>
</blockquote></div>
</blockquote></div>