BuddiesOfBudgie / budgie-control-center

Budgie Control Center is a fork of GNOME Control Center for the Budgie 10 Series.
GNU General Public License v2.0
26 stars 13 forks source link

Ninja Error: Undeclared (first use in this function) in Budgie Control Center #54

Open JonathanVQP opened 1 year ago

JonathanVQP commented 1 year ago

I received the following ninja error: ./panels/sound/cc-alert-chooser.c:139:30: error: *USER_DIR_MODE* undeclared (first use in this function) 139 g_mkdir_with_parents (dir, USER_DIR_MODE);

serebit commented 1 year ago

What distribution are you on, what Meson/Ninja version, what compiler, etc.

JonathanVQP commented 1 year ago

@serebit I am using the Photon OS Linux Vmware distro. Meson version: 1.1.0.rc2. Ninja version: 1.12.0.git. Compiler: gcc 12.2.0. I can resolve this issue by having a define of the USER_DIR_MODE variable (from the config.h in the build directory) to the cc-alert-chooser.c but it is weird that I have to do this!? I experienced this issue with Meson 1.0.0 so I thought that upgrading meson and ninja would resolve this but apparently it didn't.

fossfreedom commented 1 year ago

Why are you using a git version of ninja and a rc version of meson rather than the stable series?

This could be a bug in these versions or a changed behaviour which would be slightly odd

JonathanVQP commented 1 year ago

I installed meson 1.1.0 version as well as the ninja 1.11.1. When I did the following: git clone https://github.com/BuddiesOfBudgie/budgie-control-center.git git checkout main git submodule update --init --recursive mkdir build && cd build meson setup --prefix=/usr -Dcheese=true -Ddocumentation=false -Dibus=true -Dwayland=true .. 2>&1 | tee meson.out

I received the above error.

fossfreedom commented 1 year ago

When Ubuntu catches up with the latest meson and ninja I can then take a look myself.

-Dwayland=true isn't necessary since its a X11 desktop - should be false.

If you build with the default options what happens?

meson --prefix=/usr
JonathanVQP commented 1 year ago

@fossfreedom When I build with the default options, I still get the same ninja error. Attached are the meson and ninja output.

meson.txt ninja.txt

serebit commented 1 year ago

What are the contents of build/config.h?

JonathanVQP commented 1 year ago

@serebit config.h.txt

serebit commented 1 year ago

With those contents, I'm not sure why it would be failing—that C file includes config.h, and your config.h is showing that USER_DIR_MODE is defined there... This is an odd one.