monome / libmonome

makes writing applications for Monomes easy.
ISC License
302 stars 158 forks source link

Can't build with clang #36

Closed pcbeard closed 8 years ago

pcbeard commented 10 years ago

If I try to use clang to build, I get the following errors:

CC=clang CXX=clang++ ./waf configure ./waf build

Waf: Entering directory /Projects/libmonome/build' [ 1/29] c: src/proto/40h.c -> build/src/proto/40h.c.2.o [ 2/29] c: src/proto/series.c -> build/src/proto/series.c.3.o clang: error: argument unused during compilation: '-compatibility_version 1' clang: error: argument unused during compilation: '-current_version 1' [ 3/29] c: src/proto/mext.c -> build/src/proto/mext.c.4.o clang: error: argument unused during compilation: '-compatibility_version 1' clang: error: argument unused during compilation: '-current_version 1' clang: error: argument unused during compilation: '-compatibility_version 1' clang: error: argument unused during compilation: '-current_version 1' Waf: Leaving directory/Projects/libmonome/build' Build failed

The fix is to add the command line option: -Qunused-arguments

I've pushed this change to my fork:

https://github.com/pcbeard/libmonome.git

in the branch "clang".

wrl commented 10 years ago

hm, that's weird. i can't reproduce this. builds fine with clang over here. what version of clang, and are you setting any CFLAGS in your environment? i don't see either -compatibility_version or -current_version set in my build.

could you also gist me the output of ./waf -v? curious to see what the clang commandline is.

wrl commented 10 years ago

oh, and your OS as well.

pcbeard commented 10 years ago

Building on 10.9, using clang clang-500.0.68 (Xcode 5.0.2).

pcbeard commented 10 years ago

Here's the gist:

https://gist.github.com/pcbeard/7495539

pcbeard commented 9 years ago

This still seems to be an issue. Any ideas?

wrl commented 9 years ago

The issue seems to be around these -compatibility_version and -current_version flags. Are you setting those in your environment CFLAGS or LDFLAGS?