Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build fails on FreeBSD: error: implicit declaration of function '_mm512_4fmadd_ps' is invalid in C99 [-Werror,-Wimplicit-function-declaration] #104

Open
yurivict opened this issue Jan 21, 2021 · 4 comments

Comments

@yurivict
Copy link

yurivict commented Jan 21, 2021

Trying to build pyedflib in the FreeBSD ports framework. It uses setup.py configure and setup.py build.

===>  Configuring for py37-pyEDFlib-0.1.20
WARNING: The pip package is not available, falling back to EasyInstall for handling setup_requires/test_requires; this is deprecated and will be removed in a future version.
Running from numpy source directory.
/tmp/easy_install-8obb_40k/numpy-1.20.0rc2/setup.py:485: UserWarning: Unrecognized setuptools command, proceeding with generating Cython sources and expanding templates
  run_build = parse_setuppy_commands()
Cythonizing sources
Processing numpy/random/_bounded_integers.pxd.in
Processing numpy/random/_pcg64.pyx
Processing numpy/random/_bounded_integers.pyx.in
Processing numpy/random/mtrand.pyx
Processing numpy/random/bit_generator.pyx
Processing numpy/random/_common.pyx
Processing numpy/random/_generator.pyx
Processing numpy/random/_mt19937.pyx
Processing numpy/random/_philox.pyx
Processing numpy/random/_sfc64.pyx
/tmp/easy_install-8obb_40k/numpy-1.20.0rc2/numpy/distutils/system_info.py:1989: UserWarning: 
    Optimized (vendor) Blas libraries are not found.
    Falls back to netlib Blas library which has worse performance.
    A better performance should be easily gained by switching
    Blas library.
  if self._calc_info(blas):
