Properly find Valgrind on OpenSUSE#961
Conversation
lukaszstolarczuk
left a comment
There was a problem hiding this comment.
Reviewable status: 0 of 4 files reviewed, 1 unresolved discussion
utils/docker/images/Dockerfile.opensuse-leap-latest, line 74 at r1 (raw file):
COPY install-valgrind.sh install-valgrind.sh RUN ./install-valgrind.sh ENV PKG_CONFIG_PATH $PKG_CONFIG_PATH:/usr/lib/pkgconfig/
perhaps instead of that, we should update CMake somehow to look in path not only /usr/lib64/ but also in /usr/lib/ (which is the case here, I guess)
Codecov Report
@@ Coverage Diff @@
## master #961 +/- ##
==========================================
- Coverage 95.87% 95.79% -0.08%
==========================================
Files 48 48
Lines 6258 6258
==========================================
- Hits 6000 5995 -5
- Misses 258 263 +5
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
igchor
left a comment
There was a problem hiding this comment.
Reviewable status: 0 of 4 files reviewed, 1 unresolved discussion
|
utils/docker/images/Dockerfile.opensuse-leap-latest, line 74 at r1 (raw file): Previously, lukaszstolarczuk (Łukasz Stolarczuk) wrote…
+1 |
karczex
left a comment
There was a problem hiding this comment.
Reviewable status: 0 of 4 files reviewed, 1 unresolved discussion (waiting on @lukaszstolarczuk)
06082a8 to
61d7ec5
Compare
|
Updated as discussed, if 'TESTS_USE_VALGRIND' is ON and no Valgrind found in the system - fail the build. |
szyrom
left a comment
There was a problem hiding this comment.
Reviewed 2 of 4 files at r1, 3 of 3 files at r2.
Reviewable status: 5 of 6 files reviewed, 1 unresolved discussion (waiting on @lukaszstolarczuk)
61d7ec5 to
3576ed9
Compare
There was a problem hiding this comment.
Reviewable status: 4 of 6 files reviewed, 2 unresolved discussions (waiting on @lukaszstolarczuk and @szyrom)
utils/docker/run-build.sh, line 347 at r3 (raw file):
cmake .. -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_INSTALL_PREFIX=$INSTALL_DIR \ -DTESTS_USE_VALGRIND=OFF \
actually - is it alright that there's no valgrind found in this build? I had to add this line, because it threw me "my new cmake exception" - "valgrind not found, but TESTS_USE_VAL was set to ON"...? is this expected? I'm not sure...
|
utils/docker/images/Dockerfile.opensuse-tumbleweed-latest, line 76 at r3 (raw file):
You probably don't need to include /usr/lib/pkgconfig. According to pkg-config man page: |
lukaszstolarczuk
left a comment
There was a problem hiding this comment.
Reviewable status: 4 of 6 files reviewed, 3 unresolved discussions (waiting on @karczex, @lukaszstolarczuk, and @szyrom)
utils/docker/images/Dockerfile.opensuse-tumbleweed-latest, line 76 at r3 (raw file):
Previously, karczex (Paweł Karczewski) wrote…
You probably don't need to include /usr/lib/pkgconfig. According to pkg-config man page:
The default directory will always be searched after searching the path;
/usr/lib/pkgconfig/ is the path that was used by Valgrind installation and it then couldn't be find in our run-build.sh. So we need to add exactly this path - the default one on this OS is lib64, I believe. Also, see my comment above
igchor
left a comment
There was a problem hiding this comment.
Reviewed 1 of 4 files at r1, 1 of 1 files at r3.
Reviewable status: all files reviewed, 4 unresolved discussions (waiting on @karczex and @lukaszstolarczuk)
utils/docker/run-build.sh, line 224 at r3 (raw file):
mkdir build && cd build echo "---------------------------- Error expected! ------------------------------"
Shouldn't this test be created as a separate functions (instead of inside tests_gcc_release_cpp17_no_valgrind)? Not sure if n jenkins, we might want to run something which messses with the system files?
utils/docker/run-build.sh, line 347 at r3 (raw file):
Previously, lukaszstolarczuk (Łukasz Stolarczuk) wrote…
actually - is it allright that there's no valgrind found in this buikd? I had to add this line, because it threw me "my new cmake exception" - "valgrind not found, but TESTS_USE_VAL was set to ON"...? is this expected? I'm not sure...
I guess it's OK, since valgrind is only found through pkg-config
utils/docker/images/Dockerfile.opensuse-leap-latest, line 74 at r1 (raw file):
Previously, karczex (Paweł Karczewski) wrote…
+1
But we're relying on pkg-config, not cmake to find the package.
3576ed9 to
de4779d
Compare
lukaszstolarczuk
left a comment
There was a problem hiding this comment.
Reviewable status: 4 of 7 files reviewed, 4 unresolved discussions (waiting on @igchor, @karczex, @lukaszstolarczuk, and @szyrom)
utils/docker/run-build.sh, line 224 at r3 (raw file):
Previously, igchor (Igor Chorążewicz) wrote…
Shouldn't this test be created as a separate functions (instead of inside tests_gcc_release_cpp17_no_valgrind)? Not sure if n jenkins, we might want to run something which messses with the system files?
Done.
utils/docker/images/Dockerfile.opensuse-leap-latest, line 74 at r1 (raw file):
Previously, igchor (Igor Chorążewicz) wrote…
But we're relying on pkg-config, not cmake to find the package.
I think we should make it possible, right now we try to find it like this (in top-level CMake):
# Find Valgrind
if(PKG_CONFIG_FOUND)
pkg_check_modules(VALGRIND QUIET valgrind)
else()
find_package(VALGRIND QUIET)
endif()
so I believe, I'll file an issue to try and deliver FindValgrind script, because it seems not to work without pkg-config. It could be fixed with something like this:
https://github.com/elemental/Elemental/blob/master/cmake/modules/FindValgrind.cmake
And update check in run-build.sh to test if build really fails.
and make sure to skip only Valgrind tests, not for all tracers.
de4779d to
441d42b
Compare
igchor
left a comment
There was a problem hiding this comment.
Reviewable status: 1 of 7 files reviewed, 3 unresolved discussions (waiting on @igchor, @karczex, @lukaszstolarczuk, and @szyrom)
utils/docker/images/Dockerfile.opensuse-leap-latest, line 74 at r1 (raw file):
Previously, lukaszstolarczuk (Łukasz Stolarczuk) wrote…
I think we should make it possible, right now we try to find it like this (in top-level CMake):
# Find Valgrind if(PKG_CONFIG_FOUND) pkg_check_modules(VALGRIND QUIET valgrind) else() find_package(VALGRIND QUIET) endif()so I believe, I'll file an issue to try and deliver FindValgrind script, because it seems not to work without pkg-config. It could be fixed with something like this:
https://github.com/elemental/Elemental/blob/master/cmake/modules/FindValgrind.cmake
But the main reason for using cmake to find packages is windows, on all other OSes we use pkg-config. Since valgrind is not avaialble on windows I don't see a reason for that.
This change is