New Ticket     Tickets     Wiki     Browse Source     Timeline     Roadmap     Ticket Reports     Search

Ticket #31368 (closed defect: fixed)

Opened 20 months ago

Last modified 14 months ago

audiofile 0.3.1 fails to compile with clang

Reported by: craig+macports@… Owned by: jeremyhu@…
Priority: Normal Milestone:
Component: ports Version: 2.0.3
Keywords: clang Cc: ryandesign@…
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

comment:1 Changed 20 months ago by ryandesign@…

  • Keywords clang added
  • Cc ryandesign@… added
  • Status changed from new to closed
  • Resolution set to fixed

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 20 months 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 14 months ago by jeremyhu@…

  • Status changed from closed to reopened
  • Resolution fixed deleted

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

comment:4 Changed 14 months ago by jeremyhu@…

  • Owner changed from macports-tickets@… to jeremyhu@…
  • Status changed from reopened to new

comment:5 Changed 14 months ago by jeremyhu@…

  • Status changed from new to closed
  • Resolution set to fixed
Note: See TracTickets for help on using tickets.