Bug 257340 - math/adol-c fails to stage with python 2.7 installed
Summary: math/adol-c fails to stage with python 2.7 installed
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Yuri Victorovich
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-07-22 17:49 UTC by alt2600
Modified: 2021-07-22 19:15 UTC (History)
0 users

See Also:
bugzilla: maintainer-feedback? (yuri)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description alt2600 2021-07-22 17:49:05 UTC
Basically the autoconfigure finds the first instance of python you have and tries to build the swig interfaces for the library. It seems we do not want the python interfaces based on no USES=python directive in the make. I tried to disable by adding --disable-python and then --disable-swig into CONFIGURE_ARGS but it doesn't accept these as options. I think this requires patching out python in the configure.ac file to skip these checks. I have python 2.7 as a couple things still need a limited install of it, but I don't have py27-swig. I'm not sure how to patch python out, or if its better to just make it USES=python3+ . ADOL-C wants python 2.7 first in the search, and even if PYTHON environment isn't set, which I confirmed with make -v PYTHON it finds it by checking known executable names of python. I will try some other things and post a patch if i can figure something out, but not sure which way the maintainer wants to go with python as a dependency here.


 /bin/mkdir -p '/usr/ports/math/adol-c/work/stage/usr/local/include/adolc'
 install  -m 0644 adolc.h adalloc.h adouble.h adutils.h adutilsc.h convolut.h fortutils.h interfaces.h taping.h externfcts.h checkpointing.h fixpoint.h adolc_sparse.h adolc_openmp.h revolve.h advector.h adolc_fatalerror.h adtl.h adtl_indo.h adtl_hov.h adoublecuda.h param.h externfcts2.h edfclasses.h '/usr/ports/math/adol-c/work/stage/usr/local/include/adolc'
gmake[8]: Leaving directory '/usr/ports/math/adol-c/work/ADOL-C-2.7.2/ADOL-C/include/adolc'
gmake[7]: Leaving directory '/usr/ports/math/adol-c/work/ADOL-C-2.7.2/ADOL-C/include/adolc'
gmake[6]: Leaving directory '/usr/ports/math/adol-c/work/ADOL-C-2.7.2/ADOL-C/include/adolc'
gmake[6]: Entering directory '/usr/ports/math/adol-c/work/ADOL-C-2.7.2/ADOL-C/include'
gmake[7]: Entering directory '/usr/ports/math/adol-c/work/ADOL-C-2.7.2/ADOL-C/include'
gmake[7]: Nothing to be done for 'install-exec-am'.
gmake[7]: Nothing to be done for 'install-data-am'.
gmake[7]: Leaving directory '/usr/ports/math/adol-c/work/ADOL-C-2.7.2/ADOL-C/include'
gmake[6]: Leaving directory '/usr/ports/math/adol-c/work/ADOL-C-2.7.2/ADOL-C/include'
gmake[5]: Leaving directory '/usr/ports/math/adol-c/work/ADOL-C-2.7.2/ADOL-C/include'
Making install in swig
gmake[5]: Entering directory '/usr/ports/math/adol-c/work/ADOL-C-2.7.2/ADOL-C/swig'
CXX=c++ /usr/local/bin/python2.7 setup.py install --prefix=/usr/local --only-swig
Traceback (most recent call last):
  File "setup.py", line 15, in <module>
    from numpy.distutils import misc_util as np_dist
ImportError: No module named numpy.distutils
gmake[5]: *** [Makefile:490: install] Error 1
gmake[5]: Leaving directory '/usr/ports/math/adol-c/work/ADOL-C-2.7.2/ADOL-C/swig'
gmake[4]: *** [Makefile:554: install-recursive] Error 1
gmake[4]: Leaving directory '/usr/ports/math/adol-c/work/ADOL-C-2.7.2/ADOL-C'
gmake[3]: *** [Makefile:711: install] Error 2
gmake[3]: Leaving directory '/usr/ports/math/adol-c/work/ADOL-C-2.7.2/ADOL-C'
gmake[2]: *** [Makefile:537: install-recursive] Error 1
gmake[2]: Leaving directory '/usr/ports/math/adol-c/work/ADOL-C-2.7.2'
gmake[1]: *** [Makefile:841: install-strip] Error 2
gmake[1]: Leaving directory '/usr/ports/math/adol-c/work/ADOL-C-2.7.2'
*** Error code 2

Stop.
make: stopped in /usr/ports/math/adol-c
Comment 1 Yuri Victorovich freebsd_committer 2021-07-22 19:14:53 UTC
Fix committed. Thanks for reporting.

Please reopen if the issue isn't fixed (I wasn't able to reproduce).
Comment 2 commit-hook freebsd_committer 2021-07-22 19:15:32 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=198238af45447fc3a00918748a7fdfaece348686

commit 198238af45447fc3a00918748a7fdfaece348686
Author:     Yuri Victorovich <yuri@FreeBSD.org>
AuthorDate: 2021-07-22 19:00:06 +0000
Commit:     Yuri Victorovich <yuri@FreeBSD.org>
CommitDate: 2021-07-22 19:14:58 +0000

    math/adol-c: Add build-time python dependency

    Otherwise it was picking python-2.7 when it was installed.

    PR:             257340
    Reported by:    alt2600@icloud.com

 math/adol-c/Makefile | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)