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 failure: error: '_Generic' selector of type 'long unsigned int' is not compatible with any association #145

Closed
barracuda156 opened this issue Oct 27, 2024 · 4 comments

Comments

@barracuda156
Copy link

--->  Building bfs
Executing:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_sysutils_bfs/bfs/work/bfs-4.0.3" && /usr/bin/make -j6 -w bfs CC="/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_sysutils_bfs/bfs/work/compwrap/cc/opt/local/bin/gcc-mp-14" CXX="/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_sysutils_bfs/bfs/work/compwrap/cxx/opt/local/bin/g++-mp-14" OBJC="/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_sysutils_bfs/bfs/work/compwrap/objc/opt/local/bin/gcc-mp-14" OBJCXX="/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_sysutils_bfs/bfs/work/compwrap/objcxx/opt/local/bin/g++-mp-14" FC="/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_sysutils_bfs/bfs/work/compwrap/fc/opt/local/bin/gfortran-mp-14" F77="/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_sysutils_bfs/bfs/work/compwrap/f77/opt/local/bin/gfortran-mp-14" F90="/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_sysutils_bfs/bfs/work/compwrap/f90/opt/local/bin/gfortran-mp-14" INSTALL="/opt/x86_64/bin/ginstall -c" 
make: Entering directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_sysutils_bfs/bfs/work/bfs-4.0.3'
[ CC ] src/main.c
[ CC ] src/bftw.c
[ CC ] src/bar.c
[ CC ] src/alloc.c
[ CC ] src/bfstd.c
[ CC ] src/color.c
In file included from src/bfstd.c:7:
src/bfstd.c: In function 'asciinlen':
src/bit.h:205:18: error: '_Generic' selector of type 'long unsigned int' is not compatible with any association
  205 |         _Generic((n), \
      |                  ^
src/bfstd.c:753:24: note: in expansion of macro 'bswap'
  753 |                 word = bswap(word);
      |                        ^~~~~
make: *** [obj/src/bfstd.o] Error 1
make: *** Waiting for unfinished jobs....
make: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_sysutils_bfs/bfs/work/bfs-4.0.3'
Command failed:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_sysutils_bfs/bfs/work/bfs-4.0.3" && /usr/bin/make -j6 -w bfs CC="/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_sysutils_bfs/bfs/work/compwrap/cc/opt/local/bin/gcc-mp-14" CXX="/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_sysutils_bfs/bfs/work/compwrap/cxx/opt/local/bin/g++-mp-14" OBJC="/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_sysutils_bfs/bfs/work/compwrap/objc/opt/local/bin/gcc-mp-14" OBJCXX="/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_sysutils_bfs/bfs/work/compwrap/objcxx/opt/local/bin/g++-mp-14" FC="/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_sysutils_bfs/bfs/work/compwrap/fc/opt/local/bin/gfortran-mp-14" F77="/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_sysutils_bfs/bfs/work/compwrap/f77/opt/local/bin/gfortran-mp-14" F90="/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_sysutils_bfs/bfs/work/compwrap/f90/opt/local/bin/gfortran-mp-14" INSTALL="/opt/x86_64/bin/ginstall -c" 
Exit code: 2
Error: Failed to build bfs: command execution failed
@tavianator
Copy link
Owner

That means you must be running a big-endian system right? A PowerPC Mac I assume?

@tavianator
Copy link
Owner

If you get a chance, can you try the fix (515cda3) and see if it works? I can't easily test on a PPC Mac.

@barracuda156
Copy link
Author

@tavianator Yes, that is on ppc (in Rosetta in this case).
I will try your fix today on a PowerPC natively and let you know. Thank you for addressing this!

@barracuda156
Copy link
Author

@tavianator Thank you, 515cda3 fixes the build.

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