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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

openblas: fix compilation with mips x4k series CPU #16823

Merged
merged 2 commits into from
Oct 7, 2021

Conversation

cotequeiroz
Copy link
Member

Maintainer: @commodo
Compile tested: ath79/TP-Link Archer C6, built with CONFIG_CPU_TYPE="74kc", on master.
Run tested: same arch, using a small test program from https://www.hpc.ntnu.no/idun/software-on-idun/openblas/

/*  blas_test.c : Example using BLAS matrix multiply code sgemm */

#include <stdio.h>
#include <cblas.h>

int main(void)
{
  const int lda=3, ldb=3, ldc=3;
  int m, n, k;
  float alpha, beta;

  float a[] = { 0.11, 0.21, 0.12,
                0.15, 0.13, 0.17,
                0.22, 0.13, 0.23 };

  float b[] = { 1011, 1021, 1018,
                1031, 1012, 1021,
                1022, 1032, 1015 };

  float c[] = { 0.00, 0.00, 0,00,
                0.00, 0.00, 0,00,
                0.00, 0.00, 0,00 };

  m = 3; n = 3; k = 3;

  alpha = 1.0; beta = 0.0;

  cblas_sgemm (CblasColMajor, CblasNoTrans, CblasNoTrans,
                m, n, k, alpha, a, lda, b, ldb, beta, c, ldc);

  printf ("[ %g, %g, %g\n", c[0], c[1], c[2]);
  printf ("  %g, %g, %g\n", c[3], c[4], c[5]);
  printf ("  %g, %g, %g ]\n", c[6], c[7], c[8]);

  return 0;
}

Description:
Anything later than MIPS 24k can run MIPS 24k code. Set OPENBLAS_TARGET
to MIPS24K in those cases.

Signed-off-by: Eneas U de Queiroz cotequeiroz@gmail.com

It should fix current build errors for mipsel_74kc, mipsel_24kc_24kf, and of course, if you have a custom build on mips_74kc, like I just did 馃槣

Anything later than MIPS 24k can run MIPS 24k code.  Set OPENBLAS_TARGET
to MIPS24K in those cases.

Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
@neheb
Copy link
Contributor

neheb commented Oct 6, 2021

@cotequeiroz
Copy link
Member Author

cotequeiroz commented Oct 6, 2021

This should take care of it as well, although I haven't actually tried it. That's why I used 24k% in the filter.
When you select the pistachio target, you get CONFIG_CPU_TYPE="24kc+24kf", and that's what we are using to select OPENBLAS_TARGET.

Set MAKE_NB_JOBS=-1 so that no -j parameter is passed to make when
building the package, honoring the parent make's setting.

Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
@cotequeiroz
Copy link
Member Author

Would anyone mind if I add a commit here to avoid the package setting its own make -j flag? I hope not. I've just noticed this on top of the fail log:

make[5]: warning: -j32 forced in submake: resetting jobserver mode.

@commodo
Copy link
Contributor

commodo commented Oct 7, 2021

Would anyone mind if I add a commit here to avoid the package setting its own make -j flag? I hope not. I've just noticed this on top of the fail log:

make[5]: warning: -j32 forced in submake: resetting jobserver mode.

fine from me;

notifying @bhack and @brada4 ;
it may be of interest for them

@commodo commodo merged commit 0dd482f into openwrt:master Oct 7, 2021
@brada4
Copy link

brada4 commented Oct 7, 2021

you can use MAKE_NB_JOBS=-1 to respect jobserver setting from outside. Otherwise OpenBLAS would try all visible cores, no matter -j .

@brada4
Copy link

brada4 commented Oct 7, 2021

REF:Makefile.rule

@cotequeiroz
Copy link
Member Author

you can use MAKE_NB_JOBS=-1 to respect jobserver setting from outside. Otherwise OpenBLAS would try all visible cores, no matter -j .

Yes, that's exactly what was done here.

MAKE_NB_JOBS=-1 \

Thanks.

@cotequeiroz cotequeiroz deleted the openblas-mips branch October 7, 2021 21:21
@neheb
Copy link
Contributor

neheb commented Oct 18, 2021

@commodo
Copy link
Contributor

commodo commented Oct 18, 2021

@cotequeiroz
Copy link
Member Author

It is set to GENERIC, but generic is not compiling for mips CPUs for some reason.

@brada4
Copy link

brada4 commented Oct 18, 2021

If CPU is supposed to have MSA then MIPS24K is OK, otherwise there is no kernel/$ARCH/KERNEL.GENERIC

commodo added a commit to commodo/packages that referenced this pull request Nov 5, 2021
Reported via:
  openwrt#16823 (comment)

This fails in mips_mip32 targets with the output listed below.

Using the MIPS24K target works fine.

```
mips-openwrt-linux-musl-gcc -c -Os -pipe -mno-branch-likely -mips32 -mtune=mips32 -fno-caller-saves -fno-plt -fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result -msoft-float -ffile-prefix-map=/builder/shared-workdir/build/sdk/build_dir/target-mips_mips32_musl/OpenBLAS-0.3.18=OpenBLAS-0.3.18 -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro  -I/builder/shared-workdir/build/sdk/staging_dir/toolchain-mips_mips32_gcc-11.2.0_musl/usr/include -I/builder/shared-workdir/build/sdk/staging_dir/toolchain-mips_mips32_gcc-11.2.0_musl/include/fortify -I/builder/shared-workdir/build/sdk/staging_dir/toolchain-mips_mips32_gcc-11.2.0_musl/include   -DMAX_STACK_ALLOC=2048 -Wall -mabi=32 -DF_INTERFACE_GFORT -fPIC -DNO_LAPACK -DNO_LAPACKE -DNO_AVX512 -DSMP_SERVER -DNO_WARMUP -DMAX_CPU_NUMBER=2 -DMAX_PARALLEL_NUMBER=1 -DBUILD_SINGLE=1 -DBUILD_DOUBLE=1 -DBUILD_COMPLEX=1 -DBUILD_COMPLEX16=1 -DVERSION=\"0.3.18\" -UASMNAME -UASMFNAME -UNAME -UCNAME -UCHAR_NAME -UCHAR_CNAME -DASMNAME= -DASMFNAME=_ -DNAME=_ -DCNAME= -DCHAR_NAME=\"_\" -DCHAR_CNAME=\"\" -DNO_AFFINITY -I.  -DMAX_STACK_ALLOC=2048 -Wall -mabi=32 -DF_INTERFACE_GFORT -fPIC -DNO_LAPACK -DNO_LAPACKE -DNO_AVX512 -DSMP_SERVER -DNO_WARMUP -DMAX_CPU_NUMBER=2 -DMAX_PARALLEL_NUMBER=1 -DBUILD_SINGLE=1 -DBUILD_DOUBLE=1 -DBUILD_COMPLEX=1 -DBUILD_COMPLEX16=1 -DVERSION=\"0.3.18\" -UASMNAME -UASMFNAME -UNAME -UCNAME -UCHAR_NAME -UCHAR_CNAME -DASMNAME=sgemm -DASMFNAME=sgemm_ -DNAME=sgemm_ -DCNAME=sgemm -DCHAR_NAME=\"sgemm_\" -DCHAR_CNAME=\"sgemm\" -DNO_AFFINITY -I.. -I. -UDOUBLE  -UCOMPLEX gemm.c -o sgemm.o
In file included from ../common.h:581,
                 from gemm.c:41:
gemm.c: In function 'sgemm_':
../param.h:3477:25: error: 'sgemm_p' undeclared (first use in this function); did you mean 'sgemm_'?
 3477 | #define SGEMM_DEFAULT_P sgemm_p
      |                         ^~~~~~~
../common_param.h:1334:25: note: in expansion of macro 'SGEMM_DEFAULT_P'
 1334 | #define SGEMM_P         SGEMM_DEFAULT_P
      |                         ^~~~~~~~~~~~~~~
../common_param.h:1482:33: note: in expansion of macro 'SGEMM_P'
 1482 | #define GEMM_P                  SGEMM_P
      |                                 ^~~~~~~
gemm.c:494:37: note: in expansion of macro 'GEMM_P'
  494 |   sb = (XFLOAT *)(((BLASLONG)sa + ((GEMM_P * GEMM_Q * COMPSIZE * SIZE + GEMM_ALIGN) & ~GEMM_ALIGN)) + GEMM_OFFSET_B);
      |                                     ^~~~~~
../param.h:3477:25: note: each undeclared identifier is reported only once for each function it appears in
 3477 | #define SGEMM_DEFAULT_P sgemm_p
      |                         ^~~~~~~
../common_param.h:1334:25: note: in expansion of macro 'SGEMM_DEFAULT_P'
 1334 | #define SGEMM_P         SGEMM_DEFAULT_P
      |                         ^~~~~~~~~~~~~~~
../common_param.h:1482:33: note: in expansion of macro 'SGEMM_P'
 1482 | #define GEMM_P                  SGEMM_P
      |                                 ^~~~~~~
gemm.c:494:37: note: in expansion of macro 'GEMM_P'
  494 |   sb = (XFLOAT *)(((BLASLONG)sa + ((GEMM_P * GEMM_Q * COMPSIZE * SIZE + GEMM_ALIGN) & ~GEMM_ALIGN)) + GEMM_OFFSET_B);
      |                                     ^~~~~~
make[5]: *** [Makefile:1295: sgemm.o] Error 1
make[5]: Leaving directory '/builder/shared-workdir/
```

Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
@commodo
Copy link
Contributor

