~lattis/muon

1

Build with libpkgconf

Details
Message ID
<657112714.111106.1642190447489@office.mailbox.org>
DKIM signature
missing
Download raw message
Hi, can you provide the instructions on how to build muon with pkgconf
support?
I tried to bootstrap it, and build itself with libpkgconf=enabled.
I added the subproject, and I get:

> info subproject: pkgconf
> info detected compiler gcc 11.2.1 (cc)
> info configuring 'pkgconf', version: 1.8.0
> info have function strlcat: NO
> info have function strlcpy: NO
> info have function strndup: YES
> info string.h has header symbol strndup: YES
> /home/iemaghni/code/tmp/muon/subprojects/pkgconf/meson.build:26:64: error: undefined option
>  26 |   default_path += [join_paths(get_option('prefix'), get_option(f), 'pkgconfig')]
>                                                                      ^
> /home/iemaghni/code/tmp/muon/subprojects/pkgconf/meson.build:26:53: error: in function get_option
>  26 |   default_path += [join_paths(get_option('prefix'), get_option(f), 'pkgconfig')]
>                                                           ^
> /home/iemaghni/code/tmp/muon/subprojects/pkgconf/meson.build:26:20: error: in function join_paths
>  26 |   default_path += [join_paths(get_option('prefix'), get_option(f), 'pkgconfig')]
>                          ^
> <internal>:1:1: error: in function subproject
>   1 | subproject('pkgconf', required: true)
>       ^
> /home/iemaghni/code/tmp/muon/src/meson.build:104:11: error: in function dependency
> 104 |     dep = dependency(
>                 ^
> /home/iemaghni/code/tmp/muon/meson.build:63:1: error: in function subdir
>  63 | subdir('src')
>       ^

For now, I use meson to build muon.
Details
Message ID
<20220115022723.htozlbiih3t6bmry@hostomei>
In-Reply-To
<657112714.111106.1642190447489@office.mailbox.org> (view parent)
DKIM signature
missing
Download raw message
Hello,

> Hi, can you provide the instructions on how to build muon with pkgconf
> support?
> I tried to bootstrap it, and build itself with libpkgconf=enabled.

Unfortunately this won't work, because the bootstrapped muon created
with `./bootstrap.sh` can only really setup itself.  If you don't
already have pkgconf and libpkgconf installed, the full bootstrap
process is:

1.) run `./bootstrap.sh`.  This gets you a muon that can execute `muon
setup build` (but is missing some important features, such as a complete
list of built-in options).

2.) run `muon setup build`, followed by `ninja -C build`.  This will get
you a muon with all features, minus ones that require external
dependencies.

3.) Manually setup the pkgconf subproject, e.g. `git clone https://github.com/pkgconf/pkgconf/ subprojects/pkgconf`

4.) repeat step 2.  The resulting muon will have all features, as well
as pkgconf support. (you also have to pass '`-Dpkgconf:tests=false` if
you do not have `kyua` installed).

If you now want other features like curl/archive support, you will need
to repeat step 2 yet again after making sure you have the required
libraries, headers, and pkgconf files installed.

Another thing I realized is that pkgconf built as a subproject won't
always have the correct PKG_CONFIG_PATH set for your system.  For
instance, my system pkgconf searches in `/usr/lib/pkgconf`, but the
subproject pkgconf searches in `/usr/local/lib/pkgconf` by default.
This can be overriden by setting the PKG_CONFIG_PATH variable, muon
doesn't yet have a flag to control it.

There should probably be a note in the REAMDE about the muon from
bootstrap.sh only being suitable for setting up itself.

> For now, I use meson to build muon.

That is a reasonable approach!

Stone
Reply to thread Export thread (mbox)