Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 680114

Summary: dev-python/numpy-1.16.1[lapack]: does not compile with Python 2.7 on Mac OS X (missing symbols)
Product: Gentoo/Alt Reporter: Guilherme Amadio <amadio>
Component: Prefix SupportAssignee: Gentoo Prefix <prefix>
Status: CONFIRMED ---    
Severity: normal    
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Guilherme Amadio gentoo-dev 2019-03-12 11:05:59 UTC
The package compiles fine without lapack, but fails with the error below with lapack enabled. USE=lapack is required by other packages (e.g. sci-libs/scikits_learn).

Relevant part of build log:

/cvmfs/sft.cern.ch/lcg/contrib/gentoo/macos/10.13/usr/x86_64-apple-darwin17/gcc-bin/4.2.1/gfortran -Wall -g -Wl,-dead_strip_dylibs /private/tmp/portage/dev-python/numpy-1.16.1/work/numpy-1.16.1-python2_7/temp.macosx-10.13-x86_64-2.7/numpy/linalg/lapack_litemodule.o /private/tmp/portage/dev-python/numpy-1.16.1/work/numpy-1.16.1-python2_7/temp.macosx-10.13-x86_64-2.7/numpy/linalg/lapack_lite/python_xerbla.o -L/cvmfs/sft.cern.ch/lcg/contrib/gentoo/macos/10.13/usr/lib -L/cvmfs/sft.cern.ch/lcg/contrib/gentoo/macos/10.13/usr/lib/gcc/x86_64-apple-darwin17/4.2.1 -L/cvmfs/sft.cern.ch/lcg/contrib/gentoo/macos/10.13/usr/lib/gcc/x86_64-apple-darwin17/4.2.1 -L/cvmfs/sft.cern.ch/lcg/contrib/gentoo/macos/10.13/usr/lib/gcc/x86_64-apple-darwin17/4.2.1 -L/private/tmp/portage/dev-python/numpy-1.16.1/work/numpy-1.16.1-python2_7/temp.macosx-10.13-x86_64-2.7 -lblas -llapack -lblas -lcblas -lgfortran -o /private/tmp/portage/dev-python/numpy-1.16.1/work/numpy-1.16.1-python2_7/lib/numpy/linalg/lapack_lite.bundle
Undefined symbols for architecture x86_64:
  "_MAIN__", referenced from:
      _main in libgfortranbegin.a(fmain.o)
  "_PyArg_ParseTuple", referenced from:
      _lapack_lite_dgelsd in lapack_litemodule.o
      _lapack_lite_dgeqrf in lapack_litemodule.o
      _lapack_lite_dorgqr in lapack_litemodule.o
      _lapack_lite_zgelsd in lapack_litemodule.o
      _lapack_lite_zgeqrf in lapack_litemodule.o
      _lapack_lite_zungqr in lapack_litemodule.o
  "_PyCObject_AsVoidPtr", referenced from:
      _initlapack_lite in lapack_litemodule.o
  "_PyCObject_Type", referenced from:
      _initlapack_lite in lapack_litemodule.o
  "_PyDict_SetItemString", referenced from:
      _initlapack_lite in lapack_litemodule.o
  "_PyErr_Format", referenced from:
      _initlapack_lite in lapack_litemodule.o
      _check_object in lapack_litemodule.o
  "_PyErr_NewException", referenced from:
      _initlapack_lite in lapack_litemodule.o
  "_PyErr_Occurred", referenced from:
      _lapack_lite_dgelsd in lapack_litemodule.o
      _lapack_lite_dgeqrf in lapack_litemodule.o
      _lapack_lite_dorgqr in lapack_litemodule.o
      _lapack_lite_zgelsd in lapack_litemodule.o
      _lapack_lite_zgeqrf in lapack_litemodule.o
      _lapack_lite_zungqr in lapack_litemodule.o
      _lapack_lite_xerbla in lapack_litemodule.o
      ...
  "_PyErr_Print", referenced from:
      _initlapack_lite in lapack_litemodule.o
  "_PyErr_SetString", referenced from:
      _initlapack_lite in lapack_litemodule.o
      _xerbla_ in python_xerbla.o
  "_PyEval_RestoreThread", referenced from:
      _lapack_lite_xerbla in lapack_litemodule.o
  "_PyEval_SaveThread", referenced from:
      _lapack_lite_xerbla in lapack_litemodule.o
  "_PyExc_AttributeError", referenced from:
      _initlapack_lite in lapack_litemodule.o
  "_PyExc_ImportError", referenced from:
      _initlapack_lite in lapack_litemodule.o
  "_PyExc_RuntimeError", referenced from:
      _initlapack_lite in lapack_litemodule.o
  "_PyExc_ValueError", referenced from:
      _xerbla_ in python_xerbla.o
  "_PyGILState_Ensure", referenced from:
      _xerbla_ in python_xerbla.o
  "_PyGILState_Release", referenced from:
      _xerbla_ in python_xerbla.o
  "_PyImport_ImportModule", referenced from:
      _initlapack_lite in lapack_litemodule.o
  "_PyModule_GetDict", referenced from:
      _initlapack_lite in lapack_litemodule.o
  "_PyOS_snprintf", referenced from:
      _xerbla_ in python_xerbla.o
  "_PyObject_GetAttrString", referenced from:
      _initlapack_lite in lapack_litemodule.o
  "_PyType_IsSubtype", referenced from:
      _check_object in lapack_litemodule.o
  "_Py_BuildValue", referenced from:
      _lapack_lite_dgelsd in lapack_litemodule.o
      _lapack_lite_dgeqrf in lapack_litemodule.o
      _lapack_lite_dorgqr in lapack_litemodule.o
      _lapack_lite_zgelsd in lapack_litemodule.o
      _lapack_lite_zgeqrf in lapack_litemodule.o
      _lapack_lite_zungqr in lapack_litemodule.o
  "_Py_InitModule4_64", referenced from:
      _initlapack_lite in lapack_litemodule.o
  "__Py_NoneStruct", referenced from:
      _lapack_lite_xerbla in lapack_litemodule.o
