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

clang (and probably everything) under flatpak-builder have no colored output #605

Open
2 tasks done
brunvonlope opened this issue Jun 18, 2024 · 5 comments
Open
2 tasks done

Comments

@brunvonlope
Copy link

Checklist

  • I agree to follow the Code of Conduct that this project adheres to.
  • I have searched the issue tracker for a bug that matches the one I want to file, without success.

flatpak-builder version

1.2.3

Flatpak version

1.14.4

How to reproduce

  1. Set export CLICOLOR_FORCE=1 (that option natively supported by 'ninja' allows the compiler to display colorful warnings)
  2. Try to build some app or module that uses ninja as build system with flatpak-builder (e.g.: GIMP)
  3. Observes lack of colors

Expected Behavior

Colorful output (which is the result if the same ninja command is run directly on Debian or MSYS2 shells)

Actual Behavior

flatpak-builder is draining the color from the software that supports it

Additional Information

No response

@TingPing
Copy link
Member

Set export CLICOLOR_FORCE=1

You'd surely have to set it inside the sandbox, not outside. I'd expect it to work then. clang also has flags to explicitly set color IIRC.

All of these tools try to automatically detect color output, so we'll need to figure out how to satisfy that.

@brunvonlope
Copy link
Author

@TingPing Hi, thanks for the tip. Have set on GIMP manifest:

"build-options": {
  "env": {
    "CLICOLOR_FORCE": "1"
  }
}

But the output still don't have color 🙁

@TingPing
Copy link
Member

Hmm could you try explicitly passing -fcolor-diagnostics to clang?

@brunvonlope
Copy link
Author

brunvonlope commented Jun 18, 2024

Thanks, it worked.

(I needed to use the CLICOLOR_FORCE variable and clang option combo)

@brunvonlope brunvonlope closed this as not planned Won't fix, can't repro, duplicate, stale Jun 18, 2024
@TingPing
Copy link
Member

I'll reopen this because it should be possible for it to work by default.

@TingPing TingPing reopened this Jun 18, 2024
gnomesysadmins pushed a commit to GNOME/gimp that referenced this issue Jun 18, 2024
Following 0f42555

Ninja and Cmake (which some modules use) supports colorful output.
To enable it, we need to set in the manifest due to the sandboxing.

See also: flatpak/flatpak-builder#605
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