commodo commented Nov 5, 2021

fixed with PR #17077

apologies for the lateness;
was busy with other stuff;

1715173329 pushed a commit to immortalwrt/packages that referenced this pull request Nov 9, 2021
Reported via:
  openwrt/packages#16823 (comment)

This fails in mips_mip32 targets with the output listed below.

Using the MIPS24K target works fine.

```
mips-openwrt-linux-musl-gcc -c -Os -pipe -mno-branch-likely -mips32 -mtune=mips32 -fno-caller-saves -fno-plt -fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result -msoft-float -ffile-prefix-map=/builder/shared-workdir/build/sdk/build_dir/target-mips_mips32_musl/OpenBLAS-0.3.18=OpenBLAS-0.3.18 -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro  -I/builder/shared-workdir/build/sdk/staging_dir/toolchain-mips_mips32_gcc-11.2.0_musl/usr/include -I/builder/shared-workdir/build/sdk/staging_dir/toolchain-mips_mips32_gcc-11.2.0_musl/include/fortify -I/builder/shared-workdir/build/sdk/staging_dir/toolchain-mips_mips32_gcc-11.2.0_musl/include   -DMAX_STACK_ALLOC=2048 -Wall -mabi=32 -DF_INTERFACE_GFORT -fPIC -DNO_LAPACK -DNO_LAPACKE -DNO_AVX512 -DSMP_SERVER -DNO_WARMUP -DMAX_CPU_NUMBER=2 -DMAX_PARALLEL_NUMBER=1 -DBUILD_SINGLE=1 -DBUILD_DOUBLE=1 -DBUILD_COMPLEX=1 -DBUILD_COMPLEX16=1 -DVERSION=\"0.3.18\" -UASMNAME -UASMFNAME -UNAME -UCNAME -UCHAR_NAME -UCHAR_CNAME -DASMNAME= -DASMFNAME=_ -DNAME=_ -DCNAME= -DCHAR_NAME=\"_\" -DCHAR_CNAME=\"\" -DNO_AFFINITY -I.  -DMAX_STACK_ALLOC=2048 -Wall -mabi=32 -DF_INTERFACE_GFORT -fPIC -DNO_LAPACK -DNO_LAPACKE -DNO_AVX512 -DSMP_SERVER -DNO_WARMUP -DMAX_CPU_NUMBER=2 -DMAX_PARALLEL_NUMBER=1 -DBUILD_SINGLE=1 -DBUILD_DOUBLE=1 -DBUILD_COMPLEX=1 -DBUILD_COMPLEX16=1 -DVERSION=\"0.3.18\" -UASMNAME -UASMFNAME -UNAME -UCNAME -UCHAR_NAME -UCHAR_CNAME -DASMNAME=sgemm -DASMFNAME=sgemm_ -DNAME=sgemm_ -DCNAME=sgemm -DCHAR_NAME=\"sgemm_\" -DCHAR_CNAME=\"sgemm\" -DNO_AFFINITY -I.. -I. -UDOUBLE  -UCOMPLEX gemm.c -o sgemm.o
In file included from ../common.h:581,
                 from gemm.c:41:
gemm.c: In function 'sgemm_':
../param.h:3477:25: error: 'sgemm_p' undeclared (first use in this function); did you mean 'sgemm_'?
 3477 | #define SGEMM_DEFAULT_P sgemm_p
      |                         ^~~~~~~
../common_param.h:1334:25: note: in expansion of macro 'SGEMM_DEFAULT_P'
 1334 | #define SGEMM_P         SGEMM_DEFAULT_P
      |                         ^~~~~~~~~~~~~~~
../common_param.h:1482:33: note: in expansion of macro 'SGEMM_P'
 1482 | #define GEMM_P                  SGEMM_P
      |                                 ^~~~~~~
gemm.c:494:37: note: in expansion of macro 'GEMM_P'
  494 |   sb = (XFLOAT *)(((BLASLONG)sa + ((GEMM_P * GEMM_Q * COMPSIZE * SIZE + GEMM_ALIGN) & ~GEMM_ALIGN)) + GEMM_OFFSET_B);
      |                                     ^~~~~~
../param.h:3477:25: note: each undeclared identifier is reported only once for each function it appears in
 3477 | #define SGEMM_DEFAULT_P sgemm_p
      |                         ^~~~~~~
../common_param.h:1334:25: note: in expansion of macro 'SGEMM_DEFAULT_P'
 1334 | #define SGEMM_P         SGEMM_DEFAULT_P
      |                         ^~~~~~~~~~~~~~~
../common_param.h:1482:33: note: in expansion of macro 'SGEMM_P'
 1482 | #define GEMM_P                  SGEMM_P
      |                                 ^~~~~~~
gemm.c:494:37: note: in expansion of macro 'GEMM_P'
  494 |   sb = (XFLOAT *)(((BLASLONG)sa + ((GEMM_P * GEMM_Q * COMPSIZE * SIZE + GEMM_ALIGN) & ~GEMM_ALIGN)) + GEMM_OFFSET_B);
      |                                     ^~~~~~
make[5]: *** [Makefile:1295: sgemm.o] Error 1
make[5]: Leaving directory '/builder/shared-workdir/
```

Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
Lienol pushed a commit to Lienol/openwrt-packages that referenced this pull request Dec 8, 2021
Reported via:
  openwrt/packages#16823 (comment)

This fails in mips_mip32 targets with the output listed below.

Using the MIPS24K target works fine.

```
mips-openwrt-linux-musl-gcc -c -Os -pipe -mno-branch-likely -mips32 -mtune=mips32 -fno-caller-saves -fno-plt -fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result -msoft-float -ffile-prefix-map=/builder/shared-workdir/build/sdk/build_dir/target-mips_mips32_musl/OpenBLAS-0.3.18=OpenBLAS-0.3.18 -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro  -I/builder/shared-workdir/build/sdk/staging_dir/toolchain-mips_mips32_gcc-11.2.0_musl/usr/include -I/builder/shared-workdir/build/sdk/staging_dir/toolchain-mips_mips32_gcc-11.2.0_musl/include/fortify -I/builder/shared-workdir/build/sdk/staging_dir/toolchain-mips_mips32_gcc-11.2.0_musl/include   -DMAX_STACK_ALLOC=2048 -Wall -mabi=32 -DF_INTERFACE_GFORT -fPIC -DNO_LAPACK -DNO_LAPACKE -DNO_AVX512 -DSMP_SERVER -DNO_WARMUP -DMAX_CPU_NUMBER=2 -DMAX_PARALLEL_NUMBER=1 -DBUILD_SINGLE=1 -DBUILD_DOUBLE=1 -DBUILD_COMPLEX=1 -DBUILD_COMPLEX16=1 -DVERSION=\"0.3.18\" -UASMNAME -UASMFNAME -UNAME -UCNAME -UCHAR_NAME -UCHAR_CNAME -DASMNAME= -DASMFNAME=_ -DNAME=_ -DCNAME= -DCHAR_NAME=\"_\" -DCHAR_CNAME=\"\" -DNO_AFFINITY -I.  -DMAX_STACK_ALLOC=2048 -Wall -mabi=32 -DF_INTERFACE_GFORT -fPIC -DNO_LAPACK -DNO_LAPACKE -DNO_AVX512 -DSMP_SERVER -DNO_WARMUP -DMAX_CPU_NUMBER=2 -DMAX_PARALLEL_NUMBER=1 -DBUILD_SINGLE=1 -DBUILD_DOUBLE=1 -DBUILD_COMPLEX=1 -DBUILD_COMPLEX16=1 -DVERSION=\"0.3.18\" -UASMNAME -UASMFNAME -UNAME -UCNAME -UCHAR_NAME -UCHAR_CNAME -DASMNAME=sgemm -DASMFNAME=sgemm_ -DNAME=sgemm_ -DCNAME=sgemm -DCHAR_NAME=\"sgemm_\" -DCHAR_CNAME=\"sgemm\" -DNO_AFFINITY -I.. -I. -UDOUBLE  -UCOMPLEX gemm.c -o sgemm.o
In file included from ../common.h:581,
                 from gemm.c:41:
gemm.c: In function 'sgemm_':
../param.h:3477:25: error: 'sgemm_p' undeclared (first use in this function); did you mean 'sgemm_'?
 3477 | #define SGEMM_DEFAULT_P sgemm_p
      |                         ^~~~~~~
../common_param.h:1334:25: note: in expansion of macro 'SGEMM_DEFAULT_P'
 1334 | #define SGEMM_P         SGEMM_DEFAULT_P
      |                         ^~~~~~~~~~~~~~~
../common_param.h:1482:33: note: in expansion of macro 'SGEMM_P'
 1482 | #define GEMM_P                  SGEMM_P
      |                                 ^~~~~~~
gemm.c:494:37: note: in expansion of macro 'GEMM_P'
  494 |   sb = (XFLOAT *)(((BLASLONG)sa + ((GEMM_P * GEMM_Q * COMPSIZE * SIZE + GEMM_ALIGN) & ~GEMM_ALIGN)) + GEMM_OFFSET_B);
      |                                     ^~~~~~
../param.h:3477:25: note: each undeclared identifier is reported only once for each function it appears in
 3477 | #define SGEMM_DEFAULT_P sgemm_p
      |                         ^~~~~~~
../common_param.h:1334:25: note: in expansion of macro 'SGEMM_DEFAULT_P'
 1334 | #define SGEMM_P         SGEMM_DEFAULT_P
      |                         ^~~~~~~~~~~~~~~
../common_param.h:1482:33: note: in expansion of macro 'SGEMM_P'
 1482 | #define GEMM_P                  SGEMM_P
      |                                 ^~~~~~~
gemm.c:494:37: note: in expansion of macro 'GEMM_P'
  494 |   sb = (XFLOAT *)(((BLASLONG)sa + ((GEMM_P * GEMM_Q * COMPSIZE * SIZE + GEMM_ALIGN) & ~GEMM_ALIGN)) + GEMM_OFFSET_B);
      |                                     ^~~~~~
make[5]: *** [Makefile:1295: sgemm.o] Error 1
make[5]: Leaving directory '/builder/shared-workdir/
```

Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
Lienol pushed a commit to Lienol/openwrt-packages that referenced this pull request Dec 9, 2021
Reported via:
  openwrt/packages#16823 (comment)

