#10225 closed defect (fixed)

Hardcoded tables aligned memory change breaks compiling

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

Description

The 2/9/2023 commit to libavutil/mem.h that removed all the aligned memory macros breaks compiling with hardcoded tables enabled.

01:10:58 iPad-Pro:/src/ffmpeg-6.0 root$ smmk
HOSTCC  libavcodec/aacps_tablegen.o
In file included from libavcodec/aacps_tablegen.c:24:
In file included from libavcodec/aacps_tablegen_template.c:39:
In file included from libavcodec/aacps_tablegen.h:35:
In file included from ./libavutil/libm.h:29:
./config.h:595:9: warning: 'CONFIG_HARDCODED_TABLES' macro redefined [-Wmacro-redefined]
#define CONFIG_HARDCODED_TABLES 1
        ^
libavcodec/aacps_tablegen_template.c:25:9: note: previous definition is here
#define CONFIG_HARDCODED_TABLES 0
        ^
In file included from libavcodec/aacps_tablegen.c:24:
In file included from libavcodec/aacps_tablegen_template.c:39:
libavcodec/aacps_tablegen.h:46:24: error: expected parameter declarator
static DECLARE_ALIGNED(16, float, f20_0_8) [ 8][8][2];
                       ^
libavcodec/aacps_tablegen.h:46:24: error: expected ')'
libavcodec/aacps_tablegen.h:46:23: note: to match this '('
static DECLARE_ALIGNED(16, float, f20_0_8) [ 8][8][2];
                      ^
libavcodec/aacps_tablegen.h:46:8: warning: type specifier missing, defaults to 'int'; ISO C99 and later do not support implicit int [-Wimplicit-int]
static DECLARE_ALIGNED(16, float, f20_0_8) [ 8][8][2];
~~~~~~ ^
int
libavcodec/aacps_tablegen.h:46:23: error: function cannot return array type 'int[8][8][2]'
static DECLARE_ALIGNED(16, float, f20_0_8) [ 8][8][2];
                      ^

(Remaining similar errors removed for brevity)

I’m compiling 6.0.0 release with clang-15 using the same configure args that worked fine in 5.1.2 with clang-14. I’m using a jailbroken iPad Pro building for aarch64 but saw two guys on StackOverflow with the same issue on Raspberry Pi’s on 5.1.2 posted 5d ago.

Change History (4)

in reply to:  1 comment:2 by badger200, 20 months ago

Replying to quinkblack:

Should be fixed by http://ffmpeg.org/pipermail/ffmpeg-devel/2023-February/307034.html

Thanks for such quick work! I will watch for a 6.0.1 release to try it.

Meanwhile I manually copied and pasted a bunch of stuff by diff’ing from 5.1.2 to 6.0.0 in libavutil/mem.h, mem_internal.h, and version.h until I got it to compile and it seems to work for now.

comment:4 by James, 20 months ago

Keywords: Clang compile removed
Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.