Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

meson compile -C build fails with invalid substitution #717

Open
jascii opened this issue Jan 12, 2025 · 6 comments
Open

meson compile -C build fails with invalid substitution #717

jascii opened this issue Jan 12, 2025 · 6 comments

Comments

@jascii
Copy link

jascii commented Jan 12, 2025

Describe the bug
A clear and concise description of what the bug is.

hyprpanel fails to compile.

To Reproduce
Steps to reproduce the behavior:

Expected behavior
A clear and concise description of what you expected to happen.

I would expect hyprpanel to compile without errors.

Screenshots

❯ astal -v
0.1.0%

❯ ags -v
ags version 2.2.1

❯ meson setup build
The Meson build system
Version: 1.6.1
Source dir: /home/jascii/Projects/desktop/HyprPanel
Build dir: /home/jascii/Projects/desktop/HyprPanel/build
Build type: native build
Project name: hyprpanel
Project version: undefined
Host machine cpu family: x86_64
Host machine cpu: x86_64
Program ags found: YES (/usr/bin/ags)
Program gjs found: YES (/usr/bin/gjs)
Configuring hyprpanel using configuration
Build targets in project: 1

Found ninja-1.12.1 at /usr/bin/ninja

❯ meson compile -C build
INFO: autodetecting backend as ninja
INFO: calculating backend command to run: /usr/bin/ninja -C /home/jascii/Projects/desktop/HyprPanel/build
ninja: Entering directory `/home/jascii/Projects/desktop/HyprPanel/build'
[1/1] Generating hyprpanel_bundle with a custom command
FAILED: hyprpanel.js
/usr/bin/ags bundle --define 'DATADIR="/usr/share/hyprpanel"' --root /home/jascii/Projects/desktop/HyprPanel /home/jascii/Projects/desktop/HyprPanel/app.ts hyprpanel.js
✘ [ERROR] Invalid alias substitution: " "

Desktop (please complete the following information):

  • Distribution: Gentoo Linux
  • Window Manager/Desktop Environment: Hyprland

Additional context
Add any other context about the problem here.

All required dependencies are installed

@jascii jascii changed the title meson compile -C build failes with invalid substitution meson compile -C build fails with invalid substitution Jan 12, 2025
@ctaque
Copy link

ctaque commented Jan 16, 2025

Same here, Fedora 41, astal 0.1.0, ags 2.2.2.

I grepped the whole astal and ags projects, the errror is not found in one of these projects, maybe in a dependancy ? No idea how to debug that.

@jascii
Copy link
Author

jascii commented Jan 18, 2025

I was able to solve this problem by installing the dependencies of package.json with npm install and then adding the -p flag to the ags bundle command in meson.build.

Now everything runs fine. @ctaque hope this will help you too. If so you can close this issue

@ctaque
Copy link

ctaque commented Jan 18, 2025

Well,

Althrough I installed astal, I have no directory /usr/share/astal as pointed out by the astal dependency in package.json.

Any idea how to solve that ?

Thanks in advance

@jascii
Copy link
Author

jascii commented Jan 18, 2025

Since you are using Fedora, I assume you are compiling astal from source code. If /usr/share/astal/gjs is not present, you seem to have forgotten to install the libraries.

https://aylur.github.io/astal/guide/getting-started/installation#building-from-source

I had to execute for all the libraries individually

cd /tmp/astal/lib/astal/$library
meson setup --prefix /usr build
meson install -C build

@ctaque
Copy link

ctaque commented Jan 18, 2025

I have installed gtk3, gtk4 and io :

➜  gtk3 git:(main) meson setup --prefix /usr build
The Meson build system
Version: 1.5.1
Source dir: /home/cyprien/projets/astal/lib/astal/gtk3
Build dir: /home/cyprien/projets/astal/lib/astal/gtk3/build
Build type: native build
WARNING: You should add the boolean check kwarg to the run_command call.
         It currently defaults to false,
         but it will default to true in future releases of meson.
         See also: https://github.com/mesonbuild/meson/issues/9300
Project name: astal
Project version: 3.0.0
C compiler for the host machine: cc (gcc 14.2.1 "cc (GCC) 14.2.1 20250110 (Red Hat 14.2.1-7)")
C linker for the host machine: cc ld.bfd 2.43.1-5
Vala compiler for the host machine: valac (valac 0.56.17)
Host machine cpu family: x86_64
Host machine cpu: x86_64
Configuring config.vala using configuration
Dependency astal-io-0.1 found: YES 0.1.0 (cached)
Dependency glib-2.0 found: YES 2.82.2 (cached)
Dependency gio-unix-2.0 found: YES 2.82.2 (cached)
Dependency gobject-2.0 found: YES 2.82.2 (cached)
Dependency gio-2.0 found: YES 2.82.2 (cached)
Dependency gtk+-3.0 found: YES 3.24.43 (cached)
Dependency gdk-pixbuf-2.0 found: YES 2.42.12 (cached)
Dependency gtk-layer-shell-0 found: YES 0.9.0 (cached)
Dependency wayland-client found: YES 1.23.0 (cached)
Library m found: YES
Dependency wayland-protocols found: YES 1.39 (cached)
Program wayland-scanner found: YES (/usr/bin/wayland-scanner)
Program python3 found: YES (/usr/bin/python3)
Program g-ir-compiler found: YES (/usr/bin/g-ir-compiler)
Found pkg-config: YES (/usr/bin/pkg-config) 2.3.0
Build targets in project: 3

astal 3.0.0

  User defined options
    prefix: /usr

Found ninja-1.12.1 at /usr/bin/ninja
Cleaning... 0 files.
➜  gtk3 git:(main) meson install -C build
ninja: Entering directory `/home/cyprien/projets/astal/lib/astal/gtk3/build'
ninja: no work to do.
Installing src/libastal.so.3.0.0 to /usr/lib64
Installation failed due to insufficient permissions.
Attempt to use /usr/bin/sudo to gain elevated privileges? [y/n] y
Placez votre index droit sur le lecteur d’empreintes
Installing src/libastal.so.3.0.0 to /usr/lib64
Installing src/astal.h to /usr/include
Installing src/astal-3.0.vapi to /usr/share/vala/vapi
Installing src/Astal-3.0.gir to /usr/share/gir-1.0
Installing src/Astal-3.0.typelib to /usr/lib64/girepository-1.0
Installing /home/cyprien/projets/astal/lib/astal/gtk3/build/meson-private/astal-3.0.pc to /usr/lib64/pkgconfig
Installing symlink pointing to libastal.so.3.0.0 to /usr/lib64/libastal.so.3
Installing symlink pointing to libastal.so.3 to /usr/lib64/libastal.so

Seems that lib64 is the 64bit library directory in fedora.

Nethertheless I still don't have the /usr/lib64/astal/ directory

@jascii
Copy link
Author

jascii commented Jan 19, 2025

Ok

cd astal/lang/gjs
meson setup --prefix /usr build
meson install -C build

installs for me astal to /usr/share/astal/gjs. What is it doing for you?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants