LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 05-20-2005, 11:08 AM   #1
acidjuice
Member
 
Registered: Jan 2005
Location: a tiny spot on the iceberg
Distribution: Slackware 10.1 (dropline 2.10, kernel 2.6.11.6)
Posts: 320

Rep: Reputation: 30
problems compiling hal


hello all,

when running .configure to install HAL i get the following error:
Code:
checking for BLKGETSIZE64... no
configure: error: BLKGETSIZE64 is not defined
i can't then make it.

do you know what this is? i have kernel 2.6.9, looked into /usr/include/linux/fs.h and the line
Code:
#define BLKGETSIZE64 _IOR(0x12,114,size_t)      /* return device size in bytes (u64 *arg) */
is correctly included.

...any ideas how to solve this? i'm of course on an AMD64 arch (slamd64).
 
Old 05-20-2005, 11:25 AM   #2
acidjuice
Member
 
Registered: Jan 2005
Location: a tiny spot on the iceberg
Distribution: Slackware 10.1 (dropline 2.10, kernel 2.6.11.6)
Posts: 320

Original Poster
Rep: Reputation: 30
found this:
Code:
I got the same problem. I traced it to a missing define:
/usr/include/linux/fs.h is included in the check for BLKGETSIZE64, and
that file uses the typedef pgoff_t.
It is in /usr/include/linux/types.h, but only available there for the
kernel.
This only happens if your /usr/include/linux is a link to the kernel
includes (which I think is bad, since it introduces dependencies based
on the kernel version...):
> l /usr/include/linux
lrwxrwxrwx  1 root root 28 Dec 16 12:38 /usr/include/linux ->
/usr/src/linux/include/linux/
I'm using kernel 2.6.10, btw.:
l /usr/src/linux
lrwxrwxrwx  1 root root 12 Feb 13 18:28 /usr/src/linux -> linux-2.6.10/

My workaround was to just add the define:
--- configure.orig      2005-01-24 18:46:24.000000000 -0800
+++ configure   2005-03-20 11:21:25.000000000 -0800
@@ -22784,6 +22784,9 @@
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 #include <sys/types.h>
+#ifndef pgoff_t
+#define pgoff_t unsigned long
+#endif
 #include <linux/ioctl.h>
 #include <linux/fs.h>
 int

-Joe
tried that, didn't work.

Last edited by acidjuice; 05-20-2005 at 11:32 AM.
 
Old 05-21-2005, 03:33 AM   #3
jong357
Senior Member
 
Registered: May 2003
Location: Columbus, OH
Distribution: DIYSlackware
Posts: 1,914

Rep: Reputation: 52
I'd say it's a kernel header problem... Duh... I bet you wouldn't have this problem you were using linux-libc-headers instead of the kernel ones.... You ussually don't listen to me anyway acidjuice, but I'll try to suggest something. Do it if you want...

Code:
cat << EOF > blkgetsize.c
#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;
}

EOF
gcc -o blkgetsize blkgetsize.c
What's that spit out at ya? Just copy/paste all of that in a terminal.. I'd still move to linux-libc-headers if I were you. I've been using them on Slack for quite some time instead of the headers he provides..

By the way... What headers are you running. That doesn't look like a 2.4 fs.h

Last edited by jong357; 05-21-2005 at 03:44 AM.
 
Old 05-21-2005, 07:08 AM   #4
acidjuice
Member
 
Registered: Jan 2005
Location: a tiny spot on the iceberg
Distribution: Slackware 10.1 (dropline 2.10, kernel 2.6.11.6)
Posts: 320

Original Poster
Rep: Reputation: 30
Quote:
Originally posted by jong357
I'd say it's a kernel header problem... Duh... I bet you wouldn't have this problem you were using linux-libc-headers instead of the kernel ones.... You ussually don't listen to me anyway acidjuice, but I'll try to suggest something.
i do! i do! i did follow all your suggestions to finally be able to compile some gnome bits.

but in this case i actually don't even know what you are talking about... how can i 'use' linux-libc-headers? i would love to do that!
Quote:

I'd still move to linux-libc-headers if I were you. I've been using them on Slack for quite some time instead of the headers he provides..
that's more than allright for me... how?
Quote:

By the way... What headers are you running. That doesn't look like a 2.4 fs.h
yes you are right as per my post here above these are 2.6.9 (original headers on slamd64).
 
