Bug#876787: afl: FTBFS /usr/bin/ld: unrecognized option '--no-keep-files-mapped'

2017-10-01 Thread Sylvestre Ledru

Le 26/09/2017 à 01:24, Adrian Bunk a écrit :
> Control: reassign -1 clang-3.9 1:3.9.1-16
> Control: affects -1 src:afl
> Control: clone -1 -2 -3
> Control: reassign -2 clang-4.0 1:4.0.1-5
> Control: reassign -3 clang-5.0 1:5.0-2
>
> On Mon, Sep 25, 2017 at 10:47:22PM +0200, Daniel Stender wrote:
>> Package: src:afl
>> Version: 2.50b-1
>> Severity: serious
>> Justification: fails to build from source (but built successfully in the 
>> past)
>> Control: block 873404 by -1
>>
>> AFL begun to FTBFS recently with a clang error:
>>
>> 
>> [+] All set and ready to build.
>> clang-3.9  -Wall -D_FORTIFY_SOURCE=2 -g -Wno-pointer-sign 
>> -DAFL_PATH=\"/usr/lib/afl\" -DBIN_PATH=\"/usr/bin\" -DVERSION=\"2.50b\"  
>> afl-clang-fast.c -o ../afl-clang-fast -Wl,-z,relro -Wl,-z,now
>> ln -sf afl-clang-fast ../afl-clang-fast++
>> clang++-3.9 `llvm-config-3.9 --cxxflags` -fno-rtti -fpic  -Wall 
>> -D_FORTIFY_SOURCE=2 -g -Wno-pointer-sign -DVERSION=\"2.50b\" 
>> -Wno-variadic-macros -shared afl-llvm-pass.so.cc -o ../afl-llvm-pass.so 
>> `llvm-config-3.9 --ldflags` -Wl,-z,relro -Wl,-z,now
>> warning: unknown warning option '-Wno-maybe-uninitialized'; did you mean 
>> '-Wno-uninitialized'? [-Wunknown-warning-option]
>> 1 warning generated.
>> /usr/bin/ld: unrecognized option '--no-keep-files-mapped'
>> /usr/bin/ld: use the --help option for usage information
>> clang: error: linker command failed with exit code 1 (use -v to see 
>> invocation)
>> Makefile:83: recipe for target '../afl-llvm-pass.so' failed
>> 
>>
>> This seems to be a problem in the build toolchain (this is going to be
>> reassigned). The same error appears also with clang-4.0 and clang-5.0, thus
>> blocking the llvm-toolchain update of AFL.
> The trigger is:
>
> llvm-toolchain-3.9 (1:3.9.1-16) unstable; urgency=medium
> ...
>   [ Matthias Klose ]
>   * Link with --no-keep-files-mapped --no-map-whole-files when using gold.
> ...
>  -- Sylvestre Ledru   Fri, 08 Sep 2017 11:57:07 +0200
>
>
> But the actual bug is older:
>   CXXFLAGS_EXTRA += -Wl,-fuse-ld=gold -Wl,--no-keep-files-mapped 
> -Wl,--no-map-whole-files
>
> -Wl,-fuse-ld=gold is wrong, this should be -fuse-ld=gold
> (it cannot work to tell the linker which linker to use).

ok, well spoted.


llvm-config exports the flags which has been used to build llvm.


Thanks,
S



Bug#876787: afl: FTBFS /usr/bin/ld: unrecognized option '--no-keep-files-mapped'

2017-09-25 Thread Adrian Bunk
Control: reassign -1 clang-3.9 1:3.9.1-16
Control: affects -1 src:afl
Control: clone -1 -2 -3
Control: reassign -2 clang-4.0 1:4.0.1-5
Control: reassign -3 clang-5.0 1:5.0-2

On Mon, Sep 25, 2017 at 10:47:22PM +0200, Daniel Stender wrote:
> Package: src:afl
> Version: 2.50b-1
> Severity: serious
> Justification: fails to build from source (but built successfully in the past)
> Control: block 873404 by -1
> 
> AFL begun to FTBFS recently with a clang error:
> 
> 
> [+] All set and ready to build.
> clang-3.9  -Wall -D_FORTIFY_SOURCE=2 -g -Wno-pointer-sign 
> -DAFL_PATH=\"/usr/lib/afl\" -DBIN_PATH=\"/usr/bin\" -DVERSION=\"2.50b\"  
> afl-clang-fast.c -o ../afl-clang-fast -Wl,-z,relro -Wl,-z,now
> ln -sf afl-clang-fast ../afl-clang-fast++
> clang++-3.9 `llvm-config-3.9 --cxxflags` -fno-rtti -fpic  -Wall 
> -D_FORTIFY_SOURCE=2 -g -Wno-pointer-sign -DVERSION=\"2.50b\" 
> -Wno-variadic-macros -shared afl-llvm-pass.so.cc -o ../afl-llvm-pass.so 
> `llvm-config-3.9 --ldflags` -Wl,-z,relro -Wl,-z,now
> warning: unknown warning option '-Wno-maybe-uninitialized'; did you mean 
> '-Wno-uninitialized'? [-Wunknown-warning-option]
> 1 warning generated.
> /usr/bin/ld: unrecognized option '--no-keep-files-mapped'
> /usr/bin/ld: use the --help option for usage information
> clang: error: linker command failed with exit code 1 (use -v to see 
> invocation)
> Makefile:83: recipe for target '../afl-llvm-pass.so' failed
> 
> 
> This seems to be a problem in the build toolchain (this is going to be
> reassigned). The same error appears also with clang-4.0 and clang-5.0, thus
> blocking the llvm-toolchain update of AFL.

The trigger is:

llvm-toolchain-3.9 (1:3.9.1-16) unstable; urgency=medium
...
  [ Matthias Klose ]
  * Link with --no-keep-files-mapped --no-map-whole-files when using gold.
...
 -- Sylvestre Ledru   Fri, 08 Sep 2017 11:57:07 +0200


But the actual bug is older:
CXXFLAGS_EXTRA += -Wl,-fuse-ld=gold -Wl,--no-keep-files-mapped 
-Wl,--no-map-whole-files

-Wl,-fuse-ld=gold is wrong, this should be -fuse-ld=gold
(it cannot work to tell the linker which linker to use).


> DS

cu
Adrian

-- 

   "Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
   "Only a promise," Lao Er said.
   Pearl S. Buck - Dragon Seed



Bug#876787: afl: FTBFS /usr/bin/ld: unrecognized option '--no-keep-files-mapped'

2017-09-25 Thread Daniel Stender
Package: src:afl
Version: 2.50b-1
Severity: serious
Justification: fails to build from source (but built successfully in the past)
Control: block 873404 by -1

AFL begun to FTBFS recently with a clang error:


[+] All set and ready to build.
clang-3.9  -Wall -D_FORTIFY_SOURCE=2 -g -Wno-pointer-sign 
-DAFL_PATH=\"/usr/lib/afl\" -DBIN_PATH=\"/usr/bin\" -DVERSION=\"2.50b\"  
afl-clang-fast.c -o ../afl-clang-fast -Wl,-z,relro -Wl,-z,now
ln -sf afl-clang-fast ../afl-clang-fast++
clang++-3.9 `llvm-config-3.9 --cxxflags` -fno-rtti -fpic  -Wall 
-D_FORTIFY_SOURCE=2 -g -Wno-pointer-sign -DVERSION=\"2.50b\" 
-Wno-variadic-macros -shared afl-llvm-pass.so.cc -o ../afl-llvm-pass.so 
`llvm-config-3.9 --ldflags` -Wl,-z,relro -Wl,-z,now
warning: unknown warning option '-Wno-maybe-uninitialized'; did you mean 
'-Wno-uninitialized'? [-Wunknown-warning-option]
1 warning generated.
/usr/bin/ld: unrecognized option '--no-keep-files-mapped'
/usr/bin/ld: use the --help option for usage information
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Makefile:83: recipe for target '../afl-llvm-pass.so' failed


This seems to be a problem in the build toolchain (this is going to be
reassigned). The same error appears also with clang-4.0 and clang-5.0, thus
blocking the llvm-toolchain update of AFL.

DS

-- System Information:
Debian Release: buster/sid
  APT prefers testing
  APT policy: (990, 'testing'), (500, 'unstable')
Architecture: amd64 (x86_64)

Kernel: Linux 4.12.0-1-amd64 (SMP w/4 CPU cores)
Locale: LANG=de_DE.utf8, LC_CTYPE=de_DE.utf8 (charmap=UTF-8), 
LANGUAGE=de_DE.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages afl depends on:
ii  build-essential  12.4
ii  libc62.24-17

Versions of packages afl recommends:
ii  afl-clang  2.50b-1
ii  afl-doc2.50b-1

Versions of packages afl suggests:
ii  gnuplot   5.0.7+dfsg1-1
ii  gnuplot-qt [gnuplot]  5.0.7+dfsg1-1

-- no debconf information