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

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

Open
JonathanVQP opened this issue Apr 6, 2023 · 9 comments
Labels
bug Something isn't working

Comments

@JonathanVQP
Copy link

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
Copy link
Member

serebit commented Apr 7, 2023

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

@serebit serebit added the question Further information is requested label Apr 7, 2023
@JonathanVQP
Copy link
Author

JonathanVQP commented Apr 8, 2023

@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.

@serebit serebit added bug Something isn't working and removed question Further information is requested labels Apr 8, 2023
@fossfreedom
Copy link
Contributor

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
Copy link
Author

JonathanVQP commented Apr 12, 2023

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
Copy link
Contributor

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
Copy link
Author

@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
Copy link
Member

serebit commented Apr 13, 2023

What are the contents of build/config.h?

@JonathanVQP
Copy link
Author

@serebit
config.h.txt

@serebit
Copy link
Member

serebit commented Apr 13, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants