Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 824982 - dev-util/kernelshark-1.2 - dataplot.cpp:(.text+<snip>): undefined reference to glutInit
Summary: dev-util/kernelshark-1.2 - dataplot.cpp:(.text+<snip>): undefined reference t...
Status: CONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Patrick McLean
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-11-19 16:38 UTC by Toralf Förster
Modified: 2022-06-16 16:58 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge-info.txt (emerge-info.txt,16.24 KB, text/plain)
2021-11-19 16:38 UTC, Toralf Förster
Details
dev-util:kernelshark-1.2:20211119-144425.log (dev-util:kernelshark-1.2:20211119-144425.log,64.18 KB, text/plain)
2021-11-19 16:38 UTC, Toralf Förster
Details
emerge-history.txt (emerge-history.txt,119.00 KB, text/plain)
2021-11-19 16:38 UTC, Toralf Förster
Details
environment (environment,90.76 KB, text/plain)
2021-11-19 16:38 UTC, Toralf Förster
Details
etc.portage.tar.bz2 (etc.portage.tar.bz2,23.34 KB, application/x-bzip)
2021-11-19 16:38 UTC, Toralf Förster
Details
logs.tar.bz2 (logs.tar.bz2,4.61 KB, application/x-bzip)
2021-11-19 16:38 UTC, Toralf Förster
Details
temp.tar.bz2 (temp.tar.bz2,26.90 KB, application/x-bzip)
2021-11-19 16:38 UTC, Toralf Förster
Details
Patch based on Alex Fan's comment to fix compile (can be used as user patch) (kernelshark-1.2-GLUT_LIBRARIES.patch,468 bytes, patch)
2022-03-08 14:18 UTC, Christian Schmidt
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Toralf Förster gentoo-dev 2021-11-19 16:38:25 UTC
too long lines were shrinked:

[61/71] : && /usr/bin/x86_64-pc-linux-gnu-g++ -pipe -march=native -fno-diagnostics-color -O3 -Wall -std=c++11 -pthread -fPIC -Wl,-O1 -Wl,--as-needed -Wl,--defsym=__gentoo_check_ldflags__=0    -rdynamic examples/CMakeFiles/dplot.dir/dataplot.cpp.o -o /var/tmp/portage/dev-util/kernelshark-1.2/work/tra
FAILED: /var/tmp/portage/dev-util/kernelshark-1.2/work/trace-cmd-kernelshark-v1.2/kernel-shark/bin/dplot 
: && /usr/bin/x86_64-pc-linux-gnu-g++ -pipe -march=native -fno-diagnostics-color -O3 -Wall -std=c++11 -pthread -fPIC -Wl,-O1 -Wl,--as-needed -Wl,--defsym=__gentoo_check_ldflags__=0    -rdynamic examples/CMakeFiles/dplot.dir/dataplot.cpp.o -o /var/tmp/portage/dev-util/kernelshark-1.2/work/trace-cmd-k
/usr/lib/gcc/x86_64-pc-linux-gnu/11.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: examples/CMakeFiles/dplot.dir/dataplot.cpp.o: in function `main::{lambda(void (*)())#1}::operator()(void (*)()) const [clone .isra.0]':
dataplot.cpp:(.text+0x148): undefined reference to `glutInit'
/usr/lib/gcc/x86_64-pc-linux-gnu/11.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: dataplot.cpp:(.text+0x169): undefined reference to `glutDisplayFunc'
/usr/lib/gcc/x86_64-pc-linux-gnu/11.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: dataplot.cpp:(.text+0x16f): undefined reference to `glutMainLoop'
/usr/lib/gcc/x86_64-pc-linux-gnu/11.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: /var/tmp/portage/dev-util/kernelshark-1.2/work/trace-cmd-kernelshark-v1.2/kernel-shark/lib/libkshark-plot.so.1.2.0: undefined reference to `glutInitWindowPosition'
/usr/lib/gcc/x86_64-pc-linux-gnu/11.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: /var/tmp/portage/dev-util/kernelshark-1.2/work/trace-cmd-kernelshark-v1.2/kernel-shark/lib/libkshark-plot.so.1.2.0: undefined reference to `glutInitDisplayMode'

  -------------------------------------------------------------------

  This is an unstable amd64 chroot image at a tinderbox (==build bot)
  name: 17.1_desktop_gnome-j4-20211118-152943

  -------------------------------------------------------------------

gcc-config -l:
 [1] x86_64-pc-linux-gnu-11.2.0 *
clang version 13.0.0
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/lib/llvm/13/bin
/usr/lib/llvm/13
13.0.0
Python 3.9.9
Available Ruby profiles:
  [1]   ruby26 (with Rubygems)
  [2]   ruby27 (with Rubygems)
  [3]   ruby30 (with Rubygems) *
Available Rust versions:
  [1]   rust-1.56.1 *
The Glorious Glasgow Haskell Compilation System, version 8.10.4
php cli:

  HEAD of ::gentoo
commit 64371ec3a0cde2acac65c3980576f836d63f2ad9
Author: Repository mirror & CI <repomirrorci@gentoo.org>
Date:   Fri Nov 19 14:21:49 2021 +0000

    2021-11-19 14:21:48 UTC

emerge -qpvO dev-util/kernelshark
[ebuild  N    ] dev-util/kernelshark-1.2  USE="-custom-optimization -doc"
Comment 1 Toralf Förster gentoo-dev 2021-11-19 16:38:26 UTC
Created attachment 753134 [details]
emerge-info.txt
Comment 2 Toralf Förster gentoo-dev 2021-11-19 16:38:27 UTC
Created attachment 753138 [details]
dev-util:kernelshark-1.2:20211119-144425.log
Comment 3 Toralf Förster gentoo-dev 2021-11-19 16:38:29 UTC
Created attachment 753142 [details]
emerge-history.txt
Comment 4 Toralf Förster gentoo-dev 2021-11-19 16:38:30 UTC
Created attachment 753146 [details]
environment
Comment 5 Toralf Förster gentoo-dev 2021-11-19 16:38:31 UTC
Created attachment 753150 [details]
etc.portage.tar.bz2
Comment 6 Toralf Förster gentoo-dev 2021-11-19 16:38:32 UTC
Created attachment 753154 [details]
logs.tar.bz2
Comment 7 Toralf Förster gentoo-dev 2021-11-19 16:38:33 UTC
Created attachment 753158 [details]
temp.tar.bz2
Comment 8 Alex Fan archtester 2022-01-15 10:57:45 UTC
I encountered the same glut issue in sci-libs/vtk. Upstream uses obsolete GLUT_LIBRARY, which is no longer defined.
https://git.kernel.org/pub/scm/utils/trace-cmd/trace-cmd.git/tree/kernel-shark/src/CMakeLists.txt?h=kernelshark-v1.2&id=448b08e49550ed6ee988404999ced753dc1a5ab6#n27

The proper variable for glut library should be GLUT_LIBRARIES as in cmake document.
Comment 9 Christian Schmidt 2022-03-08 14:18:00 UTC
Created attachment 766590 [details, diff]
Patch based on Alex Fan's comment to fix compile (can be used as user patch)

This is a trivial patch to replace GLUT_LIBRARY with GLUT_LIBRARIES, based on Alex Fan's comment. So far only tested to compile.
Comment 10 cJ 2022-04-01 18:28:23 UTC
Tested here, looks good.

Unrelated, kernelshark was launched with workaround:
 LD_LIBRARY_PATH=/usr/lib64/trace-cmd:/usr/lib64/tracefs:/usr/lib64/traceevent kernelshark
Comment 11 Larry the Git Cow gentoo-dev 2022-06-16 16:58:21 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8e4742a4aaf16615a8cb633c4b027b80fb1da81e

commit 8e4742a4aaf16615a8cb633c4b027b80fb1da81e
Author:     Christian Schmidt <schmidt@digadd.de>
AuthorDate: 2022-03-19 19:47:34 +0000
Commit:     Patrick McLean <chutzpah@gentoo.org>
CommitDate: 2022-06-16 16:57:44 +0000

    dev-util/kernelshark: bump to 2.1.0
    
    Signed-off-by: Christian Schmidt <gentoo@digadd.de>
    Bug: https://bugs.gentoo.org/824982
    Closes: https://github.com/gentoo/gentoo/pull/24667
    Signed-off-by: Patrick McLean <chutzpah@gentoo.org>

 dev-util/kernelshark/Manifest                      |  1 +
 .../kernelshark-2.1.0-fix-desktop-version.patch    | 11 ++++
 .../files/kernelshark-2.1.0-no-ldconfig.patch      | 16 ++++++
 dev-util/kernelshark/kernelshark-2.1.0.ebuild      | 60 ++++++++++++++++++++++
 4 files changed, 88 insertions(+)

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5e28158e9f5826b2a56dd5bf6c099bab00b8f5d4

commit 5e28158e9f5826b2a56dd5bf6c099bab00b8f5d4
Author:     Christian Schmidt <schmidt@digadd.de>
AuthorDate: 2022-03-19 19:47:16 +0000
Commit:     Patrick McLean <chutzpah@gentoo.org>
CommitDate: 2022-06-16 16:57:33 +0000

    dev-utils/trace-cmd: Add 3.0.2
    
    Signed-off-by: Christian Schmidt <gentoo@digadd.de>
    Bug: https://bugs.gentoo.org/824982
    Signed-off-by: Patrick McLean <chutzpah@gentoo.org>

 dev-util/trace-cmd/Manifest               |   1 +
 dev-util/trace-cmd/trace-cmd-3.0.2.ebuild | 134 ++++++++++++++++++++++++++++++
 2 files changed, 135 insertions(+)

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=550cda64f94f986d2462725dbca605b922c41543

commit 550cda64f94f986d2462725dbca605b922c41543
Author:     Christian Schmidt <schmidt@digadd.de>
AuthorDate: 2022-03-19 19:46:56 +0000
Commit:     Patrick McLean <chutzpah@gentoo.org>
CommitDate: 2022-06-16 16:55:25 +0000

    dev-libs/libtracefs: New package, add 1.3.1
    
    Signed-off-by: Christian Schmidt <gentoo@digadd.de>
    Bug: https://bugs.gentoo.org/824982
    Signed-off-by: Patrick McLean <chutzpah@gentoo.org>

 dev-libs/libtracefs/Manifest                |  1 +
 dev-libs/libtracefs/libtracefs-1.3.1.ebuild | 51 +++++++++++++++++++++++++++++
 dev-libs/libtracefs/metadata.xml            |  8 +++++
 3 files changed, 60 insertions(+)

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=aecd00ce5b2d029b0fe27a9e45cfb11d13de8e75

commit aecd00ce5b2d029b0fe27a9e45cfb11d13de8e75
Author:     Christian Schmidt <schmidt@digadd.de>
AuthorDate: 2022-03-19 19:46:37 +0000
Commit:     Patrick McLean <chutzpah@gentoo.org>
CommitDate: 2022-06-16 16:53:23 +0000

    dev-libs/libtraceevent: new package
    
    libtraceevent is a prerequisite for newer versions of dev-util/trace-cmd
    and dev-util/kernelshark, factored out from the former by upstream.
    
    Signed-off-by: Christian Schmidt <gentoo@digadd.de>
    Bug: https://bugs.gentoo.org/824982
    Signed-off-by: Patrick McLean <chutzpah@gentoo.org>

 dev-libs/libtraceevent/Manifest                   |  1 +
 dev-libs/libtraceevent/libtraceevent-1.5.2.ebuild | 46 +++++++++++++++++++++++
 dev-libs/libtraceevent/metadata.xml               |  8 ++++
 3 files changed, 55 insertions(+)