ffmpeg build error: Raspberry Pi 4 B+, Raspberry Pi OS Buster 32bit
Two years back I built ffmpeg successfully with same script on the same setup. Now I try building new version ffmpeg 5.0, I get below error and build fails.
I nearly tried more than 10 times with even many other OS version. Raspberry Pi OS Buster 32bit Raspberry Pi OS Bullseys 32bit Raspberry Pi OS Bullseys 64bit
I even tried many scripts: https://github.com/NRCHKB/nrchkb-ffmpeg-build https://github.com/NRCHKB/nrchkb-ffmpeg-build/discussions/11 https://github.com/NRCHKB/nrchkb-ffmpeg-build/discussions/11#discussioncomment-5008967 https://gist.github.com/milankragujevic/bd38d796ea6eea27f229216d75d6c202 https://gist.github.com/wildrun0/86a890585857a36c90110cee275c45fd#file-compile-ffmpeg-sh
Almost all are showing same error at the end. Should I doubt the latest ffmpeg git source ? https://github.com/FFmpeg/FFmpeg.git
All showing same error on the files: libavcodec/aacps_tablegen.h libavcodec/aacps_tablegen_template.c
No solution found on the internet on my searches It will be highy appreciated if some ffmpeg experts solve this issue.
./config.h:594: warning: "CONFIG_HARDCODED_TABLES" redefined
#define CONFIG_HARDCODED_TABLES 1
In file included from libavcodec/aacps_tablegen.c:24:
libavcodec/aacps_tablegen_template.c:25: note: this is the location of the previous definition
#define CONFIG_HARDCODED_TABLES 0
In file included from libavcodec/aacps_tablegen_template.c:39,
from libavcodec/aacps_tablegen.c:24:
libavcodec/aacps_tablegen.h:46:24: error: expected declaration specifiers or ‘...’ before numeric constant
static DECLARE_ALIGNED(16, float, f20_0_8) [ 8][8][2];
^~
libavcodec/aacps_tablegen.h:46:35: error: unknown type name ‘f20_0_8’
static DECLARE_ALIGNED(16, float, f20_0_8) [ 8][8][2];
^~~~~~~
libavcodec/aacps_tablegen.h:47:24: error: expected declaration specifiers or ‘...’ before numeric constant
static DECLARE_ALIGNED(16, float, f34_0_12)[12][8][2];
^~
libavcodec/aacps_tablegen.h:47:35: error: unknown type name ‘f34_0_12’
static DECLARE_ALIGNED(16, float, f34_0_12)[12][8][2];
^~~~~~~~
libavcodec/aacps_tablegen.h:48:24: error: expected declaration specifiers or ‘...’ before numeric constant
static DECLARE_ALIGNED(16, float, f34_1_8) [ 8][8][2];
^~
libavcodec/aacps_tablegen.h:48:35: error: unknown type name ‘f34_1_8’
static DECLARE_ALIGNED(16, float, f34_1_8) [ 8][8][2];
^~~~~~~
libavcodec/aacps_tablegen.h:49:24: error: expected declaration specifiers or ‘...’ before numeric constant
static DECLARE_ALIGNED(16, float, f34_2_4) [ 4][8][2];
^~
libavcodec/aacps_tablegen.h:49:35: error: unknown type name ‘f34_2_4’
static DECLARE_ALIGNED(16, float, f34_2_4) [ 4][8][2];
^~~~~~~
libavcodec/aacps_tablegen.h:50:36: error: expected declaration specifiers or ‘...’ before numeric constant
static TABLE_CONST DECLARE_ALIGNED(16, float, Q_fract_allpass)[2][50][3][2];
^~
libavcodec/aacps_tablegen.h:50:47: error: unknown type name ‘Q_fract_allpass’
static TABLE_CONST DECLARE_ALIGNED(16, float, Q_fract_allpass)[2][50][3][2];
^~~~~~~~~~~~~~~
libavcodec/aacps_tablegen.h:51:24: error: expected declaration specifiers or ‘...’ before numeric constant
static DECLARE_ALIGNED(16, float, phi_fract)[2][50][2];
^~
libavcodec/aacps_tablegen.h:51:35: error: unknown type name ‘phi_fract’
static DECLARE_ALIGNED(16, float, phi_fract)[2][50][2];
^~~~~~~~~
libavcodec/aacps_tablegen.h: In function ‘ps_tableinit’:
libavcodec/aacps_tablegen.h:187:13: error: ‘Q_fract_allpass’ undeclared (first use in this function)
Q_fract_allpass[0][k][m][0] = cos(theta);
^~~~~~~~~~~~~~~
libavcodec/aacps_tablegen.h:187:13: note: each undeclared identifier is reported only once for each function it appears in
libavcodec/aacps_tablegen.h:191:9: error: ‘phi_fract’ undeclared (first use in this function)
phi_fract[0][k][0] = cos(theta);
^~~~~~~~~
libavcodec/aacps_tablegen.h:210:29: error: ‘f20_0_8’ undeclared (first use in this function)
make_filters_from_proto(f20_0_8, g0_Q8, 8);
^~~~~~~
libavcodec/aacps_tablegen.h:211:29: error: ‘f34_0_12’ undeclared (first use in this function)
make_filters_from_proto(f34_0_12, g0_Q12, 12);
^~~~~~~~
libavcodec/aacps_tablegen.h:212:29: error: ‘f34_1_8’ undeclared (first use in this function)
make_filters_from_proto(f34_1_8, g1_Q8, 8);
^~~~~~~
libavcodec/aacps_tablegen.h:213:29: error: ‘f34_2_4’ undeclared (first use in this function)
make_filters_from_proto(f34_2_4, g2_Q4, 4);
^~~~~~~
In file included from libavcodec/aacps_tablegen.c:24:
libavcodec/aacps_tablegen_template.c: In function ‘main’:
libavcodec/aacps_tablegen_template.c:88:28: error: ‘f20_0_8’ undeclared (first use in this function)
ARRAY_RENAME(3d_array)(f20_0_8, 8, 8, 2);
^~~~~~~
libavcodec/aacps_tablegen_template.c:91:28: error: ‘f34_0_12’ undeclared (first use in this function)
ARRAY_RENAME(3d_array)(f34_0_12, 12, 8, 2);
^~~~~~~~
libavcodec/aacps_tablegen_template.c:94:28: error: ‘f34_1_8’ undeclared (first use in this function)
ARRAY_RENAME(3d_array)(f34_1_8, 8, 8, 2);
^~~~~~~
libavcodec/aacps_tablegen_template.c:97:28: error: ‘f34_2_4’ undeclared (first use in this function)
ARRAY_RENAME(3d_array)(f34_2_4, 4, 8, 2);
^~~~~~~
libavcodec/aacps_tablegen_template.c:101:28: error: ‘Q_fract_allpass’ undeclared (first use in this function)
ARRAY_RENAME(4d_array)(Q_fract_allpass, 2, 50, 3, 2);
^~~~~~~~~~~~~~~
libavcodec/aacps_tablegen_template.c:104:28: error: ‘phi_fract’ undeclared (first use in this function)
ARRAY_RENAME(3d_array)(phi_fract, 2, 50, 2);
^~~~~~~~~
make: *** [ffbuild/common.mak:201: libavcodec/aacps_tablegen.o] Error 1
make: *** Waiting for unfinished jobs....
I had the same error. If I remove --enable-hardcoded-tables from when I run configure it goes away.