mbox series

[v6,0/2] Add initial support for meson

Message ID 20230207124634.6515-1-dwagner@suse.de (mailing list archive)
Headers show
Series Add initial support for meson | expand

Message

Daniel Wagner Feb. 7, 2023, 12:46 p.m. UTC
This version brings a few cleanups on the documentation intallation path
and pkg-config depenedency updates.

Changes:

v6:
  - lib: isntall trace-cmd.h directly in /usr/include and not subdir
    trace-cmd. kernelshark builds breaks otherwise

v5:
  - lib: set default html doc path to share/doc/libtracemd-doc
  - lib: list libtraceevent and libtracefs in Required pkg-config section.
  - lib: install (any) man5 pages (keep it in sync with other projects)
  - trace-cmd: install (any) man5 pages (keep it in sync with other projects)
  - trace-cmd: set default html doch patch to share/doc/trace-cmd-doc

v4:
  - changed project defaults to --default-library=both
  - code style consistency updates
  - hardening doc install script (shellcheck)
  - renamed install-man.sh.in to install-docs.sh.in
  - install-docs.sh.in installs html pages too
  - introduces docs target
  - updated copyright year
  - streamlined documentation meson build file

v3:
  - generate tc_version.h file
  - lib: cleaning up the standalone build vs trace-cmd build
  - s/conf10.set/conf.set10/
  - default build target is debug
  - do not install man pages into subdirs

v2:
  - make audit dependency optional as default
  - integrate static libtracecmd build into trace-cmd directly
  - remove check-manpages target in trace-cmd

v1:
  - initial version

Daniel Wagner (2):
  libtracecmd: Add initial support for meson
  trace-cmd: Add initial support for meson

 Documentation/libtracecmd/install-docs.sh.in |  20 ++
 Documentation/libtracecmd/meson.build        | 168 +++++++++++++++++
 Documentation/trace-cmd/install-docs.sh.in   |  20 ++
 Documentation/trace-cmd/meson.build          | 187 +++++++++++++++++++
 lib/Documentation                            |   1 +
 lib/check-manpages.sh                        |   1 +
 lib/meson.build                              | 112 +++++++++++
 lib/meson_options.txt                        |  19 ++
 lib/trace-cmd/include/meson.build            |   5 +
 lib/trace-cmd/include/private/meson.build    |  14 ++
 lib/trace-cmd/meson.build                    |  87 +++++++++
 meson-vcs-tag.sh                             |  17 ++
 meson.build                                  | 149 +++++++++++++++
 meson_options.txt                            |  23 +++
 python/meson.build                           |  40 ++++
 tracecmd/meson.build                         |  59 ++++++
 utest/meson.build                            |  26 +++
 17 files changed, 948 insertions(+)
 create mode 100755 Documentation/libtracecmd/install-docs.sh.in
 create mode 100644 Documentation/libtracecmd/meson.build
 create mode 100755 Documentation/trace-cmd/install-docs.sh.in
 create mode 100644 Documentation/trace-cmd/meson.build
 create mode 120000 lib/Documentation
 create mode 120000 lib/check-manpages.sh
 create mode 100644 lib/meson.build
 create mode 100644 lib/meson_options.txt
 create mode 100644 lib/trace-cmd/include/meson.build
 create mode 100644 lib/trace-cmd/include/private/meson.build
 create mode 100644 lib/trace-cmd/meson.build
 create mode 100755 meson-vcs-tag.sh
 create mode 100644 meson.build
 create mode 100644 meson_options.txt
 create mode 100644 python/meson.build
 create mode 100644 tracecmd/meson.build
 create mode 100644 utest/meson.build

Comments

Daniel Wagner Feb. 7, 2023, 1:48 p.m. UTC | #1
On Tue, Feb 07, 2023 at 01:46:32PM +0100, Daniel Wagner wrote:
> This version brings a few cleanups on the documentation intallation path
> and pkg-config depenedency updates.
> 
> Changes:
> 
> v6:
>   - lib: isntall trace-cmd.h directly in /usr/include and not subdir
>     trace-cmd. kernelshark builds breaks otherwise

No, this is not the real problem. The Makefile also installs it under
/usr/include/trace-cmd.
Steven Rostedt Feb. 7, 2023, 3:10 p.m. UTC | #2
On Tue, 7 Feb 2023 14:48:25 +0100
Daniel Wagner <dwagner@suse.de> wrote:

> On Tue, Feb 07, 2023 at 01:46:32PM +0100, Daniel Wagner wrote:
> > This version brings a few cleanups on the documentation intallation path
> > and pkg-config depenedency updates.
> > 
> > Changes:
> > 
> > v6:
> >   - lib: isntall trace-cmd.h directly in /usr/include and not subdir
> >     trace-cmd. kernelshark builds breaks otherwise  
> 
> No, this is not the real problem. The Makefile also installs it under
> /usr/include/trace-cmd.

But `pkg-config --cflags libtracecmd` should give the right path:

  -I/usr/include/trace-cmd -I/usr/include/tracefs -I/usr/include/traceevent

This is the way it's always been. Why are your kernelshark builds breaking?

-- Steve
Daniel Wagner Feb. 7, 2023, 3:45 p.m. UTC | #3
On Tue, Feb 07, 2023 at 10:10:01AM -0500, Steven Rostedt wrote:
> On Tue, 7 Feb 2023 14:48:25 +0100
> Daniel Wagner <dwagner@suse.de> wrote:
> 
> > On Tue, Feb 07, 2023 at 01:46:32PM +0100, Daniel Wagner wrote:
> > > This version brings a few cleanups on the documentation intallation path
> > > and pkg-config depenedency updates.
> > > 
> > > Changes:
> > > 
> > > v6:
> > >   - lib: isntall trace-cmd.h directly in /usr/include and not subdir
> > >     trace-cmd. kernelshark builds breaks otherwise  
> > 
> > No, this is not the real problem. The Makefile also installs it under
> > /usr/include/trace-cmd.
> 
> But `pkg-config --cflags libtracecmd` should give the right path:
> 
>   -I/usr/include/trace-cmd -I/usr/include/tracefs -I/usr/include/traceevent
> 
> This is the way it's always been. Why are your kernelshark builds breaking?

Not sure what's happening. I've build and installed the library with make
and the kernelshark configuration step still fails. I see the following
output (make and meson):

$ cmake -S . -B foo --debug-find
Running with debug output on for the `find` commands.

 project: Kernel Shark: (version: 2.1.1)

CMake Debug Log at build/FindTraceEvent.cmake:39 (find_package):
  find_package considered the following paths for FindPkgConfig.cmake:

    /home/wagi/work/osc/home:wagi:branches:devel:trace/kernelshark/kernel-shark/build/FindPkgConfig.cmake

  The file was found at

    /usr/share/cmake/Modules/FindPkgConfig.cmake

Call Stack (most recent call first):
  CMakeLists.txt:48 (find_package)


CMake Debug Log at CMakeLists.txt:48 (find_package):
  find_package considered the following paths for FindTraceEvent.cmake:

    /usr/share/cmake/Modules/FindTraceEvent.cmake

  The file was found at

    /home/wagi/work/osc/home:wagi:branches:devel:trace/kernelshark/kernel-shark/build/FindTraceEvent.cmake



CMake Debug Log at build/FindTraceFS.cmake:39 (find_package):
  find_package considered the following paths for FindPkgConfig.cmake:

    /home/wagi/work/osc/home:wagi:branches:devel:trace/kernelshark/kernel-shark/build/FindPkgConfig.cmake

  The file was found at

    /usr/share/cmake/Modules/FindPkgConfig.cmake

Call Stack (most recent call first):
  CMakeLists.txt:49 (find_package)


CMake Debug Log at CMakeLists.txt:49 (find_package):
  find_package considered the following paths for FindTraceFS.cmake:

    /usr/share/cmake/Modules/FindTraceFS.cmake

  The file was found at

    /home/wagi/work/osc/home:wagi:branches:devel:trace/kernelshark/kernel-shark/build/FindTraceFS.cmake



CMake Debug Log at build/FindTraceCmd.cmake:39 (find_package):
  find_package considered the following paths for FindPkgConfig.cmake:

    /home/wagi/work/osc/home:wagi:branches:devel:trace/kernelshark/kernel-shark/build/FindPkgConfig.cmake

  The file was found at

    /usr/share/cmake/Modules/FindPkgConfig.cmake

Call Stack (most recent call first):
  CMakeLists.txt:50 (find_package)


CMake Debug Log at build/FindTraceCmd.cmake:45 (find_path):
  find_path called with the following settings:

    VAR: TraceCmd_INCLUDE_DIR
    NAMES: "trace-cmd.h"
    Documentation: Path to a file.
    Framework
      Only Search Frameworks: 0
      Search Frameworks Last: 0
      Search Frameworks First: 0
    AppBundle
      Only Search AppBundle: 0
      Search AppBundle Last: 0
      Search AppBundle First: 0
    CMAKE_FIND_USE_CMAKE_PATH: 1
    CMAKE_FIND_USE_CMAKE_ENVIRONMENT_PATH: 1
    CMAKE_FIND_USE_SYSTEM_ENVIRONMENT_PATH: 1
    CMAKE_FIND_USE_CMAKE_SYSTEM_PATH: 1
    CMAKE_FIND_USE_INSTALL_PREFIX: 1

  find_path considered the following locations:

    /usr/local/include/trace-cmd/trace-cmd.h
    /usr/include/libtracefs/trace-cmd.h
    /usr/include/traceevent/trace-cmd.h
    /home/wagi/work/osc/home:wagi:branches:devel:trace/kernelshark/kernel-shark/trace-cmd.h
    /home/wagi/bin/trace-cmd.h
    /home/wagi/.local/bin/trace-cmd.h
    /home/wagi/node_modules/.bin/trace-cmd.h
    /home/wagi/work/osc/home:wagi:branches:devel:trace/kernelshark/kernel-shark/usr/local/bin/trace-cmd.h
    /usr/local/bin/trace-cmd.h
    /usr/bin/trace-cmd.h
    /bin/trace-cmd.h
    /usr/local/include/trace-cmd.h
    /usr/local/trace-cmd.h
    /usr/include/trace-cmd.h
    /usr/trace-cmd.h
    /include/trace-cmd.h
    /usr/X11R6/include/trace-cmd.h
    /usr/X11R6/trace-cmd.h
    /usr/pkg/include/trace-cmd.h
    /usr/pkg/trace-cmd.h
    /opt/include/trace-cmd.h
    /opt/trace-cmd.h
    /usr/include/X11/trace-cmd.h

  The item was not found.

Call Stack (most recent call first):
  CMakeLists.txt:50 (find_package)


CMake Error at /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
  Could NOT find TraceCmd (missing: TraceCmd_INCLUDE_DIR)
Call Stack (most recent call first):
  /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:600 (_FPHSA_FAILURE_MESSAGE)
  build/FindTraceCmd.cmake:57 (find_package_handle_standard_args)
  CMakeLists.txt:50 (find_package)


CMake Debug Log at CMakeLists.txt:50 (find_package):
  find_package considered the following paths for FindTraceCmd.cmake:

    /usr/share/cmake/Modules/FindTraceCmd.cmake

  The file was found at

    /home/wagi/work/osc/home:wagi:branches:devel:trace/kernelshark/kernel-shark/build/FindTraceCmd.cmake



-- Configuring incomplete, errors occurred!
See also "/home/wagi/work/osc/home:wagi:branches:devel:trace/kernelshark/kernel-shark/foo/CMakeFiles/CMakeOutput.log".
Steven Rostedt Feb. 7, 2023, 4:18 p.m. UTC | #4
On Tue, 7 Feb 2023 16:45:46 +0100
Daniel Wagner <dwagner@suse.de> wrote:

>   find_path considered the following locations:
> 
>     /usr/local/include/trace-cmd/trace-cmd.h

If you run "pkg-config --cflags libtracecmd" what output does it give you?

-- Steve

>     /usr/include/libtracefs/trace-cmd.h
>     /usr/include/traceevent/trace-cmd.h
>     /home/wagi/work/osc/home:wagi:branches:devel:trace/kernelshark/kernel-shark/trace-cmd.h
>     /home/wagi/bin/trace-cmd.h
>     /home/wagi/.local/bin/trace-cmd.h
>     /home/wagi/node_modules/.bin/trace-cmd.h
>     /home/wagi/work/osc/home:wagi:branches:devel:trace/kernelshark/kernel-shark/usr/local/bin/trace-cmd.h
>     /usr/local/bin/trace-cmd.h
>     /usr/bin/trace-cmd.h
>     /bin/trace-cmd.h
>     /usr/local/include/trace-cmd.h
>     /usr/local/trace-cmd.h
>     /usr/include/trace-cmd.h
>     /usr/trace-cmd.h
>     /include/trace-cmd.h
>     /usr/X11R6/include/trace-cmd.h
>     /usr/X11R6/trace-cmd.h
>     /usr/pkg/include/trace-cmd.h
>     /usr/pkg/trace-cmd.h
>     /opt/include/trace-cmd.h
>     /opt/trace-cmd.h
>     /usr/include/X11/trace-cmd.h
Daniel Wagner Feb. 7, 2023, 4:19 p.m. UTC | #5
On Tue, Feb 07, 2023 at 04:45:47PM +0100, Daniel Wagner wrote:
> On Tue, Feb 07, 2023 at 10:10:01AM -0500, Steven Rostedt wrote:
> > On Tue, 7 Feb 2023 14:48:25 +0100
> > Daniel Wagner <dwagner@suse.de> wrote:
> > 
> > > On Tue, Feb 07, 2023 at 01:46:32PM +0100, Daniel Wagner wrote:
> > > > This version brings a few cleanups on the documentation intallation path
> > > > and pkg-config depenedency updates.
> > > > 
> > > > Changes:
> > > > 
> > > > v6:
> > > >   - lib: isntall trace-cmd.h directly in /usr/include and not subdir
> > > >     trace-cmd. kernelshark builds breaks otherwise  
> > > 
> > > No, this is not the real problem. The Makefile also installs it under
> > > /usr/include/trace-cmd.
> > 
> > But `pkg-config --cflags libtracecmd` should give the right path:
> > 
> >   -I/usr/include/trace-cmd -I/usr/include/tracefs -I/usr/include/traceevent
> > 
> > This is the way it's always been. Why are your kernelshark builds breaking?
> 
> Not sure what's happening. I've build and installed the library with make
> and the kernelshark configuration step still fails. I see the following
> output (make and meson):
> 
> $ cmake -S . -B foo --debug-find
> Running with debug output on for the `find` commands.

There is something wierd going with the libtracecmd build in our build system.
It produces a libtrace-cmd.pc and not a libtracecmd.pc file but this was
with the v2 version of the meson patches. Doesn't happen with libtracecmd v5.

In short, just ignore v6.
Daniel Wagner Feb. 8, 2023, 8:48 a.m. UTC | #6
On Tue, Feb 07, 2023 at 05:19:47PM +0100, Daniel Wagner wrote:
 There is something wierd going with the libtracecmd build in our build system.
> It produces a libtrace-cmd.pc and not a libtracecmd.pc file but this was
> with the v2 version of the meson patches. Doesn't happen with libtracecmd v5.

Finally found the problem in build setup. The generated pkg-config file
doesn't include the trace-cmd subdir. I'll send an update on this patches.