[MacPorts] #68868: OpenBLAS, OpenBLAS-devel now broken on PowerPC

MacPorts noreply at macports.org
Sun Dec 10 15:32:08 UTC 2023


#68868: OpenBLAS, OpenBLAS-devel now broken on PowerPC
--------------------------+--------------------------------------
 Reporter:  barracuda156  |      Owner:  (none)
     Type:  defect        |     Status:  new
 Priority:  Normal        |  Milestone:
Component:  ports         |    Version:  2.8.1
 Keywords:  powerpc       |       Port:  OpenBLAS, OpenBLAS-devel
--------------------------+--------------------------------------
 There seems to be two issues:

 1. Wrong upstream code for bitness in `system_check.cmake`, which forces
 `-m64` flag with `ppc` (32 bit). Trivially fixable, either with bringing
 the source to sanity or by passing `-DBINARY=32`.

 {{{
 Performing C SOURCE FILE Test CMAKE_HAVE_LIBC_PTHREAD failed with the
 following output:
 Change Dir:
 /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_math_OpenBLAS
 /OpenBLAS-devel/work/build/CMakeFiles/CMakeTmp

 Run Build Command(s):/usr/bin/make -f Makefile cmTC_d8baf/fast &&
 /usr/bin/make  -f CMakeFiles/cmTC_d8baf.dir/build.make
 CMakeFiles/cmTC_d8baf.dir/build
 Building C object CMakeFiles/cmTC_d8baf.dir/src.c.o
 /opt/local/bin/gcc-mp-13 -DCMAKE_HAVE_LIBC_PTHREAD  -pipe -O3 -DNDEBUG
 -I/opt/local/include -arch ppc  -DHAVE_C11 -Wall -m64 -fPIC -DNO_AVX
 -DNO_AVX2 -DNO_AVX512 -DSMP_SERVER -DNO_WARMUP -DMAX_CPU_NUMBER=4
 -DMAX_PARALLEL_NUMBER=1 -DMAX_STACK_ALLOC=2048 -DNO_AFFINITY
 -DVERSION="\"0.3.25.dev\"" -DBUILD_SINGLE -DBUILD_DOUBLE -DBUILD_COMPLEX
 -DBUILD_COMPLEX16  -arch ppc -mmacosx-version-min=10.6 -o
 CMakeFiles/cmTC_d8baf.dir/src.c.o -c
 /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_math_OpenBLAS
 /OpenBLAS-devel/work/build/CMakeFiles/CMakeTmp/src.c
 gcc-mp-13: warning: '-m64' conflicts with '-arch ppc' ('-m64' ignored)
 {standard input}:1:invalid .machine argument: ppc7400
 make[1]: *** [CMakeFiles/cmTC_d8baf.dir/src.c.o] Error 1
 make: *** [cmTC_d8baf/fast] Error 2
 }}}

 Here is the bug, and apparently it was never tested on `ppc` even on
 Linux:
 {{{
 if (NOT BINARY)
   if (X86_64 OR ARM64 OR POWER OR MIPS64 OR LOONGARCH64 OR RISCV64)
     set(BINARY 64)
   else ()
     set(BINARY 32)
   endif ()
 endif()
 }}}

 2. Something broken further with number of arguments; not sure if it is
 upstream issue or something in our patches messes it up. Or another bug in
 CMake.

 {{{
 -- Reading vars from
 /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_math_OpenBLAS
 /OpenBLAS-devel/work/OpenBLAS-
 864c65b526945604597ef9da1571a2f36b408054/kernel/power/KERNEL...
 -- Reading vars from
 /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_math_OpenBLAS
 /OpenBLAS-devel/work/OpenBLAS-
 864c65b526945604597ef9da1571a2f36b408054/kernel/power/KERNEL.PPC970...
 CMake Error at cmake/utils.cmake:106 (string):
   string sub-command REGEX, mode MATCHALL needs at least 5 arguments total
 to
   command.
 Call Stack (most recent call first):
   kernel/CMakeLists.txt:13 (ParseMakefileVars)
   kernel/CMakeLists.txt:1371 (build_core)


 CMake Error at cmake/utils.cmake:106 (string):
   string sub-command REGEX, mode MATCHALL needs at least 5 arguments total
 to
   command.
 Call Stack (most recent call first):
   kernel/CMakeLists.txt:13 (ParseMakefileVars)
   kernel/CMakeLists.txt:1371 (build_core)


 CMake Error at cmake/utils.cmake:106 (string):
   string sub-command REGEX, mode MATCHALL needs at least 5 arguments total
 to
   command.
 Call Stack (most recent call first):
   kernel/CMakeLists.txt:13 (ParseMakefileVars)
   kernel/CMakeLists.txt:1371 (build_core)


 CMake Error at cmake/utils.cmake:106 (string):
   string sub-command REGEX, mode MATCHALL needs at least 5 arguments total
 to
   command.
 Call Stack (most recent call first):
   kernel/CMakeLists.txt:13 (ParseMakefileVars)
   kernel/CMakeLists.txt:1371 (build_core)
 }}}

 I will make a PR to fix arch detection, but first need to understand what
 is breaking configure. No time today, will return to this tomorrow. Broken
 OpenBLAS is a disaster :(

-- 
Ticket URL: <https://trac.macports.org/ticket/68868>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list