Discussion:
[ast-developers] Failure to build on OSX Mavericks
Adam Edgar
2014-05-12 14:43:10 UTC
Permalink
As of the release of Apples OSX Maverick gcc has been replaced with lvvm/clang and a number of iffe issues seem to have popped up. As people start to move to the newer compiler there is likely to be more issues. Especially since Apple has hidden the fact that /usr/bin/gcc is not really gcc:

$ which gcc
/usr/bin/gcc
$ gcc --version
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 5.1 (clang-503.0.40) (based on LLVM 3.4svn)
Target: x86_64-apple-darwin13.1.0
Thread model: posix


When trying to compile ast-open on Mac OS X I found a few issues. The first was in src/lib/libast/features/lib. There are three calls to mmap. Each compares the result to NULL like this:
if (!(b = mmap((void*)0, m, PROT_READ|PROT_WRITE, MAP_PRIVATE, d, (off_t)0)))

but the error condition as per the spec is MAP_FAILED. The code should be like this:
if ((b = mmap((void*)0, m, PROT_READ|PROT_WRITE, MAP_PRIVATE, d, (off_t)0))==MAP_FAILED)

This causes the memccpy check to fail on OSX so that we later try to build memccpy.c which in turn fails due to memccpy being a macro on the latest LVVM library headers.


Once I get past that issue I get a sigabort in nmake building

sh: line 114: 14193 Abort trap: 6 /Users/aedgar/Downloads/ast-src/arch/darwin.i386-64/bin/nmake --ignorelock --keepgoing --errorid=cmd/INIT CCFLAGS=-g .RWD.=cmd/INIT RECURSEROOT=.. believe
make: *** termination code 6 making cmd/INIT


Any ideas on how to track down this issue?

ASE
Glenn Fowler
2014-05-14 00:53:03 UTC
Permalink
thanks Adam and other reporting macosx problems
I added clang to the build on my home linux machine
will try macosx shortly
Post by Adam Edgar
As of the release of Apples OSX Maverick gcc has been replaced with
lvvm/clang and a number of iffe issues seem to have popped up. As people
start to move to the newer compiler there is likely to be more issues.
Especially since Apple has hidden the fact that /usr/bin/gcc is not really
$ which gcc
/usr/bin/gcc
$ gcc --version
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr
--with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 5.1 (clang-503.0.40) (based on LLVM 3.4svn)
Target: x86_64-apple-darwin13.1.0
Thread model: posix
When trying to compile ast-open on Mac OS X I found a few issues. The
first was in src/lib/libast/features/lib. There are three calls to mmap.
if (!(b = mmap((void*)0, m, PROT_READ|PROT_WRITE, MAP_PRIVATE, d, (off_t)0)))
if ((b = mmap((void*)0, m, PROT_READ|PROT_WRITE, MAP_PRIVATE, d,
(off_t)0))==MAP_FAILED)
This causes the memccpy check to fail on OSX so that we later try to build
memccpy.c which in turn fails due to memccpy being a macro on the latest
LVVM library headers.
Once I get past that issue I get a sigabort in nmake building
sh: line 114: 14193 Abort trap: 6
/Users/aedgar/Downloads/ast-src/arch/darwin.i386-64/bin/nmake --ignorelock
--keepgoing --errorid=cmd/INIT CCFLAGS=-g .RWD.=cmd/INIT RECURSEROOT=..
believe
make: *** termination code 6 making cmd/INIT
Any ideas on how to track down this issue?
ASE
_______________________________________________
ast-developers mailing list
ast-developers at lists.research.att.com
http://lists.research.att.com/mailman/listinfo/ast-developers
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.research.att.com/pipermail/ast-developers/attachments/20140513/ecac7fb0/attachment.html>
Loading...