This fails in mips_mip32 targets with the output listed below.

Using the MIPS24K target works fine.

```
mips-openwrt-linux-musl-gcc -c -Os -pipe -mno-branch-likely -mips32 -mtune=mips32 -fno-caller-saves -fno-plt -fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result -msoft-float -ffile-prefix-map=/builder/shared-workdir/build/sdk/build_dir/target-mips_mips32_musl/OpenBLAS-0.3.18=OpenBLAS-0.3.18 -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro  -I/builder/shared-workdir/build/sdk/staging_dir/toolchain-mips_mips32_gcc-11.2.0_musl/usr/include -I/builder/shared-workdir/build/sdk/staging_dir/toolchain-mips_mips32_gcc-11.2.0_musl/include/fortify -I/builder/shared-workdir/build/sdk/staging_dir/toolchain-mips_mips32_gcc-11.2.0_musl/include   -DMAX_STACK_ALLOC=2048 -Wall -mabi=32 -DF_INTERFACE_GFORT -fPIC -DNO_LAPACK -DNO_LAPACKE -DNO_AVX512 -DSMP_SERVER -DNO_WARMUP -DMAX_CPU_NUMBER=2 -DMAX_PARALLEL_NUMBER=1 -DBUILD_SINGLE=1 -DBUILD_DOUBLE=1 -DBUILD_COMPLEX=1 -DBUILD_COMPLEX16=1 -DVERSION=\"0.3.18\" -UASMNAME -UASMFNAME -UNAME -UCNAME -UCHAR_NAME -UCHAR_CNAME -DASMNAME= -DASMFNAME=_ -DNAME=_ -DCNAME= -DCHAR_NAME=\"_\" -DCHAR_CNAME=\"\" -DNO_AFFINITY -I.  -DMAX_STACK_ALLOC=2048 -Wall -mabi=32 -DF_INTERFACE_GFORT -fPIC -DNO_LAPACK -DNO_LAPACKE -DNO_AVX512 -DSMP_SERVER -DNO_WARMUP -DMAX_CPU_NUMBER=2 -DMAX_PARALLEL_NUMBER=1 -DBUILD_SINGLE=1 -DBUILD_DOUBLE=1 -DBUILD_COMPLEX=1 -DBUILD_COMPLEX16=1 -DVERSION=\"0.3.18\" -UASMNAME -UASMFNAME -UNAME -UCNAME -UCHAR_NAME -UCHAR_CNAME -DASMNAME=sgemm -DASMFNAME=sgemm_ -DNAME=sgemm_ -DCNAME=sgemm -DCHAR_NAME=\"sgemm_\" -DCHAR_CNAME=\"sgemm\" -DNO_AFFINITY -I.. -I. -UDOUBLE  -UCOMPLEX gemm.c -o sgemm.o
In file included from ../common.h:581,
                 from gemm.c:41:
gemm.c: In function 'sgemm_':
../param.h:3477:25: error: 'sgemm_p' undeclared (first use in this function); did you mean 'sgemm_'?
 3477 | #define SGEMM_DEFAULT_P sgemm_p
      |                         ^~~~~~~
../common_param.h:1334:25: note: in expansion of macro 'SGEMM_DEFAULT_P'
 1334 | #define SGEMM_P         SGEMM_DEFAULT_P
      |                         ^~~~~~~~~~~~~~~
../common_param.h:1482:33: note: in expansion of macro 'SGEMM_P'
 1482 | #define GEMM_P                  SGEMM_P
      |                                 ^~~~~~~
gemm.c:494:37: note: in expansion of macro 'GEMM_P'
  494 |   sb = (XFLOAT *)(((BLASLONG)sa + ((GEMM_P * GEMM_Q * COMPSIZE * SIZE + GEMM_ALIGN) & ~GEMM_ALIGN)) + GEMM_OFFSET_B);
      |                                     ^~~~~~
../param.h:3477:25: note: each undeclared identifier is reported only once for each function it appears in
 3477 | #define SGEMM_DEFAULT_P sgemm_p
      |                         ^~~~~~~
../common_param.h:1334:25: note: in expansion of macro 'SGEMM_DEFAULT_P'
 1334 | #define SGEMM_P         SGEMM_DEFAULT_P
      |                         ^~~~~~~~~~~~~~~
../common_param.h:1482:33: note: in expansion of macro 'SGEMM_P'
 1482 | #define GEMM_P                  SGEMM_P
      |                                 ^~~~~~~
gemm.c:494:37: note: in expansion of macro 'GEMM_P'
  494 |   sb = (XFLOAT *)(((BLASLONG)sa + ((GEMM_P * GEMM_Q * COMPSIZE * SIZE + GEMM_ALIGN) & ~GEMM_ALIGN)) + GEMM_OFFSET_B);
      |                                     ^~~~~~
make[5]: *** [Makefile:1295: sgemm.o] Error 1
make[5]: Leaving directory '/builder/shared-workdir/
```

Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
Lienol pushed a commit to Lienol/openwrt-packages that referenced this pull request Dec 19, 2021
Reported via:
  openwrt/packages#16823 (comment)

This fails in mips_mip32 targets with the output listed below.

Using the MIPS24K target works fine.

```
mips-openwrt-linux-musl-gcc -c -Os -pipe -mno-branch-likely -mips32 -mtune=mips32 -fno-caller-saves -fno-plt -fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result -msoft-float -ffile-prefix-map=/builder/shared-workdir/build/sdk/build_dir/target-mips_mips32_musl/OpenBLAS-0.3.18=OpenBLAS-0.3.18 -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro  -I/builder/shared-workdir/build/sdk/staging_dir/toolchain-mips_mips32_gcc-11.2.0_musl/usr/include -I/builder/shared-workdir/build/sdk/staging_dir/toolchain-mips_mips32_gcc-11.2.0_musl/include/fortify -I/builder/shared-workdir/build/sdk/staging_dir/toolchain-mips_mips32_gcc-11.2.0_musl/include   -DMAX_STACK_ALLOC=2048 -Wall -mabi=32 -DF_INTERFACE_GFORT -fPIC -DNO_LAPACK -DNO_LAPACKE -DNO_AVX512 -DSMP_SERVER -DNO_WARMUP -DMAX_CPU_NUMBER=2 -DMAX_PARALLEL_NUMBER=1 -DBUILD_SINGLE=1 -DBUILD_DOUBLE=1 -DBUILD_COMPLEX=1 -DBUILD_COMPLEX16=1 -DVERSION=\"0.3.18\" -UASMNAME -UASMFNAME -UNAME -UCNAME -UCHAR_NAME -UCHAR_CNAME -DASMNAME= -DASMFNAME=_ -DNAME=_ -DCNAME= -DCHAR_NAME=\"_\" -DCHAR_CNAME=\"\" -DNO_AFFINITY -I.  -DMAX_STACK_ALLOC=2048 -Wall -mabi=32 -DF_INTERFACE_GFORT -fPIC -DNO_LAPACK -DNO_LAPACKE -DNO_AVX512 -DSMP_SERVER -DNO_WARMUP -DMAX_CPU_NUMBER=2 -DMAX_PARALLEL_NUMBER=1 -DBUILD_SINGLE=1 -DBUILD_DOUBLE=1 -DBUILD_COMPLEX=1 -DBUILD_COMPLEX16=1 -DVERSION=\"0.3.18\" -UASMNAME -UASMFNAME -UNAME -UCNAME -UCHAR_NAME -UCHAR_CNAME -DASMNAME=sgemm -DASMFNAME=sgemm_ -DNAME=sgemm_ -DCNAME=sgemm -DCHAR_NAME=\"sgemm_\" -DCHAR_CNAME=\"sgemm\" -DNO_AFFINITY -I.. -I. -UDOUBLE  -UCOMPLEX gemm.c -o sgemm.o
In file included from ../common.h:581,
                 from gemm.c:41:
gemm.c: In function 'sgemm_':
../param.h:3477:25: error: 'sgemm_p' undeclared (first use in this function); did you mean 'sgemm_'?
 3477 | #define SGEMM_DEFAULT_P sgemm_p
      |                         ^~~~~~~
../common_param.h:1334:25: note: in expansion of macro 'SGEMM_DEFAULT_P'
 1334 | #define SGEMM_P         SGEMM_DEFAULT_P
      |                         ^~~~~~~~~~~~~~~
../common_param.h:1482:33: note: in expansion of macro 'SGEMM_P'
 1482 | #define GEMM_P                  SGEMM_P
      |                                 ^~~~~~~
gemm.c:494:37: note: in expansion of macro 'GEMM_P'
  494 |   sb = (XFLOAT *)(((BLASLONG)sa + ((GEMM_P * GEMM_Q * COMPSIZE * SIZE + GEMM_ALIGN) & ~GEMM_ALIGN)) + GEMM_OFFSET_B);
      |                                     ^~~~~~
../param.h:3477:25: note: each undeclared identifier is reported only once for each function it appears in
 3477 | #define SGEMM_DEFAULT_P sgemm_p
      |                         ^~~~~~~
../common_param.h:1334:25: note: in expansion of macro 'SGEMM_DEFAULT_P'
 1334 | #define SGEMM_P         SGEMM_DEFAULT_P
      |                         ^~~~~~~~~~~~~~~
../common_param.h:1482:33: note: in expansion of macro 'SGEMM_P'
 1482 | #define GEMM_P                  SGEMM_P
      |                                 ^~~~~~~
gemm.c:494:37: note: in expansion of macro 'GEMM_P'
  494 |   sb = (XFLOAT *)(((BLASLONG)sa + ((GEMM_P * GEMM_Q * COMPSIZE * SIZE + GEMM_ALIGN) & ~GEMM_ALIGN)) + GEMM_OFFSET_B);
      |                                     ^~~~~~
make[5]: *** [Makefile:1295: sgemm.o] Error 1
make[5]: Leaving directory '/builder/shared-workdir/
```

Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
utoni pushed a commit to utoni/openwrt-packages that referenced this pull request Jan 21, 2022
Reported via:
  openwrt#16823 (comment)

This fails in mips_mip32 targets with the output listed below.

Using the MIPS24K target works fine.

```
mips-openwrt-linux-musl-gcc -c -Os -pipe -mno-branch-likely -mips32 -mtune=mips32 -fno-caller-saves -fno-plt -fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result -msoft-float -ffile-prefix-map=/builder/shared-workdir/build/sdk/build_dir/target-mips_mips32_musl/OpenBLAS-0.3.18=OpenBLAS-0.3.18 -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro  -I/builder/shared-workdir/build/sdk/staging_dir/toolchain-mips_mips32_gcc-11.2.0_musl/usr/include -I/builder/shared-workdir/build/sdk/staging_dir/toolchain-mips_mips32_gcc-11.2.0_musl/include/fortify -I/builder/shared-workdir/build/sdk/staging_dir/toolchain-mips_mips32_gcc-11.2.0_musl/include   -DMAX_STACK_ALLOC=2048 -Wall -mabi=32 -DF_INTERFACE_GFORT -fPIC -DNO_LAPACK -DNO_LAPACKE -DNO_AVX512 -DSMP_SERVER -DNO_WARMUP -DMAX_CPU_NUMBER=2 -DMAX_PARALLEL_NUMBER=1 -DBUILD_SINGLE=1 -DBUILD_DOUBLE=1 -DBUILD_COMPLEX=1 -DBUILD_COMPLEX16=1 -DVERSION=\"0.3.18\" -UASMNAME -UASMFNAME -UNAME -UCNAME -UCHAR_NAME -UCHAR_CNAME -DASMNAME= -DASMFNAME=_ -DNAME=_ -DCNAME= -DCHAR_NAME=\"_\" -DCHAR_CNAME=\"\" -DNO_AFFINITY -I.  -DMAX_STACK_ALLOC=2048 -Wall -mabi=32 -DF_INTERFACE_GFORT -fPIC -DNO_LAPACK -DNO_LAPACKE -DNO_AVX512 -DSMP_SERVER -DNO_WARMUP -DMAX_CPU_NUMBER=2 -DMAX_PARALLEL_NUMBER=1 -DBUILD_SINGLE=1 -DBUILD_DOUBLE=1 -DBUILD_COMPLEX=1 -DBUILD_COMPLEX16=1 -DVERSION=\"0.3.18\" -UASMNAME -UASMFNAME -UNAME -UCNAME -UCHAR_NAME -UCHAR_CNAME -DASMNAME=sgemm -DASMFNAME=sgemm_ -DNAME=sgemm_ -DCNAME=sgemm -DCHAR_NAME=\"sgemm_\" -DCHAR_CNAME=\"sgemm\" -DNO_AFFINITY -I.. -I. -UDOUBLE  -UCOMPLEX gemm.c -o sgemm.o
In file included from ../common.h:581,
                 from gemm.c:41:
gemm.c: In function 'sgemm_':
../param.h:3477:25: error: 'sgemm_p' undeclared (first use in this function); did you mean 'sgemm_'?
 3477 | #define SGEMM_DEFAULT_P sgemm_p
      |                         ^~~~~~~
../common_param.h:1334:25: note: in expansion of macro 'SGEMM_DEFAULT_P'
 1334 | #define SGEMM_P         SGEMM_DEFAULT_P
      |                         ^~~~~~~~~~~~~~~
../common_param.h:1482:33: note: in expansion of macro 'SGEMM_P'
 1482 | #define GEMM_P                  SGEMM_P
      |                                 ^~~~~~~
gemm.c:494:37: note: in expansion of macro 'GEMM_P'
  494 |   sb = (XFLOAT *)(((BLASLONG)sa + ((GEMM_P * GEMM_Q * COMPSIZE * SIZE + GEMM_ALIGN) & ~GEMM_ALIGN)) + GEMM_OFFSET_B);
      |                                     ^~~~~~
../param.h:3477:25: note: each undeclared identifier is reported only once for each function it appears in
 3477 | #define SGEMM_DEFAULT_P sgemm_p
      |                         ^~~~~~~
../common_param.h:1334:25: note: in expansion of macro 'SGEMM_DEFAULT_P'
 1334 | #define SGEMM_P         SGEMM_DEFAULT_P
      |                         ^~~~~~~~~~~~~~~
../common_param.h:1482:33: note: in expansion of macro 'SGEMM_P'
 1482 | #define GEMM_P                  SGEMM_P
      |                                 ^~~~~~~
gemm.c:494:37: note: in expansion of macro 'GEMM_P'
  494 |   sb = (XFLOAT *)(((BLASLONG)sa + ((GEMM_P * GEMM_Q * COMPSIZE * SIZE + GEMM_ALIGN) & ~GEMM_ALIGN)) + GEMM_OFFSET_B);
      |                                     ^~~~~~
make[5]: *** [Makefile:1295: sgemm.o] Error 1
make[5]: Leaving directory '/builder/shared-workdir/
```

Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
Lienol pushed a commit to Lienol/openwrt-packages that referenced this pull request Feb 2, 2022
Reported via:
  openwrt/packages#16823 (comment)

This fails in mips_mip32 targets with the output listed below.

Using the MIPS24K target works fine.

```
mips-openwrt-linux-musl-gcc -c -Os -pipe -mno-branch-likely -mips32 -mtune=mips32 -fno-caller-saves -fno-plt -fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result -msoft-float -ffile-prefix-map=/builder/shared-workdir/build/sdk/build_dir/target-mips_mips32_musl/OpenBLAS-0.3.18=OpenBLAS-0.3.18 -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro  -I/builder/shared-workdir/build/sdk/staging_dir/toolchain-mips_mips32_gcc-11.2.0_musl/usr/include -I/builder/shared-workdir/build/sdk/staging_dir/toolchain-mips_mips32_gcc-11.2.0_musl/include/fortify -I/builder/shared-workdir/build/sdk/staging_dir/toolchain-mips_mips32_gcc-11.2.0_musl/include   -DMAX_STACK_ALLOC=2048 -Wall -mabi=32 -DF_INTERFACE_GFORT -fPIC -DNO_LAPACK -DNO_LAPACKE -DNO_AVX512 -DSMP_SERVER -DNO_WARMUP -DMAX_CPU_NUMBER=2 -DMAX_PARALLEL_NUMBER=1 -DBUILD_SINGLE=1 -DBUILD_DOUBLE=1 -DBUILD_COMPLEX=1 -DBUILD_COMPLEX16=1 -DVERSION=\"0.3.18\" -UASMNAME -UASMFNAME -UNAME -UCNAME -UCHAR_NAME -UCHAR_CNAME -DASMNAME= -DASMFNAME=_ -DNAME=_ -DCNAME= -DCHAR_NAME=\"_\" -DCHAR_CNAME=\"\" -DNO_AFFINITY -I.  -DMAX_STACK_ALLOC=2048 -Wall -mabi=32 -DF_INTERFACE_GFORT -fPIC -DNO_LAPACK -DNO_LAPACKE -DNO_AVX512 -DSMP_SERVER -DNO_WARMUP -DMAX_CPU_NUMBER=2 -DMAX_PARALLEL_NUMBER=1 -DBUILD_SINGLE=1 -DBUILD_DOUBLE=1 -DBUILD_COMPLEX=1 -DBUILD_COMPLEX16=1 -DVERSION=\"0.3.18\" -UASMNAME -UASMFNAME -UNAME -UCNAME -UCHAR_NAME -UCHAR_CNAME -DASMNAME=sgemm -DASMFNAME=sgemm_ -DNAME=sgemm_ -DCNAME=sgemm -DCHAR_NAME=\"sgemm_\" -DCHAR_CNAME=\"sgemm\" -DNO_AFFINITY -I.. -I. -UDOUBLE  -UCOMPLEX gemm.c -o sgemm.o
In file included from ../common.h:581,
                 from gemm.c:41:
gemm.c: In function 'sgemm_':
../param.h:3477:25: error: 'sgemm_p' undeclared (first use in this function); did you mean 'sgemm_'?
 3477 | #define SGEMM_DEFAULT_P sgemm_p
      |                         ^~~~~~~
../common_param.h:1334:25: note: in expansion of macro 'SGEMM_DEFAULT_P'
 1334 | #define SGEMM_P         SGEMM_DEFAULT_P
      |                         ^~~~~~~~~~~~~~~
../common_param.h:1482:33: note: in expansion of macro 'SGEMM_P'
 1482 | #define GEMM_P                  SGEMM_P
      |                                 ^~~~~~~
gemm.c:494:37: note: in expansion of macro 'GEMM_P'
  494 |   sb = (XFLOAT *)(((BLASLONG)sa + ((GEMM_P * GEMM_Q * COMPSIZE * SIZE + GEMM_ALIGN) & ~GEMM_ALIGN)) + GEMM_OFFSET_B);
      |                                     ^~~~~~
../param.h:3477:25: note: each undeclared identifier is reported only once for each function it appears in
 3477 | #define SGEMM_DEFAULT_P sgemm_p
      |                         ^~~~~~~
../common_param.h:1334:25: note: in expansion of macro 'SGEMM_DEFAULT_P'
 1334 | #define SGEMM_P         SGEMM_DEFAULT_P
      |                         ^~~~~~~~~~~~~~~
../common_param.h:1482:33: note: in expansion of macro 'SGEMM_P'
 1482 | #define GEMM_P                  SGEMM_P
      |                                 ^~~~~~~
gemm.c:494:37: note: in expansion of macro 'GEMM_P'
  494 |   sb = (XFLOAT *)(((BLASLONG)sa + ((GEMM_P * GEMM_Q * COMPSIZE * SIZE + GEMM_ALIGN) & ~GEMM_ALIGN)) + GEMM_OFFSET_B);
      |                                     ^~~~~~
make[5]: *** [Makefile:1295: sgemm.o] Error 1
make[5]: Leaving directory '/builder/shared-workdir/
```

Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
graysky2 pushed a commit to graysky2/packages that referenced this pull request Feb 3, 2022
Reported via:
  openwrt#16823 (comment)

This fails in mips_mip32 targets with the output listed below.

Using the MIPS24K target works fine.

```
mips-openwrt-linux-musl-gcc -c -Os -pipe -mno-branch-likely -mips32 -mtune=mips32 -fno-caller-saves -fno-plt -fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result -msoft-float -ffile-prefix-map=/builder/shared-workdir/build/sdk/build_dir/target-mips_mips32_musl/OpenBLAS-0.3.18=OpenBLAS-0.3.18 -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro  -I/builder/shared-workdir/build/sdk/staging_dir/toolchain-mips_mips32_gcc-11.2.0_musl/usr/include -I/builder/shared-workdir/build/sdk/staging_dir/toolchain-mips_mips32_gcc-11.2.0_musl/include/fortify -I/builder/shared-workdir/build/sdk/staging_dir/toolchain-mips_mips32_gcc-11.2.0_musl/include   -DMAX_STACK_ALLOC=2048 -Wall -mabi=32 -DF_INTERFACE_GFORT -fPIC -DNO_LAPACK -DNO_LAPACKE -DNO_AVX512 -DSMP_SERVER -DNO_WARMUP -DMAX_CPU_NUMBER=2 -DMAX_PARALLEL_NUMBER=1 -DBUILD_SINGLE=1 -DBUILD_DOUBLE=1 -DBUILD_COMPLEX=1 -DBUILD_COMPLEX16=1 -DVERSION=\"0.3.18\" -UASMNAME -UASMFNAME -UNAME -UCNAME -UCHAR_NAME -UCHAR_CNAME -DASMNAME= -DASMFNAME=_ -DNAME=_ -DCNAME= -DCHAR_NAME=\"_\" -DCHAR_CNAME=\"\" -DNO_AFFINITY -I.  -DMAX_STACK_ALLOC=2048 -Wall -mabi=32 -DF_INTERFACE_GFORT -fPIC -DNO_LAPACK -DNO_LAPACKE -DNO_AVX512 -DSMP_SERVER -DNO_WARMUP -DMAX_CPU_NUMBER=2 -DMAX_PARALLEL_NUMBER=1 -DBUILD_SINGLE=1 -DBUILD_DOUBLE=1 -DBUILD_COMPLEX=1 -DBUILD_COMPLEX16=1 -DVERSION=\"0.3.18\" -UASMNAME -UASMFNAME -UNAME -UCNAME -UCHAR_NAME -UCHAR_CNAME -DASMNAME=sgemm -DASMFNAME=sgemm_ -DNAME=sgemm_ -DCNAME=sgemm -DCHAR_NAME=\"sgemm_\" -DCHAR_CNAME=\"sgemm\" -DNO_AFFINITY -I.. -I. -UDOUBLE  -UCOMPLEX gemm.c -o sgemm.o
In file included from ../common.h:581,
                 from gemm.c:41:
gemm.c: In function 'sgemm_':
../param.h:3477:25: error: 'sgemm_p' undeclared (first use in this function); did you mean 'sgemm_'?
 3477 | #define SGEMM_DEFAULT_P sgemm_p
      |                         ^~~~~~~
../common_param.h:1334:25: note: in expansion of macro 'SGEMM_DEFAULT_P'
 1334 | #define SGEMM_P         SGEMM_DEFAULT_P
      |                         ^~~~~~~~~~~~~~~
../common_param.h:1482:33: note: in expansion of macro 'SGEMM_P'
 1482 | #define GEMM_P                  SGEMM_P
      |                                 ^~~~~~~
gemm.c:494:37: note: in expansion of macro 'GEMM_P'
  494 |   sb = (XFLOAT *)(((BLASLONG)sa + ((GEMM_P * GEMM_Q * COMPSIZE * SIZE + GEMM_ALIGN) & ~GEMM_ALIGN)) + GEMM_OFFSET_B);
      |                                     ^~~~~~
../param.h:3477:25: note: each undeclared identifier is reported only once for each function it appears in
 3477 | #define SGEMM_DEFAULT_P sgemm_p
      |                         ^~~~~~~
../common_param.h:1334:25: note: in expansion of macro 'SGEMM_DEFAULT_P'
 1334 | #define SGEMM_P         SGEMM_DEFAULT_P
      |                         ^~~~~~~~~~~~~~~
../common_param.h:1482:33: note: in expansion of macro 'SGEMM_P'
 1482 | #define GEMM_P                  SGEMM_P
      |                                 ^~~~~~~
gemm.c:494:37: note: in expansion of macro 'GEMM_P'
  494 |   sb = (XFLOAT *)(((BLASLONG)sa + ((GEMM_P * GEMM_Q * COMPSIZE * SIZE + GEMM_ALIGN) & ~GEMM_ALIGN)) + GEMM_OFFSET_B);
      |                                     ^~~~~~
make[5]: *** [Makefile:1295: sgemm.o] Error 1
make[5]: Leaving directory '/builder/shared-workdir/
```

Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
graysky2 pushed a commit to graysky2/packages that referenced this pull request Feb 6, 2022
Reported via:
  openwrt#16823 (comment)

This fails in mips_mip32 targets with the output listed below.

Using the MIPS24K target works fine.

```
mips-openwrt-linux-musl-gcc -c -Os -pipe -mno-branch-likely -mips32 -mtune=mips32 -fno-caller-saves -fno-plt -fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result -msoft-float -ffile-prefix-map=/builder/shared-workdir/build/sdk/build_dir/target-mips_mips32_musl/OpenBLAS-0.3.18=OpenBLAS-0.3.18 -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro  -I/builder/shared-workdir/build/sdk/staging_dir/toolchain-mips_mips32_gcc-11.2.0_musl/usr/include -I/builder/shared-workdir/build/sdk/staging_dir/toolchain-mips_mips32_gcc-11.2.0_musl/include/fortify -I/builder/shared-workdir/build/sdk/staging_dir/toolchain-mips_mips32_gcc-11.2.0_musl/include   -DMAX_STACK_ALLOC=2048 -Wall -mabi=32 -DF_INTERFACE_GFORT -fPIC -DNO_LAPACK -DNO_LAPACKE -DNO_AVX512 -DSMP_SERVER -DNO_WARMUP -DMAX_CPU_NUMBER=2 -DMAX_PARALLEL_NUMBER=1 -DBUILD_SINGLE=1 -DBUILD_DOUBLE=1 -DBUILD_COMPLEX=1 -DBUILD_COMPLEX16=1 -DVERSION=\"0.3.18\" -UASMNAME -UASMFNAME -UNAME -UCNAME -UCHAR_NAME -UCHAR_CNAME -DASMNAME= -DASMFNAME=_ -DNAME=_ -DCNAME= -DCHAR_NAME=\"_\" -DCHAR_CNAME=\"\" -DNO_AFFINITY -I.  -DMAX_STACK_ALLOC=2048 -Wall -mabi=32 -DF_INTERFACE_GFORT -fPIC -DNO_LAPACK -DNO_LAPACKE -DNO_AVX512 -DSMP_SERVER -DNO_WARMUP -DMAX_CPU_NUMBER=2 -DMAX_PARALLEL_NUMBER=1 -DBUILD_SINGLE=1 -DBUILD_DOUBLE=1 -DBUILD_COMPLEX=1 -DBUILD_COMPLEX16=1 -DVERSION=\"0.3.18\" -UASMNAME -UASMFNAME -UNAME -UCNAME -UCHAR_NAME -UCHAR_CNAME -DASMNAME=sgemm -DASMFNAME=sgemm_ -DNAME=sgemm_ -DCNAME=sgemm -DCHAR_NAME=\"sgemm_\" -DCHAR_CNAME=\"sgemm\" -DNO_AFFINITY -I.. -I. -UDOUBLE  -UCOMPLEX gemm.c -o sgemm.o
In file included from ../common.h:581,
                 from gemm.c:41:
gemm.c: In function 'sgemm_':
../param.h:3477:25: error: 'sgemm_p' undeclared (first use in this function); did you mean 'sgemm_'?
 3477 | #define SGEMM_DEFAULT_P sgemm_p
      |                         ^~~~~~~
../common_param.h:1334:25: note: in expansion of macro 'SGEMM_DEFAULT_P'
 1334 | #define SGEMM_P         SGEMM_DEFAULT_P
      |                         ^~~~~~~~~~~~~~~
../common_param.h:1482:33: note: in expansion of macro 'SGEMM_P'
 1482 | #define GEMM_P                  SGEMM_P
      |                                 ^~~~~~~
gemm.c:494:37: note: in expansion of macro 'GEMM_P'
  494 |   sb = (XFLOAT *)(((BLASLONG)sa + ((GEMM_P * GEMM_Q * COMPSIZE * SIZE + GEMM_ALIGN) & ~GEMM_ALIGN)) + GEMM_OFFSET_B);
      |                                     ^~~~~~
../param.h:3477:25: note: each undeclared identifier is reported only once for each function it appears in
 3477 | #define SGEMM_DEFAULT_P sgemm_p
      |                         ^~~~~~~
../common_param.h:1334:25: note: in expansion of macro 'SGEMM_DEFAULT_P'
 1334 | #define SGEMM_P         SGEMM_DEFAULT_P
      |                         ^~~~~~~~~~~~~~~
../common_param.h:1482:33: note: in expansion of macro 'SGEMM_P'
 1482 | #define GEMM_P                  SGEMM_P
      |                                 ^~~~~~~
gemm.c:494:37: note: in expansion of macro 'GEMM_P'
  494 |   sb = (XFLOAT *)(((BLASLONG)sa + ((GEMM_P * GEMM_Q * COMPSIZE * SIZE + GEMM_ALIGN) & ~GEMM_ALIGN)) + GEMM_OFFSET_B);
      |                                     ^~~~~~
make[5]: *** [Makefile:1295: sgemm.o] Error 1
make[5]: Leaving directory '/builder/shared-workdir/
```

Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
Lienol pushed a commit to Lienol/openwrt-packages that referenced this pull request Feb 11, 2022
Reported via:
  openwrt/packages#16823 (comment)

This fails in mips_mip32 targets with the output listed below.

Using the MIPS24K target works fine.

```
mips-openwrt-linux-musl-gcc -c -Os -pipe -mno-branch-likely -mips32 -mtune=mips32 -fno-caller-saves -fno-plt -fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result -msoft-float -ffile-prefix-map=/builder/shared-workdir/build/sdk/build_dir/target-mips_mips32_musl/OpenBLAS-0.3.18=OpenBLAS-0.3.18 -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro  -I/builder/shared-workdir/build/sdk/staging_dir/toolchain-mips_mips32_gcc-11.2.0_musl/usr/include -I/builder/shared-workdir/build/sdk/staging_dir/toolchain-mips_mips32_gcc-11.2.0_musl/include/fortify -I/builder/shared-workdir/build/sdk/staging_dir/toolchain-mips_mips32_gcc-11.2.0_musl/include   -DMAX_STACK_ALLOC=2048 -Wall -mabi=32 -DF_INTERFACE_GFORT -fPIC -DNO_LAPACK -DNO_LAPACKE -DNO_AVX512 -DSMP_SERVER -DNO_WARMUP -DMAX_CPU_NUMBER=2 -DMAX_PARALLEL_NUMBER=1 -DBUILD_SINGLE=1 -DBUILD_DOUBLE=1 -DBUILD_COMPLEX=1 -DBUILD_COMPLEX16=1 -DVERSION=\"0.3.18\" -UASMNAME -UASMFNAME -UNAME -UCNAME -UCHAR_NAME -UCHAR_CNAME -DASMNAME= -DASMFNAME=_ -DNAME=_ -DCNAME= -DCHAR_NAME=\"_\" -DCHAR_CNAME=\"\" -DNO_AFFINITY -I.  -DMAX_STACK_ALLOC=2048 -Wall -mabi=32 -DF_INTERFACE_GFORT -fPIC -DNO_LAPACK -DNO_LAPACKE -DNO_AVX512 -DSMP_SERVER -DNO_WARMUP -DMAX_CPU_NUMBER=2 -DMAX_PARALLEL_NUMBER=1 -DBUILD_SINGLE=1 -DBUILD_DOUBLE=1 -DBUILD_COMPLEX=1 -DBUILD_COMPLEX16=1 -DVERSION=\"0.3.18\" -UASMNAME -UASMFNAME -UNAME -UCNAME -UCHAR_NAME -UCHAR_CNAME -DASMNAME=sgemm -DASMFNAME=sgemm_ -DNAME=sgemm_ -DCNAME=sgemm -DCHAR_NAME=\"sgemm_\" -DCHAR_CNAME=\"sgemm\" -DNO_AFFINITY -I.. -I. -UDOUBLE  -UCOMPLEX gemm.c -o sgemm.o
In file included from ../common.h:581,
                 from gemm.c:41:
gemm.c: In function 'sgemm_':
../param.h:3477:25: error: 'sgemm_p' undeclared (first use in this function); did you mean 'sgemm_'?
 3477 | #define SGEMM_DEFAULT_P sgemm_p
      |                         ^~~~~~~
../common_param.h:1334:25: note: in expansion of macro 'SGEMM_DEFAULT_P'
 1334 | #define SGEMM_P         SGEMM_DEFAULT_P
      |                         ^~~~~~~~~~~~~~~
../common_param.h:1482:33: note: in expansion of macro 'SGEMM_P'
 1482 | #define GEMM_P                  SGEMM_P
      |                                 ^~~~~~~
gemm.c:494:37: note: in expansion of macro 'GEMM_P'
  494 |   sb = (XFLOAT *)(((BLASLONG)sa + ((GEMM_P * GEMM_Q * COMPSIZE * SIZE + GEMM_ALIGN) & ~GEMM_ALIGN)) + GEMM_OFFSET_B);
      |                                     ^~~~~~
../param.h:3477:25: note: each undeclared identifier is reported only once for each function it appears in
 3477 | #define SGEMM_DEFAULT_P sgemm_p
      |                         ^~~~~~~
../common_param.h:1334:25: note: in expansion of macro 'SGEMM_DEFAULT_P'
 1334 | #define SGEMM_P         SGEMM_DEFAULT_P
      |                         ^~~~~~~~~~~~~~~
../common_param.h:1482:33: note: in expansion of macro 'SGEMM_P'
 1482 | #define GEMM_P                  SGEMM_P
      |                                 ^~~~~~~
gemm.c:494:37: note: in expansion of macro 'GEMM_P'
  494 |   sb = (XFLOAT *)(((BLASLONG)sa + ((GEMM_P * GEMM_Q * COMPSIZE * SIZE + GEMM_ALIGN) & ~GEMM_ALIGN)) + GEMM_OFFSET_B);
      |                                     ^~~~~~
make[5]: *** [Makefile:1295: sgemm.o] Error 1
make[5]: Leaving directory '/builder/shared-workdir/
```

Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
ArmyOfPirates pushed a commit to ArmyOfPirates/packages that referenced this pull request Feb 12, 2022
Reported via:
  openwrt#16823 (comment)

This fails in mips_mip32 targets with the output listed below.

Using the MIPS24K target works fine.

```
mips-openwrt-linux-musl-gcc -c -Os -pipe -mno-branch-likely -mips32 -mtune=mips32 -fno-caller-saves -fno-plt -fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result -msoft-float -ffile-prefix-map=/builder/shared-workdir/build/sdk/build_dir/target-mips_mips32_musl/OpenBLAS-0.3.18=OpenBLAS-0.3.18 -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro  -I/builder/shared-workdir/build/sdk/staging_dir/toolchain-mips_mips32_gcc-11.2.0_musl/usr/include -I/builder/shared-workdir/build/sdk/staging_dir/toolchain-mips_mips32_gcc-11.2.0_musl/include/fortify -I/builder/shared-workdir/build/sdk/staging_dir/toolchain-mips_mips32_gcc-11.2.0_musl/include   -DMAX_STACK_ALLOC=2048 -Wall -mabi=32 -DF_INTERFACE_GFORT -fPIC -DNO_LAPACK -DNO_LAPACKE -DNO_AVX512 -DSMP_SERVER -DNO_WARMUP -DMAX_CPU_NUMBER=2 -DMAX_PARALLEL_NUMBER=1 -DBUILD_SINGLE=1 -DBUILD_DOUBLE=1 -DBUILD_COMPLEX=1 -DBUILD_COMPLEX16=1 -DVERSION=\"0.3.18\" -UASMNAME -UASMFNAME -UNAME -UCNAME -UCHAR_NAME -UCHAR_CNAME -DASMNAME= -DASMFNAME=_ -DNAME=_ -DCNAME= -DCHAR_NAME=\"_\" -DCHAR_CNAME=\"\" -DNO_AFFINITY -I.  -DMAX_STACK_ALLOC=2048 -Wall -mabi=32 -DF_INTERFACE_GFORT -fPIC -DNO_LAPACK -DNO_LAPACKE -DNO_AVX512 -DSMP_SERVER -DNO_WARMUP -DMAX_CPU_NUMBER=2 -DMAX_PARALLEL_NUMBER=1 -DBUILD_SINGLE=1 -DBUILD_DOUBLE=1 -DBUILD_COMPLEX=1 -DBUILD_COMPLEX16=1 -DVERSION=\"0.3.18\" -UASMNAME -UASMFNAME -UNAME -UCNAME -UCHAR_NAME -UCHAR_CNAME -DASMNAME=sgemm -DASMFNAME=sgemm_ -DNAME=sgemm_ -DCNAME=sgemm -DCHAR_NAME=\"sgemm_\" -DCHAR_CNAME=\"sgemm\" -DNO_AFFINITY -I.. -I. -UDOUBLE  -UCOMPLEX gemm.c -o sgemm.o
In file included from ../common.h:581,
                 from gemm.c:41:
gemm.c: In function 'sgemm_':
../param.h:3477:25: error: 'sgemm_p' undeclared (first use in this function); did you mean 'sgemm_'?
 3477 | #define SGEMM_DEFAULT_P sgemm_p
      |                         ^~~~~~~
../common_param.h:1334:25: note: in expansion of macro 'SGEMM_DEFAULT_P'
 1334 | #define SGEMM_P         SGEMM_DEFAULT_P
      |                         ^~~~~~~~~~~~~~~
../common_param.h:1482:33: note: in expansion of macro 'SGEMM_P'
 1482 | #define GEMM_P                  SGEMM_P
      |                                 ^~~~~~~
gemm.c:494:37: note: in expansion of macro 'GEMM_P'
  494 |   sb = (XFLOAT *)(((BLASLONG)sa + ((GEMM_P * GEMM_Q * COMPSIZE * SIZE + GEMM_ALIGN) & ~GEMM_ALIGN)) + GEMM_OFFSET_B);
      |                                     ^~~~~~
../param.h:3477:25: note: each undeclared identifier is reported only once for each function it appears in
 3477 | #define SGEMM_DEFAULT_P sgemm_p
      |                         ^~~~~~~
../common_param.h:1334:25: note: in expansion of macro 'SGEMM_DEFAULT_P'
 1334 | #define SGEMM_P         SGEMM_DEFAULT_P
      |                         ^~~~~~~~~~~~~~~
../common_param.h:1482:33: note: in expansion of macro 'SGEMM_P'
 1482 | #define GEMM_P                  SGEMM_P
      |                                 ^~~~~~~
gemm.c:494:37: note: in expansion of macro 'GEMM_P'
  494 |   sb = (XFLOAT *)(((BLASLONG)sa + ((GEMM_P * GEMM_Q * COMPSIZE * SIZE + GEMM_ALIGN) & ~GEMM_ALIGN)) + GEMM_OFFSET_B);
      |                                     ^~~~~~
make[5]: *** [Makefile:1295: sgemm.o] Error 1
make[5]: Leaving directory '/builder/shared-workdir/
```

Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
utoni pushed a commit to utoni/openwrt-packages that referenced this pull request May 30, 2022
Reported via:
  openwrt#16823 (comment)

This fails in mips_mip32 targets with the output listed below.

Using the MIPS24K target works fine.

```
mips-openwrt-linux-musl-gcc -c -Os -pipe -mno-branch-likely -mips32 -mtune=mips32 -fno-caller-saves -fno-plt -fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result -msoft-float -ffile-prefix-map=/builder/shared-workdir/build/sdk/build_dir/target-mips_mips32_musl/OpenBLAS-0.3.18=OpenBLAS-0.3.18 -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro  -I/builder/shared-workdir/build/sdk/staging_dir/toolchain-mips_mips32_gcc-11.2.0_musl/usr/include -I/builder/shared-workdir/build/sdk/staging_dir/toolchain-mips_mips32_gcc-11.2.0_musl/include/fortify -I/builder/shared-workdir/build/sdk/staging_dir/toolchain-mips_mips32_gcc-11.2.0_musl/include   -DMAX_STACK_ALLOC=2048 -Wall -mabi=32 -DF_INTERFACE_GFORT -fPIC -DNO_LAPACK -DNO_LAPACKE -DNO_AVX512 -DSMP_SERVER -DNO_WARMUP -DMAX_CPU_NUMBER=2 -DMAX_PARALLEL_NUMBER=1 -DBUILD_SINGLE=1 -DBUILD_DOUBLE=1 -DBUILD_COMPLEX=1 -DBUILD_COMPLEX16=1 -DVERSION=\"0.3.18\" -UASMNAME -UASMFNAME -UNAME -UCNAME -UCHAR_NAME -UCHAR_CNAME -DASMNAME= -DASMFNAME=_ -DNAME=_ -DCNAME= -DCHAR_NAME=\"_\" -DCHAR_CNAME=\"\" -DNO_AFFINITY -I.  -DMAX_STACK_ALLOC=2048 -Wall -mabi=32 -DF_INTERFACE_GFORT -fPIC -DNO_LAPACK -DNO_LAPACKE -DNO_AVX512 -DSMP_SERVER -DNO_WARMUP -DMAX_CPU_NUMBER=2 -DMAX_PARALLEL_NUMBER=1 -DBUILD_SINGLE=1 -DBUILD_DOUBLE=1 -DBUILD_COMPLEX=1 -DBUILD_COMPLEX16=1 -DVERSION=\"0.3.18\" -UASMNAME -UASMFNAME -UNAME -UCNAME -UCHAR_NAME -UCHAR_CNAME -DASMNAME=sgemm -DASMFNAME=sgemm_ -DNAME=sgemm_ -DCNAME=sgemm -DCHAR_NAME=\"sgemm_\" -DCHAR_CNAME=\"sgemm\" -DNO_AFFINITY -I.. -I. -UDOUBLE  -UCOMPLEX gemm.c -o sgemm.o
In file included from ../common.h:581,
                 from gemm.c:41:
gemm.c: In function 'sgemm_':
../param.h:3477:25: error: 'sgemm_p' undeclared (first use in this function); did you mean 'sgemm_'?
 3477 | #define SGEMM_DEFAULT_P sgemm_p
      |                         ^~~~~~~
../common_param.h:1334:25: note: in expansion of macro 'SGEMM_DEFAULT_P'
 1334 | #define SGEMM_P         SGEMM_DEFAULT_P
      |                         ^~~~~~~~~~~~~~~
../common_param.h:1482:33: note: in expansion of macro 'SGEMM_P'
 1482 | #define GEMM_P                  SGEMM_P
      |                                 ^~~~~~~
gemm.c:494:37: note: in expansion of macro 'GEMM_P'
  494 |   sb = (XFLOAT *)(((BLASLONG)sa + ((GEMM_P * GEMM_Q * COMPSIZE * SIZE + GEMM_ALIGN) & ~GEMM_ALIGN)) + GEMM_OFFSET_B);
      |                                     ^~~~~~
../param.h:3477:25: note: each undeclared identifier is reported only once for each function it appears in
 3477 | #define SGEMM_DEFAULT_P sgemm_p
      |                         ^~~~~~~
../common_param.h:1334:25: note: in expansion of macro 'SGEMM_DEFAULT_P'
 1334 | #define SGEMM_P         SGEMM_DEFAULT_P
      |                         ^~~~~~~~~~~~~~~
../common_param.h:1482:33: note: in expansion of macro 'SGEMM_P'
 1482 | #define GEMM_P                  SGEMM_P
      |                                 ^~~~~~~
gemm.c:494:37: note: in expansion of macro 'GEMM_P'
  494 |   sb = (XFLOAT *)(((BLASLONG)sa + ((GEMM_P * GEMM_Q * COMPSIZE * SIZE + GEMM_ALIGN) & ~GEMM_ALIGN)) + GEMM_OFFSET_B);
      |                                     ^~~~~~
make[5]: *** [Makefile:1295: sgemm.o] Error 1
make[5]: Leaving directory '/builder/shared-workdir/
```

Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
1582130940 pushed a commit to 1582130940/OpenWrt-Lean-Packages that referenced this pull request Nov 8, 2022
Reported via:
  openwrt/packages#16823 (comment)

This fails in mips_mip32 targets with the output listed below.

Using the MIPS24K target works fine.

```
mips-openwrt-linux-musl-gcc -c -Os -pipe -mno-branch-likely -mips32 -mtune=mips32 -fno-caller-saves -fno-plt -fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result -msoft-float -ffile-prefix-map=/builder/shared-workdir/build/sdk/build_dir/target-mips_mips32_musl/OpenBLAS-0.3.18=OpenBLAS-0.3.18 -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro  -I/builder/shared-workdir/build/sdk/staging_dir/toolchain-mips_mips32_gcc-11.2.0_musl/usr/include -I/builder/shared-workdir/build/sdk/staging_dir/toolchain-mips_mips32_gcc-11.2.0_musl/include/fortify -I/builder/shared-workdir/build/sdk/staging_dir/toolchain-mips_mips32_gcc-11.2.0_musl/include   -DMAX_STACK_ALLOC=2048 -Wall -mabi=32 -DF_INTERFACE_GFORT -fPIC -DNO_LAPACK -DNO_LAPACKE -DNO_AVX512 -DSMP_SERVER -DNO_WARMUP -DMAX_CPU_NUMBER=2 -DMAX_PARALLEL_NUMBER=1 -DBUILD_SINGLE=1 -DBUILD_DOUBLE=1 -DBUILD_COMPLEX=1 -DBUILD_COMPLEX16=1 -DVERSION=\"0.3.18\" -UASMNAME -UASMFNAME -UNAME -UCNAME -UCHAR_NAME -UCHAR_CNAME -DASMNAME= -DASMFNAME=_ -DNAME=_ -DCNAME= -DCHAR_NAME=\"_\" -DCHAR_CNAME=\"\" -DNO_AFFINITY -I.  -DMAX_STACK_ALLOC=2048 -Wall -mabi=32 -DF_INTERFACE_GFORT -fPIC -DNO_LAPACK -DNO_LAPACKE -DNO_AVX512 -DSMP_SERVER -DNO_WARMUP -DMAX_CPU_NUMBER=2 -DMAX_PARALLEL_NUMBER=1 -DBUILD_SINGLE=1 -DBUILD_DOUBLE=1 -DBUILD_COMPLEX=1 -DBUILD_COMPLEX16=1 -DVERSION=\"0.3.18\" -UASMNAME -UASMFNAME -UNAME -UCNAME -UCHAR_NAME -UCHAR_CNAME -DASMNAME=sgemm -DASMFNAME=sgemm_ -DNAME=sgemm_ -DCNAME=sgemm -DCHAR_NAME=\"sgemm_\" -DCHAR_CNAME=\"sgemm\" -DNO_AFFINITY -I.. -I. -UDOUBLE  -UCOMPLEX gemm.c -o sgemm.o
In file included from ../common.h:581,
                 from gemm.c:41:
gemm.c: In function 'sgemm_':
../param.h:3477:25: error: 'sgemm_p' undeclared (first use in this function); did you mean 'sgemm_'?
 3477 | #define SGEMM_DEFAULT_P sgemm_p
      |                         ^~~~~~~
../common_param.h:1334:25: note: in expansion of macro 'SGEMM_DEFAULT_P'
 1334 | #define SGEMM_P         SGEMM_DEFAULT_P
      |                         ^~~~~~~~~~~~~~~
../common_param.h:1482:33: note: in expansion of macro 'SGEMM_P'
 1482 | #define GEMM_P                  SGEMM_P
      |                                 ^~~~~~~
gemm.c:494:37: note: in expansion of macro 'GEMM_P'
  494 |   sb = (XFLOAT *)(((BLASLONG)sa + ((GEMM_P * GEMM_Q * COMPSIZE * SIZE + GEMM_ALIGN) & ~GEMM_ALIGN)) + GEMM_OFFSET_B);
      |                                     ^~~~~~
../param.h:3477:25: note: each undeclared identifier is reported only once for each function it appears in
 3477 | #define SGEMM_DEFAULT_P sgemm_p
      |                         ^~~~~~~
../common_param.h:1334:25: note: in expansion of macro 'SGEMM_DEFAULT_P'
 1334 | #define SGEMM_P         SGEMM_DEFAULT_P
      |                         ^~~~~~~~~~~~~~~
../common_param.h:1482:33: note: in expansion of macro 'SGEMM_P'
 1482 | #define GEMM_P                  SGEMM_P
      |                                 ^~~~~~~
gemm.c:494:37: note: in expansion of macro 'GEMM_P'
  494 |   sb = (XFLOAT *)(((BLASLONG)sa + ((GEMM_P * GEMM_Q * COMPSIZE * SIZE + GEMM_ALIGN) & ~GEMM_ALIGN)) + GEMM_OFFSET_B);
      |                                     ^~~~~~
make[5]: *** [Makefile:1295: sgemm.o] Error 1
make[5]: Leaving directory '/builder/shared-workdir/
```

Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
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

Successfully merging this pull request may close these issues.

None yet

4 participants