/tmp/easy_install-8obb_40k/numpy-1.20.0rc2/numpy/distutils/system_info.py:1989: UserWarning: 
    Blas (http://www.netlib.org/blas/) libraries not found.
    Directories to search for the libraries can be specified in the
    numpy/distutils/site.cfg file (section [blas]) or by setting
    the BLAS environment variable.
  if self._calc_info(blas):
/tmp/easy_install-8obb_40k/numpy-1.20.0rc2/numpy/distutils/system_info.py:1989: UserWarning: 
    Blas (http://www.netlib.org/blas/) sources not found.
    Directories to search for the sources can be specified in the
    numpy/distutils/site.cfg file (section [blas_src]) or by setting
    the BLAS_SRC environment variable.
  if self._calc_info(blas):
non-existing path in 'numpy/distutils': 'site.cfg'
/tmp/easy_install-8obb_40k/numpy-1.20.0rc2/numpy/distutils/system_info.py:1849: UserWarning: 
    Lapack (http://www.netlib.org/lapack/) libraries not found.
    Directories to search for the libraries can be specified in the
    numpy/distutils/site.cfg file (section [lapack]) or by setting
    the LAPACK environment variable.
  return getattr(self, '_calc_info_{}'.format(name))()
/tmp/easy_install-8obb_40k/numpy-1.20.0rc2/numpy/distutils/system_info.py:1849: UserWarning: 
    Lapack (http://www.netlib.org/lapack/) sources not found.
    Directories to search for the sources can be specified in the
    numpy/distutils/site.cfg file (section [lapack_src]) or by setting
    the LAPACK_SRC environment variable.
  return getattr(self, '_calc_info_{}'.format(name))()
/usr/local/lib/python3.7/distutils/dist.py:274: UserWarning: Unknown distribution option: 'define_macros'
  warnings.warn(msg)
gnu: no Fortran 90 compiler found
Could not locate executable cc -shared
Could not locate executable g77
Could not locate executable f77
gnu: no Fortran 90 compiler found
Could not locate executable gfortran
Could not locate executable f95
gnu95: no Fortran 90 compiler found
gnu95: no Fortran 90 compiler found
don't know how to compile Fortran code on platform 'posix'
non-existing path in 'numpy/core': 'build/src.freebsd-12.2-STABLE-amd64-3.7/numpy/core/src/common'
### Warning:  Using unoptimized lapack ###
### Warning:  Using unoptimized lapack ###
no previously-included directories found matching 'doc/build'
no previously-included directories found matching 'doc/source/generated'
no previously-included directories found matching 'benchmarks/env'
no previously-included directories found matching 'benchmarks/results'
no previously-included directories found matching 'benchmarks/html'
no previously-included directories found matching 'benchmarks/numpy'
warning: no previously-included files matching '*.pyo' found anywhere in distribution
warning: no previously-included files matching '*.pyd' found anywhere in distribution
warning: no previously-included files matching '*.swp' found anywhere in distribution
warning: no previously-included files matching '*.bak' found anywhere in distribution
warning: no previously-included files matching '*~' found anywhere in distribution
warning: no previously-included files found matching 'LICENSES_bundled.txt'
CCompilerOpt.__init__[959] : unable to detect compiler type which leads to treating it as GCC. this is a normal behavior if you're using gcc-like compiler such as MinGW or IBM/XLC.check dist_info:<<
('freebsd-12.2-STABLE-amd64', 'cc', '-Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -O2 -pipe -fstack-protector-strong -fno-strict-aliasing -O2 -pipe -fno-omit-frame-pointer -fstack-protector-strong -fno-strict-aliasing -fno-omit-frame-pointer')
>>
CCompilerOpt.dist_test[576] : CCompilerOpt._dist_test_spawn[713] : Command (cc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -O2 -pipe -fstack-protector-strong -fno-strict-aliasing -O2 -pipe -fno-omit-frame-pointer -fstack-protector-strong -fno-strict-aliasing -fno-omit-frame-pointer -fPIC -Inumpy/core/src/common -Inumpy/core/src -Inumpy/core -Inumpy/core/src/npymath -Inumpy/core/src/multiarray -Inumpy/core/src/umath -Inumpy/core/src/npysort -Inumpy/core/src/_simd -I/usr/local/include/python3.7m -Ibuild/src.freebsd-12.2-STABLE-amd64-3.7/numpy/core/src/common -Ibuild/src.freebsd-12.2-STABLE-amd64-3.7/numpy/core/src/npymath -c /tmp/easy_install-8obb_40k/numpy-1.20.0rc2/numpy/distutils/checks/test_flags.c -o /tmp/easy_install-8obb_40k/numpy-1.20.0rc2/temp/tmpf5o9ls1f/tmp/easy_install-8obb_40k/numpy-1.20.0rc2/numpy/distutils/checks/test_flags.o -MMD -MF /tmp/easy_install-8obb_40k/numpy-1.20.0rc2/temp/tmpf5o9ls1f/tmp/easy_install-8obb_40k/numpy-1.20.0rc2/numpy/distutils/checks/test_flags.o.d -mavx5124fmaps -mavx5124vnniw -mavx512vpopcntdq) failed with exit status 1 output -> 
cc: error: unknown argument: '-mavx5124fmaps'
cc: error: unknown argument: '-mavx5124vnniw'

CCompilerOpt.cc_test_flags[1003] : testing failed
CCompilerOpt.dist_test[576] : CCompilerOpt._dist_test_spawn[713] : Command (cc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -O2 -pipe -fstack-protector-strong -fno-strict-aliasing -O2 -pipe -fno-omit-frame-pointer -fstack-protector-strong -fno-strict-aliasing -fno-omit-frame-pointer -fPIC -Inumpy/core/src/common -Inumpy/core/src -Inumpy/core -Inumpy/core/src/npymath -Inumpy/core/src/multiarray -Inumpy/core/src/umath -Inumpy/core/src/npysort -Inumpy/core/src/_simd -I/usr/local/include/python3.7m -Ibuild/src.freebsd-12.2-STABLE-amd64-3.7/numpy/core/src/common -Ibuild/src.freebsd-12.2-STABLE-amd64-3.7/numpy/core/src/npymath -c /tmp/easy_install-8obb_40k/numpy-1.20.0rc2/numpy/distutils/checks/cpu_avx512_knm.c -o /tmp/easy_install-8obb_40k/numpy-1.20.0rc2/temp/tmpf5o9ls1f/tmp/easy_install-8obb_40k/numpy-1.20.0rc2/numpy/distutils/checks/cpu_avx512_knm.o -MMD -MF /tmp/easy_install-8obb_40k/numpy-1.20.0rc2/temp/tmpf5o9ls1f/tmp/easy_install-8obb_40k/numpy-1.20.0rc2/numpy/distutils/checks/cpu_avx512_knm.o.d -msse -msse2 -msse3 -mssse3 -msse4.1 -mpopcnt -msse4.2 -mavx -mf16c -mfma -mavx2 -mavx512f -mavx512cd -mavx512er -mavx512pf -Werror) failed with exit status 1 output -> 
/tmp/easy_install-8obb_40k/numpy-1.20.0rc2/numpy/distutils/checks/cpu_avx512_knm.c:9:9: error: implicit declaration of function '_mm512_4fmadd_ps' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
    b = _mm512_4fmadd_ps(b, b, b, b, b, NULL);
        ^
/tmp/easy_install-8obb_40k/numpy-1.20.0rc2/numpy/distutils/checks/cpu_avx512_knm.c:9:9: note: did you mean '_mm512_fmadd_ps'?
/usr/lib/clang/10.0.1/include/avx512fintrin.h:2716:1: note: '_mm512_fmadd_ps' declared here
_mm512_fmadd_ps(__m512 __A, __m512 __B, __m512 __C)
^
/tmp/easy_install-8obb_40k/numpy-1.20.0rc2/numpy/distutils/checks/cpu_avx512_knm.c:9:7: error: assigning to '__m512' (vector of 16 'float' values) from incompatible type 'int'
    b = _mm512_4fmadd_ps(b, b, b, b, b, NULL);
      ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/easy_install-8obb_40k/numpy-1.20.0rc2/numpy/distutils/checks/cpu_avx512_knm.c:11:9: error: implicit declaration of function '_mm512_4dpwssd_epi32' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
    a = _mm512_4dpwssd_epi32(a, a, a, a, a, NULL);
        ^
/tmp/easy_install-8obb_40k/numpy-1.20.0rc2/numpy/distutils/checks/cpu_avx512_knm.c:11:9: note: did you mean '_mm512_dpwssd_epi32'?
/usr/lib/clang/10.0.1/include/avx512vnniintrin.h:68:1: note: '_mm512_dpwssd_epi32' declared here
_mm512_dpwssd_epi32(__m512i __S, __m512i __A, __m512i __B)
^
/tmp/easy_install-8obb_40k/numpy-1.20.0rc2/numpy/distutils/checks/cpu_avx512_knm.c:11:7: error: assigning to '__m512i' (vector of 8 'long long' values) from incompatible type 'int'
    a = _mm512_4dpwssd_epi32(a, a, a, a, a, NULL);
      ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
4 errors generated.

It begins to cythonize numpy for some reason, and fails.
Numpy is already installed from a package.

Version 0.1.20
OS: FreeBSD 12.2
Python-3.7
clang-10

@skjerns
Copy link
Collaborator

skjerns commented Jan 22, 2021

@holgern maybe you know something about this?

@holgern
Copy link
Owner

holgern commented Jan 22, 2021

Please check https://www.freshports.org/misc/py-pyEDFlib/

Build Build dependencies for Freebsd according to the link above:
py37-numpy>=1.16,1<1.20,1 : math/py-numpy@py37
gfortran10 : lang/gcc10
cython-3.7 : lang/cython@py37
py37-setuptools>0 : devel/py-setuptools@py37
python3.7 : lang/python37
gcc10 : lang/gcc10
as : devel/binutils

@yurivict
Copy link
Author

Yes, I created this port yesterday.

The problem is that it breaks with clang. Could you please check why is build broken with clang?

@skjerns
Copy link
Collaborator

skjerns commented Apr 19, 2023

@yurivict does this problem persist?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants