0

我正在尝试使用带有地址清理标志的 clang 构建 mplayer。但是,当我执行 make 时,我不断收到错误。这是完整的输出日志,包括我使用的命令。任何帮助都感激不尽。

kt@kt-VirtualBox:~/mplayer$ ./configure --cc=clang --extra-ldflags="-fsanitize=address" 
Updating FFmpeg, (re)move ffmpeg/mp_auto_pull to disable
Already on 'master'
Your branch is up-to-date with 'origin/master'.
Current branch master is up to date.
Checking for ffmpeg/libavcodec/allcodecs.c ... found 
Checking for ffmpeg/libavformat/allformats.c ... found 
Checking for ffmpeg/libavfilter/allfilters.c ... found 
Checking for clang version ... clang 4.2.1 (experimental support only)
Checking for working compiler ... yes
Detected operating system: Linux
Detected host architecture: x86_64
Checking for cross compilation ... no 
Checking for host cc ... clang 
Checking for CPU vendor ... GenuineIntel (6:69:1) 
Checking for CPU type ...  Intel(R) Core(TM) i7-4558U CPU @ 2.80GHz 
Checking for kernel support of mmx ... yes 
Checking for kernel support of mmxext ... yes 
Checking for kernel support of sse ... yes 
Checking for kernel support of sse2 ... yes 
Checking for kernel support of sse3 ... yes 
Checking for kernel support of ssse3 ... yes 
Checking for kernel support of sse4_1 ... yes 
Checking for kernel support of sse4_2 ... yes 
Checking for kernel support of avx ... yes 
Checking for kernel support of cmov ... yes 
Checking for mtrr support ... yes 
Checking for GCC & CPU optimization abilities ... corei7-avx 
Checking for byte order ... little-endian 
Checking for extern symbol prefix ... __asan_init_v3 U __asan_mapping_offset V 0000000000000000 0000000000000008 __asan_mapping_scale V 0000000000000000 0000000000000008 
Checking for assembler support of -pipe option ... yes 
Checking for relocatable binary ... yes (fast PIC)
Checking for PIC ... yes 
Checking for .align is a power of two ... no 
Checking for ebx availability ... yes 
Checking for yasm ... yasm 
Checking for bswap ... yes 
Checking for xmm clobbers ... yes 
Checking for langinfo ... yes 
Checking for language ... messages: en - man pages: en - documentation: en 
Checking for enable sighandler ... yes 
Checking for runtime cpudetection ... no 
Checking for restrict keyword ... restrict 
Checking for __builtin_expect ... yes 
Checking for kstat ... no 
Checking for atanf ... yes 
Checking for cbrt ... yes 
Checking for cbrtf ... yes 
Checking for cosf ... yes 
Checking for expf ... yes 
Checking for exp2 ... yes 
Checking for exp2f ... yes 
Checking for isnan ... yes 
Checking for isinf ... yes 
Checking for llrint ... yes 
Checking for llrintf ... yes 
Checking for log2 ... yes 
Checking for log2f ... yes 
Checking for log10f ... yes 
Checking for lrint ... yes 
Checking for lrintf ... yes 
Checking for rint ... yes 
Checking for round ... yes 
Checking for roundf ... yes 
Checking for sinf ... yes 
Checking for trunc ... yes 
Checking for truncf ... yes 
Checking for atan2f ... yes 
Checking for fminf ... yes 
Checking for ldexpf ... yes 
Checking for powf ... yes 
Checking for mkstemp ... yes 
Checking for gmtime_r ... yes 
Checking for localtime_r ... yes 
Checking for nanosleep ... yes 
Checking for socklib ... yes 
Checking for netdb.h, struct addrinfo ... yes 
Checking for netdb.h, getaddrinfo() ... yes 
Checking for sockaddr_storage ... yes 
Checking for struct ipv6_mreq ... yes 
Checking for struct sockaddr_in6 ... yes 
Checking for struct sockaddr sa_len ... no 
Checking for arpa/inet.h ... yes 
Checking for inet_pton() ... yes 
Checking for inet_aton() ... yes 
Checking for socklen_t ... yes 
Checking for closesocket() ... no 
Checking for networking ... yes 
Checking for inet6 ... yes 
Checking for gethostbyname2 ... yes 
Checking for SCTP ... no 
Checking for sys/un.h ... yes 
Checking for sys/poll.h ... yes 
Checking for inttypes.h (required) ... yes 
Checking for int_fastXY_t in inttypes.h ... yes 
Checking for malloc.h ... yes 
Checking for aligned malloc ... no 
Checking for memalign() ... yes 
Checking for posix_memalign() ... yes 
Checking for alloca.h ... yes 
Checking for fastmemcpy ... yes 
Checking for hard-coded tables ... no 
Checking for mman.h ... yes 
Checking for mprotect ... yes 
Checking for dynamic loader ... yes 
Checking for dynamic a/v plugins support ... no 
Checking for pthread ... yes 
Checking for pthread_cancel ... yes 
Checking for direct.h ... no 
Checking for windows.h ... no 
Checking for io.h ... no 
Checking for rpath ... no 
Checking for iconv ... yes 
Checking for soundcard.h ... yes (sys/soundcard.h)
Checking for termcap ... no 
Checking for termios ... yes (using termios.h)
Checking for shm ... yes 
Checking for strsep() ... yes 
Checking for vsscanf() ... yes 
Checking for POSIX select() ... yes 
Checking for audio select() ... yes 
Checking for gettimeofday() ... yes 
Checking for clock_gettime() ... yes 
Checking for glob() ... yes 
Checking for setenv() ... yes 
Checking for setmode() ... no 
Checking for sys/sysinfo.h ... yes 
Checking for Apple IR ... yes 
Checking for pkg-config ... yes 
Checking for GnuTLS ... no 
Checking for Samba support (libsmbclient) ... no 
Checking for /dev/mga_vid ... no 
Checking for tdfxfb ... no 
Checking for s3fb ... no 
Checking for wii ... no 
Checking for tdfxvid ... no 
Checking for xvr100 ... no 
Checking for tga ... yes 
Checking for md5sum support ... yes 
Checking for yuv4mpeg support ... yes 
Checking for bl ... no 
Checking for DirectFB ... no 
Checking for X11 headers presence ... yes 
Checking for X11 ... no (check if the dev(el) packages are installed)
Checking for Xss screensaver extensions ... no 
Checking for DPMS ... no 
Checking for Xv ... auto 
Checking for XvMC ... no 
Checking for Video Decode Acceleration (VDA) ... no 
Checking for VDPAU ... auto 
Checking for Xinerama ... auto 
Checking for Xxf86vm ... auto 
Checking for XF86keysym ... auto 
Checking for DGA ... no 
Checking for xmga ... no 
Checking for 3dfx ... no 
Checking for VIDIX ... yes 
Checking for VIDIX PCI device name database ... yes 
Checking for VIDIX dhahelper support ... no 
Checking for VIDIX svgalib_helper support ... no 
Checking for GGI ... no 
Checking for GGI extension: libggiwmh ... no 
Checking for AA ... no 
Checking for CACA ... no 
Checking for SVGAlib ... no 
Checking for FBDev ... yes 
Checking for DVB ... yes 
Checking for PNG support ... no 
Checking for MNG support ... no 
Checking for JPEG support ... no 
Checking for OpenJPEG (JPEG 2000) support ... no 
Checking for PNM support ... yes 
Checking for GIF support ... no 
Checking for VESA support ... no 
Checking for SDL ... no 
Checking for SDL image ... no 
Checking for OpenGL ... no 
Checking for MatrixView ... no 
Checking for DXR2 ... no 
Checking for DXR3/H+ ... no 
Checking for IVTV TV-Out (pre linux-2.6.24) ... no 
Checking for V4L2 MPEG Decoder ... yes 
Checking for OSS Audio ... yes 
Checking for aRts ... no 
Checking for EsounD ... no 
Checking for NAS ... no 
Checking for pulse ... no 
Checking for JACK ... yes 
Checking for OpenAL ... no 
Checking for ALSA audio ... no 
Checking for Sun audio ... no 
Checking for sndio audio ... no 
Checking for VCD support ... yes 
Checking for Blu-ray support ... no 
Checking for dvdread ... no 
Checking for libcdio ... no 
Checking for cdparanoia ... no 
Checking for bitmap font support ... yes 
Checking for freetype >= 2.0.9 ... no 
Checking for fontconfig ... no (FreeType support needed)
Checking for fribidi with charsets ... no 
Checking for SSA/ASS support ... no (FreeType and FriBiDi support needed)
Checking for ENCA ... no 
Checking for zlib ... yes 
Checking for bzlib ... no 
Checking for RTC ... yes 
Checking for liblzo2 support ... no 
Checking for mad support ... no 
Checking for Twolame ... no 
Checking for Toolame ... no 
Checking for OggVorbis support ... yes (libvorbis)
Checking for libspeex (version >= 1.1 required) ... no 
Checking for libgsm ... no 
Checking for OggTheora support ... yes 
Checking for mpg123 support ... no 
Checking for liba52 support ... no 
Checking for libmpeg2 support ... no 
Checking for libdca support ... no 
Checking for libmpcdec (musepack, version >= 1.2.1 required) ... no 
Checking for FAAC support ... yes (in FFmpeg: yes)
Checking for FAAD2 support ... no 
Checking for libilbc support ... no 
Checking for libopus decoding support ... no 
Checking for LADSPA plugin support ... no 
Checking for libbs2b audio filter support ... no 
Checking for Win32 codecs ... no 
Checking for XAnim codecs ... yes (dynamic loader support needed)
Checking for RealPlayer codecs ... yes (dynamic loader support needed)
Checking for QuickTime codecs ... auto 
Checking for Nemesi Streaming Media libraries ... no 
Checking for LIVE555 Streaming Media libraries ... no 
Checking for RTMPDump Streaming Media library ... no 
Checking for FFmpeg ... yes 
Checking for libpostproc ... yes 
Checking for libopencore_amr narrowband ... yes 
Checking for libopencore_amr wideband ... yes 
Checking for libdv-0.9.5+ ... no 
Checking for CrystalHD ... no 
Checking for Xvid ... no 
Checking for Xvid two pass plugin ... no 
Checking for x264 ... no (in FFmpeg: no)
Checking for libdirac ... no 
Checking for libschroedinger ... no 
Checking for libvpx ... no 
Checking for libnut ... no 
Checking for zr ... no 
Checking for libmp3lame ... yes (in FFmpeg: yes)
Checking for mencoder ... yes 
Checking for UnRAR executable ... yes 
Checking for TV interface ... yes 
Checking for DirectShow TV interface ... no 
Checking for Video 4 Linux TV interface ... no 
Checking for Video 4 Linux 2 TV interface ... yes 
Checking for Radio interface ... no 
Checking for Capture for Radio interface ... no 
Checking for Video 4 Linux 2 Radio interface ... no 
Checking for Video 4 Linux Radio interface ... no 
Checking for Video 4 Linux 2 MPEG PVR interface ... yes 
Checking for ftp ... yes 
Checking for vstream client ... no 
Checking for OSD menu ... no 
Checking for Subtitles sorting ... yes 
Checking for XMMS inputplugin support ... no 
Checking for GUI ... no 
Checking for automatic gdb attach ... no 
Checking for compiler support for noexecstack ... yes 
Checking for linker support for --nxcompat --no-seh --dynamicbase ... no 
Checking for linker support for --large-address-aware ... no 
Checking for linker support for --version-script ... yes 
Checking for joystick ... no 
Checking for lirc ... no 
Checking for lircc ... no 
Checking for DVD support (libdvdnav) ... no 
Checking for XML catalogs ... SGML catalog 
Checking for XML chunked stylesheet ... not found, using default 
Checking for XML monolithic stylesheet ... not found, using default 
Checking for XML DTD ... not found, using default 
Checking for valid XSLT processor ... xsltproc not found 
Creating config.mak
Creating config.h

