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

Spack package update needed to 0.9 release; missing -Wno_narrowing flag in 0.8.1 release #40

Open
alansill opened this issue May 1, 2021 · 2 comments

Comments

@alansill
Copy link

alansill commented May 1, 2021

The currently available spack installation for Spindle pulls release 0.8.1 and fails due to narrowing error in compilation of spindle_logd.cc in the logging directory:

    133      CXX    spindle_logd.o
  >> 134    spindle_logd.cc:65:76: error: narrowing conversion of '255' from 'int' to 'char' inside { } [-Wnarrowing]
     135     static char exitcode[8] = { 0x01, 0xff, 0x03, 0xdf, 0x05, 0xbf, 0x07, '\n' };
     136                                                                                ^
  >> 137    spindle_logd.cc:65:76: error: narrowing conversion of '223' from 'int' to 'char' inside { } [-Wnarrowing]
  >> 138    spindle_logd.cc:65:76: error: narrowing conversion of '191' from 'int' to 'char' inside { } [-Wnarrowing]
     139      CCLD   libspindlelogc.la
     140    make[2]: *** [Makefile:386: spindle_logd.o] Error 1
     141    make[2]: Leaving directory '/tmp/asill/spack-stage/spack-stage-spindle-0.8.1-u6g66hhvbkxfa7n32x2gzferzpurspf3/spack-src/logging'
     142    make[1]: *** [Makefile:319: all-recursive] Error 1
     143    make[1]: Leaving directory '/tmp/asill/spack-stage/spack-stage-spindle-0.8.1-u6g66hhvbkxfa7n32x2gzferzpurspf3/spack-src'
     144    make: *** [Makefile:248: all] Error 2

I can work around this by using ./bin/spack install spindle cxxflags="-Wno-narrowing" but likely the spack package should be updated and this flag fixed for the older tarball for manual installations.

@alansill alansill changed the title Spack package update needed; missing mpi.h Spack package update needed to 0.9 release; missing -Wno_narrowing flag in 0.8.1 release May 1, 2021
@mplegendre
Copy link
Member

What compiler and version produces this error?

@alansill
Copy link
Author

alansill commented May 5, 2021

I've seen this with 8.3.1 but think it will occur with any recent gcc version. Note the problem seems to be fixed in the main branch code so this is only a problem with the release 0.8.1 flagged. I t can be worked around as mentioned or by editing the spack yaml file for the package to include this flag.

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