Skip to contentSkip to conversation

Udev 0.65 fail to compile!

DISCUSSION Gerhard Mourani 4 participants 4 messages Aug 3, 2005 – Aug 9, 2005

lore
Share & tools
lore
#0 lore raw

Hello,

I'm downloaded and tried to compile and install latest version of udev (0.65) today and get the following error; please note that previous version 0.64 compiled well and without problem on the same system/host.

+ /usr/bin/make 'CC=gcc -Os -march=pentium3 -fomit-frame-pointer -DUDEV_STATIC' 'LD=gcc -Os -march=pentium3 -fomit-frame-pointer -static' USE_KLIBCúlse USE_SELINUXúlse USE_STATIC=true udevdir=/dev 'EXTRAS=extras/scsi_id extras/ata_id' USE_LOGúlse
Creating udev_version.h
Building ccdv

Compiling udev.c:                                                     [OK]
Compiling udev_utils.c:                                               [OK]
Compiling udev_event.c:                                               [OK]
Compiling udev_device.c:                                              [OK]
Compiling udev_config.c:                                              [OK]
Compiling udev_add.c:                                                 [OK]
Compiling udev_remove.c:                                              [OK]
Compiling udev_sysfs.c:                                               [OK]
Compiling udev_db.c:                                                  [OK]
Compiling udev_rules.c:                                               [OK]
Compiling udev_rules_parse.c:                                         [OK]
Compiling udev_libc_wrapper.c:                                        [OK]
rm -f udev.a
Creating library udev.a:                                              [OK]
Running ranlib:                                                       [OK]
Compiling sysfs_class.c:                                              [OK]
Compiling sysfs_device.c:                                             [OK]
Compiling sysfs_dir.c:                                                [OK]
Compiling sysfs_driver.c:                                             [OK]
Compiling sysfs_utils.c:                                              [OK]
Compiling dlist.c:                                                    [OK]
rm -f libsysfs/sysfs.a
Creating library sysfs.a:                                             [OK]
Running ranlib:                                                       [OK]
sed -e "s:@udevdir@:/dev:" < udev.8.in > udev.8
Linking udev:                                                         [OK]
Running strip:                                                        [OK]
Compiling udevsend.c:                                                 [OK]
Linking udevsend:                                                     [OK]
Running strip:                                                        [OK]
Compiling udevrulescompile.c:                                         [OK]
Linking udevrulescompile:                                             [OK]
Running strip:                                                        [OK]
Compiling udevinitsend.c:                                             [OK]
Linking udevinitsend:                                                 [OK]
Running strip:                                                        [OK]
Compiling udeveventrecorder.c:                                        [OK]
Linking udeveventrecorder:                                            [OK]
Running strip:                                                        [OK]
Compiling udevcontrol.c:                                              [OK]
Linking udevcontrol:                                                  [OK]
Running strip:                                                        [OK]
Compiling udevmonitor.c:                                              [ERROR]

gcc -Os -march=pentium3 -fomit-frame-pointer -DUDEV_STATIC -Wall -fno-builtin
-Wchar-subscripts -Wpointer-arith -Wstrict-prototypes -Wsign-compare -Wdecla
ration-after-statement -pipe -D_GNU_SOURCE -D_FILE_OFFSET_BITSd -I/usr/src/ openna/BUILD/udev-065/libsysfs/sysfs -I/usr/src/openna/BUILD/udev-065/libsysf s -Os -march=pentium3 -fomit-frame-pointer -fomit-frame-pointer -Wshadow -Wst rict-prototypes -Wmissing-prototypes -Wmissing-declarations -DUSE_STATIC -c -
o udevmonitor.o udevmonitor.c
In file included from udevmonitor.c:31:
/usr/include/linux/netlink.h:22: error: syntax error before '__u32' /usr/include/linux/netlink.h:28: error: syntax error before '__u32' /usr/include/linux/netlink.h:30: error: syntax error before 'nlmsg_flags' /usr/include/linux/netlink.h:31: error: syntax error before 'nlmsg_seq' /usr/include/linux/netlink.h:32: error: syntax error before 'nlmsg_pid' /usr/include/linux/netlink.h:82: error: field 'msg' has incomplete type udevmonitor.c: In function 'init_uevent_netlink_sock':
udevmonitor.c:75: error: storage size of 'snl' isn't known udevmonitor.c:78: error: invalid application of 'sizeof' to incomplete type ' struct sockaddr_nl'
udevmonitor.c:83: error: 'NETLINK_KOBJECT_UEVENT' undeclared (first use in th is function)
udevmonitor.c:83: error: (Each undeclared identifier is reported only once udevmonitor.c:83: error: for each function it appears in.) udevmonitor.c:90: error: invalid application of 'sizeof' to incomplete type ' struct sockaddr_nl'
udevmonitor.c:75: warning: unused variable 'snl'
make: *** [udevmonitor.o] Error 1
error: Bad exit status from /var/tmp/rpm-tmp.97858 (%build)

RPM build errors:
Bad exit status from /var/tmp/rpm-tmp.97858 (%build)

--
Gerhard Mourani

-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

#1 lore raw
Quoted 1 line · Gerhard Mourani

I'm downloaded and tried to compile and install latest version of udev (0.65)

Use this patch.

Signature · 2 lines
ciao,
Marco
udevmonitor.c +4 -0
diff -ruNp udev-065.orig/udevmonitor.c udev-065/udevmonitor.c
@@ -34,6 +34,10 @@
 #include "udev.h"
 #include "udevd.h"
 
+#ifndef NETLINK_KOBJECT_UEVENT
+#define NETLINK_KOBJECT_UEVENT 15
+#endif
+
 static int uevent_netlink_sock;
 static int udev_monitor_sock;
 
#2 lore raw
In reply to Gerhard Mourani
Quoted 5 lines · Marco d'Itri
Quoted 1 line · Gerhard Mourani

I'm downloaded and tried to compile and install latest version of udev (0.65)

Use this patch.

That should work, yes. But you should definitely update your glibc-kernel headers to get the missing pieces.

Kay

-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

#3 lore raw
In reply to Gerhard Mourani
Quoted 5 lines · Marco d'Itri
Quoted 1 line · Gerhard Mourani

I'm downloaded and tried to compile and install latest version of udev (0.65)

Use this patch.

Thanks for that. To compile against 2.4 headers you also need to include <linux/types.h> before <linux/netlink.h> as in the attached combined patch.

udevmonitor.c renamed from udevmonitor.c.orig +5 -0
@@ -28,12 +28,17 @@
 #include <sys/socket.h>
 #include <sys/un.h>
 #include <sys/select.h>
+#include <linux/types.h>
 #include <linux/netlink.h>
 #include <asm/types.h>
 
 #include "udev.h"
 #include "udevd.h"
 
+#ifndef NETLINK_KOBJECT_UEVENT
+#define NETLINK_KOBJECT_UEVENT 15
+#endif
+
 static int uevent_netlink_sock;
 static int udev_monitor_sock;