This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: compile failure due to undefined symbol
- From: "Peter S. Mazinger" <ps dot m at gmx dot net>
- To: Nick Clifton <nickc at redhat dot com>
- Cc: binutils at sourceware dot org
- Date: Fri, 5 Oct 2007 09:27:01 +0200 (CEST)
- Subject: Re: compile failure due to undefined symbol
On Thu, 4 Oct 2007, Peter S. Mazinger wrote:
Hi Nick,
> On Thu, 4 Oct 2007, Nick Clifton wrote:
>
> > Hi Peter,
> >
> > > you used `pwd`/../bfd/.libs/libbfd.la, I used `pwd`/../bfd/libbfd.la, note
> > > the missing .libs subdir, maybe it does not matter though
> >
> > bfd/.libs/libbfd.la is a symbolic link to bfd/libbbfd.la so it should be OK.
>
> I know that, I have thought, that the "last" target in bfd subdir is
> bfd/libbfd.la, to be sure that everything is compiled (and parallel builds
> do not break remain parallel)
I rechecked all subdirs around DEPENDENCIES, binutils/gas/grof/ld have
dependencies on ../bfd/libbfd.la (relative path), so that could be good
for opcodes too.
I did following to see if it works:
mkdir build; cd build; path_to_configure/configure; make
cd bfd; make clean; cd ../opcodes; make clean; make
(the first make and the make clean's can be omitted, only there for
completeness, if used in an already compiled build directory)
2 dependencies not found ../bfd/bfd.h and ../bfd/.libs/libbfd.la
Test of which targets exist at least in the bfd subdir:
cd ../bfd;
make bfd.h and make libbfd.la are ok (or from the build dir using make -C
bfd bfd.h libbfd.la), but make [./].libs/libbfd.so [./].libs/libbfd.la fail
all four, there are definitely no such targets, so I propose changing
absolute path to relative (../bfd/libbfd.la) as dependency as that is at
least used everywhere (even if it is not quite working).
Fixing the dependencies themselves is a generic issue, none of the
dependencies work as target (checked ../bfd/bfd.h,
../libiberty/libiberty.a called from the subdirs where they are used).
The build copes with this probably due to the compile order, but
effectively dependendencies are incorrect, they should really create the
missing files, if ran from somewhere else. Targets like:
../bfd/bfd.h:
(cd ../bfd; make bfd.h)
or
../libiberty.a:
(cd ..; make -C libiberty libiberty.a)
are needed in some generic place, seen by all makefiles
Peter
--
Peter S. Mazinger <ps dot m at gmx dot net> ID: 0xA5F059F2
Key fingerprint = 92A4 31E1 56BC 3D5A 2D08 BB6E C389 975E A5F0 59F2