Bug 226838

Summary: math/pdal: Build fails with PYTHON=off
Product: Ports & Packages Reporter: Yuri Victorovich <yuri>
Component: Individual Port(s)Assignee: freebsd-ports-bugs (Nobody) <ports-bugs>
Status: Closed Works As Intended    
Severity: Affects Only Me CC: dan, lbartoletti, w.schwarzenfeld
Priority: --- Flags: bugzilla: maintainer-feedback? (lbartoletti)
Version: Latest   
Hardware: Any   
OS: Any   
URL: https://github.com/PDAL/PDAL/issues/1867
See Also: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=226401

Description Yuri Victorovich freebsd_committer freebsd_triage 2018-03-22 02:12:33 UTC
-- Found GDAL: /usr/local/lib/libgdal.so (Required is at least version "1.9.0")
-- Found GeoTIFF: /usr/local/lib/libgeotiff.so  
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Found Threads: TRUE  
-- Found ZLIB: /usr/lib/libz.so (found version "1.2.11") 
-- Found JSONCPP: /usr/local/lib/libjsoncpp.so (Required is at least version "1.6.2") 
-- Found LibXml2: /usr/local/lib/libxml2.so (found version "2.9.7") 
-- Numpy output: 
CMake Error at /usr/local/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:137 (message):
  Could NOT find NumPy (missing: NUMPY_VERSION NUMPY_INCLUDE_DIR) (Required
  is at least version "1.5")
Call Stack (most recent call first):
  /usr/local/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:378 (_FPHSA_FAILURE_MESSAGE)
  cmake/modules/FindNumPy.cmake:32 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
  cmake/python.cmake:16 (find_package)
  CMakeLists.txt:124 (include)


-- Configuring incomplete, errors occurred!
Comment 1 Walter Schwarzenfeld freebsd_triage 2018-03-22 07:18:29 UTC
I had an other "effect" or "issue" (version 1.6.2).
If I turn off python output shows:

===>  Building for pdal-1.6_2
[1/388] /usr/local/libexec/ccache/world/c++  -DHAVE_PYTHON=1 
                                                                      ^^^^^^^^^^^^^^^^^^^^^
-DPDAL_PYTHON_LIBRARY=\"/usr/local/lib/libpython2.7.so\" -DUNIX -I/ram/usr/ports/math/pdal/work/PDAL-1.6/vendor/gtest/include -I/ram/usr/ports/math/pdal/work/PDAL-1.6/vendor/gtest -I/ram/usr/ports/math/pdal/work/PDAL-1.6 -isystem /usr/local/include -I/usr/local/include/jsoncpp -isystem /usr/local/include/python2.7 -isystem /usr/local/lib/python2.7/site-packages/numpy/core/include -O2 -pipe -fstack-protector -fno-strict-aliasing  -D_GLIBCXX_USE_C99 -O2 -pipe -fstack-protector -fno-strict-aliasing  -D_GLIBCXX_USE_C99   -std=c++11 -Wextra -Wall -Wno-unused-parameter -Wno-unused-variable -Wpointer-arith -Wcast-align -Wcast-qual -Wredundant-decls -Wno-long-long -Wno-unknown-pragmas -Wno-deprecated-declarations -MD -MT dimbuilder/CMakeFiles/dimbuilder.dir/DimBuilder.cpp.o -MF 


Seems python is not "off".
Comment 2 Dan Lukes 2018-03-22 09:02:09 UTC
(In reply to w.schwarzenfeld from comment #1)
Unless I misunderstood PDAL documentation, the python option doesn't mean the python is not required during build. It mean the python-related stuff is not created during build (e.g. PDAL build require python all the time, but it may not depend on p0ythin at runtime).

Ports PDAL Makefile seems not to take it correctly.
Comment 3 Dan Lukes 2018-03-22 09:05:55 UTC
(In reply to Yuri Victorovich from comment #0)
Just note that the error you mentioned is not only fired with PYTHON=off, but also with PYTHON=on and system configured to use Python 3.x as default. Even in the case the py36-numpy is installed.
Comment 4 Yuri Victorovich freebsd_committer freebsd_triage 2018-03-22 09:06:01 UTC
(In reply to Dan Lukes from comment #2)

But it looks for numpy which is a very special python package. If python isn't built there should be no need for numpy.
Comment 5 Yuri Victorovich freebsd_committer freebsd_triage 2018-03-22 09:18:21 UTC
Actually, python bindings should be in separate ports. They can be for different python versions.
Comment 6 Loïc Bartoletti freebsd_committer freebsd_triage 2018-05-22 16:52:40 UTC
Should be OK with #228427
(I will prepare a python version after)
Comment 7 Walter Schwarzenfeld freebsd_triage 2019-02-12 17:02:03 UTC
ping! resp. is this still relevant?
Comment 8 Yuri Victorovich freebsd_committer freebsd_triage 2019-02-12 20:42:49 UTC
(In reply to w.schwarzenfeld from comment #7)

pdal-1.7.2_6 does't fail wit PTO=off any more.
Comment 9 Yuri Victorovich freebsd_committer freebsd_triage 2019-02-12 20:43:49 UTC
(In reply to Yuri Victorovich from comment #8)

* pdal-1.7.2_6 doesn't fail with PYTHON=off any more.