ld: symbol(s) not found for architecture x86_64
collect2: ld returned 1 exit status
error: Command "/cvmfs/sft.cern.ch/lcg/contrib/gentoo/macos/10.13/usr/x86_64-apple-darwin17/gcc-bin/4.2.1/gfortran -Wall -g -Wl,-dead_strip_dylibs /private/tmp/portage/dev-python/numpy-1.16.1/work/numpy-1.16.1-python2_7/temp.macosx-10.13-x86_64-2.7/numpy/linalg/lapack_litemodule.o /private/tmp/portage/dev-python/numpy-1.16.1/work/numpy-1.16.1-python2_7/temp.macosx-10.13-x86_64-2.7/numpy/linalg/lapack_lite/python_xerbla.o -L/cvmfs/sft.cern.ch/lcg/contrib/gentoo/macos/10.13/usr/lib -L/cvmfs/sft.cern.ch/lcg/contrib/gentoo/macos/10.13/usr/lib/gcc/x86_64-apple-darwin17/4.2.1 -L/cvmfs/sft.cern.ch/lcg/contrib/gentoo/macos/10.13/usr/lib/gcc/x86_64-apple-darwin17/4.2.1 -L/cvmfs/sft.cern.ch/lcg/contrib/gentoo/macos/10.13/usr/lib/gcc/x86_64-apple-darwin17/4.2.1 -L/private/tmp/portage/dev-python/numpy-1.16.1/work/numpy-1.16.1-python2_7/temp.macosx-10.13-x86_64-2.7 -lblas -llapack -lblas -lcblas -lgfortran -o /private/tmp/portage/dev-python/numpy-1.16.1/work/numpy-1.16.1-python2_7/lib/numpy/linalg/lapack_lite.bundle" failed with exit status 1
 * ERROR: dev-python/numpy-1.16.1::gentoo_prefix failed (compile phase):
 *   (no error message)
 * 
 * Call stack:
 *     ebuild.sh, line  124:  Called __call-ebuildshell 'src_compile'
 *     ebuild.sh, line  540:  Called src_compile
 *   environment, line 3523:  Called distutils-r1_src_compile
 *   environment, line 1226:  Called _distutils-r1_run_foreach_impl 'python_compile'
 *   environment, line  457:  Called python_foreach_impl 'distutils-r1_run_phase' 'python_compile'
 *   environment, line 2943:  Called multibuild_foreach_variant '_python_multibuild_wrapper' 'distutils-r1_run_phase' 'python_compile'
 *   environment, line 2191:  Called _multibuild_run '_python_multibuild_wrapper' 'distutils-r1_run_phase' 'python_compile'
 *   environment, line 2189:  Called _python_multibuild_wrapper 'distutils-r1_run_phase' 'python_compile'
 *   environment, line  853:  Called distutils-r1_run_phase 'python_compile'
 *   environment, line 1219:  Called python_compile
 *   environment, line 2510:  Called distutils-r1_python_compile '-j' '1' 'config_fc' '--noopt' '--noarch' '--fcompiler=gnu95'
 *   environment, line 1089:  Called esetup.py 'build' '-j' '1' 'config_fc' '--noopt' '--noarch' '--fcompiler=gnu95'
 *   environment, line 1540:  Called die
 * The specific snippet of code:
 *       "${@}" || die "${die_args[@]}";
 * 
 * If you need support, post the output of `emerge --info '=dev-python/numpy-1.16.1::gentoo_prefix'`,
 * the complete build log and the output of `emerge -pqv '=dev-python/numpy-1.16.1::gentoo_prefix'`.
 * The complete build log is located at '/private/tmp/portage/dev-python/numpy-1.16.1/temp/build.log'.
 * The ebuild environment file is located at '/private/tmp/portage/dev-python/numpy-1.16.1/temp/environment'.
 * Working directory: '/private/tmp/portage/dev-python/numpy-1.16.1/work/numpy-1.16.1'
 * S: '/private/tmp/portage/dev-python/numpy-1.16.1/work/numpy-1.16.1'

