LLNL / UnifyFS

UnifyFS: A file system for burst buffers
Other
105 stars 31 forks source link

Compile errors on GCC 4 from PR 736 #738

Closed CamStan closed 2 years ago

CamStan commented 2 years ago

Describe the problem you're observing

UnifyFS is now failing to build on the default compiler on LC systems (GCC v4.9.3) since PR #736 was merged.

The issues are stemming from unifyfs-ls.cpp.

Describe how to reproduce the problem

Build UnifyFS using GCC v4.9.3

First failed in GitLab CI, reproduced manually as well.

Include any warning or errors or releveant debugging data

../../../../util/unifyfs-api-client/src/unifyfs-ls.cpp: In function ‘int main(int, char**)’:
../../../../util/unifyfs-api-client/src/unifyfs-ls.cpp:95:10: error: ‘it’ does not name a type
     auto it = file_set.cbegin();
          ^
../../../../util/unifyfs-api-client/src/unifyfs-ls.cpp:96:12: error: ‘it’ was not declared in this scope
     while (it != file_set.cend()) {
            ^
../../../../util/unifyfs-api-client/src/unifyfs-ls.cpp:96:27: error: ‘class std::set<unifyfs_server_file_meta, CompareByFilename>’ has no member named ‘cend’
     while (it != file_set.cend()) {
                           ^
../../../../util/unifyfs-api-client/src/unifyfs-ls.cpp:109:5: error: ‘it’ was not declared in this scope
     it = file_set.cbegin();
     ^
../../../../util/unifyfs-api-client/src/unifyfs-ls.cpp:109:19: error: ‘class std::set<unifyfs_server_file_meta, CompareByFilename>’ has no member named ‘cbegin’
     it = file_set.cbegin();
                   ^
../../../../util/unifyfs-api-client/src/unifyfs-ls.cpp:111:26: error: ‘free’ was not declared in this scope
         free(it->filename);
                          ^
../../../../util/unifyfs-api-client/src/unifyfs-ls.cpp: In function ‘void parseOpts(int, char**, CommandOptions&)’:
../../../../util/unifyfs-api-client/src/unifyfs-ls.cpp:194:28: error: ‘exit’ was not declared in this scope
                     exit( 0);
                            ^
make[4]: *** [Makefile:639: unifyfs_ls-unifyfs-ls.o] Error 1
CamStan commented 2 years ago

Just capturing the issue, but haven't looked into it. @rgmiller, these make sense or simple enough to fix?

rgmiller commented 2 years ago

Oh dear! I didn't realize we still built with gcc 4.x. That compiler probably isn't new enough to support the auto keyword. Let me look into it.

rgmiller commented 2 years ago

OK, just building gcc 4.9.3 is a problem. Spack fails on both my office workstation and on Summit. I'm going to try a VM running CentOS7 and see if that works.