audiofile 0.3.1 fails to compile with clang
:info:build make[3]: Entering directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_audio_audiofile/audiofile/work/audiofile-0.3.1/libaudiofile'
:info:build /bin/sh ../libtool --tag=CC --mode=compile /Developer/usr/bin/clang -DHAVE_CONFIG_H -I. -I.. -I/opt/local/include -DNDEBUG -Wall -Werror -pipe -O2 -arch x86_64 -MT g711.lo -MD -MP -MF .deps/g711.Tpo -c -o g711.lo g711.c
:info:build libtool: compile: /Developer/usr/bin/clang -DHAVE_CONFIG_H -I. -I.. -I/opt/local/include -DNDEBUG -Wall -Werror -pipe -O2 -arch x86_64 -MT g711.lo -MD -MP -MF .deps/g711.Tpo -c g711.c -fno-common -DPIC -o .libs/g711.o
:info:build g711.c:133:24: error: passing 'const short [8]' to parameter of type 'short *' discards qualifiers [-Werror]
:info:build seg = search(pcm_val, seg_end, 8);
:info:build ^~~~~~~
:info:build g711.c:227:24: error: passing 'const short [8]' to parameter of type 'short *' discards qualifiers [-Werror]
:info:build seg = search(pcm_val, seg_end, 8);
:info:build ^~~~~~~
:info:build 2 errors generated.
GCC seems to be more lenient, so as a workaround for now you can
port install audiofile configure.compiler=gcc-4.2
Change History (5)
Cc: |
ryandesign@… added
|
Keywords: |
clang added
|
Resolution: |
→ fixed
|
Status: |
new →
closed
|
Resolution: |
fixed
|
Status: |
closed →
reopened
|
Owner: |
changed from macports-tickets@… to jeremyhu@…
|
Status: |
reopened →
new
|
Resolution: |
→ fixed
|
Status: |
new →
closed
|
We would rather use llvm-gcc-4.2 or clang than gcc. I don't have Lion but I am able to reproduce the issue using clang on Snow Leopard. llvm-gcc-4.2 worked fine so in r84359 I changed the port to use that. Please re-open if that doesn't work on Lion.