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

Issues building on linux-rhel7-power9le with Spack (GCC 10.2.0) #3133

Closed
stmobo opened this issue Aug 12, 2020 · 7 comments
Closed

Issues building on linux-rhel7-power9le with Spack (GCC 10.2.0) #3133

stmobo opened this issue Aug 12, 2020 · 7 comments

Comments

@stmobo
Copy link

stmobo commented Aug 12, 2020

I'm trying to install flux-sched@master+cuda using Spack (using the instructions in the Quick Start), but I'm running into an error while building flux-core. I'm using GCC 10.2.0 (installed via Spack) on a linux-rhel7-power9le system.

I get the same error when installing the latest tagged version ([email protected]+cuda) and when installing the latest master branch (flux-core@master+cuda).

The full error text is:

==> Installing flux-core
==> No binary for flux-core found: installing from source
==> flux-core: Executing phase: 'autoreconf'
==> flux-core: Executing phase: 'configure'
==> flux-core: Executing phase: 'build'
==> Error: ProcessError: Command exited with status 2:
    'make' '-j16'

5 errors found in build log:
     454      CC       unlink_recursive.lo
     455      CC       sds.lo
     456      CC       sha1.lo
     457      CC       sha256.lo
     458      CC       blobref.lo
     459    /tmp/smobo/spack-stage/spack-stage-flux-core-master-6rcivxwdqmmxnh6ffgaqyfqlrsechbjy/spack-src/src/common/libutil/sds.c: In function 'sdsRemoveFreeSpace':
  >> 460    /tmp/smobo/spack-stage/spack-stage-flux-core-master-6rcivxwdqmmxnh6ffgaqyfqlrsechbjy/spack-src/src/common/libutil/sds.c:264:15: error: writing 1 byte into a region of size 0 [-Werror=stringop-overflow=]
     461      264 |         s[-1] = type;
     462          |         ~~~~~~^~~~~~
     463    In file included from /tmp/smobo/spack-stage/spack-stage-flux-core-master-6rcivxwdqmmxnh6ffgaqyfqlrsechbjy/spack-src/src/common/libutil/sds.c:39:
     464    /tmp/smobo/spack-stage/spack-stage-flux-core-master-6rcivxwdqmmxnh6ffgaqyfqlrsechbjy/spack-src/src/common/libutil/sdsalloc.h:40:18: note: at offset -1 to an object with size 0 allocated by 'malloc' here
     465       40 | #define s_malloc malloc
     466    /tmp/smobo/spack-stage/spack-stage-flux-core-master-6rcivxwdqmmxnh6ffgaqyfqlrsechbjy/spack-src/src/common/libutil/sds.c:259:17: note: in expansion of macro 's_malloc'

     ...

     477      CC       dirwalk.lo
     478      CC       tomltk.lo
     479      CC       timestamp.lo
     480      CC       mnemonic.lo
     481      CC       mn_wordlist.lo
     482    cc1: all warnings being treated as errors
  >> 483    make[3]: *** [sds.lo] Error 1
     484    make[3]: *** Waiting for unfinished jobs....
     485    make[3]: Leaving directory `/tmp/smobo/spack-stage/spack-stage-flux-core-master-6rcivxwdqmmxnh6ffgaqyfqlrsechbjy/spack-src/spack-build/src/common/libutil'
  >> 486    make[2]: *** [all-recursive] Error 1
     487    make[2]: Leaving directory `/tmp/smobo/spack-stage/spack-stage-flux-core-master-6rcivxwdqmmxnh6ffgaqyfqlrsechbjy/spack-src/spack-build/src/common'
  >> 488    make[1]: *** [all-recursive] Error 1
     489    make[1]: Leaving directory `/tmp/smobo/spack-stage/spack-stage-flux-core-master-6rcivxwdqmmxnh6ffgaqyfqlrsechbjy/spack-src/spack-build/src'
  >> 490    make: *** [all-recursive] Error 1

See build log for details:
  /tmp/smobo/spack-stage/spack-stage-flux-core-master-6rcivxwdqmmxnh6ffgaqyfqlrsechbjy/spack-build-out.txt

==> Warning: Skipping build of flux-sched since flux-core failed
==> Error: Installation of flux-sched failed.  Review log for details

I also saved a copy of the Spack build log, if that helps: spack-build-out.txt

@SteVwonder
Copy link
Member

Thanks @stmobo for the detailed compilation error and logs. After glancing at the SDS lib, I think the code is fine. I'm going to guess that GCC 10 added a new static analysis pass, and it is getting caught up in the pointer arithmetic going on in the sds library. Unfortunately, the upstream appears to be abandoned (no PRs merged for almost a year), and I don't see any open issues about this.

While we sort this out, can you try compiling with GCC 8 or older? We regularly compile with GCC 8 in our CI, so it shouldn't run into these types of issues (GCC 9 might also work).

@SteVwonder
Copy link
Member

As far as fixing this issue, it looks like the vendored sds library is only used in one file: cmdhelp.c. Assuming that the upstream sds is abandoned, maybe we drop its usage from that file and then drop the vendored dependency entirely?

@grondo
Copy link
Contributor

grondo commented Aug 12, 2020

Yeah, that seems reasonable if it is the case. I'll see if I can quickly get that done.

@grondo
Copy link
Contributor

grondo commented Aug 12, 2020

Also used in an optparse unit test, but still, should be easily removed.

@grondo
Copy link
Contributor

grondo commented Aug 12, 2020

@stmobo, #3135 has been merged, so want to try your spack build with flux-core@master again? Thanks!!

@stmobo
Copy link
Author

stmobo commented Aug 12, 2020

@grondo That fixed the compilation error I was having with flux-core, thanks!

Unfortunately, I then ran into other errors building flux-sched@master itself, so I guess I'll have to compile with GCC 8 instead as suggested by @SteVwonder .

Thank you both for your quick help, though!

@SteVwonder
Copy link
Member

Thanks @stmobo! Do you still have the compilation errors from building flux-sched@master with GCC 10? If so, do you mind opening an issue over on the flux-sched repo with the errors?

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