pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Pkgsrc fails to use system compiler if locale is set



Le 16/07/2012 21:44, Jonathan Perkin a écrit :
> * On 2012-07-16 at 18:10 BST, Emmanuel Kasper wrote:
> 
>> On my (Ubuntu Linux 12.04, gcc-4.6, pkgsrc-2012Q2), I noticed that
>> many many programms, but not all, where trying to force me to
>> boostrap gcc-3 although I had a perfectly working compiler.
>>
>> I pinpointed the problem to all makefiles which contains
>> "../../mk/compiler.mk"
>>
>> After some research I found this mail
>> http://mail-index.netbsd.org/pkgsrc-users/2009/07/30/msg010316.html
>> which mentions setting LC_ALL=C.
>>
>> I did that and suddenly pkgsrc started to use my system compiler.
> 
> Please try the attached patch, the problem with packages which include
> compiler.mk is that a bunch of variables are not set up at that point,
> and so it was not setting LC_ALL=C - thus the grep for 'gcc version'
> was dependant upon your locale.
> 
> Anyone see a problem with committing this?  _CC has already been set
> to the full path to the compiler, so there are no PATH issues, and I
> don't see that anything else in ALL_ENV is relevant for this test so
> we might as well simplify it.
> 
> Regards,
> 

hello

here is the default output of gcc on my system

gcc -v
Es werden eingebaute Spezifikationen verwendet.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/4.6/lto-wrapper
Ziel: x86_64-linux-gnu
Konfiguriert mit: ../src/configure -v --with-pkgversion='Ubuntu/Linaro
4.6.3-1ubuntu5' --with-bugurl=file:///usr/share/doc/gcc-4.6/README.Bugs
--enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr
--program-suffix=-4.6 --enable-shared --enable-linker-build-id
--with-system-zlib --libexecdir=/usr/lib --without-included-gettext
--enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.6
--libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu
--enable-libstdcxx-debug --enable-libstdcxx-time=yes
--enable-gnu-unique-object --enable-plugin --enable-objc-gc
--disable-werror --with-arch-32=i686 --with-tune=generic
--enable-checking=release --build=x86_64-linux-gnu
--host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread-Modell: posix
gcc-Version 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5)

before applying your patch:

bmake show-var VARNAME=_GCC_VERSION_STRING
0

after applying:

bmake show-var VARNAME=_GCC_VERSION_STRING
gcc version 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5)

thanks for your patch, and I hope it will be considered for inclusion

Emmanuel


Home | Main Index | Thread Index | Old Index