On 2019/04/24 02:14, Landry Breuil wrote:
> CVSROOT: /cvs
> Module name: ports
> Changes by: [email protected] 2019/04/24 02:14:17
>
> Modified files:
> geo/pdal : Makefile distinfo
> geo/pdal/patches: patch-cmake_macros_cmake
> geo/pdal/pkg : PLIST
> Added files:
> geo/pdal/patches: patch-vendor_arbiter_arbiter_hpp
> Removed files:
> geo/pdal/patches: patch-cmake_modules_FindGEOS_cmake
> patch-dimbuilder_CMakeLists_txt
> patch-pdal_PluginDirectory_cpp
> patch-pdal_util_CMakeLists_txt
> patch-pdal_util_Utils_cpp
> patch-plugins_sqlite_io_SQLiteCommon_hpp
> patch-test_unit_PluginManagerTest_cpp
>
> Log message:
> Update to pdal 1.9.0.
>
> Should build fine with python 3.7.
>
This breaks on i386 in a source file for tests,
test/unit/filters/DelaunayFilterTest.cpp,
88 // Loop through the triangles of the generated mesh...
89 for (size_t i = 0; i < mesh->size(); i++)
90 {
91 Triangle triangle = (*mesh)[i];
92
93 // Build a vector so we can compare to an expected triangle with
94 // the == operator.
95 std::vector<size_t> triangleVector = {triangle.m_a,
triangle.m_b, triangle.m_c};
96
/usr/obj/ports/pdal-1.9.0/PDAL-1.9.0-src/test/unit/filters/DelaunayFilterTest.cpp:95:47:
error: non-constant-expressio
n cannot be narrowed from type 'pdal::PointId' (aka 'unsigned long long') to
'unsigned long' in initializer list [-Wc+
+11-narrowing]
std::vector<size_t> triangleVector = {triangle.m_a, triangle.m_b,
triangle.m_c};
^~~~~~~~~~~~
/usr/obj/ports/pdal-1.9.0/PDAL-1.9.0-src/test/unit/filters/DelaunayFilterTest.cpp:95:47:
note: insert an explicit cast
to silence this issue
std::vector<size_t> triangleVector = {triangle.m_a, triangle.m_b,
triangle.m_c};
^~~~~~~~~~~~
static_cast<unsigned long>( )
/usr/obj/ports/pdal-1.9.0/PDAL-1.9.0-src/test/unit/filters/DelaunayFilterTest.cpp:95:61:
error: non-constant-expressio
n cannot be narrowed from type 'pdal::PointId' (aka 'unsigned long long') to
'unsigned long' in initializer list [-Wc+
+11-narrowing]
std::vector<size_t> triangleVector = {triangle.m_a, triangle.m_b,
triangle.m_c};
^~~~~~~~~~~~
/usr/obj/ports/pdal-1.9.0/PDAL-1.9.0-src/test/unit/filters/DelaunayFilterTest.cpp:95:61:
note: insert an explicit cast
to silence this issue
std::vector<size_t> triangleVector = {triangle.m_a, triangle.m_b,
triangle.m_c};
^~~~~~~~~~~~
static_cast<unsigned long>( )
/usr/obj/ports/pdal-1.9.0/PDAL-1.9.0-src/test/unit/filters/DelaunayFilterTest.cpp:95:75:
error: non-constant-expressio
n cannot be narrowed from type 'pdal::PointId' (aka 'unsigned long long') to
'unsigned long' in initializer list [-Wc+
+11-narrowing]
std::vector<size_t> triangleVector = {triangle.m_a, triangle.m_b,
triangle.m_c};
^~~~~~~~~~~~
/usr/obj/ports/pdal-1.9.0/PDAL-1.9.0-src/test/unit/filters/DelaunayFilterTest.cpp:95:75:
note: insert an explicit cast
to silence this issue
std::vector<size_t> triangleVector = {triangle.m_a, triangle.m_b,
triangle.m_c};
^~~~~~~~~~~~
static_cast<unsigned long>( )
3 errors generated.
Dirty fix here, or does someone have a better idea?
Index: Makefile
===================================================================
RCS file: /cvs/ports/geo/pdal/Makefile,v
retrieving revision 1.8
diff -u -p -r1.8 Makefile
--- Makefile 24 Apr 2019 08:14:17 -0000 1.8
+++ Makefile 27 Apr 2019 15:47:06 -0000
@@ -46,4 +46,11 @@ CONFIGURE_ARGS = \
# needs load extension
# -DBUILD_PLUGIN_SQLITE=ON
+.include <bsd.port.arch.mk>
+.if ${PROPERTIES:Mclang}
+CXXFLAGS += -Wno-c++11-narrowing
+# fails on 32-bit otherwise:
+# test/unit/filters/DelaunayFilterTest.cpp:95:47: error:
non-constant-expression cannot be narrowed from type 'pdal::PointId' (aka
'unsigned long long') to 'unsigned long' in initializer list [-Wc++11-narrowing]
+.endif
+
.include <bsd.port.mk>