Arch Linux

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#41423 - [devtools][makepkg][ccache]makepkg fails to build on configure with 'ccache' option enabled

Attached to Project: Arch Linux
Opened by Nikita Malyavin (foobarrior) - Friday, 01 August 2014, 09:35 GMT
Last edited by Dave Reisner (falconindy) - Friday, 01 August 2014, 19:00 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To No-one
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:
makepkg fails to build with ccache option enabled mostly with error:
configure: error: C compiler cannot create executables

Additional info:
For some packages it just throws out ccache "unrecognized option" message, which is ccache's default behavior.

As we can see in config.log attached, the first directory in PATH is '/usr/lib/ccache/bin', which means it uses `gcc` from that directory.

The following experiment has been made:
1. Add ccache bin dir to PATH
2. Create dummy conftest.c
3. Run:
gcc -march=x86-64 -mtune=native -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -g -fvar-tracking-assignments -fbuiltin -O -fvisibility=hidden -D_FORTIFY_SOURCE=2 -Wl,-O1,--sort-common,--as-needed,-z,relro conftest.c
4. Run:
/usr/lib/ccache/bin/gcc -march=x86-64 -mtune=native -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -g -fvar-tracking-assignments -fbuiltin -O -fvisibility=hidden -D_FORTIFY_SOURCE=2 -Wl,-O1,--sort-common,--as-needed,-z,relro conftest.c

Step 3 fails with ccache "unrecognized option" error
Step 4 succeeds


Steps to reproduce:
1. enable ccache in BUILDENV at /etc/makepkg.conf
2. make some package with C sources and `configure` command in PKGBUILD file
This task depends upon

Closed by  Dave Reisner (falconindy)
Friday, 01 August 2014, 19:00 GMT
Reason for closing:  Not a bug
Additional comments about closing:  Not sure why we continue to package colorgcc, which causes all sort of strange bugs like this...
Comment by Dave Reisner (falconindy) - Friday, 01 August 2014, 12:40 GMT
You should replicate/debug this without involving unsupported tools (yaourt).
Comment by Nikita Malyavin (foobarrior) - Friday, 01 August 2014, 14:02 GMT
Have I written anything about yaourt?
Nevertheless, I've just checked it out, and this bug is still in place, even without yaourt (even without makepkg, look at bug description starting from words: " The following experiment has been made")

Again:
- my $PATH has no ccache directory in it (because i'm not going to use it when compiling manually)
- I have ccache option enabled in /etc/makepkg.conf
- Looking through attached config.log, we can see it has '/usr/lib/ccache/bin'. This means, makepkg stuff added it.
- Calling `gcc` in ./configure fails, because ccache thinks it was called as `ccache`, not as `gcc`
- Disabling ccache with '!' repairs the thing.


Well, maybe this bug is more related to ccache instead of makepkg, but i'm not sure here. Ccache was not changing for a long time, but makepkg functionality's got broken
Comment by Dave Reisner (falconindy) - Friday, 01 August 2014, 14:07 GMT
> Have I written anything about yaourt?
You sure have -- it's in the logs you posted.

> Ccache was not changing for a long time, but makepkr functionality's got broken
So you've tried an older version of makepkg to see if this bug exists there?
Comment by Nikita Malyavin (foobarrior) - Friday, 01 August 2014, 14:43 GMT
> So you've tried an older version of makepkg to see if this bug exists there?
For 4.1.2-5 the problem is still there
Comment by Dave Reisner (falconindy) - Friday, 01 August 2014, 14:51 GMT
Testing an older pkgrel isn't useful. Testing a older pkgver is. If you can't find an older version where this works, then I suspect the problem is on your end.
Comment by Nikita Malyavin (foobarrior) - Friday, 01 August 2014, 15:42 GMT
Debugging through source shows up that it launches itself for second time! But the only case of it is specifying it's bin dir in PATH...
This means that following
PATH=/usr/lib/ccache/bin:$PATH /usr/lib/ccache/bin/gcc conftest.c
fails, but this:
/usr/lib/ccache/bin/gcc conftest.c
works cool...
Comment by Nikita Malyavin (foobarrior) - Friday, 01 August 2014, 17:53 GMT
this bug happened to be related to colorgcc

Loading...