You are not logged in.
Using CFLAGS="-march=x86-64 -O2 -pipe -fno-plt -fdiagnostics-color" in /etc/makepkg.conf, results in the expected colors being displayed when building. However, if I do the same building a clean-chroot, no colors are displayed. Why?
The kodi-devel package is a good one to illustrate. Building it outside of the chroot displays colored output, but inside, no colors.
Step to reproduce:
Append the -fdiagnostics-color to /etc/makepkg.conf's CFLAGS and CXXFLAGS
Get the kodi-devel package, make the chroot, and build the package:
wget https://aur.archlinux.org/cgit/aur.git/snapshot/kodi-devel.tar.gz
tar zxvf kodi-devel.tar.gz
cd kodi-devel
CHROOT=~/.chroot64
mkdir $CHROOT
mkarchroot -M /etc/makepkg.conf $CHROOT base-devel
makechrootpkg -r $CHROOT
CPU-optimized Linux-ck packages @ Repo-ck • AUR packages • Zsh and other configs
Offline
Does makepkg work when using -L?
Offline
Does makepkg work when using -L?
Yes, building with `makepkg -sL` works as expected. Both the shell output and the logs are colored.
I see now my confusion. In short, the CFLAG setting I mentioned does work within the devtool build scripts. My question was sparked by a memory I had about seeing more colorized output which I now know (confirmed) was observed when compiling on an Arch ARM box. It produces even more verbose colorized output when compared to building on Arch x86_64. To be clear: I am not asking for ARM support, just wondering what options they might be using (compiled into their toolchain?) that produces more colorized output by default compared to building on Arch x86_64. Something in cmake perhaps?
To illustrate, building the kodi package on Arch ARM:
Vs. building on Arch x86_64:
CPU-optimized Linux-ck packages @ Repo-ck • AUR packages • Zsh and other configs
Offline
gcc is not the only software which may or may not be producing colored output, and the output you are pointing to is the output from CMake. So why don't you tell us, whether you've done research into options that are similar to *gcc*'s fdiagnostics-color, but for cmake?
My question was sparked by a memory I had about seeing more colorized output which I now know (confirmed) was observed when compiling on an Arch ARM box. It produces even more verbose colorized output when compared to building on Arch x86_64. To be clear: I am not asking for ARM support, just wondering what options they might be using (compiled into their toolchain?) that produces more colorized output by default compared to building on Arch x86_64. Something in cmake perhaps?
Arch Linux ARM does have makechrootpkg, but they have forked it in order to *not* use makepkg --log. Hence there is no logging, hence in order to properly compare Arch Linux and Arch Linux ARM you will need to pass that option yourself. This on its own is more than sufficient to explain all color differences ever under any circumstances -- most notably, -fdiagnostics-color is not needed at all since when not using --log, stdout/stderr is a terminal and gcc autodetects that in order to emit color.
Managing AUR repos The Right Way -- aurpublish (now a standalone tool)
Offline
@eschwartz - Thanks for insights. I will do some searching around the cmake coloring. As to the fork of makechrootpkg: I get those colors whether I use the devtools scripts or simply use makepkg on the live filesystem under Arch ARM whereas under Arch, building with makepkg on the live filesystem does not give them so I'm thinking devtools isn't a factor and that there must be some cmake customization on Arch ARM.
Last edited by graysky (2019-02-03 19:49:24)
CPU-optimized Linux-ck packages @ Repo-ck • AUR packages • Zsh and other configs
Offline
...
-_-
Why do you think that you don't get cmake color when using it on Arch? I categorically assert that I do, for this and all other cmake projects ever. And if I modify the makechrootpkg caller to not include --log, then I get cmake color there too.
Not only that: it is impossible for makepkg to mess with the cmake color above and beyond running cmake .. in an interactive console, unless you're suggesting that makepkg without using the --log option will secretly modify your PKGBUILD to change how cmake is being run. We've previously established that the only makepkg-specific stuff going on here is whether --log is used, and if you don't believe that, then feel free to inspect the makepkg source code.
You've repeatedly through the course of this thread confused the difference between cmake, gcc, and logging to a file both with and without devtools, so I'm decidedly uncertain that vague statements of intent correspond to what you're actually running.
Once again:
gcc and cmake are different programs, which separately implement the concept of "sometimes use colored output".
gcc has fdiagnostics-color, cmake may have whatever as I've not researched it.
makepkg --log will not send output to stdout/stderr, but to a logfile, which disables color autodetection in many programs (this is why gcc -fdiagnostics-color is needed at all, ever, since gcc uses color by default if the warning/error messages are going to an interactive terminal session *which a logfile is not*)
devtools and any other program or user is free to use makepkg --log or not, as the script author chooses
archlinuxarm does not use --log in devtools
We can add more facts to this:
It goes against the meaning of archlinuxarm to #yolo fork archlinux packages for no reason other than to mess with color
archlinuxarm is not run by derpy morons
archlinuxarm does not mess with your color
as verified by looking up the archlinuxarm build scripts, they do not modify cmake in any way shape or form
any modifications would logically have to involve reinstating the default behavior of cmake, i.e. removing a derpy moronic downstream patch in archlinux
Managing AUR repos The Right Way -- aurpublish (now a standalone tool)
Offline
[...] so I'm thinking devtools isn't a factor and that there must be some cmake customization on Arch ARM.
There is a very easy check for this.
What happens when you run cmake .. && make from the command line? No makepkg, no devtools, nothing but cmake. You're asserting your belief that cmake is different on archlinux and archlinuxarm, so... test this.
Managing AUR repos The Right Way -- aurpublish (now a standalone tool)
Offline