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

bisect-runner.pl force-prepends ccache to command if available #12964

Open
p5pRT opened this issue May 13, 2013 · 3 comments
Open

bisect-runner.pl force-prepends ccache to command if available #12964

p5pRT opened this issue May 13, 2013 · 3 comments

Comments

@p5pRT
Copy link

p5pRT commented May 13, 2013

Migrated from rt.perl.org#117977 (status was 'open')

Searchable as RT117977$

@p5pRT
Copy link
Author

p5pRT commented May 13, 2013

From @mauke

Created by @mauke

bisect-runner.pl​:

unless (exists $defines{cc}) {
  # If it fails, the heuristic of 63f9ec3 is noisy, and hence
  # confusing.
  # FIXME - really it should be replaced with a proper test of
  # "can we build something?" and a helpful diagnostic if we can't.
  # For now, simply move it here.
  $defines{cc} = (`ccache -V`, $?) ? 'cc' : 'ccache cc';
}

This code unconditionally prepends 'ccache' to the compiler command if ccache
is available. This sucks because I have ccache on my system (so
bisect-runner.pl prepends 'ccache') but my 'cc' is a wrapper script that
invokes ccache with custom options around 'gcc' (my real compiler).

So $defines{cc} is set to 'ccache cc', which ends up running the equivalent of
'ccache ccache --custom-options gcc'.

This feature should be documented and there should be an option or
environment variable to disable it.

Perl Info

Flags:
    category=utilities
    severity=low

This perlbug was built using Perl 5.12.1 - Thu Jun  3 20:09:15 CEST 2010
It is being executed now by  Perl 5.16.3 - Sun Mar 24 20:23:51 CET 2013.

Site configuration information for perl 5.16.3:

Configured by mauke at Sun Mar 24 20:23:51 CET 2013.

Summary of my perl5 (revision 5 version 16 subversion 3) configuration:
   
  Platform:
    osname=linux, osvers=3.5.7-gentoo, archname=i686-linux
    uname='linux nora 3.5.7-gentoo #5 preempt sat jan 26 16:46:10 cet 2013 i686 amd athlon(tm) 64 processor 3200+ authenticamd gnulinux '
    config_args=''
    hint=previous, useposix=true, d_sigaction=define
    useithreads=undef, usemultiplicity=undef
    useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef
    use64bitint=undef, use64bitall=undef, uselongdouble=undef
    usemymalloc=n, bincompat5005=undef
  Compiler:
    cc='cc', ccflags ='-fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64',
    optimize='-O2 -flto',
    cppflags='-fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64'
    ccversion='', gccversion='4.8.0', gccosandvers=''
    intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234
    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
    ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
    alignbytes=4, prototype=define
  Linker and Libraries:
    ld='cc', ldflags ='-fstack-protector -L/usr/local/lib -O2 -flto'
    libpth=/usr/local/lib /lib/../lib /usr/lib/../lib /lib /usr/lib
    libs=-lnsl -lgdbm -ldb -ldl -lm -lcrypt -lutil -lc -lgdbm_compat
    perllibs=-lnsl -ldl -lm -lcrypt -lutil -lc
    libc=/lib/libc-2.15.so, so=so, useshrplib=false, libperl=libperl.a
    gnulibc_version='2.15'
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E'
    cccdlflags='-fPIC', lddlflags='-shared -O2 -flto -L/usr/local/lib -fstack-protector'

Locally applied patches:
    SAVEARGV0 - disable magic open in <ARGV>


@INC for perl 5.16.3:
    /home/mauke/usr/local/lib/perl5/site_perl/5.16.3/i686-linux
    /home/mauke/usr/local/lib/perl5/site_perl/5.16.3
    /home/mauke/usr/local/lib/perl5/5.16.3/i686-linux
    /home/mauke/usr/local/lib/perl5/5.16.3
    /home/mauke/usr/local/lib/perl5/site_perl/5.16.0/i686-linux
    /home/mauke/usr/local/lib/perl5/site_perl/5.16.0
    /home/mauke/usr/local/lib/perl5/site_perl
    .


Environment for perl 5.16.3:
    HOME=/home/mauke
    LANG=en_US.UTF-8
    LANGUAGE (unset)
    LC_COLLATE=POSIX
    LD_LIBRARY_PATH=/home/mauke/usr/local/lib
    LOGDIR (unset)
    PATH=/home/mauke/usr/perlbrew/bin:/home/mauke/usr/local/bin:/usr/local/bin:/usr/bin:/bin:/opt/bin:/usr/i686-pc-linux-gnu/gcc-bin/4.6.3:/opt/sun-jdk-1.4.2.13/bin:/opt/sun-jdk-1.4.2.13/jre/bin:/opt/sun-jdk-1.4.2.13/jre/javaws:/opt/dmd/bin:/usr/games/bin
    PERLBREW_BASHRC_VERSION=0.43
    PERLBREW_HOME=/home/mauke/.perlbrew
    PERLBREW_PATH=/home/mauke/usr/perlbrew/bin
    PERLBREW_ROOT=/home/mauke/usr/perlbrew
    PERLBREW_VERSION=0.27
    PERL_BADLANG (unset)
    PERL_UNICODE=SAL
    SHELL=/bin/bash

@p5pRT
Copy link
Author

p5pRT commented May 13, 2013

From @nwc10

On Mon, May 13, 2013 at 04​:21​:29AM -0700, l.mai@​web.de wrote​:

bisect-runner.pl​:

unless (exists $defines{cc}) {
# If it fails, the heuristic of 63f9ec3 is noisy, and hence
# confusing.
# FIXME - really it should be replaced with a proper test of
# "can we build something?" and a helpful diagnostic if we can't.
# For now, simply move it here.
$defines{cc} = (`ccache -V`, $?) ? 'cc' : 'ccache cc';
}

This code unconditionally prepends 'ccache' to the compiler command if ccache
is available. This sucks because I have ccache on my system (so
bisect-runner.pl prepends 'ccache') but my 'cc' is a wrapper script that
invokes ccache with custom options around 'gcc' (my real compiler).

So $defines{cc} is set to 'ccache cc', which ends up running the equivalent of
'ccache ccache --custom-options gcc'.

This feature should be documented and there should be an option or
environment variable to disable it.

True, it's not documented, and it should be. But implied from the source
above I can see that if you explicitly define your C compiler, it is not
prepended. So you can already disable it with -Dcc=real_compiler

Nicholas Clark

@p5pRT
Copy link
Author

p5pRT commented May 13, 2013

The RT System itself - Status changed from 'new' to 'open'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants