Opened 10 years ago
Closed 9 years ago
#4263 closed defect (wontfix)
libavutil compile error
Reported by: | Jon | 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 )
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)
Change History (13)
comment:1 by , 10 years ago
comment:2 by , 10 years ago
missing configure line, information about your platform, config.mak/h/log
comment:3 by , 10 years ago
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
comment:4 by , 10 years ago
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.
by , 10 years ago
follow-up: 9 comment:5 by , 10 years ago
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 by , 10 years ago
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 by , 10 years ago
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 by , 10 years ago
Priority: | normal → minor |
---|---|
Status: | new → open |
Version: | unspecified → git-master |
comment:9 by , 10 years ago
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 by , 9 years ago
Description: | modified (diff) |
---|---|
Resolution: | → wontfix |
Status: | open → closed |
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 */