[FFmpeg-trac] #3649(avutil:new): Solaris Intel static libraries required AMD 3D NOW even though the CPU doesn't support

FFmpeg trac at avcodec.org
Thu Jun 19 02:01:32 CEST 2014


#3649: Solaris Intel static libraries required AMD 3D NOW even though the CPU
doesn't support
---------------------------------------+----------------------------------
             Reporter:  bmitchel       |                    Owner:
                 Type:  defect         |                   Status:  new
             Priority:  minor          |                Component:  avutil
              Version:  2.2.1          |               Resolution:
             Keywords:  solaris intel  |               Blocked By:
             Blocking:                 |  Reproduced by developer:  0
Analyzed by developer:  0              |
---------------------------------------+----------------------------------

Comment (by bmitchel):

 I need to lay out all the issues here, as there seems to be a bit of
 confusion.

 Compiling & using FFMPEG with Solaris 10 Intel

 Configure with:
 {{{
         bash ./configure --cc=cc --cxx=CC
 }}}

 I removed --disable-doc etc, and Intel compiled no problems, so there are
 no issues here.

 1) version.sh does not execute properly.

 {{{
 barney(bradm) gmake
 ./version.sh: syntax error at line 7: `revision=$' unexpected
 }}}

 To fix this, the first line needs to be changed to use bash:
 {{{
 #!/bin/bash
 }}}

 Running "bash version.sh" also works, however, the way version.sh is
 normally called doens't preclude with the bash shell.
 {{{
 barney(bradm) bash version.sh
 N-64012-g61df081
 }}}

 2) libswscale/x86/swscale.c has a compiler error

 {{{
 "libswscale/x86/swscale_template.c", line 777: warning: parameter in
 inline asm statement unused: %1
 "libswscale/x86/swscale_template.c", line 777: warning: parameter in
 inline asm statement unused: %2
 "libswscale/x86/swscale_template.c", line 777: warning: parameter in
 inline asm statement unused: %3
 "libswscale/x86/swscale.c", line 205: void function cannot return value
 cc: acomp failed for libswscale/x86/swscale.c
 gmake: *** [libswscale/x86/swscale.o] Error 2
 }}}

 At line 205, there is a return from a void function:

 {{{
 static void yuv2yuvX_sse3(const int16_t *filter, int filterSize,
                            const int16_t **src, uint8_t *dest, int dstW,
                            const uint8_t *dither, int offset)
 {
     if(((int)dest) & 15){
         return yuv2yuvX_mmxext(filter, filterSize, src, dest, dstW,
 dither, offset);
     }
 }}}

 To get this to compile, I've moved the return to after the yuv2yuvX_mmxext
 function call

 {{{
         if(((int)dest) & 15){
         yuv2yuvX_mmxext(filter, filterSize, src, dest, dstW, dither,
 offset);
         return;
    }
 }}}

 3) As per the original intention, I have an issue with the Oracle Compiler
 (we don't use the gcc compiler in our environment, but
         I am testing the Solaris compile as requested.

         C++ applications (I haven't tried a simple C application) when
 linked have a CPU requirement for the AMD_3dNow instructions.
         The only workaround I've found for this on our own C++
 applications is as said in the comments, by using a mapfile to remove the
         AMD_3dNow instruction dependency.

 {{{
 barney(bradm) elfdump -H libavcodec/libavcodec.a | grep AMD
        [0]  CA_SUNW_HW_1     0x943  [ SSE AMD_3DNow MMX TSC FPU ]
        [0]  CA_SUNW_HW_1     0x400963  [ SSSE3 SSE AMD_3DNow MMX CMOV TSC
 FPU ]
 barney(bradm) elfdump -H libavdevice/libavdevice.a | grep AMD
 barney(bradm) elfdump -H libavfilter/libavfilter.a | grep AMD
 barney(bradm) elfdump -H libavformat/libavformat.a | grep AMD
 barney(bradm) elfdump -H libavutil/libavutil.a | grep AMD
 barney(bradm) elfdump -H libswresample/libswresample.a | grep AMD
 barney(bradm) elfdump -H libswscale/libswscale.a | grep AMD
        [0]  CA_SUNW_HW_1     0x1943  [ SSE2 SSE AMD_3DNow MMX TSC FPU ]
 }}}

 {{{
 libavcodec/libavcodec.a(cavsdsp.o):

 Capabilities Section:  .SUNW_cap

  Object Capabilities:
      index  tag               value
        [0]  CA_SUNW_HW_1     0x943  [ SSE AMD_3DNow MMX TSC FPU ]

 libavcodec/libavcodec.a(dsputilenc_mmx.o):

 Capabilities Section:  .SUNW_cap

  Object Capabilities:
      index  tag               value
        [0]  CA_SUNW_HW_1     0x400963  [ SSSE3 SSE AMD_3DNow MMX CMOV TSC
 FPU ]
 }}}

 To remove this depedency when building our own C++ executables, the
 mapfile consists of:
 {{{
 hwcap_1 = AVX SSSE3 SSE2 SSE MMX CMOV TSC FPU OVERRIDE;
 }}}

 Linker flags include:
 {{{
         -M mapfile.i386
 }}}

 GCC Compile

 As requested, I've tried to compile using GCC.

 Configure:
 {{{
         bash ./configure --cc=/opt/csw/bin/gcc --cxx=/opt/csw/bin/g++
 --extra-libs=/usr/lib/values-xpg6.o
 }}}

 1) There is a compiler issue in libavutil/file_open.c

 {{{
 CC      libavutil/fifo.o
 CC      libavutil/file.o
 CC      libavutil/file_open.o
 libavutil/file_open.c: In function 'av_fopen_utf8':
 libavutil/file_open.c:128:5: error: implicit declaration of function
 'fdopen' [-Werror=implicit-function-declaration]
      return fdopen(fd, mode);
      ^
 libavutil/file_open.c:128:5: warning: return makes pointer from integer
 without a cast
 cc1: some warnings being treated as errors
 gmake: *** [libavutil/file_open.o] Error 1
 }}}

 My question for this is, fdopen is not standard C, is this the issue here?
 Should I be using -std=gnu99 or something?

--
Ticket URL: <https://trac.ffmpeg.org/ticket/3649#comment:15>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list