-
Notifications
You must be signed in to change notification settings - Fork 26
Fix errors when building an RPM #178
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
Open
adrianreber
wants to merge
5
commits into
Parallel-NetCDF:master
Choose a base branch
from
adrianreber:2025-04-27-DESTDIR
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Fix errors when building an RPM #178
adrianreber
wants to merge
5
commits into
Parallel-NetCDF:master
from
adrianreber:2025-04-27-DESTDIR
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Building an RPM for OpenHPC of pnetcdf fails with: ``` + /usr/lib/rpm/check-buildroot /home/ohpc/rpmbuild/BUILDROOT/pnetcdf-gnu14-mvapich2-ohpc-1.14.0-19999.ci.ohpc.x86_64/opt/ohpc/pub/libs/gnu14/mvapich2/pnetcdf/1.14.0/bin/pnetcdf-config:prefix=/home/ohpc/rpmbuild/BUILDROOT/pnetcdf-gnu14-mvapich2-ohpc-1.14.0-19999.ci.ohpc.x86_64/opt/ohpc/pub/libs/gnu14/mvapich2/pnetcdf/1.14.0 /home/ohpc/rpmbuild/BUILDROOT/pnetcdf-gnu14-mvapich2-ohpc-1.14.0-19999.ci.ohpc.x86_64/opt/ohpc/pub/libs/gnu14/mvapich2/pnetcdf/1.14.0/bin/pnetcdf-config:exec_prefix=/home/ohpc/rpmbuild/BUILDROOT/pnetcdf-gnu14-mvapich2-ohpc-1.14.0-19999.ci.ohpc.x86_64/opt/ohpc/pub/libs/gnu14/mvapich2/pnetcdf/1.14.0 /home/ohpc/rpmbuild/BUILDROOT/pnetcdf-gnu14-mvapich2-ohpc-1.14.0-19999.ci.ohpc.x86_64/opt/ohpc/pub/libs/gnu14/mvapich2/pnetcdf/1.14.0/lib/pkgconfig/pnetcdf.pc:prefix=/home/ohpc/rpmbuild/BUILDROOT/pnetcdf-gnu14-mvapich2-ohpc-1.14.0-19999.ci.ohpc.x86_64/opt/ohpc/pub/libs/gnu14/mvapich2/pnetcdf/1.14.0 /home/ohpc/rpmbuild/BUILDROOT/pnetcdf-gnu14-mvapich2-ohpc-1.14.0-19999.ci.ohpc.x86_64/opt/ohpc/pub/libs/gnu14/mvapich2/pnetcdf/1.14.0/lib/pkgconfig/pnetcdf.pc:exec_prefix=/home/ohpc/rpmbuild/BUILDROOT/pnetcdf-gnu14-mvapich2-ohpc-1.14.0-19999.ci.ohpc.x86_64/opt/ohpc/pub/libs/gnu14/mvapich2/pnetcdf/1.14.0 Found '/home/ohpc/rpmbuild/BUILDROOT/pnetcdf-gnu14-mvapich2-ohpc-1.14.0-19999.ci.ohpc.x86_64' in installed files; aborting ``` The reason is that the variable DESTDIR is added to the path of the binary location. This is, however, wrong. DESTDIR is the directory where the files are installed but not where they are located in the final RPM. Keeping DESTDIR for the file location is correct but not for the path where the files are located. With this patch applied, it is possible to create an RPM without errors like above. Signed-off-by: Adrian Reber <[email protected]>
5dd9e7a
to
0434f5a
Compare
Needed for openhpc/ohpc#2127 |
Revise to take one requires command-line argument and one optional: prefix and DESTDIR. Note command "make install prefix=/path/of/install DESTDIR=/path/to/dest" does not install the library. It copies all install files into folder "$DESTDIR/$prefix", so one can cd to $DESTDIR and pack the folder $prefix there into a tar ball.
Thanks. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Building an RPM for OpenHPC of pnetcdf fails with:
The reason is that the variable DESTDIR is added to the path of the binary location. This is, however, wrong. DESTDIR is the directory where the files are installed but not where they are located in the final RPM.
Keeping DESTDIR for the file location is correct but not for the path where the files are located.
With this patch applied, it is possible to create an RPM without errors like above.