bsd-ac / wayland-desktop

Gentoo overlay for Wayland related ebuilds
https://gentoo.org
ISC License
61 stars 21 forks source link

Local 'debug' use flag #5

Closed erikvanhamme closed 4 years ago

erikvanhamme commented 4 years ago

Great job on the package overlay!

Enhancement request: Add a local 'debug' use flag to allow the wayfire and wf-* packages to be built in debug mode.

The suggested debug build settings are documented on this page: https://github.com/WayfireWM/wayfire/wiki/Debugging-problems

This would make it possible to install wayfire from the overlay in a mode that allows to support the wayfire devs with debug information. I currently don't have gui-wm/wayfire installed because I am helping the devs with stacktraces. I manually installed the code from git.

If I could add 'debug' use flag in package.use to enable the debug builds, I could keep gui-wm/wayfire installed and update with emerge sync && emerge --update @world.

Thank you for considering this request.

epsilon-0 commented 4 years ago

That sounds like a great idea. I will do this over the next weekend.

Do the other softwares also allow you to add this flag?

erikvanhamme commented 4 years ago

Well, the 'debug' use flag is used in many packages: https://packages.gentoo.org/useflags/debug

For now, I would only add it to: gui-wm/wayfire gui-apps/wcm gui-apps/wf-config gui-apps/wf-recorder gui-apps/wf-shell

If you do one, and show me, I can make patches to do the others. I am software engineer, but I have never made ebuilds. I am more then willing to help.

Best regards, Erik

epsilon-0 commented 4 years ago

@erikvanhamme I've added the debug use flag for wayfire-0.3.1 and will add it for wayfire-9999 and othersas soon as I get their dependency corrected.

Can you test it and let me know if it is working?

Cheers.

erikvanhamme commented 4 years ago

I tested the *-9999 builds.

The debug flag is applied as expected.

Some problems though: I noticed that the ninja build is not running in parallel, it does 1 file at a time instead of 16.

I had to manually step in to compile wayfire first before wf-shell.

It crashed on execution. I am still debugging why.

BTW, I am in the #wayfire channel on IRC under nick rsq.

epsilon-0 commented 4 years ago

It seems like nothing except wayfire is supposed to be using the debug symbols, as mentioned by @ammen99, so I am going to be removing them from everyone except wayfire.

It should be working now, but there are going to be some more changes along the way.

Cheers.

epsilon-0 commented 4 years ago

Some problems though: I noticed that the ninja build is not running in parallel, it does 1 file at a time instead of 16.

I had to manually step in to compile wayfire first before wf-shell.

It crashed on execution. I am still debugging why.

I am going to test this now, will let you know soon.

epsilon-0 commented 4 years ago

It seems to be using all of my cores, so I am not sure what the error is. Maybe there is some problem with MAKEOPTS?

ammen99 commented 4 years ago

It seems like nothing except wayfire is supposed to be using the debug symbols, as mentioned by @ammen99, so I am going to be removing them from everyone except wayfire.

It should be working now, but there are going to be some more changes along the way.

Cheers.

Sorry, I was not clear enough. You should build everything with debugging symbols. Address sanitizer is only needed for the main Wayfire and wf-shell executables.