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

Problem compiling bind with egcc (was: Re: new glibc, egcs, etc.)

On Thu, Mar 25, 1999 at 02:38:34PM +0200, Konstantinos Margaritis wrote:
> On Tue, 23 Mar 1999, Hartmut Koptein wrote:
> >I think it sym-links  ../linux -> /usr/src/linux, this may also a link ...
> >This with  -I../../port/linux/include -I../../include  and you are in trouble.
> >
> >... and an  #include <net/route.h>  is so easy  :-)
> check this. It's the most absurd and stupid way I've seen to create a source
> tree.
> pwd = /public/ftp/pub/debian/dists/potato/source/net/bind-8.1.2/
> target/port/linux/include/net/route.h -> SRC/route.h
> target/port/linux/include/net/SRC -> ../SRC/net/
> target/port/linux/include/SRC -> ../SRC/include/
> target/port/linux/SRC -> ../SRC/linux/
> target/port/SRC -> ../SRC/port/
> target/SRC -> /public/ftp/pub/debian/dists/potato/source/net/bind-8.1.2/
> So, I see three ways to overcome this problem
> a) hack this up so that it includes the necessary file without the links.
> This is easy, but it will have to be done probably every time a new bind
> release is made.
> b) Fix egcs compiler to be able to follow a greater number of symlinks (I don't
> even know if that can be done in the first place). If it can be done, it will
> probably be just a definition in a config file but it will require a new
> recompiling (slow and tedious process), not to mention I would have to download
> a few MBs again.

But that's not the problem at all.  Look where it's failing:

open("../../port/linux/include/net/route.h", O_RDONLY) = -1 ELOOP (Too many levels of symbolic links)

Let's take a closer look (this is wide, line wrapping may be ugly):

 -> target/port/linux/include/net/SRC/route.h
 -> target/port/linux/include/SRC/net/route.h
 -> target/port/linux/SRC/include/net/route.h
 -> target/port/SRC/linux/include/net/route.h
 -> target/SRC/port/linux/include/net/route.h
 -> port/linux/include/net/route.h

So it's impossible to automatically resolve this apparently.

I'm kind of confused as to why this doesn't happen on x86.  *Brief
pause while I build bind on a PC*.

Ahah.  On my PC I can also not open the file.  But somehow, it is never
called for!  For some reason I can not quite find,
/usr/include/net/route.h is opened automatically, instead, even though
../../port/linux/include comes first in the search path.

And finally I found the key.  If I build bind on a PC with egcc instead
of gcc 2.7, it opens the 'correct' <net/route.h>, and thus fails to
build.  So bind is broken on all platforms now that egcs is the default
primary compiler!  And should never rightfully have worked in the first
place.  This needs to be fixed for all platforms.  Perhaps building
without that damnable 'make links'?


/--------------------------------\  /--------------------------------\
|       Daniel Jacobowitz        |__|     CMU, CS class of 2002      |
|   Debian GNU/Linux Developer    __   Part-Time Systems Programmer  |
|         dan@debian.org         |  |        drow@cs.cmu.edu         |
\--------------------------------/  \--------------------------------/

Reply to: