-
Notifications
You must be signed in to change notification settings - Fork 369
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
put USE_HDF5 in the GNUMake build system #1047
Conversation
Tools/GNUMake/packages/Make.hdf5
Outdated
HDF5_ABSPATH = $(abspath $(AMREX_HDF5_HOME)) | ||
INCLUDE_LOCATIONS += $(HDF5_ABSPATH)/include | ||
LIBRARY_LOCATIONS += $(HDF5_ABSPATH)/lib | ||
LIBRARIES += -lhdf5 -lz -ldl -L$(HDF5_ABSPATH)/lib |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Even when AMREX_HDF5_HOME
is not defined, we should have those -l
s.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you mean these three: -lhdf5 -lz -ldl
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, they might be found without -L.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And we probably also want to pass -Xlinker=-rpath -Xlinker=$(HDF5_ABSPATH)/lib
.
Tools/GNUMake/packages/Make.hdf5
Outdated
HDF5_ABSPATH = $(abspath $(AMREX_HDF5_HOME)) | ||
INCLUDE_LOCATIONS += $(HDF5_ABSPATH)/include | ||
LIBRARY_LOCATIONS += $(HDF5_ABSPATH)/lib | ||
LIBRARIES += -L$(HDF5_ABSPATH)/lib |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This line is not needed because the path has already been added to LIBRARY_LOCATIONS
. In Make.defs
, we have
LDFLAGS += -L. $(addprefix -L, $(LIBRARY_LOCATIONS))
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We also have:
ifeq ($(USE_RPATH),TRUE)
LDFLAGS += -Xlinker -rpath -Xlinker '$(abspath .)' $(addprefix -Xlinker -rpath -Xlinker , $(abspath $(LIBRARY_LOCATIONS)))
endif
in Make.defs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, but USE_RPATH
is not defaulted to TRUE
.
No description provided.