While trying to compile itt sample from https://github.com/intel/IntelSEAPI,
it was initially facing header file error.
$gcc InstrumentationExample.cpp main.cpp -o itt-sample -littnotify64 -lstdc++
-lpthread -I /usr/include/ittnotify
InstrumentationExample.cpp:53:10: fatal error: itt_notify.hpp: No such file or
directory
53 | #include "itt_notify.hpp"
| ^~~~~~~~~~~~~~~~
compilation terminated.
main.cpp:18:10: fatal error: itt_notify.hpp: No such file or directory
18 | #include "itt_notify.hpp"
| ^~~~~~~~~~~~~~~~
compilation terminated.
While mannually added the missing itt_notify.hpp header to the image, it
was facing the compilation errors while using the only available
library (libittnotify64.a) provided by itt.
$gcc InstrumentationExample.cpp main.cpp -o itt-sample -littnotify64 -lstdc++
-lpthread -I /usr/include/ittnotify
In file included from /usr/include/ittnotify/itt_notify.hpp:8,
from InstrumentationExample.cpp:53:
/usr/include/ittnotify/ittnotify.h:253:6: warning: #warning "Deprecated API is
used. Please undefine INTEL_ITTNOTIFY_ENABLE_LEGACY macro" [-Wcpp]
253 | # warning "Deprecated API is used. Please undefine
INTEL_ITTNOTIFY_ENABLE_LEGACY macro"
| ^~~~~~~
/usr/lib/gcc/x86_64-poky-linux/9.2.0/../../../../x86_64-poky-linux/bin/ld:
/usr/lib/gcc/x86_64-poky-linux/9.2.0/../../../../lib/libittnotify64.a(ittnotify_static.c.o):
in function `__itt_init_ittlib':
/usr/src/debug/itt/17.01.28-r0/git/ittnotify/src/ittnotify/ittnotify_static.c:1189:
undefined reference to `dlerror'
collect2: error: ld returned 1 exit status
Found that it was missing the required libIntelSEAPI64.so library.
Compilation of itt sample succeeded after adding both missing header and
library.
Enhanced the itt recipe to provide both the itt_notify.hpp and
libIntelSEAPI64.so.
Signed-off-by: Yeoh Ee Peng <[email protected]>
---
recipes-multimedia/itt/itt_17.01.28.bb | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/recipes-multimedia/itt/itt_17.01.28.bb
b/recipes-multimedia/itt/itt_17.01.28.bb
index b4a3727..752ecaa 100644
--- a/recipes-multimedia/itt/itt_17.01.28.bb
+++ b/recipes-multimedia/itt/itt_17.01.28.bb
@@ -21,10 +21,16 @@ EXTRA_OECMAKE +=
"${@oe.utils.conditional('TARGET_ARCH','x86_64','','-DFORCE_32=
COMPATIBLE_HOST_libc-musl_class-target = "null"
do_install() {
+ # Create the directories needed
install -d -m 755 ${D}${libdir} ${D}${includedir}/ittnotify
install -m 644 ${S}/bin/*.a ${D}${libdir}
+ install -m 755 ${S}/bin/*.so ${D}${libdir}
cp -r ${S}/ittnotify/include/* ${D}${includedir}/ittnotify
cp -r ${S}/ittnotify/src/ittnotify/*.h ${D}${includedir}/ittnotify
+ cp -r ${S}/*.hpp ${D}${includedir}/ittnotify
}
+FILES_${PN} = "${libdir}"
+FILES_${PN}-dev = "${includedir}"
+
RDEPENDS_${PN}-dev_remove = "${PN} (= ${EXTENDPKGV})"
--
2.7.4
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#6398):
https://lists.yoctoproject.org/g/meta-intel/message/6398
Mute This Topic: https://lists.yoctoproject.org/mt/71642673/21656
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/meta-intel/unsub
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-