muon-build / muon

An implementation of the meson build system in c99
https://muon.build
GNU General Public License v3.0
168 stars 14 forks source link

muon does not consider PKG_CONFIG env var #32

Open lu-zero opened 7 months ago

lu-zero commented 7 months ago

the system only has pkgconf thus

export PKG_CONFIG=pkgconf
meson setup .build --reconfigure
The Meson build system
Version: 1.4.0
Source dir: /Users/lu_zero/Sources/muon
Build dir: /Users/lu_zero/Sources/muon/.build
Build type: native build
Project name: muon
Project version: 0.2.0
C compiler for the host machine: sccache cc (clang 15.0.0 "Apple clang version 15.0.0 (clang-1500.3.9.4)")
C linker for the host machine: cc ld64 1053.12
Host machine cpu family: aarch64
Host machine cpu: aarch64
Program git found: YES (/opt/homebrew/bin/git)
Compiler for C supports arguments -Wendif-labels: YES (cached)
Compiler for C supports arguments -Wimplicit-fallthrough=2: NO (cached)
Compiler for C supports arguments -Winit-self: YES (cached)
Compiler for C supports arguments -Wlogical-op: NO (cached)
Compiler for C supports arguments -Wmissing-include-dirs: YES (cached)
Compiler for C supports arguments -Wno-missing-braces: YES (cached)
Compiler for C supports arguments -Wno-missing-field-initializers: YES (cached)
Compiler for C supports arguments -Wno-unused-parameter: YES (cached)
Compiler for C supports arguments -Wold-style-definition: YES (cached)
Compiler for C supports arguments -Woverflow: YES (cached)
Compiler for C supports arguments -Wstrict-aliasing=2: YES (cached)
Compiler for C supports arguments -Wstrict-prototypes: YES (cached)
Compiler for C supports arguments -Wundef: YES (cached)
Compiler for C supports arguments -Wvla: YES (cached)
Compiler for C supports arguments -fstrict-aliasing: YES (cached)
Configuring version.c using configuration
Dependency libcurl found: YES 8.4.0 (cached)
Found pkg-config: YES (/opt/homebrew/bin/pkgconf) 2.1.1
Found CMake: /opt/homebrew/bin/cmake (3.28.3)
Run-time dependency libarchive found: NO (tried pkgconfig, framework and cmake)
Dependency libpkgconf found: YES 2.1.1 (cached)
Dependency bestline skipped: feature bestline disabled
Run-time dependency tinyjson found: NO (tried pkgconfig, framework and cmake)
Looking for a fallback subproject for the dependency tinyjson
Building fallback subproject with default_library=static

Executing subproject tinyjson

tinyjson| Project name: tiny-json
tinyjson| Project version: undefined
tinyjson| C compiler for the host machine: sccache cc (clang 15.0.0 "Apple clang version 15.0.0 (clang-1500.3.9.4)")
tinyjson| C linker for the host machine: cc ld64 1053.12
tinyjson| Build targets in project: 3
tinyjson| Subproject tinyjson finished.

Dependency tinyjson found: YES undefined (overridden)
Run-time dependency tracy found: NO (tried pkgconfig, framework and cmake)
Program python3 found: YES (/opt/homebrew/bin/python3)
Program test.sh found: YES (/Users/lu_zero/Sources/muon/tests/fmt/test.sh)
Program test.sh found: YES (/Users/lu_zero/Sources/muon/tests/fmt/editorconfig/test.sh)
Program afl-fuzz found: NO
Program runner.sh found: YES (/Users/lu_zero/Sources/muon/tests/project/runner.sh)
Program scdoc found: NO
Build targets in project: 4

muon 0.2.0

    libcurl   : true
    libarchive: false
    libpkgconf: true
    bestline  : false

  Subprojects
    tinyjson  : YES

Found ninja-1.11.1 at /opt/homebrew/bin/ninja
Cleaning... 0 files.
muon setup .build-muon
detected compiler clang '1500.3.9.4' (['cc']), linker: ld64 (['ld']), static_linker: ar (['ar'])
configuring 'muon', version: 0.2.0
c compiler: supports argument '-Wendif-labels': YES
c compiler: supports argument '-Wimplicit-fallthrough=2': NO
c compiler: supports argument '-Winit-self': YES
c compiler: supports argument '-Wlogical-op': NO
c compiler: supports argument '-Wmissing-include-dirs': YES
c compiler: supports argument '-Wno-missing-braces': YES
c compiler: supports argument '-Wno-missing-field-initializers': YES
c compiler: supports argument '-Wno-unused-parameter': YES
c compiler: supports argument '-Wold-style-definition': YES
c compiler: supports argument '-Woverflow': YES
c compiler: supports argument '-Wstrict-aliasing=2': YES
c compiler: supports argument '-Wstrict-prototypes': YES
c compiler: supports argument '-Wundef': YES
c compiler: supports argument '-Wvla': YES
c compiler: supports argument '-fstrict-aliasing': YES
configuring '/Users/lu_zero/Sources/muon/.build-muon/src/version.c'
warn dependency ['libcurl'] not found
warn dependency ['libarchive'] not found
fallback ['pkgconf','dep_libpkgconf'] failed for 'libpkgconf'
fallback ['pkgconf','dep_libpkgconf'] failed for 'libpkgconf'
warn dependency ['libpkgconf'] not found
[tinyjson] entering subproject 'tinyjson'
[tinyjson] detected compiler clang '1500.3.9.4' (['cc']), linker: ld64 (['ld']), static_linker: ar (['ar'])
[tinyjson] configuring 'tiny-json', version: undefined
found dependency 'tinyjson' (declared dependency) version undefined static
warn dependency ['tracy'] not found

summary:
- muon 0.2.0
      libcurl: false
      libarchive: false
      libpkgconf: false
      bestline: false
setup complete
annacrombie commented 7 months ago

muon doesn't really have a use for a PKG_CONFIG envvar because it doesn't call pkgconf or pkg-config. It uses libpkgconf internally. So whats happening here is more likely an issue with the pkg config search path.

lu-zero commented 7 months ago

the libpkgconf is the same as the one used by pkgconf, so it is fairly strange they pick different env vars for the search paths and being a quite stock macos+homebrew it isn't even exotic.

eli-schwartz commented 7 months ago

muon doesn't really have a use for a PKG_CONFIG envvar because it doesn't call pkgconf or pkg-config. It uses libpkgconf internally. So whats happening here is more likely an issue with the pkg config search path.

To be fair, one common use of $PKG_CONFIG is to select a wrapper that has set up the search path variables...