https://bugs.lttng.org/https://bugs.lttng.org/themes/lttng/favicon/a.ico?14249722912016-07-08T16:05:22ZLTTng bugs repositoryLTTng-UST - Bug #1042: Error during make on a clean systemhttps://bugs.lttng.org/issues/1042?journal_id=30462016-07-08T16:05:22ZSébastien Boisvertsboisvert@gydle.com
<ul></ul><p>Hi Ricardo,</p>
<p>Can you try with this patch:</p>
<pre><code><a class="external" href="https://github.com/sebhtml/lttng-ust/commit/70b1330de854adf544fcdf8b61f644d3af79e052.patch">https://github.com/sebhtml/lttng-ust/commit/70b1330de854adf544fcdf8b61f644d3af79e052.patch</a></code></pre>
<p>From my branch </p>
<pre><code><a class="external" href="https://github.com/sebhtml/lttng-ust/commits/lttng-ust-issue-1042.v1">https://github.com/sebhtml/lttng-ust/commits/lttng-ust-issue-1042.v1</a></code></pre> LTTng-UST - Bug #1042: Error during make on a clean systemhttps://bugs.lttng.org/issues/1042?journal_id=30472016-07-08T16:06:33ZSébastien Boisvertsboisvert@gydle.com
<ul></ul><p>The fix could be implemented 100% in FindLTTngUST.cmake such that it looks in the lttng-ust source distribution for the header file and for the shared library.</p>
<p>I don't think that we would really want that.</p> LTTng-UST - Bug #1042: Error during make on a clean systemhttps://bugs.lttng.org/issues/1042?journal_id=30482016-07-08T16:09:59ZSébastien Boisvertsboisvert@gydle.com
<ul></ul><p>So...</p>
<p>The 3 solutions that I can see are:</p>
<p>1. The patch that I provided (or a variant thereof).</p>
<p>2. Implement a solution strictly in FindLTTngUST.cmake.</p>
<p>3. Don't build this example if if LTTngUST is not found on the system.</p> LTTng-UST - Bug #1042: Error during make on a clean systemhttps://bugs.lttng.org/issues/1042?journal_id=30492016-07-08T16:36:52ZRicardo Nabinger Sanchezrnsanchez@gmail.com
<ul></ul><p>On another machine (without LTTng), using the repository/branch mentioned by Sébastien, the build completed without errors:<br /><pre>
(...)
make[4]: Leaving directory '/home/rnsanchez/apps/lttng/lttng-ust-sebhtml/doc/examples/gen-tp'
if [ x"cmake-multiple-shared-libraries" != x"" ]; then \
for subdir in cmake-multiple-shared-libraries; do \
(cd cmake-multiple-shared-libraries && mkdir -p build && cd build && cmake .. && make && cd ..) || exit 1; \
done; \
fi;
-- The C compiler identification is GNU 5.3.0
-- The CXX compiler identification is GNU 5.3.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Could NOT find LTTngUST (missing: LTTNGUST_LIBRARIES LTTNGUST_INCLUDE_DIRS)
-- Configuring done
-- Generating done
-- Build files have been written to: /home/rnsanchez/apps/lttng/lttng-ust-sebhtml/doc/examples/cmake-multiple-shared-libraries/build
make[4]: Entering directory '/home/rnsanchez/apps/lttng/lttng-ust-sebhtml/doc/examples/cmake-multiple-shared-libraries/build'
make[5]: Entering directory '/home/rnsanchez/apps/lttng/lttng-ust-sebhtml/doc/examples/cmake-multiple-shared-libraries/build'
make[6]: Entering directory '/home/rnsanchez/apps/lttng/lttng-ust-sebhtml/doc/examples/cmake-multiple-shared-libraries/build'
Scanning dependencies of target tracepoint-provider
make[6]: Leaving directory '/home/rnsanchez/apps/lttng/lttng-ust-sebhtml/doc/examples/cmake-multiple-shared-libraries/build'
make[6]: Entering directory '/home/rnsanchez/apps/lttng/lttng-ust-sebhtml/doc/examples/cmake-multiple-shared-libraries/build'
[ 10%] Building CXX object CMakeFiles/tracepoint-provider.dir/tracepoint-provider.cpp.o
[ 20%] Linking CXX shared library libtracepoint-provider.so
make[6]: Leaving directory '/home/rnsanchez/apps/lttng/lttng-ust-sebhtml/doc/examples/cmake-multiple-shared-libraries/build'
[ 20%] Built target tracepoint-provider
make[6]: Entering directory '/home/rnsanchez/apps/lttng/lttng-ust-sebhtml/doc/examples/cmake-multiple-shared-libraries/build'
Scanning dependencies of target aligner-lib
make[6]: Leaving directory '/home/rnsanchez/apps/lttng/lttng-ust-sebhtml/doc/examples/cmake-multiple-shared-libraries/build'
make[6]: Entering directory '/home/rnsanchez/apps/lttng/lttng-ust-sebhtml/doc/examples/cmake-multiple-shared-libraries/build'
[ 30%] Building CXX object CMakeFiles/aligner-lib.dir/aligner-lib.cpp.o
[ 40%] Linking CXX shared library libaligner-lib.so
make[6]: Leaving directory '/home/rnsanchez/apps/lttng/lttng-ust-sebhtml/doc/examples/cmake-multiple-shared-libraries/build'
[ 40%] Built target aligner-lib
make[6]: Entering directory '/home/rnsanchez/apps/lttng/lttng-ust-sebhtml/doc/examples/cmake-multiple-shared-libraries/build'
Scanning dependencies of target tester-lib
make[6]: Leaving directory '/home/rnsanchez/apps/lttng/lttng-ust-sebhtml/doc/examples/cmake-multiple-shared-libraries/build'
make[6]: Entering directory '/home/rnsanchez/apps/lttng/lttng-ust-sebhtml/doc/examples/cmake-multiple-shared-libraries/build'
[ 50%] Building CXX object CMakeFiles/tester-lib.dir/tester-lib.cpp.o
[ 60%] Linking CXX shared library libtester-lib.so
make[6]: Leaving directory '/home/rnsanchez/apps/lttng/lttng-ust-sebhtml/doc/examples/cmake-multiple-shared-libraries/build'
[ 60%] Built target tester-lib
make[6]: Entering directory '/home/rnsanchez/apps/lttng/lttng-ust-sebhtml/doc/examples/cmake-multiple-shared-libraries/build'
Scanning dependencies of target tester
make[6]: Leaving directory '/home/rnsanchez/apps/lttng/lttng-ust-sebhtml/doc/examples/cmake-multiple-shared-libraries/build'
make[6]: Entering directory '/home/rnsanchez/apps/lttng/lttng-ust-sebhtml/doc/examples/cmake-multiple-shared-libraries/build'
[ 70%] Building CXX object CMakeFiles/tester.dir/tester.cpp.o
[ 80%] Linking CXX executable tester
make[6]: Leaving directory '/home/rnsanchez/apps/lttng/lttng-ust-sebhtml/doc/examples/cmake-multiple-shared-libraries/build'
[ 80%] Built target tester
make[6]: Entering directory '/home/rnsanchez/apps/lttng/lttng-ust-sebhtml/doc/examples/cmake-multiple-shared-libraries/build'
Scanning dependencies of target aligner
make[6]: Leaving directory '/home/rnsanchez/apps/lttng/lttng-ust-sebhtml/doc/examples/cmake-multiple-shared-libraries/build'
make[6]: Entering directory '/home/rnsanchez/apps/lttng/lttng-ust-sebhtml/doc/examples/cmake-multiple-shared-libraries/build'
[ 90%] Building CXX object CMakeFiles/aligner.dir/aligner.cpp.o
[100%] Linking CXX executable aligner
make[6]: Leaving directory '/home/rnsanchez/apps/lttng/lttng-ust-sebhtml/doc/examples/cmake-multiple-shared-libraries/build'
[100%] Built target aligner
make[5]: Leaving directory '/home/rnsanchez/apps/lttng/lttng-ust-sebhtml/doc/examples/cmake-multiple-shared-libraries/build'
make[4]: Leaving directory '/home/rnsanchez/apps/lttng/lttng-ust-sebhtml/doc/examples/cmake-multiple-shared-libraries/build'
make[3]: Leaving directory '/home/rnsanchez/apps/lttng/lttng-ust-sebhtml/doc/examples'
make[2]: Leaving directory '/home/rnsanchez/apps/lttng/lttng-ust-sebhtml/doc'
make[1]: Leaving directory '/home/rnsanchez/apps/lttng/lttng-ust-sebhtml'
</pre></p> LTTng-UST - Bug #1042: Error during make on a clean systemhttps://bugs.lttng.org/issues/1042?journal_id=30502016-07-08T16:48:42ZMathieu Desnoyersmathieu.desnoyers@efficios.com
<ul></ul><p>I would think that there might be a way to FindLTTngUST.cmake to look in additional spots ?</p>
<p>So it would itself not have to know whether it is invoked from src tree or not, but would rather receive environment variables telling it where to look.</p>
<p>Solution (1) looks weird because there appears to be an error in the configure output (cannot find...), but then it succeeds afterward.</p> LTTng-UST - Bug #1042: Error during make on a clean systemhttps://bugs.lttng.org/issues/1042?journal_id=30512016-07-08T17:28:51ZPhilippe Proulxeeppeliteloop@gmail.com
<ul></ul><p><code>find_path()</code> and <code>find_library()</code> need to know where to find the include and library files beyond the system directories.</p>
<p>One of the many ways to achieve this is by using the standard CMake definitions <code>CMAKE_INCLUDE_PATH</code> and <code>CMAKE_LIBRARY_PATH</code>.</p>
<p>This is fixed in <a href="https://github.com/lttng/lttng-ust/pull/35" class="external">this GH pull request</a>.</p> LTTng-UST - Bug #1042: Error during make on a clean systemhttps://bugs.lttng.org/issues/1042?journal_id=30522016-07-08T18:30:04ZPhilippe Proulxeeppeliteloop@gmail.com
<ul><li><strong>Status</strong> changed from <i>New</i> to <i>Resolved</i></li><li><strong>% Done</strong> changed from <i>0</i> to <i>100</i></li></ul><p>Applied in changeset ust|commit:0363661e12053e578f5cae7e29108c7029ed74ae.</p> LTTng-UST - Bug #1042: Error during make on a clean systemhttps://bugs.lttng.org/issues/1042?journal_id=30532016-07-08T18:44:57ZRicardo Nabinger Sanchezrnsanchez@gmail.com
<ul></ul><p>Confirmed:<br /><pre>
(...)
-- Found LTTngUST: /home/rnsanchez/apps/lttng/lttng-ust/liblttng-ust/.libs/liblttng-ust.so;dl (found version "2.9.0")
-- Configuring done
-- Generating done
-- Build files have been written to: /home/rnsanchez/apps/lttng/lttng-ust/doc/examples/cmake-multiple-shared-libraries/build
(...)
</pre></p>