Mac osx clang error

365 views
Skip to first unread message

Nicholas Pezolano

unread,
Apr 15, 2014, 12:39:55 AM4/15/14
to dav...@fix8.org

Hi David,

Not sure if this is the right place to report a bug, seems clang didn’t like one of the flags used. -fno-var-tracking-assignments

A simple solution is to set ARCHFLAGS="-Wno-error=unused-command-line-argument-hard-error-in-future”

libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I../include/fix8 -I/Users/n/lib/include -I../include -fno-var-tracking -fno-var-tracking-assignments -g -O2 -Wall -MT libmyfix_la-Myfix_classes.lo -MD -MP -MF .deps/libmyfix_la-Myfix_classes.Tpo -c Myfix_classes.cpp  -fno-common -DPIC -o .libs/libmyfix_la-Myfix_classes.o

clang: error: unknown argument: '-fno-var-tracking-assignments' [-Wunused-command-line-argument-hard-error-in-future]

clang: note: this will be a hard error (cannot be downgraded to a warning) in the future

make[1]: *** [libmyfix_la-Myfix_classes.lo] Error 1

make: *** [all-recursive] Error 1


Nicholass-MacBook-Air:fix8-1.1.0 n$ clang++ -v

Apple LLVM version 5.1 (clang-503.0.38) (based on LLVM 3.4svn)

Target: x86_64-apple-darwin13.1.0

Thread model: posix


Best,

Nicholas Pezolano

signature.asc

dakka

unread,
Apr 15, 2014, 1:59:58 AM4/15/14
to fix8-s...@googlegroups.com, dav...@fix8.org, npez...@gmail.com, Venkat Bhamidipati
Venkat - any comments on this? I thought we had fixed this 1.1.0
/dfakka

Venkat Bhamidipati

unread,
Apr 15, 2014, 6:43:11 AM4/15/14
to dakka, fix8-s...@googlegroups.com, David Dight, npez...@gmail.com
Good day,

Looks like it is being compiled with g++?  This is fixed for clang++.
Try with 
CC=clang CXX=clang++ ./configure

Regards,
Venkat

Venkat Bhamidipati

unread,
Apr 15, 2014, 8:11:28 AM4/15/14
to dakka, fix8-s...@googlegroups.com, David Dight, Nicholas Pezolano
David,

libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I../include/fix8 -I/Users/n/lib/include -I../include -fno-var-tracking -fno-var-tracking-assignments -g -O2 -Wall -MT libmyfix_la-Myfix_classes.lo -MD -MP -MF .deps/libmyfix_la-Myfix_classes.Tpo -c Myfix_classes.cpp  -fno-common -DPIC -o .libs/libmyfix_la-Myfix_classes.o


g++-4.2.1 on mac does not support -fno-var-tracking-assignments.
Attached patch enables the -fno-var-tracking-assignments only if the compiler supports it, I have tested with gcc-4.2.1 on mac and on linux with gcc-4.8.2.  I have also attached ax_check_compile_flag.m4 which needs to go in the m4 directory.
Please let me know if you want me to create a pull request.

Regards,
Venkat

assignmentvars.patch
ax_check_compile_flag.m4

dakka

unread,
Apr 16, 2014, 12:41:26 AM4/16/14
to fix8-s...@googlegroups.com, dakka, David Dight, Nicholas Pezolano, venk...@gmail.com
Thanks Venkat. Will put this into fix8:dev now.
Reply all
Reply to author
Forward
0 new messages