libunwind-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Libunwind-devel] Compiler Errors on Mac OSX


From: Tim Cassidy
Subject: Re: [Libunwind-devel] Compiler Errors on Mac OSX
Date: Mon, 1 Feb 2016 16:37:03 +0000 (UTC)

I think I might have a better understanding of what is going wrong.

It looks like the configure stage of the make wants to know some system information that I haven't given it.

Specifically it seems like I need to tell configure and/or make where my android ndk is installed.  On my mac - it is installed at
/opt/android-ndk-r10e

Is there I way I can pass that through to configure and/or make - so that when I run make the following preprocessor defines (HAVE_ENDIAN_H, HAVE_ELF_H, etc) will be correctly defined AND so that the build will point at the aforementioned directory?

Thanks,
Tim




From: Tim Cassidy <address@hidden>
To: "address@hidden" <address@hidden>
Sent: Saturday, January 30, 2016 1:17 PM
Subject: Compiler Errors on Mac OSX


Hi there, I'm attempting to build libunwind on my mac os X - but am getting hit with a few different compiler errors (just the first three - there are more - mostly related to the elf dependency):
------------------------------------
/usr/include/ucontext.h:43:2: error: The deprecated ucontext routines require _XOPEN_SOURCE to be defined
#error The deprecated ucontext routines require _XOPEN_SOURCE to be defined
 ^
In file included from mi/init.c:26:
In file included from ../include/libunwind_i.h:52:
In file included from ../include/libunwind.h:25:
../include/libunwind-x86_64.h:121:9: error: unknown type name 'ucontext_t'
typedef ucontext_t unw_tdep_context_t;
        ^
In file included from mi/init.c:26:
../include/libunwind_i.h:66:3: error: Could not locate <elf.h>
# error Could not locate <elf.h>
------------------------------------

I tried running the configure command for the intel compiler:
----------
./configure CC=icc CFLAGS="-g -O3 -ip" CXX=icc CCAS=gcc CCASFLAGS=-g LDFLAGS="-L$PWD/src/.libs"
----------

 as mentioned in the readme - but then I just get:
----------
checking whether the C compiler works... no
configure: error: in `/Users/Cassidy/P4/van-perf01-lnx/source/libunwind':
configure: error: C compiler cannot create executables
----------

I checked the config.log - but couldn't make heads nor tails of it:
--------------------------------------
It was created by libunwind configure 1.1, which was
generated by GNU Autoconf 2.69.  Invocation command line was

  $ ./configure CC=icc CFLAGS=-g -O3 -ip CXX=icc CCAS=gcc CCASFLAGS=-g LDFLAGS=-L/Users/Cassidy/source/libunwind/src/.libs

## --------- ##
## Platform. ##
## --------- ##

hostname = 
uname -m = x86_64
uname -r = 14.5.0
uname -s = Darwin
uname -v = Darwin Kernel Version 14.5.0: Wed Jul 29 02:26:53 PDT 2015; root:xnu-2782.40.9~1/RELEASE_X86_64

/usr/bin/uname -p = i386
/bin/uname -X     = unknown

/bin/arch              = unknown
/usr/bin/arch -k       = unknown
/usr/convex/getsysinfo = unknown
/usr/bin/hostinfo      = Mach kernel version:
 Darwin Kernel Version 14.5.0: Wed Jul 29 02:26:53 PDT 2015; root:xnu-2782.40.9~1/RELEASE_X86_64
Kernel configured for up to 8 processors.
4 processors are physically available.
8 processors are logically available.
Processor type: x86_64h (Intel x86-64h Haswell)

[SNIP]

configure: exit 77
--------------------------------------


If you know of anything to point me in the right direction - I'd appreciate it.

In case it is useful (for background info - what I'm trying to accomplish) - I'm building a lib for android.  I was hoping to use the native libunwind using the build settings:
APP_STL := c++_static
APP_ABI := armeabi armeabi-v7a x86

I actually don't need to use the c++_static STL - but it was the only one that seemed to allow me to link against libunwind.  This works fine except for the x86 platform.  Oddly enough - when I looked at the code in 
sources/cxx-stl/llvm-libc++abi/libcxxabi/

I noticed that there is support for x86.  But, even if I include the needed header file for my x86 platform - by adding the following to my Android.mk's LOCAL_C_INCLUDES:
/opt/android-ndk-r10e/sources/cxx-stl/llvm-libc++abi/libcxxabi/include


I (not surprisingly) get a linker error about the various function definitions.  Anyway, not sure if this background information is useful - but if there is a simpler approach - please feel free to suggest it.

Thanks,
Tim





reply via email to

[Prev in Thread] Current Thread [Next in Thread]