Opened 12 years ago

Closed 12 years ago

Last modified 11 years ago

#31368 closed defect (fixed)

audiofile 0.3.1 fails to compile with clang

Reported by: craig+macports@… Owned by: jeremyhu (Jeremy Huddleston Sequoia)
Priority: Normal Milestone:
Component: ports Version: 2.0.3
Keywords: clang Cc: ryandesign (Ryan Carsten Schmidt)
Port: audiofile

Description

: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)

comment:1 Changed 12 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: ryandesign@… added
Keywords: clang added
Resolution: fixed
Status: newclosed

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.

comment:2 Changed 12 years ago by craig+macports@…

llvm-gcc-4.2 works on Lion with the old portfile as well, so this should be fine.

comment:3 Changed 12 years ago by jeremyhu (Jeremy Huddleston Sequoia)

Resolution: fixed
Status: closedreopened

This is a bug in the project and not a toolchain bug. Reopening.

comment:4 Changed 12 years ago by jeremyhu (Jeremy Huddleston Sequoia)

Owner: changed from macports-tickets@… to jeremyhu@…
Status: reopenednew

comment:5 Changed 12 years ago by jeremyhu (Jeremy Huddleston Sequoia)

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.