SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Hi everyone,
I am trying to compile Gnome via Gargnome (garnome-2.14.3). Everything goes smooth till this message:
--------------------------------
checking for doxygen... /usr/bin/doxygen
checking whether to build Doxygen documentation... yes
checking for pgoff_t... no
checking for BLKGETSIZE64... no
configure: error: BLKGETSIZE64 is not defined
--------------------------------
Browsing the web and other LQ messages it seems to me that the problem lays in the kernel headers. Common suggestion is to installing Linux-Libc-Headers.
Could someone please explain where to get those headers for Ker 2.6.17 if there are any of course. The ones I found are for ker 2.6.12. Will they do for ker 2.6.17 as well?
Distribution: Caldera, CTOS, Debian, FreeBSD, Mac OS X, Mandrake, Minix, OpenBSD, Slackware, SuSE
Posts: 1,757
Rep:
This may be of help.
"Infact, the updated patch is included with GARNOME 2.12.1 and above, you just need to uncomment it in the freedesktop/hal/Makefile before starting your build."
# [slackware / suse fix] uncomment the following line to fix defines that are not included in your distribution.
#PATCHFILES += hal-kernel-includes.diff
Thank you very much!
That solved the "BLKGETSIZE64" problem. Yet another one cropped up though:
---------------------------
probe-input.c:48: error: redefinition of `struct input_id'
shared.h:62: warning: `drop_privileges' defined but not used
make[15]: *** [probe-input.o] Error 1
---------------------------
Distribution: Caldera, CTOS, Debian, FreeBSD, Mac OS X, Mandrake, Minix, OpenBSD, Slackware, SuSE
Posts: 1,757
Rep:
Hum, the diff has the change for that error, I don't know why it didn't compile:
+/* struct input_id is not defined in Slackware */
+struct input_id {
+ __u16 bustype;
+ __u16 vendor;
+ __u16 product;
+ __u16 version;
+};
As Pat said in the 10.2 stable changelog when he removed GNOME:
"... GNOME is and always has been a moving target (even the "stable" releases usually aren't quite ready yet) that really does demand a team to keep up on all the changes (many of which are not always well documented). ...
This is the problem with Slackware using "Stable" kernel headers. Well, there not so stable actually. Most programs now-a-days are using the 2.6 system calls...
evdev in xorg-drivers (7.x) will bomb with 2.4 headers and there doesn't seem to be an easy way around it on a stock system. Here's hoping Pat will jump on the band wagon soon otherwise this will be a continuing problem more often as time passes.
With kernel 2.6.18, we now have "make headers_install" which sanitizes and installs headers straight from the kernel tarball... Just in the nick of time seeing as how the LLH project is now dead. This is what Pat will be using if and when he "deems 2.6 to be stable enoungh".....
It would have been nice if glibc-2.3.6 were compiled against 2.6 headers when he first uploaded it to current. A massive portion of Slackware has been recompiled against said glibc in the past few months, judging from the changelog. But everything is still unaware of 2.6......
find configure.in in the top level dir : /tmp/hal-0.5.7.1/configure.in
this is the old code, here you have to remove two lines :
#include <linux/ioctl.h>
#include <linux/fs.h>],
and replace it by : #include <sys/mount.h>],
part of old configure.in:
# Check for BLKGETSIZE64
AC_CHECK_TYPE(pgoff_t, ,
[AC_DEFINE(pgoff_t, unsigned long, [Index into the pagecache])],
/usr/include/sys/types.h)
AC_MSG_CHECKING(for BLKGETSIZE64)
AC_TRY_COMPILE(
[#include <sys/types.h>
#include <linux/ioctl.h>
#include <linux/fs.h>],
[int main(int argc, char *argv[])
{
int fd = 0;
unsigned long long int n;
ioctl (fd, BLKGETSIZE64, &n);
return 0;
}
], have_size64=yes, have_size64=no)
AC_MSG_RESULT($have_size64)
if test x$have_size64 = xno; then
case "$host" in
*-*-linux*)
AC_MSG_ERROR([BLKGETSIZE64 is not defined])
;;
*)
;;
esac
fi
this is the new code with the line :" #include <sys/mount.h>], " included.
Part of new configure.in:
# Check for BLKGETSIZE64
AC_CHECK_TYPE(pgoff_t, ,
[AC_DEFINE(pgoff_t, unsigned long, [Index into the pagecache])],
/usr/include/sys/types.h)
AC_MSG_CHECKING(for BLKGETSIZE64)
AC_TRY_COMPILE(
[#include <sys/types.h>
#include <sys/mount.h>],
[int main(int argc, char *argv[])
{
int fd = 0;
unsigned long long int n;
ioctl (fd, BLKGETSIZE64, &n);
return 0;
}
], have_size64=yes, have_size64=no)
AC_MSG_RESULT($have_size64)
if test x$have_size64 = xno; then
case "$host" in
*-*-linux*)
AC_MSG_ERROR([BLKGETSIZE64 is not defined])
;;
*)
;;
esac
fi
Typically when you run into one of these "old headers" issues, there's only a few things to consider, and if it's fixable, the fix is actually quite easy.
The big one is "Is this code accessing a kernel module?" Several kernel modules have changed their APIs between 2.4.x and 2.6.x. If the answer to this is yes, you're in good shape.
After that is whether or not the application has done any checking to see what kernel is present. If it did, and it detected 2.4.x, you could easily have problems if the APIs are different and the app is now expecting a 2.4.x kernel elsewhere.
Considering that the majority of the reasons for keeping the kernel headers that were present when glibc was built have to do with workarounds for kernelspace issues, cherry picking for specific new headers isn't terribly dangerous.
The "cheat" is very simple. If it's a missing header complaint, go into the file that wants the header and change the include statement to read "/usr/src/linux/include/linux/foo.h" instead of just <linux/foo.sh>. If it's a missing structure or element, check carefully in both versions of the header files to find out where that item is actually supposed to come from, and then make sure that it doesn't in turn #include something else incompatible from the 2.6.x headers.
This works for USB input drivers (which underwent an API change, much to my irritation), as well as some issues with compiling Video4Linux-2 tools (like ivtv).
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.