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

compile LERC test binary in postinstallcmds to fix sanity check error when RPATH linking is enabled #19386

Merged
merged 3 commits into from
Dec 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 8 additions & 2 deletions easybuild/easyconfigs/l/LERC/LERC-3.0-GCCcore-10.2.0.eb
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,19 @@ builddependencies = [
('CMake', '3.18.4'),
]

configopts = '-DCMAKE_INSTALL_LIBDIR=lib'

postinstallcmds = [
# copy the LercTest source file to a LercTest subdir in the installation directory and compile it
# (needs to be done here instead of in the sanity check, else it won't work when RPATH linking is enabled)
"cd %(builddir)s/lerc-%(version)s/src/LercTest && sed -i -e 's@../LercLib/include/@@' main.cpp",
"cp %(builddir)s/lerc-%(version)s/src/LercTest/main.cpp %(installdir)s/test.c",
"mkdir %(installdir)s/LercTest",
"cp %(builddir)s/lerc-%(version)s/src/LercTest/main.cpp %(installdir)s/LercTest/main.cpp",
"cd %(installdir)s/LercTest && ${CXX} ${CXXFLAGS} main.cpp -o LercTest -I../include -L../lib -lLerc",
]

sanity_check_commands = [
"mkdir -p %(builddir)s && cd %(builddir)s && g++ %(installdir)s/test.c -o lerctest -lLerc && ./lerctest",
"%(installdir)s/LercTest/LercTest",
]

sanity_check_paths = {
Expand Down
10 changes: 8 additions & 2 deletions easybuild/easyconfigs/l/LERC/LERC-3.0-GCCcore-10.3.0.eb
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,19 @@ builddependencies = [
('CMake', '3.20.1'),
]

configopts = '-DCMAKE_INSTALL_LIBDIR=lib'

postinstallcmds = [
# copy the LercTest source file to a LercTest subdir in the installation directory and compile it
# (needs to be done here instead of in the sanity check, else it won't work when RPATH linking is enabled)
"cd %(builddir)s/lerc-%(version)s/src/LercTest && sed -i -e 's@../LercLib/include/@@' main.cpp",
"cp %(builddir)s/lerc-%(version)s/src/LercTest/main.cpp %(installdir)s/test.c",
"mkdir %(installdir)s/LercTest",
"cp %(builddir)s/lerc-%(version)s/src/LercTest/main.cpp %(installdir)s/LercTest/main.cpp",
"cd %(installdir)s/LercTest && ${CXX} ${CXXFLAGS} main.cpp -o LercTest -I../include -L../lib -lLerc",
]

sanity_check_commands = [
"mkdir -p %(builddir)s && cd %(builddir)s && g++ %(installdir)s/test.c -o lerctest -lLerc && ./lerctest",
"%(installdir)s/LercTest/LercTest",
]

sanity_check_paths = {
Expand Down
10 changes: 8 additions & 2 deletions easybuild/easyconfigs/l/LERC/LERC-4.0.0-GCCcore-11.3.0.eb
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,19 @@ builddependencies = [
('CMake', '3.23.1'),
]

configopts = '-DCMAKE_INSTALL_LIBDIR=lib'

postinstallcmds = [
# copy the LercTest source file to a LercTest subdir in the installation directory and compile it
# (needs to be done here instead of in the sanity check, else it won't work when RPATH linking is enabled)
"cd %(builddir)s/lerc-%(version)s/src/LercTest && sed -i -e 's@../LercLib/include/@@' main.cpp",
"cp %(builddir)s/lerc-%(version)s/src/LercTest/main.cpp %(installdir)s/test.c",
"mkdir %(installdir)s/LercTest",
"cp %(builddir)s/lerc-%(version)s/src/LercTest/main.cpp %(installdir)s/LercTest/main.cpp",
"cd %(installdir)s/LercTest && ${CXX} ${CXXFLAGS} main.cpp -o LercTest -I../include -L../lib -lLerc",
]

sanity_check_commands = [
"mkdir -p %(builddir)s && cd %(builddir)s && g++ %(installdir)s/test.c -o lerctest -lLerc && ./lerctest",
"%(installdir)s/LercTest/LercTest",
]

sanity_check_paths = {
Expand Down
10 changes: 8 additions & 2 deletions easybuild/easyconfigs/l/LERC/LERC-4.0.0-GCCcore-12.2.0.eb
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,19 @@ builddependencies = [
('CMake', '3.24.3'),
]

configopts = '-DCMAKE_INSTALL_LIBDIR=lib'

postinstallcmds = [
# copy the LercTest source file to a LercTest subdir in the installation directory and compile it
# (needs to be done here instead of in the sanity check, else it won't work when RPATH linking is enabled)
"cd %(builddir)s/lerc-%(version)s/src/LercTest && sed -i -e 's@../LercLib/include/@@' main.cpp",
"cp %(builddir)s/lerc-%(version)s/src/LercTest/main.cpp %(installdir)s/test.c",
"mkdir %(installdir)s/LercTest",
"cp %(builddir)s/lerc-%(version)s/src/LercTest/main.cpp %(installdir)s/LercTest/main.cpp",
"cd %(installdir)s/LercTest && ${CXX} ${CXXFLAGS} main.cpp -o LercTest -I../include -L../lib -lLerc",
]

sanity_check_commands = [
"mkdir -p %(builddir)s && cd %(builddir)s && g++ %(installdir)s/test.c -o lerctest -lLerc && ./lerctest",
"%(installdir)s/LercTest/LercTest",
]

sanity_check_paths = {
Expand Down
10 changes: 8 additions & 2 deletions easybuild/easyconfigs/l/LERC/LERC-4.0.0-GCCcore-12.3.0.eb
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,19 @@ builddependencies = [
('CMake', '3.26.3'),
]

configopts = '-DCMAKE_INSTALL_LIBDIR=lib'

postinstallcmds = [
# copy the LercTest source file to a LercTest subdir in the installation directory and compile it
# (needs to be done here instead of in the sanity check, else it won't work when RPATH linking is enabled)
"cd %(builddir)s/lerc-%(version)s/src/LercTest && sed -i -e 's@../LercLib/include/@@' main.cpp",
"cp %(builddir)s/lerc-%(version)s/src/LercTest/main.cpp %(installdir)s/test.c",
"mkdir %(installdir)s/LercTest",
"cp %(builddir)s/lerc-%(version)s/src/LercTest/main.cpp %(installdir)s/LercTest/main.cpp",
"cd %(installdir)s/LercTest && ${CXX} ${CXXFLAGS} main.cpp -o LercTest -I../include -L../lib -lLerc",
]

sanity_check_commands = [
"mkdir -p %(builddir)s && cd %(builddir)s && g++ %(installdir)s/test.c -o lerctest -lLerc && ./lerctest",
"%(installdir)s/LercTest/LercTest",
]

sanity_check_paths = {
Expand Down