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

Hermes Build Error: 'O_TMPFILE' was not declared in this scope #492

Closed
mengtang-pnnl opened this issue Feb 20, 2023 · 3 comments
Closed
Assignees
Milestone

Comments

@mengtang-pnnl
Copy link
Contributor

mengtang-pnnl commented Feb 20, 2023

Hermes beta 0.9.5

Both buildings with Spack and CMake have the O_TMPFILE error.
From building with Spack:

>> 309    /tmp/$USER/spack-stage/spack-stage-hermes-master-3kaezfwzoaefbzsmklylfvcesjzp4yst/spack-src/adapter/posix/fs_api.cc:24:44: error: 'O_TMPFILE' was not declared in this scope

From building with CMake:

[ 11%] Building CXX object adapter/posix/CMakeFiles/hermes_posix_backend.dir/fs_api.cc.o
/people/tang584/hermes_stage/hermes/adapter/posix/fs_api.cc: In member function ‘virtual hermes::adapter::fs::File hermes::adapter::posix::PosixFS::_RealOpen(hermes::adapter::fs::AdapterStat&, const string&)’:
/people/tang584/hermes_stage/hermes/adapter/posix/fs_api.cc:24:44: error: ‘O_TMPFILE’ was not declared in this scope
   24 |   if (stat.flags & O_CREAT || stat.flags & O_TMPFILE) {
      |                                            ^~~~~~~~~
make[2]: *** [adapter/posix/CMakeFiles/hermes_posix_backend.dir/fs_api.cc.o] Error 1
make[1]: *** [adapter/posix/CMakeFiles/hermes_posix_backend.dir/all] Error 2
make: *** [all] Error 2

Solution for building with CMake:
Add the below lines to hermes/adapter/filesystem/filesystem.h

#ifndef O_TMPFILE
#define O_TMPFILE 0x0
#endif
@hyoklee
Copy link
Member

hyoklee commented Feb 20, 2023

Hi, @mengtang-pnnl !

Thank you for your report!
This is a known issue and a FAQ item:

https://github.com/HDFGroup/hermes/wiki/FAQ#can-i-run-hermes-on-mac

@mengtang-pnnl , are you building on macOS?
If not, what's the output of uname -a?

@mengtang-pnnl
Copy link
Contributor Author

Hi @hyoklee.

I am building on CentOS7.
uname -a output:

Linux bluesky 3.10.0-693.5.2.el7.x86_64 #1 SMP Fri Oct 20 20:32:50 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

@hyoklee
Copy link
Member

hyoklee commented Feb 25, 2023

@hyoklee hyoklee self-assigned this Feb 25, 2023
@hyoklee hyoklee added this to the Usability milestone Feb 25, 2023
hyoklee added a commit that referenced this issue Feb 25, 2023
lukemartinlogan added a commit that referenced this issue Mar 2, 2023
@hyoklee hyoklee closed this as completed Mar 2, 2023
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