Opened 3 years ago

Closed 21 months ago

#4263 closed defect (wontfix)

libavutil compile error

Reported by: jonshouse Owned by:
Priority: minor Component: avutil
Version: git-master Keywords:
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description (last modified by richardpl)

Summary of the bug:

CC libavutil/cpu.o
CC libavutil/crc.o
CC libavutil/des.o
CC libavutil/dict.o
CC libavutil/display.o
CC libavutil/downmix_info.o
CC libavutil/error.o
libavutil/error.c: In function `av_strerror':
libavutil/error.c:79:15: error: wrong type argument to unary minus
make: * [libavutil/error.o] Error 1

How to reproduce:

Just compile
# gcc --version
gcc (GCC) 4.6.2
Copyright (C) 2011 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

# uname -a
Linux localhost.localdomain 3.2.2 #12 SMP Wed Oct 24 11:00:28 UTC 2012 i686 i686 i386 GNU/Linux

Version is 2.5.3, this is missing from the version Pulldown ?

Attachments (3)

config.log (249.7 KB) - added by jonshouse 2 years ago.
This time from ffmpeg-2.6.2
man_strerr (2.8 KB) - added by jonshouse 2 years ago.
Manual text
string.h (13.9 KB) - added by jonshouse 2 years ago.

Download all attachments as: .zip

Change History (13)

comment:1 Changed 3 years ago by mastered

It seems you get gnu version of strerror_r

Try to add to libavutil/error.c:
#define _POSIX_C_SOURCE 200112

So you get:
#undef _GNU_SOURCE
#define _POSIX_C_SOURCE 200112
#define _XOPEN_SOURCE 600 /* XSI-compliant version of strerror_r */

comment:2 Changed 3 years ago by michael

missing configure line, information about your platform, config.mak/h/log

comment:3 Changed 2 years ago by jonshouse

I am trying again with newer ffmpeg. Still the same

CC libavutil/error.o
libavutil/error.c: In function ‘av_strerror’:
libavutil/error.c:83:15: error: wrong type argument to unary minus
make: * [libavutil/error.o] Error 1

Modifying libavutil/error.c to read :

#undef _GNU_SOURCE
#define _XOPEN_SOURCE 600 /* XSI-compliant version of strerror_r */
#define _POSIX_C_SOURCE 200112
#include "avutil.h"

Does not fix it.

Any ideas ?

Thanks

Changed 2 years ago by jonshouse

This time from ffmpeg-2.6.2

comment:4 Changed 2 years ago by cehoyos

Please tell us more about your system (which distribution?) and attach your /usr/include/string.h file. The output of man 3 strerror_r may also be interesting.

Changed 2 years ago by jonshouse

Manual text

Changed 2 years ago by jonshouse

comment:5 follow-up: Changed 2 years ago by jonshouse

The system is custom. It started life as a Debian about 12 years ago but has largely been replaced by packages built from source.

comment:6 Changed 2 years ago by cehoyos

It seems to me that your manual and your header disagree about the type of the strerror_r() function, indicating a broken system. Note that your header is from 2002...

comment:7 Changed 2 years ago by cehoyos

Either send a configure patch to test for broken string.h header or just force HAVE_STRERROR_R to 0 in config.h after running configure.

comment:8 Changed 2 years ago by cehoyos

  • Priority changed from normal to minor
  • Status changed from new to open
  • Version changed from unspecified to git-master

comment:9 in reply to: ↑ 5 Changed 2 years ago by heleppkes

Replying to jonshouse:

The system is custom. It started life as a Debian about 12 years ago but has largely been replaced by packages built from source.

I suggest you fix your system then, it doesn't seem to be POSIX compliant.

comment:10 Changed 21 months ago by richardpl

  • Description modified (diff)
  • Resolution set to wontfix
  • Status changed from open to closed
Note: See TracTickets for help on using tickets.