Old 05-21-2005, 10:44 AM   #5
jong357
Senior Member
 
Registered: May 2003
Location: Columbus, OH
Distribution: DIYSlackware
Posts: 1,914

Rep: Reputation: 52
Not to sound mean in anyway (cause I'm not), but this is what I'm talking about... You didn't run those commands like I asked..... Thats why I find it frustrating to try and help you because you never do what I suggest...

Did that compile or no? It shouldn't according to your hal error. I'm curious as to what the output from gcc is.. Compile that C file and then post the output. I was waiting on the output of "file" from weeks ago, but I've long since lost interest in whether or not you are actually producing 64 bit libraries and binaries when you compile these packages. It actually wouldn't suprise me if you've been cranking out 32bit packages this whole time...

Last edited by jong357; 05-21-2005 at 10:48 AM.
 
Old 05-21-2005, 10:50 AM   #6
slackMeUp
Member
 
Registered: Nov 2003
Distribution: Slack-where?
Posts: 654

Rep: Reputation: 30
If you want a work-around....


Dropline has added HAL and DBUS into it's install... you can download the dropline installer and just not install everything but HAL if you wish.
 
Old 05-21-2005, 11:41 AM   #7
jong357
Senior Member
 
Registered: May 2003
Location: Columbus, OH
Distribution: DIYSlackware
Posts: 1,914

Rep: Reputation: 52
Yea, he's running dropline on his regular slack install. I think he wanted to build and package vanilla Gnome x86_64 for slamd. I'm pretty sure Dropline only comes in one flavor. x86_32... It certainly would be easier using dropline...
 
Old 05-21-2005, 01:18 PM   #8
acidjuice
Member
 
Registered: Jan 2005
Location: a tiny spot on the iceberg
Distribution: Slackware 10.1 (dropline 2.10, kernel 2.6.11.6)
Posts: 320

Original Poster
Rep: Reputation: 30
Quote:
Originally posted by jong357
Not to sound mean in anyway (cause I'm not), but this is what I'm talking about... You didn't run those commands like I asked..... Thats why I find it frustrating to try and help you because you never do what I suggest...

Did that compile or no? It shouldn't according to your hal error. I'm curious as to what the output from gcc is.. Compile that C file and then post the output. I was waiting on the output of "file" from weeks ago, but I've long since lost interest in whether or not you are actually producing 64 bit libraries and binaries when you compile these packages. It actually wouldn't suprise me if you've been cranking out 32bit packages this whole time...
LOL

ok so you want me to copy / paste this code into a file:
Code:
cat << EOF > blkgetsize.c
#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;
}

EOF
gcc -o blkgetsize blkgetsize.c
and run it? i'm sorry i didn't follow some suggestions actually because i didn't understand them

if this is what you are looking for i'll do it asap.
 
Old 05-21-2005, 01:19 PM   #9
acidjuice
Member
 
Registered: Jan 2005
Location: a tiny spot on the iceberg
Distribution: Slackware 10.1 (dropline 2.10, kernel 2.6.11.6)
Posts: 320

Original Poster
Rep: Reputation: 30
Quote:
Originally posted by slackMeUp
If you want a work-around....


Dropline has added HAL and DBUS into it's install... you can download the dropline installer and just not install everything but HAL if you wish.
need 64 bit libs
 
Old 05-21-2005, 03:24 PM   #10
jong357
Senior Member
 
Registered: May 2003
Location: Columbus, OH
Distribution: DIYSlackware
Posts: 1,914

Rep: Reputation: 52
Quote:
Originally posted by jong357
What's that spit out at ya? Just copy/paste all of that in a terminal..
So for further clarification ( I didn't think it needed any), COPY/PASTE every single line of code that I listed into a TERMINAL. Then press ENTER. Then COPY/PASTE your terminal OUPUT here...

It might help to identify the problem. Altho, posting the relevant section of your configure log would probably produce similar results... I'm not going to ask you to, because you WONT anyway....

Last edited by jong357; 05-21-2005 at 03:59 PM.
 
Old 05-22-2005, 04:55 PM   #11
jong357
Senior Member
 
Registered: May 2003
Location: Columbus, OH
Distribution: DIYSlackware
Posts: 1,914

Rep: Reputation: 52
Here... This has been sitting on my desktop for a day or two now and I want to get rid of it. Not sure what's up with your hal problem right now but good luck in whatever route you try to take... Obviously, I can't guarantee that linux-libc-headers will fix your problem, but it's atleast worth a shot in my book... Sory about the previous pissy post. I got my ass handed to me all day long in enemy territory. Tends to make me grumpy....

Code:
#!/bin/sh
#
# linux-libc-headers for slamd64
# They can be found at http://ep09.pld-linux.org/~mmazur/linux-libc-headers/

CWD=`pwd`
TMP=/tmp
PKG=$TMP/package-linux-libc-headers
VERSION=2.6.9.0
PKGVERSION=2.6.9
ARCH=x86_64
BUILD=1

# Obviously, we don't need this here. This WILL be an
# x86_64 arch tho, because of our asm headers...
if [ "$ARCH" = "x86_64" ]; then
  SLKCFLAGS="-O2"
fi

rm -rf $PKG
mkdir -p $PKG/usr/include

cd $TMP
rm -rf linux-libc-headers-$VERSION
tar xjf $CWD/linux-libc-headers-$VERSION.tar.bz2
cd linux-libc-headers-$VERSION
# Again, I'm assuming you want 'asm-x86_64' instead of
# 'asm-i386'.. Makes sense anyway...
cp -R include/asm-x86_64 $PKG/usr/include/asm
cp -R include/linux $PKG/usr/include
( cd $PKG
  chown -R root.root .
  find usr/include/{asm,linux} -type d -exec chmod 755 {} \;
  find usr/include/{asm,linux} -type f -exec chmod 644 {} \; )

mkdir -p $PKG/install
cat << EOF > $PKG/install/slack-desc
# HOW TO EDIT THIS FILE:
# The "handy ruler" below makes it easier to edit a package description.  Line
# up the first '|' above the ':' following the base package name, and the '|' on
# the right side marks the last column you can put a character in.  You must make
# exactly 11 lines for the formatting to be correct.  It's also customary to
# leave one space after the ':'.

                  |-----handy-ruler-------------------------------------------|
linux-libc-headers: linux-$PKGVERSION (kernel headers)
linux-libc-headers:
linux-libc-headers: For years it has been common practice to use 'raw'
linux-libc-headers: kernel headers (straight from a kernel tarball) in
linux-libc-headers: /usr/include, but over the last few years, the 
linux-libc-headers: kernel developers have taken a strong stance that
linux-libc-headers: this should not be done. This gave birth to the 
linux-libc-headers: Linux-Libc-Headers Project, which was designed to 
linux-libc-headers: maintain an API stable version of the Linux headers.
linux-libc-headers:
linux-libc-headers:
EOF

# Build the package:
cd $PKG
makepkg -l y -c n $TMP/linux-libc-headers-$PKGVERSION-$ARCH-$BUILD.tgz

Last edited by jong357; 05-22-2005 at 11:38 PM.
 
Old 05-23-2005, 02:02 AM   #12
acidjuice
Member
 
Registered: Jan 2005
Location: a tiny spot on the iceberg
Distribution: Slackware 10.1 (dropline 2.10, kernel 2.6.11.6)
Posts: 320

Original Poster
Rep: Reputation: 30
hi jong,

sorry for the late reply i was away the whole weekend.

here it is... even though i do not think this is what you were looking for...
Code:
/home/slamd# cat << EOF > blkgetsize.c
> #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;
> }
>
> EOF
root@rslamd:/home/slamd# gcc -o blkgetsize blkgetsize.c
In file included from /usr/include/linux/wait.h:21,
                 from /usr/include/linux/fs.h:12,
                 from blkgetsize.c:3:
/usr/include/linux/list.h:715:2: warning: #warning "don't include kernel headers in userspace"
In file included from /usr/include/linux/wait.h:22,
                 from /usr/include/linux/fs.h:12,
                 from blkgetsize.c:3:
/usr/include/linux/pid.h:19: error: field `pid_chain' has incomplete type
In file included from /usr/include/linux/fs.h:19,
                 from blkgetsize.c:3:
/usr/include/linux/prio_tree.h:22: error: parse error before "pgoff_t"
/usr/include/linux/prio_tree.h:27: error: parse error before "pgoff_t"
/usr/include/linux/prio_tree.h: In function `prio_tree_iter_init':
/usr/include/linux/prio_tree.h:29: error: `iter' undeclared (first use in this function)
/usr/include/linux/prio_tree.h:29: error: (Each undeclared identifier is reported only once
/usr/include/linux/prio_tree.h:29: error: for each function it appears in.)
/usr/include/linux/prio_tree.h:29: error: `root' undeclared (first use in this function)
/usr/include/linux/prio_tree.h:30: error: `r_index' undeclared (first use in this function)
if you need anything else please do let me know... fyi, couldn't find any proper config.log this time because my script cleaned it. if you think this can make any difference i will recompile and post it here for you.

shall i instead use the script you provided to install the linux headers? btw already thank you for this precious script and no need to worry for the 'rudeness', you are being all but that.

cheers,

aj.
 
Old 05-23-2005, 01:47 PM   #13
jong357
Senior Member
 
Registered: May 2003
Location: Columbus, OH
Distribution: DIYSlackware
Posts: 1,914

Rep: Reputation: 52
Well, yea.. That helps. Look, they are even telling you not to use the kernel headers basically..

warning: #warning "don't include kernel headers in userspace"

Thats pretty much what I expected to see. And there is your pgoff_t error as well...

Actually, I'd feel pretty good about using linux-libc-headers if I were you... Give it a try, can't hurt. Even if it doesn't work, I'd probably still leave them installed. As long as they are they same version that's installed now (more importantly, the same version Glibc was compiled against), it shouldn't hurt anything. Do a removepkg on your current kernel headers and then install the new ones... Hopefully, hal will like your new headers...
 
Old 05-25-2005, 11:23 AM   #14
acidjuice
Member
 
Registered: Jan 2005
Location: a tiny spot on the iceberg
Distribution: Slackware 10.1 (dropline 2.10, kernel 2.6.11.6)
Posts: 320

Original Poster
Rep: Reputation: 30
dear jong,

thank to your suggestions i was able to compile hal.

however, when i compile dbus (just prior hal) i get this error:
Code:
dbus.py  File "/usr/lib/python2.3/site-packages/dbus.py", line 518
    @method('org.freedesktop.DBus.Introspectable')
    ^
SyntaxError: invalid syntax
if i ignore it, hal compiles ok but of course after that, gnome-vfs gives:
Code:
gnome-vfs-hal-mounts.c:52: error: parse error before "HalStoragePolicy"
gnome-vfs-hal-mounts.c:52: warning: no semicolon at end of struct or union
gnome-vfs-hal-mounts.c:53: warning: data definition has no type or storage class
gnome-vfs-hal-mounts.c: In function `_hal_device_added':
gnome-vfs-hal-mounts.c:66: error: `hal_userdata' undeclared (first use in this function)
gnome-vfs-hal-mounts.c:66: error: (Each undeclared identifier is reported only once
gnome-vfs-hal-mounts.c:66: error: for each function it appears in.)
gnome-vfs-hal-mounts.c:69: error: parse error before ')' token
gnome-vfs-hal-mounts.c:78: warning: assignment makes pointer from integer without a cast
gnome-vfs-hal-mounts.c: In function `_hal_device_removed':
gnome-vfs-hal-mounts.c:97: error: `hal_userdata' undeclared (first use in this function)
gnome-vfs-hal-mounts.c:100: error: parse error before ')' token
gnome-vfs-hal-mounts.c: In function `_hal_device_new_capability':
gnome-vfs-hal-mounts.c:130: error: `hal_userdata' undeclared (first use in this function)
compiling gnome-vfs fails.

yes, it is a neverending story. learning, but starting to get tired
 
Old 05-25-2005, 11:39 AM   #15
jong357
Senior Member
 
Registered: May 2003
Location: Columbus, OH
Distribution: DIYSlackware
Posts: 1,914

Rep: Reputation: 52
http://lists.freedesktop.org/piperma...il/002572.html

Check it out from CVS or look for a newer version...

Are you having fun yet?
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Linux keeps saving my behind with windows problems (HAL.DLL) randon SUSE / openSUSE 1 10-29-2005 09:30 PM
hal krusty_lab Fedora 3 10-10-2005 10:23 AM
HAL demon chocobanana Linux - Hardware 1 06-06-2005 05:24 PM
Hal gamehack Programming 7 12-16-2004 02:03 AM
udev/hal, problems... TazG Linux - Hardware 0 09-28-2004 02:38 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 11:11 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration