knik0 / faac

Freeware Advanced Audio Coder faac mirror
https://sourceforge.net/projects/faac/
Other
179 stars 60 forks source link

1.29.8 fail to build with --enable-drm #7

Open marillat opened 6 years ago

marillat commented 6 years ago

Hi again, Build fine without --enable-drm

make[2]: Entering directory '/src/faac-1.29.8/libfaac'
/bin/bash ../libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I..  -I../include -Wdate-time -D_FORTIFY_SOURCE=2 -fvisibility=hidden -msse2 -DDRM -g -O2 -fdebug-prefix-map=/src/faac-1.29.8=. -fstack-protector-strong -Wformat -Werror=format-security -DDRM -c -o libfaac_drm_la-bitstream.lo `test -f 'bitstream.c' || echo './'`bitstream.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -I../include -Wdate-time -D_FORTIFY_SOURCE=2 -fvisibility=hidden -msse2 -DDRM -g -O2 -fdebug-prefix-map=/src/faac-1.29.8=. -fstack-protector-strong -Wformat -Werror=format-security -DDRM -c bitstream.c  -fPIC -DPIC -o .libs/libfaac_drm_la-bitstream.o
In file included from huff2.h:20:0,
                 from bitstream.c:33:
bitstream.h:112:18: error: expected identifier before numeric constant
 # define ESC_HCB 11
                  ^
huff2.h:24:5: note: in expansion of macro 'ESC_HCB'
     ESC_HCB = 11,
     ^~~~~~~
bitstream.c: In function 'WriteReorderedSpectralData':
bitstream.c:1023:28: error: 'CoderInfo {aka struct <anonymous>}' has no member named 'data'; did you mean 'datacnt'?
     int* data = coderInfo->data;
                            ^~~~
                            datacnt
bitstream.c:1024:26: error: 'CoderInfo {aka struct <anonymous>}' has no member named 'len'
     int* len  = coderInfo->len;
                          ^~
bitstream.c:1047:27: error: 'CoderInfo {aka struct <anonymous>}' has no member named 'book_vector'
         cur_cb = coderInfo->book_vector[0];
                           ^~
bitstream.c:1074:39: error: 'CoderInfo {aka struct <anonymous>}' has no member named 'book_vector'
                     cur_cb = coderInfo->book_vector[sfb_cnt];
                                       ^~
Makefile:617: recipe for target 'libfaac_drm_la-bitstream.lo' failed
knik0 commented 6 years ago

Yes, a few things were revamped and DRM doesn't work at the moment. Most importantly DRM is missing in the new huffman coder.

configure --enable-drm should fail like this:

./configure --enable-drm
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
configure: error: "DRM not available in this version"
marillat commented 6 years ago

OK. I'm waiting to see the drm option back.

marillat commented 6 years ago

Another, comment. I did this bug report because this issue isn't documented in the ChangeLog.

knik0 commented 6 years ago

BTW, how do you normally test if DRM is working. I tried to compile faac with libfaac-drm and faad with libfaad-drm but when I encode a file and decode it with faad it just fails.

marillat commented 6 years ago

Never tested. I can try if you want.

knik0 commented 6 years ago

Nevermind.

marillat commented 6 years ago

1.29.8.2 doesn't build for architectures other than i386 or amd64 as immintrin.h is for Intel cpu.

Making all in libfaac
make[2]: Entering directory '/home/marillat/faac-1.29.8.2/libfaac'
/bin/bash ../libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I..  -I../include -Wdate-time -D_FORTIFY_SOURCE=2 -fvisibility=hidden  -DDRM -g -O2 -fdebug-prefix-map=/home/marillat/faac-dmo-1.29.8.2=. -fstack-protector-strong -Wformat -Werror=format-security -DDRM -c -o libfaac_drm_la-quantize.lo `test -f 'quantize.c' || echo './'`quantize.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -I../include -Wdate-time -D_FORTIFY_SOURCE=2 -fvisibility=hidden -DDRM -g -O2 -fdebug-prefix-map=/home/marillat/faac-dmo-1.29.8.2=. -fstack-protector-strong -Wformat -Werror=format-security -DDRM -c quantize.c  -fPIC -DPIC -o .libs/libfaac_drm_la-quantize.o
quantize.c:21:10: fatal error: immintrin.h: No such file or directory
 #include <immintrin.h>
          ^~~~~~~~~~~~~
compilation terminated.

If I comment immintrin.h the build fail with SSE2 code

make[2]: Entering directory '/home/marillat/faac-1.29.8.2/libfaac'
/bin/bash ../libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I..  -I../include -Wdate-time -D_FORTIFY_SOURCE=2 -fvisibility=hidden  -DDRM -g -O2 -fdebug-prefix-map=/home/marillat/faac-dmo-1.29.8.2=. -fstack-protector-strong -Wformat -Werror=format-security -DDRM -c -o libfaac_drm_la-quantize.lo `test -f 'quantize.c' || echo './'`quantize.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -I../include -Wdate-time -D_FORTIFY_SOURCE=2 -fvisibility=hidden -DDRM -g -O2 -fdebug-prefix-map=/home/marillat/faac-dmo-1.29.8.2=. -fstack-protector-strong -Wformat -Werror=format-security -DDRM -c quantize.c  -fPIC -DPIC -o .libs/libfaac_drm_la-quantize.o
quantize.c: In function ‘qlevel’:
quantize.c:168:27: error: ‘gsize’ undeclared (first use in this function); did you mean ‘ssize_t’?
       for (win = 0; win < gsize; win++)
                           ^~~~~
                           ssize_t
quantize.c:168:27: note: each undeclared identifier is reported only once for each function it appears in
Makefile:681: recipe for target 'libfaac_drm_la-quantize.lo' failed
knik0 commented 6 years ago

OK, I think I fixed it. Just committed.

marillat commented 6 years ago

Yes, build fine now.

fabiangreffrath commented 6 years ago

So, now that faac builds again with --enable-drm, can this get closed? Or are we still waiting for some confirmation that --enable-drm actually even works as intended?