[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Re: compilation error in kdesupport
From:       "Raul Fernandes" <rgfernandes () gmail ! com>
Date:       2008-12-08 1:02:22
Message-ID: fa597860812071702s58db69fbv372b2e13f817537e () mail ! gmail ! com
[Download RAW message or body]

2008/12/7 Thiago Macieira <thiago@kde.org>:
> This code has remained the same for over 5 years now, and has been mostly
> untouched since it was ported to KDE 4.
>
> There's something wrong with your system.

The problem is I have updated the linux headers from version 2.6.12 to
version 2.6.27.7.
Only the headers (/usr/include/{asm,linux,net,scsi}).
The kernel I use always was more recent but the headers was outdated.

After the update, I had this error while compiling qt:

Creating qmake. Please wait...
In file included from generators/makefiledeps.cpp:44:
/var/tmp/kde-build/qt4/mkspecs/linux-g++/qplatformdefs.h:78:20: error:
net/if.h: Arquivo ou diretório não encontrado
make: ** [makefiledeps.o] Erro 1

So I have found that net/if.h was moved before 2.6.19.

commit 0844565fb8a9418f5a860aa480c1aef70319c9a2
Author: Thomas Graf <tgraf@suug.ch>
Date:   Fri Aug 4 23:05:56 2006 -0700

    [NET]: Move netlink interface bits to linux/if.h

    Signed-off-by: Thomas Graf <tgraf@suug.ch>
    Signed-off-by: David S. Miller <davem@davemloft.net>
-------------------------
$ git name-rev --tags 0844565fb8a9418f5a860aa480c1aef70319c9a2
0844565fb8a9418f5a860aa480c1aef70319c9a2 tags/v2.6.19-rc1~1272^2~321

I have reported this to trolltech yesterday with a patch that fix it to me.

Now I have just discovered that if_nametoindex was declared in net/if.h
(I've made a backup of old headers)

$ grep "if_nametoindex" -r /root/include-backup
/root/include-backup/net/if.h:extern unsigned int if_nametoindex
(__const char *__ifname) __THROW;

But searching in new headers for this function:

$ grep "if.h" -r /usr/include/{asm,linux,net,scsi}
(nothing)

$ grep "if_nametoindex" -r /usr/src/linux
/usr/src/linux/Documentation/lguest/lguest.c:   ifidx = if_nametoindex(if_name);

Nothing that helps.
Is this function removed from kernel??
I've tried to find the commit that removed this function but had no success.
Maybe my kernel's git repository is corrupted (I doubt that), so I
have just downloaded the kernel and search again:

$ grep "if_nametoindex" -r linux-2.6.27.8
linux-2.6.27.8/Documentation/lguest/lguest.c:   ifidx = if_nametoindex(if_name);

Well, I don't know what happens. If the function was removed why the
code still works??
If I return the old headers, the code compiles.
Is this a bug, right??
Can anyone test and report if it happens too? You have to update the
kernel headers too not the kernel itself only.

Raul Fernandes
rgfernandes@gmail.com
 
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic