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

Fails to compile with gcc 11: error: size of array element is not a multiple of its alignment #313

Closed
candrews opened this issue May 5, 2021 · 3 comments

Comments

@candrews
Copy link

candrews commented May 5, 2021

Trying to compile cpuminer-opt 3.16.2 with gcc-11 results in this build failure:

x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I.  -Iyes/include -Iyes/include -fno-strict-aliasing  -I. -Iyes/include -Iyes/include -Wno-pointer-sign -Wno-pointer-to-int-cast   -O2 -march=native -pipe -fuse-linker-plugin -flto -Wl,-flto -ftree-vectorize -falign-functions=32 -fgraphite-identity -floop-nest-optimize -fno-common -fno-lto -fno-use-linker-plugin  -Iyes/include -Iyes/include -c -o algo/blake/cpuminer-blake2b-hash-4way.o `test -f 'algo/blake/blake2b-hash-4way.c' || echo './'`algo/blake/blake2b-hash-4way.c
algo/blake/sph-blake2s.c: In function ‘blake2s’:
algo/blake/sph-blake2s.c:326:9: error: size of array element is not a multiple of its alignment
  326 |         blake2s_state S[1];
      |         ^~~~~~~~~~~~~
make[2]: *** [Makefile:3158: algo/blake/cpuminer-sph-blake2s.o] Error 1

Originally reported at https://bugs.gentoo.org/787230

@JayDDee
Copy link
Owner

JayDDee commented May 5, 2021

It appears to be a problem with the location of the alignment attribute in the typedef as described here:
https://bugzilla.redhat.com/show_bug.cgi?id=1937076

The same error was found in a few other places. They will be fixed in the next release.

@JayDDee
Copy link
Owner

JayDDee commented May 6, 2021

cpuminer-opt-3.16.3 is released, please retest.

@candrews
Copy link
Author

candrews commented May 6, 2021

It now builds - thank you!

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

2 participants