[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Libunwind-devel] build error on Linux x86
From: |
Dave Watson |
Subject: |
Re: [Libunwind-devel] build error on Linux x86 |
Date: |
Wed, 15 Mar 2017 13:25:59 -0700 |
User-agent: |
Mutt/1.6.0 (2016-04-01) |
On 03/13/17 05:10 PM, Mario Emmenlauer wrote:
> >> This is the error I get:
> >> [...]
> >> In file included from ./elf32.h:7:0,
> >> from ../include/tdep-x86/libunwind_i.h:35,
> >> from ../include/tdep/libunwind_i.h:23,
> >> from ../include/libunwind_i.h:344,
> >> from elfxx.h:33,
> >> from elf64.h:7,
> >> from elf64.c:2:
> >> ./elfxx.h:70:1: note: previous definition of 'elf_map_image' was here
> >> elf_map_image (struct elf_image *ei, const char *path)
> >> ^
> >
> > It looks like it is pulling in both tdep-x86/libunwind_i.h *and*
> > tdep-x86_64/libunwind_i.h (and hence both elf32.h and elf64.h), but
> > it's not clear to me why. Possible include path issue? Are
> > libunwind-devel headers already installed on your ubuntu machine?
>
> Thanks for the quick reply! libunwind and -devel are not installed,
> but I do override some environment variables, in case that might be
> related? I set:
> export CFLAGS="-U_FORTIFY_SOURCE ${CFLAGS}"
> because this helped to build on some flavours of Linux, and I set:
> export PATH="$THIRDPARTYTARGETDIR/bin:${PATH}"
> export CFLAGS="-I$THIRDPARTYTARGETDIR/include ${CFLAGS}"
> export CPPFLAGS="-I$THIRDPARTYTARGETDIR/include ${CPPFLAGS}"
> export LDFLAGS="-L$THIRDPARTYTARGETDIR/lib ${LDFLAGS}"
> export LD_LIBRARY_PATH="$THIRDPARTYTARGETDIR/lib:${LD_LIBRARY_PATH}"
> because my installations go into THIRDPARTYTARGETDIR. There should
> not be any x86_64 libs in THIRDPARTYTARGETDIR since I build on a
> dedicated i386 docker image. Could the environment variables some-
> how confuse configure, or is the -U_FORTIFY_SOURCE maybe the root
> of the problem?
>
> Here is my call to configure:
> ./configure \
> --prefix="$THIRDPARTYTARGETDIR/unwind" \
> --with-pic \
> --disable-static \
> --enable-shared
>
I tried with those exact flags and configure call, and it worked for
me, although I'm on 64bit ubuntu.