Gentoo Archives: gentoo-user

From: Dale <rdalek1967@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] LVM2 compile error. Clock_gettime
Date: Wed, 26 Jun 2013 06:31:29
Message-Id: 51CA8AB6.8050500@gmail.com
In Reply to: Re: [gentoo-user] LVM2 compile error. Clock_gettime by Samuli Suominen
1 Samuli Suominen wrote:
2 > On 26/06/13 07:58, Dale wrote:
3 >> I can't seem to get lvm2 to compile. I get this error:
4 >>
5 >> FILE=`echo lvchange.d | sed 's/\\//\\\\\\//g;s/\\.d//g'`; \
6 >> DEPS=`echo ../make.tmpl ../VERSION ../Makefile
7 >> ../include/.symlinks_created | sed -e 's/\\//\\\\\\//g'`; \
8 >> x86_64-pc-linux-gnu-gcc -MM -I. -I../include
9 >> -DLVM_SHARED_PATH=\"/usr/sbin/lvm\" -DHAVE_CONFIG_H -DDM_IOCTLS -o
10 >> lvchange.d lvchange.c; \
11 >> sed -i "s/\(.*\)\.o[ :]*/$FILE.o $FILE.d $FILE.pot: $DEPS /g"
12 >> lvchange.d; \
13 >> [ -s lvchange.d ] || rm -f lvchange.d
14 >> /bin/mkdir -p ./; \
15 >> set -e; \
16 >> FILE=`echo formats.d | sed 's/\\//\\\\\\//g;s/\\.d//g'`; \
17 >> DEPS=`echo ../make.tmpl ../VERSION ../Makefile
18 >> ../include/.symlinks_created | sed -e 's/\\//\\\\\\//g'`; \
19 >> x86_64-pc-linux-gnu-gcc -MM -I. -I../include
20 >> -DLVM_SHARED_PATH=\"/usr/sbin/lvm\" -DHAVE_CONFIG_H -DDM_IOCTLS -o
21 >> formats.d formats.c; \
22 >> sed -i "s/\(.*\)\.o[ :]*/$FILE.o $FILE.d $FILE.pot: $DEPS /g"
23 >> formats.d; \
24 >> [ -s formats.d ] || rm -f formats.d
25 >> /bin/mkdir -p ./; \
26 >> set -e; \
27 >> FILE=`echo dumpconfig.d | sed 's/\\//\\\\\\//g;s/\\.d//g'`; \
28 >> DEPS=`echo ../make.tmpl ../VERSION ../Makefile
29 >> ../include/.symlinks_created | sed -e 's/\\//\\\\\\//g'`; \
30 >> x86_64-pc-linux-gnu-gcc -MM -I. -I../include
31 >> -DLVM_SHARED_PATH=\"/usr/sbin/lvm\" -DHAVE_CONFIG_H -DDM_IOCTLS -o
32 >> dumpconfig.d dumpconfig.c; \
33 >> sed -i "s/\(.*\)\.o[ :]*/$FILE.o $FILE.d $FILE.pot: $DEPS /g"
34 >> dumpconfig.d; \
35 >> [ -s dumpconfig.d ] || rm -f dumpconfig.d
36 >> make[1]: Leaving directory
37 >> `/var/tmp/portage/sys-fs/lvm2-2.02.98/work/LVM2.2.02.98/tools'
38 >> make[1]: Entering directory
39 >> `/var/tmp/portage/sys-fs/lvm2-2.02.98/work/LVM2.2.02.98/tools'
40 >> x86_64-pc-linux-gnu-gcc -c -I. -I../include
41 >> -DLVM_SHARED_PATH=\"/usr/sbin/lvm\" -DHAVE_CONFIG_H -DDM_IOCTLS -Wall
42 >> -Wundef -Wshadow -Wcast-align -Wwrite-strings -Wmissing-prototypes
43 >> -Wmissing-declarations -Wnested-externs -Winline -Wmissing-noreturn
44 >> -Wformat-security -Wredundant-decls -Wpointer-arith -march=native -O2
45 >> -pipe -march=native -O2 -pipe -fPIC -O2 -march=native -O2 -pipe -fPIC
46 >> -O2 dmsetup.c -o dmsetup.o
47 >> x86_64-pc-linux-gnu-gcc -shared -Wl,-soname,libdevmapper-event.so.1.02 \
48 >> -march=native -O2 -pipe -march=native -O2 -pipe -fPIC -O2
49 >> -march=native -O2 -pipe -fPIC -O2 -march=native -O2 -pipe -fPIC -O2
50 >> -Wl,-O1 -Wl,--as-needed -Wl,--version-script,.export.sym -L../../libdm
51 >> -L../../lib -L../../libdaemon/client -L../../daemons/dmeventd
52 >> libdevmapper-event.o -ldevmapper -o libdevmapper-event.so.1.02
53 >> rm -f libdevmapper-event.a
54 >> x86_64-pc-linux-gnu-ar rs libdevmapper-event.a libdevmapper-event.o
55 >> x86_64-pc-linux-gnu-ar: creating libdevmapper-event.a
56 >> ln -s -f libdevmapper-event.so.1.02 libdevmapper-event.so
57 >> x86_64-pc-linux-gnu-gcc -march=native -O2 -pipe -march=native -O2 -pipe
58 >> -fPIC -O2 -march=native -O2 -pipe -fPIC -O2 -march=native -O2 -pipe
59 >> -fPIC -O2 -Wl,-O1 -Wl,--as-needed -Wl,-O1 -Wl,--as-needed -O2 -L./libdm
60 >> -L./lib -L./libdaemon/client -L./daemons/dmeventd -Wl,-O1
61 >> -Wl,--as-needed -O2 -L../libdm -L../lib -L../libdaemon/client
62 >> -L../daemons/dmeventd -Wl,-O1 -Wl,--as-needed -O2 -L../../libdm
63 >> -L../../lib -L../../libdaemon/client -L../../daemons/dmeventd
64 >> -Wl,--export-dynamic -L. -o dmeventd dmeventd.o \
65 >> -ldl -ldevmapper-event -lpthread -ldevmapper -rdynamic
66 >> x86_64-pc-linux-gnu-gcc -march=native -O2 -pipe -march=native -O2 -pipe
67 >> -fPIC -O2 -march=native -O2 -pipe -fPIC -O2 -march=native -O2 -pipe
68 >> -fPIC -O2 -Wl,-O1 -Wl,--as-needed -Wl,-O1 -Wl,--as-needed -O2 -L./libdm
69 >> -L./lib -L./libdaemon/client -L./daemons/dmeventd -Wl,-O1
70 >> -Wl,--as-needed -O2 -L../libdm -L../lib -L../libdaemon/client
71 >> -L../daemons/dmeventd -Wl,-O1 -Wl,--as-needed -O2 -L../../libdm
72 >> -L../../lib -L../../libdaemon/client -L../../daemons/dmeventd
73 >> -Wl,--export-dynamic -Wl,--no-export-dynamic -static -L.
74 >> -L../../libdm/ioctl -o dmeventd.static \
75 >> dmeventd.o -ldl -ldevmapper-event -lpthread -ldevmapper -ludev
76 >> dmeventd.o: In function `_register_for_event':
77 >> dmeventd.c:(.text+0xfb1): warning: Using 'dlopen' in statically linked
78 >> applications requires at runtime the shared libraries from the glibc
79 >> version used for linking
80 >> /usr/lib/gcc/x86_64-pc-linux-gnu/4.6.3/../../../../lib64/libudev.a(libudev-util.o):
81 >>
82 >> In function `util_lookup_group':
83 >> (.text+0x4d6): warning: Using 'getgrnam_r' in statically linked
84 >> applications requires at runtime the shared libraries from the glibc
85 >> version used for linking
86 >> /usr/lib/gcc/x86_64-pc-linux-gnu/4.6.3/../../../../lib64/libudev.a(libudev-util.o):
87 >>
88 >> In function `util_lookup_user':
89 >> (.text+0x3a3): warning: Using 'getpwnam_r' in statically linked
90 >> applications requires at runtime the shared libraries from the glibc
91 >> version used for linking
92 >> /usr/lib/gcc/x86_64-pc-linux-gnu/4.6.3/../../../../lib64/libudev.a(util.o):
93 >>
94 >> In function `now':
95 >> (.text+0x148): undefined reference to `clock_gettime'
96 >> collect2: ld returned 1 exit status
97 >> make[2]: *** [dmeventd.static] Error 1
98 >> make[2]: Leaving directory
99 >> `/var/tmp/portage/sys-fs/lvm2-2.02.98/work/LVM2.2.02.98/daemons/dmeventd'
100 >>
101 >> make[1]: *** [dmeventd.device-mapper] Error 2
102 >> make[1]: Leaving directory
103 >> `/var/tmp/portage/sys-fs/lvm2-2.02.98/work/LVM2.2.02.98/daemons'
104 >> make: *** [daemons.device-mapper] Error 2
105 >> make: *** Waiting for unfinished jobs....
106 >> x86_64-pc-linux-gnu-gcc -march=native -O2 -pipe -march=native -O2 -pipe
107 >> -fPIC -O2 -march=native -O2 -pipe -fPIC -O2 -Wl,-O1 -Wl,--as-needed
108 >> -Wl,-O1 -Wl,--as-needed -O2 -L./libdm -L./lib -L./libdaemon/client
109 >> -L./daemons/dmeventd -Wl,-O1 -Wl,--as-needed -O2 -L../libdm -L../lib
110 >> -L../libdaemon/client -L../daemons/dmeventd -L../libdm \
111 >> -o dmsetup dmsetup.o -ldevmapper -ludev
112 >> x86_64-pc-linux-gnu-gcc -march=native -O2 -pipe -march=native -O2 -pipe
113 >> -fPIC -O2 -march=native -O2 -pipe -fPIC -O2 -Wl,-O1 -Wl,--as-needed
114 >> -Wl,-O1 -Wl,--as-needed -O2 -L./libdm -L./lib -L./libdaemon/client
115 >> -L./daemons/dmeventd -Wl,-O1 -Wl,--as-needed -O2 -L../libdm -L../lib
116 >> -L../libdaemon/client -L../daemons/dmeventd -Wl,--no-export-dynamic
117 >> -static -L../libdm/ioctl \
118 >> -o dmsetup.static dmsetup.o -ldevmapper -ludev -ludev
119 >> /usr/lib/gcc/x86_64-pc-linux-gnu/4.6.3/../../../../lib64/libudev.a(libudev-util.o):
120 >>
121 >> In function `util_lookup_group':
122 >> (.text+0x4d6): warning: Using 'getgrnam_r' in statically linked
123 >> applications requires at runtime the shared libraries from the glibc
124 >> version used for linking
125 >> /usr/lib/gcc/x86_64-pc-linux-gnu/4.6.3/../../../../lib64/libudev.a(libudev-util.o):
126 >>
127 >> In function `util_lookup_user':
128 >> (.text+0x3a3): warning: Using 'getpwnam_r' in statically linked
129 >> applications requires at runtime the shared libraries from the glibc
130 >> version used for linking
131 >> /usr/lib/gcc/x86_64-pc-linux-gnu/4.6.3/../../../../lib64/libudev.a(util.o):
132 >>
133 >> In function `now':
134 >> (.text+0x148): undefined reference to `clock_gettime'
135 >> collect2: ld returned 1 exit status
136 >> make[1]: *** [dmsetup.static] Error 1
137 >> make[1]: Leaving directory
138 >> `/var/tmp/portage/sys-fs/lvm2-2.02.98/work/LVM2.2.02.98/tools'
139 >> make: *** [tools.device-mapper] Error 2
140 >> * ERROR: sys-fs/lvm2-2.02.98 failed (compile phase):
141 >> * emake failed
142 >>
143 >>
144 >> The short error is this:
145 >>
146 >> (.text+0x148): undefined reference to `clock_gettime'
147 >>
148 >> I googled and it seems udev is supposed to deal with this. I'm using
149 >> eudev. I have tried a masked version of lvm2 to see if it has a fix but
150 >> same error. I'm on the latest eudev except for the *9999 version. This
151 >> is current version of eudev:
152 >>
153 >> [IP-] [ ] sys-fs/eudev-1.0:0
154 >>
155 >> Current installed gcc:
156 >>
157 >> [IP-] [ ] sys-devel/gcc-4.4.7:4.4.7
158 >> [IP-] [ ] sys-devel/gcc-4.5.4:4.5.4
159 >> [IP-] [ ] sys-devel/gcc-4.6.3:4.6.3
160 >>
161 >> I'm set to use 4.6.3 gcc according to gcc-config. This is part of a
162 >> emerge -e world hoping to fix the seamonkey/firefox issue, hoping.
163 >> Everything else compiled except googleearth and ppp. I'm not using
164 >> those at the moment so I'm not worried about those. Maybe later.
165 >>
166 >> Thoughts? Ideas?
167 >
168 > With sys-fs/udev-204 installed I get:
169 >
170 > $ pkg-config --libs --static libudev
171 > -ludev -lrt
172 > $ grep lrt /usr/lib64/pkgconfig/libudev.pc
173 > Libs.private: -lrt
174 >
175 > In which the -lrt is the important bit. It's required for clock_gettime.
176 >
177 > So either eudev is broken and doesn't contain proper Libs.private: in
178 > libudev.pc file, or sys-fs/lvm2's build system is broken and doesn't
179 > query proper Libs.private: from libudev.pc when building lvm2 with
180 > static.
181 >
182 > For the record. There is no reason to use sys-fs/eudev at this time,
183 > it doesn't bring anything to the table sys-fs/udev doesn't have. In
184 > fact, sys-fs/eudev has broken USE="+rule-generator" which leads to
185 > random interface names.
186 >
187 > - Samuli
188 >
189 >
190
191 I switched when all the separate /usr uproar happened. I no longer have
192 a init thingy either. I cleaned all that out after a few successful
193 reboots with eudev without using a init thingy. So, if I switch back to
194 udev, are you sure that my system is going to reboot? I have everything
195 but / and /boot on LVM. Point being, I don't want to switch back,
196 reboot and have a non-bootable system. I switched to grub2 and would
197 really not want to learn the hard way how to edit stuff, chrrot to fix
198 anything with it, although I need to test on that one day.
199
200 At least my guess was right on it being a *dev problem. What I saw from
201 google pointed in that direction.
202
203 Thanks.
204
205 Dale
206
207 :-) :-)
208
209 --
210 I am only responsible for what I said ... Not for what you understood or how you interpreted my words!

Replies

Subject Author
Re: [gentoo-user] LVM2 compile error. Clock_gettime Samuli Suominen <ssuominen@g.o>