Config files successfully generated by ./configure --cc=clang --extra-ldflags=-fsanitize=address !

  Install prefix: /usr/local
  Data directory: /usr/local/share/mplayer
  Config direct.: /usr/local/etc/mplayer

  Byte order: little-endian
  Optimizing for: corei7-avx

  Languages:
    Messages/GUI: en
    Manual pages: en
    Documentation: en

  Enabled optional drivers:
    Input: ftp pvr tv-v4l2 tv vcd dvb networking 
    Codecs: libopencore_amrwb libopencore_amrnb ffmpeg(internal) real xanim faac libtheora libvorbis 
    Audio output: jack oss v4l2 mpegpes(dvb) 
    Video output: v4l2 pnm mpegpes(dvb) fbdev cvidix yuv4mpeg md5sum tga 

  Disabled optional drivers:
    Input: dvdnav vstream radio tv-v4l1 tv-dshow librtmp live555 nemesi cddb cdda dvdread bluray smb 
    Codecs: libvpx libschroedinger libdirac x264 xvid crystalhd libdv qtx win32 libopus ilbc faad2 musepack libdca libmpeg2 liba52 mpg123 libgsm speex toolame twolame libmad liblzo gif OpenJPEG 
    Audio output: sndio sun alsa openal pulse nas esd arts ivtv dxr2 sdl 
    Video output: zr zr2 ivtv dxr3 dxr2 matrixview opengl sdl vesa gif89a jpeg mng svga caca aa ggi xvidix winvidix 3dfx xmga dga vdpau xvmc xv x11 directfb dfbmga bl xvr100 tdfx_vid wii s3fb tdfxfb mga 

'config.h' and 'config.mak' contain your configuration options.
Note: If you alter theses files (for instance CFLAGS) MPlayer may no longer
      compile *** DO NOT REPORT BUGS if you tweak these files ***

'make' will now compile MPlayer and 'make install' will install it.
Note: On non-Linux systems you might need to use 'gmake' instead of 'make'.

Please check MTRR settings at /proc/mtrr (see DOCS/HTML/en/video.html#mtrr)

NOTE: Win32 codec DLLs are not supported on your CPU (x86_64) or your
operating system (Linux). You may encounter a few files that cannot
be played due to missing open source video/audio codec support.

Check config.log if you wonder why an autodetection failed (make sure
development headers/packages are installed).

NOTE: The --enable-* parameters unconditionally force options on, completely
skipping autodetection. This behavior is unlike what you may be used to from
autoconf-based configure scripts that can decide to override you. This greater
level of control comes at a price. You may have to provide the correct compiler
and linker flags yourself.
If you used one of these options (except --enable-menu and similar ones that
turn on internal features) and experience a compilation or linking failure,
make sure you have passed the necessary compiler/linker flags to configure.

If you suspect a bug, please read DOCS/HTML/en/bugreports.html.


MPlayer compilation will use the CPPFLAGS/CFLAGS/LDFLAGS/YASMFLAGS set by you,
but:

    *** ***  DO NOT REPORT BUGS IF IT DOES NOT COMPILE/WORK!  *** ***

It is strongly recommended to let MPlayer choose the correct *FLAGS!
To do so, remove *FLAGS from the environment an re-run configure.
You can use --extra-*flags to add custom flags if necessary.

    kt@t-VirtualBox:~/mplayer$ make
    clang -MMD -MP -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -D_ISOC99_SOURCE -I. -Iffmpeg -fsanitize=address -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE  -fpie -DPIC -D_REENTRANT  -DZLIB_CONST -c -o command.o command.c
    In file included from command.c:27:
    ./config.h:123:1: error: unknown type name '__asan_mapping_offset'
    __asan_mapping_offset V 0000000000000000 0000000000000008
    ^
    ./config.h:123:24: error: expected ';' after top level declarator
    __asan_mapping_offset V 0000000000000000 0000000000000008
                           ^
                           ;
    ./config.h:126:23: warning: missing terminating '"' character [-Winvalid-pp-token]
    #define EXTERN_PREFIX "__asan_init_v3 U         
                          ^
    ./config.h:129:1: warning: missing terminating '"' character [-Winvalid-pp-token]
    "
    ^
    In file included from command.c:28:
    ./command.h:25:24: warning: declaration of 'struct MPContext' will not be visible outside of this function [-Wvisibility]
    int run_command(struct MPContext *mpctx, struct mp_cmd *cmd);
                           ^
    ./command.h:26:37: warning: declaration of 'struct MPContext' will not be visible outside of this function [-Wvisibility]
    char *property_expand_string(struct MPContext *mpctx, char *str);
                                        ^
    command.c:2262:7: error: conflicting types for 'property_expand_string'
    char *property_expand_string(MPContext *mpctx, char *str)
          ^
    ./command.h:26:7: note: previous declaration is here
    char *property_expand_string(struct MPContext *mpctx, char *str);
          ^
    command.c:2590:5: error: conflicting types for 'run_command'
    int run_command(MPContext *mpctx, mp_cmd_t *cmd)
        ^
    ./command.h:25:5: note: previous declaration is here
    int run_command(struct MPContext *mpctx, struct mp_cmd *cmd);
        ^
    command.c:3373:56: warning: incompatible pointer types passing 'MPContext *' (aka 'struct MPContext *') to parameter of type
          'struct MPContext *' [-Wincompatible-pointer-types]
                    char *exp_cmd = property_expand_string(mpctx, cmd->args[0].v.s);
                                                           ^~~~~
    ./command.h:26:48: note: passing argument to parameter 'mpctx' here
    char *property_expand_string(struct MPContext *mpctx, char *str);
                                                   ^
    5 warnings and 4 errors generated.
    make: *** [command.o] Error 1
4

1 回答 1

0

在 Asan 的存在下,mplayer 的配置脚本似乎中断了:

Checking for extern symbol prefix ... __asan_init_v3 U __asan_mapping_offset V 0000000000000000 0000000000000008 __asan_mapping_scale V 0000000000000000 0000000000000008

这会导致生成无效的 config.h。

顺便说一句,您似乎只添加-fsanitize=addressLDFLAGS- 您也需要它CFLAGS/ CXXFLAGS

于 2016-10-24T13:47:41.273 回答