>>> Failed to emerge dev-python/numpy-1.16.1, Log file:

>>>  '/private/tmp/portage/dev-python/numpy-1.16.1/temp/build.log'

 * Messages for package dev-python/numpy-1.16.1:

 * ERROR: dev-python/numpy-1.16.1::gentoo_prefix failed (compile phase):
 *   (no error message)
 * 
 * Call stack:
 *     ebuild.sh, line  124:  Called __call-ebuildshell 'src_compile'
 *     ebuild.sh, line  540:  Called src_compile
 *   environment, line 3523:  Called distutils-r1_src_compile
 *   environment, line 1226:  Called _distutils-r1_run_foreach_impl 'python_compile'
 *   environment, line  457:  Called python_foreach_impl 'distutils-r1_run_phase' 'python_compile'
 *   environment, line 2943:  Called multibuild_foreach_variant '_python_multibuild_wrapper' 'distutils-r1_run_phase' 'python_compile'
 *   environment, line 2191:  Called _multibuild_run '_python_multibuild_wrapper' 'distutils-r1_run_phase' 'python_compile'
 *   environment, line 2189:  Called _python_multibuild_wrapper 'distutils-r1_run_phase' 'python_compile'
 *   environment, line  853:  Called distutils-r1_run_phase 'python_compile'
 *   environment, line 1219:  Called python_compile
 *   environment, line 2510:  Called distutils-r1_python_compile '-j' '1' 'config_fc' '--noopt' '--noarch' '--fcompiler=gnu95'
 *   environment, line 1089:  Called esetup.py 'build' '-j' '1' 'config_fc' '--noopt' '--noarch' '--fcompiler=gnu95'
 *   environment, line 1540:  Called die
 * The specific snippet of code:
 *       "${@}" || die "${die_args[@]}";
 * 
 * If you need support, post the output of `emerge --info '=dev-python/numpy-1.16.1::gentoo_prefix'`,
 * the complete build log and the output of `emerge -pqv '=dev-python/numpy-1.16.1::gentoo_prefix'`.
 * The complete build log is located at '/private/tmp/portage/dev-python/numpy-1.16.1/temp/build.log'.
 * The ebuild environment file is located at '/private/tmp/portage/dev-python/numpy-1.16.1/temp/environment'.
 * Working directory: '/private/tmp/portage/dev-python/numpy-1.16.1/work/numpy-1.16.1'
 * S: '/private/tmp/portage/dev-python/numpy-1.16.1/work/numpy-1.16.1'


This is the version of gfortran I have installed:

macphsft20 ~ $ x86_64-apple-darwin17-gfortran --version
GNU Fortran (GCC) 4.2.1 (Gentoo 4.2.1_p5666-r2, Apple Inc. build 5666) (dot 3)
Copyright (C) 2007 Free Software Foundation, Inc.

GNU Fortran comes with NO WARRANTY, to the extent permitted by law.
You may redistribute copies of GNU Fortran
under the terms of the GNU General Public License.
For more information about these matters, see the file named COPYING