maintainer-feedback requested: [Bug 257396] math/py-numpy typo in ATLAS option forces use of lapack instead of alapack

From: <bugzilla-noreply_at_freebsd.org>
Date: Sat, 24 Jul 2021 20:34:36 UTC
Bugzilla Automation <bugzilla@FreeBSD.org> has asked freebsd-python (Nobody)
<python@FreeBSD.org> for maintainer-feedback:
Bug 257396: math/py-numpy typo in ATLAS option forces use of lapack instead of
alapack
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=257396



--- Description ---
Not sure if this is intended or not but if the ATLAS option is taken the lapack
lib in the ATLAS_VARS as the string defines to use alpack for lapack library,
but it should be alapack, see output of configure. I only ask and post as I
have used the framework of this numpy port to get scipy building with other
blas libraries using the same mechanisms to dynamically set site.cfg, and it
seems to work, but I noticed it was not using the Atlas libalapack libraries
but instead saying it is using atlas wihtout atlas lapack and defaulting back
to normal lapack. Just want to make sure this is a typo and intent is to use
the atlas lapack version for the ATLAS option. see below and attached patch. I
just want to make sure I prepare the best version for the scipy patch I am
preparing by checking this first. in both cases numpy builds with no orphans.


###Unpatched Uses lapack

creating /tmp/tmplnipbtve/tmp
creating /tmp/tmplnipbtve/tmp/tmplnipbtve
compile options: '-MMD -MF /tmp/tmplnipbtve/file.c.d -c'
cc: /tmp/tmplnipbtve/file.c
  FOUND:
    libraries = ['lapack', 'lapack']
    library_dirs = ['/usr/local/lib']
    language = f77

  FOUND:
    include_dirs = ['/usr/local/include']
    language = f77
    libraries = ['ptf77blas', 'ptcblas', 'lapack', 'lapack']
    library_dirs = ['/usr/local/lib']
    define_macros = [('ATLAS_WITHOUT_LAPACK', None)]

/usr/local/lib/python3.8/distutils/dist.py:274: UserWarning: Unknown
distribution option: 'define_macros'
  warnings.warn(msg)
running config


###With Patch use Atlas's lapack

creating /tmp/tmpebgjdj2s/tmp
creating /tmp/tmpebgjdj2s/tmp/tmpebgjdj2s
compile options: '-MMD -MF /tmp/tmpebgjdj2s/file.c.d -c'
cc: /tmp/tmpebgjdj2s/file.c
  libraries tatlas not found in ['/usr/lib', '/usr/local/lib',
'/usr/local/lib/gcc10/gcc/x86_64-portbld-freebsd12.2/10.3.0/../../../']
Library tatlas was not found. Ignoring
  FOUND:
    include_dirs = ['/usr/local/include']
    language = f77
    libraries = ['alapack', 'ptf77blas', 'ptcblas']
    library_dirs = ['/usr/local/lib']
    define_macros = [('ATLAS_INFO', '"None"')]

  FOUND:
    include_dirs = ['/usr/local/include']
    language = f77
    libraries = ['alapack', 'ptf77blas', 'ptcblas']
    library_dirs = ['/usr/local/lib']
    define_macros = [('ATLAS_INFO', '"None"')]

/usr/local/lib/python3.8/distutils/dist.py:274: UserWarning: Unknown
distribution option: 'define_macros'
  warnings.warn(msg)
running config