From: Max H. <ma...@qu...> - 2014-04-22 15:12:10
|
On 22.04.2014, at 16:58, Alexander Hansen <ale...@gm...> wrote: > On 4/22/14, 5:48 AM, Martin Costabel wrote: >> On 22/04/14 14:05, Max Horn wrote: >>> Hi, >>> >>> trying to build apt-0.5.4-1061 fails for me. See the attached log. >> >>> checking build system type... x86_64-apple-darwin12 >>> checking for gcc... gcc >>> checking whether the C compiler (gcc ) works... yes >>> checking whether the C compiler (gcc ) is a cross-compiler... no >>> checking whether we are using GNU C... yes >>> checking whether gcc accepts -g... no >>> checking for POSIXized ISC... no >>> checking for c++... c++ >>> checking whether the C++ compiler (c++ -O2 -DEMULATE_MMAP -D__USE_MISC >>> -fconstant-cfstrings -DHAVE_SOCKLEN_T=1 ) works... yes >>> checking whether the C++ compiler (c++ -O2 -DEMULATE_MMAP -D__USE_MISC >>> -fconstant-cfstrings -DHAVE_SOCKLEN_T=1 ) is a cross-compiler... no >>> checking whether we are using GNU C++... yes >>> checking whether c++ accepts -g... no >>> checking how to run the C preprocessor... /lib/cpp >> >> What weird gcc and c++ do you have that don't accept -g? >> And what does config.log say about this? >> > > I don't replicate this with fink-0.36.4.1 and 10.8/Xcode 5.0.x. > > You might want to verify that > /sw/var/lib/fink/path-prefix-clang/compiler_wrapper is present. It is: $ md5 /sw/var/lib/fink/path-prefix-clang/compiler_wrapper MD5 (/sw/var/lib/fink/path-prefix-clang/compiler_wrapper) = b7a7e0ca2661e46a0b66a4b2cb01a078 But it contains a bogus check: -- 8< -- # To avoid extra warning spew, don't add # -Wno-error=unused-command-line-argument-hard-error-in-future # when clang doesn't support it . if [ "x`clang -Wno-error=unused-command-line-argument-hard-error-in-future 2>&1 | grep unknown`" = "x" ]; then suppress_hard_error="-Wno-error=unused-command-line-argument-hard-error-in-future" else suppress_hard_error="" fi -- 8< -- This check does not work and can not work. Indeed, behold: $ [ "x`clang -Wfoobar`" = "x" ] && echo yesclang: error: no input files yes The test really needs to pass a file to clang to verify it works. Something like this works better: -- 8< -- opt="-Wno-error=unused-command-line-argument-hard-error-in-future" #opt="-Wall" if [ "x`echo | clang -E $opt - 2>&1 | grep unknown`" = "x" ]; then suppress_hard_error="$opt" else suppress_hard_error="" fi -- 8< -- Max |