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: duplicate case value '8' #2074

Closed
yurivict opened this issue Mar 31, 2019 · 9 comments
Closed

Build fails: duplicate case value '8' #2074

yurivict opened this issue Mar 31, 2019 · 9 comments

Comments

@yurivict
Copy link
Contributor

Version 0.3.5 fails to build in the FreeBSD port:

-- Checking whether /usr/local/bin/gfortran8 supports Fortran 90 -- yes
CMake Error at cmake/prebuild.cmake:307 (MESSAGE):
  Compiling getarch failed Change Dir:
  /usr/ports/math/openblas/work/.build/getarch_build/CMakeFiles/CMakeTmp

  

  Run Build Command:"/usr/local/bin/gmake" "cmTC_e2982/fast"

  gmake[2]: Entering directory
  '/usr/ports/math/openblas/work/.build/getarch_build/CMakeFiles/CMakeTmp'

  /usr/local/bin/gmake -f CMakeFiles/cmTC_e2982.dir/build.make
  CMakeFiles/cmTC_e2982.dir/build

  gmake[3]: Entering directory
  '/usr/ports/math/openblas/work/.build/getarch_build/CMakeFiles/CMakeTmp'

  Building C object CMakeFiles/cmTC_e2982.dir/getarch.c.o

  /usr/bin/cc -DGEMM_MULTITHREAD_THRESHOLD=4 -DNO_AVX -DNO_AVX2
  -DNO_PARALLEL_MAKE=0 -O2 -pipe -fno-omit-frame-pointer -fstack-protector
  -fno-strict-aliasing -I/usr/ports/math/openblas/work/.build/getarch_build
  -I"/usr/ports/math/openblas/work/OpenBLAS-0.3.5"
  -I"/usr/ports/math/openblas/work/.build" -o
  CMakeFiles/cmTC_e2982.dir/getarch.c.o -c
  /usr/ports/math/openblas/work/OpenBLAS-0.3.5/getarch.c

  In file included from
  /usr/ports/math/openblas/work/OpenBLAS-0.3.5/getarch.c:1086:

  /usr/ports/math/openblas/work/OpenBLAS-0.3.5/cpuid_x86.c:1456:7: error:
  duplicate case value '8'

          case 8:
               ^

  /usr/ports/math/openblas/work/OpenBLAS-0.3.5/cpuid_x86.c:1454:7: note:
  previous case defined here

          case 8:
               ^

  /usr/ports/math/openblas/work/OpenBLAS-0.3.5/cpuid_x86.c:2014:7: error:
  duplicate case value '8'

          case 8:
               ^

  /usr/ports/math/openblas/work/OpenBLAS-0.3.5/cpuid_x86.c:2012:7: note:
  previous case defined here

          case 8:
               ^

  2 errors generated.

@brada4
Copy link
Contributor

brada4 commented Mar 31, 2019

Looking in the file - nope, there are case sections for different variables nested and then again nested, those values "8" mentioned are from different things. There are not even many ifdefs around to make it fail somehow.

Seeing gfortran8 I assume it implies gcc8, in this case better wait for 0.3.6 for massive assemblies fixup.

Does it fail in same place with just swapping source tarball in current port with "make" ?

@yurivict
Copy link
Contributor Author

Does it fail in same place with just swapping source tarball in current port with "make" ?

What do you mean by swapping source tarball?

@brada4
Copy link
Contributor

brada4 commented Mar 31, 2019

You are using cmake, could you try bumping up version of source tarball in current port before walking new unexplored paths.
See the commit log from @martin-frbg regarding fixes towards gcc8, it is really worth the (hopefully short) wait.

@martin-frbg
Copy link
Collaborator

I cannot match up the error message with any problem in the 0.3.5 cpuid_x86.c either - is that source actually taken from the 0.3.5 release or from a snapshot of the develop branch at an earlier date ?
Current develop has a number of fixes for register misuse the inline assembly, in particular #1964 #2009 #2014 #2018 - you are most likely to hit the related bugs with gcc9 though.

@brada4
Copy link
Contributor

brada4 commented Mar 31, 2019

Maybe attach/link as long as possible build log. Given past experiences - also dump whole env before invoking 'gmake'

@yurivict
Copy link
Contributor Author

It was a local patch that inserted case values 8 for some reason, sorry.
This is an old port, and I don't maintain it and don't know much about it.

@martin-frbg
Copy link
Collaborator

Probably an outdated patch to make 0.3.3 and earlier recognize Ryzen2 then.

@brada4
Copy link
Contributor

brada4 commented Apr 1, 2019

@yurivict are we talking about there https://svnweb.freebsd.org/ports/head/math/openblas/files/ patches?
Some are already independently introduced here, some look clean to integrate here being well wrapped with ifdefs.

@yurivict
Copy link
Contributor Author

yurivict commented Apr 1, 2019

Yes, the same patches.
I removed one offending patch.

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