[OpenAFS] Re: 64-bit mod_waklog / filedrawers on afs
Ting-jen Yen
yentj@infowrap.com.tw
Tue, 30 Aug 2011 13:28:20 +0800
On Web=A1A24 Aug 2011 10:56:00 -0400
Andrew Deason <adeason@sinenomine.net> wrote:
> On Mon, 22 Aug 2011 09:54:16 -0400
> "Colson, Daniel" <dcolson5@uncc.edu> wrote:
>=20
> > Oops. I apologize. I sent the output from the filedrawers build
> > instead of the mod_waklog build. I'll check on mysql-devel though.
> > Below is the output from "make" for mod_waklog.
> >=20
> >=20
> > `/usr/sbin/apxs -q CC` -I/usr/include/ -I/usr/include/afs -I/usr/incl=
ude/httpd -DEAPI -g `/usr/sbin/apxs -q CFLAGS` -c mod_waklog.c -o mod_wak=
log.o
>=20
> Did you try using the patches Aaron mentioned earlier in the thread? I'=
m
> not too familiar with mod_waklog, but this looks like a build line
> without Aaron's fix_build_scripts.patch.
>=20
Hello,
The output after calling ioctl() of "strace -f afsd" is in the
following, (compiler errors are after this output message.)
--------- strace -f afsd line 155-----------------------
open("/proc/fs/openafs/afs_ioctl", O_RDWR) =3D 3
ioctl(3, CAPI_REGISTER or SNDCTL_COPR_LOAD, 0xffa4c320) =3D -1 EINVAL
(Invalid argument)
close(3) =3D 0
clone(Process 19813 attached (waiting for parent)
Process 19813 resumed (parent 19812 ready)
child_stack=3D0, flags=3DCLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD,
child_tidptr=3D0xfff1e48) =3D 19813
[pid 19812] clone(Process 19814 attached (waiting for parent)
Process 19814 resumed (parent 19812 ready)
child_stack=3D0, flags=3DCLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD,
child_tidptr=3D0xfff1e48) =3D 19814
[pid 19812] clone(Process 19815 attached (waiting for parent)
Process 19815 resumed (parent 19812 ready)
child_stack=3D0, flags=3DCLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD,
child_tidptr=3D0xfff1e48) =3D 19815
[pid 19812] open("/proc/fs/openafs/afs_ioctl", O_RDWR) =3D 3
[pid 19813] setpriority(PRIO_PROCESS, 0, -10 <unfinished ...>
[pid 19815] setpriority(PRIO_PROCESS, 0, -10 <unfinished ...>
[pid 19814] open("/proc/fs/openafs/afs_ioctl", O_RDWR <unfinished ...>
[pid 19815] <... setpriority resumed> ) =3D 0
[pid 19813] <... setpriority resumed> ) =3D 0
[pid 19815] open("/proc/fs/openafs/afs_ioctl", O_RDWR <unfinished ...>
[pid 19814] <... open resumed> ) =3D 3
[pid 19815] <... open resumed> ) =3D 3
[pid 19813] open("/proc/fs/openafs/afs_ioctl", O_RDWR <unfinished ...>
[pid 19815] ioctl(3, CAPI_REGISTER or SNDCTL_COPR_LOAD <unfinished ...>
[pid 19814] ioctl(3, CAPI_REGISTER or SNDCTL_COPR_LOAD <unfinished ...>
[pid 19812] ioctl(3, CAPI_REGISTER or SNDCTL_COPR_LOAD <unfinished ...>
[pid 19815] <... ioctl resumed> , 0xffa4c290) =3D -1 EINVAL (Invalid
argument)
[pid 19813] <... open resumed> ) =3D 3
[pid 19815] close(3 <unfinished ...>
[pid 19813] ioctl(3, CAPI_REGISTER or SNDCTL_COPR_LOAD <unfinished ...>
[pid 19815] <... close resumed> ) =3D 0
[pid 19813] <... ioctl resumed> , 0xffa4c290) =3D -1 EINVAL (Invalid
argument)
[pid 19813] close(3 <unfinished ...>
[pid 19815] exit_group(1) =3D ?
Process 19815 detached
[pid 19813] <... close resumed> ) =3D 0
[pid 19813] exit_group(1) =3D ?
Process 19813 detached
[pid 19812] <... ioctl resumed> , 0xffa4c320) =3D -1 EINVAL (Invalid
argument)
[pid 19812] --- SIGCHLD (Child exited) @ 0 (0) ---
[pid 19812] close(3) =3D 0
[pid 19812] fstat64(1, {st_mode=3DS_IFCHR|0620, st_rdev=3Dmakedev(136,
0), ...}) =3D 0
[pid 19814] <... ioctl resumed> , 0xffa4c290) =3D -1 EINVAL (Invalid
argument)
[pid 19812] mmap(NULL, 65536, PROT_READ|PROT_WRITE, MAP_PRIVATE|
MAP_ANONYMOUS, -1, 0) =3D 0xf7fe0000
[pid 19812] write(1, "afsd: Error -1 in basic initiali"..., 40afsd:
Error -1 in basic initialization.
) =3D 40
[pid 19812] exit_group(1) =3D ?
[pid 19814] close(3) =3D 0
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
For compiler errors, if I simple run rpmbuild -bb openafs.spec, it=20
shows: (using SRPM of openafs-1.4.14.1-1.1.src.rpm)
----------------------------------------------------
[root@r602 SPECS]# rpmbuild -bb openafs.spec
error: parse error in expression
error: /usr/src/redhat/SPECS/openafs.spec:337: parseExpressionBoolean
returns -1
Checking for unpackaged
file(s): /usr/lib/rpm/check-files /var/tmp/openafs-1.4.14.1-root
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
If I specified build_userspace, build_modules, and build_authlibs
in rpmbuild, the compiling will go ahead, and stop at:
------------------------------------------------
cc -o aklog -DALLOW_REGISTER
-I/usr/src/redhat/BUILD/openafs-1.4.14.1/src/config -I. -I.
-I/usr/src/redhat/BUILD/openafs-1.4.14.1/include
-I/usr/src/redhat/BUILD/openafs-1.4.14.1/include/afs
-I/usr/src/redhat/BUILD/openafs-1.4.14.1/include/rx
.... (line to long, so I deleted the rest of it)
/usr/bin/ld: cannot find -lcom_err
collect2: ld returned 1 exit status
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
I did notice I have /usr/lib64/libcom_err.so which is symlink
to /lib64/libcom_err.so.2, though there is no /usr/lib/libcom_err.so.
I supposed this is part of 64/32-bitness. I did manually add a link
/usr/lib/libcom_err.so to /lib/libcom_err.so.2. The compiling would
now go past the previous part, and no error until it began to compile
kernel module. It would dump a lot of warning/error messages,
like:
-------------------------------------------------
/usr/src/redhat/BUILD/openafs-1.4.14.1/src/libafs/MODLOAD-2.6.18-194.el5-=
SP/afs_
vnop_flock.c:617: warning: 'struct flock64' declared inside parameter
list
/usr/src/redhat/BUILD/openafs-1.4.14.1/src/libafs/MODLOAD-2.6.18-194.el5-=
SP/afs_
vnop_flock.c:620: error: storage size of 'flock' isn't known
/usr/src/redhat/BUILD/openafs-1.4.14.1/src/libafs/MODLOAD-2.6.18-194.el5-=
SP/afs_
vnop_flock.c:632: error: dereferencing pointer to incomplete type
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D
I try to get a preprocessed code output (using -E) of the=20
afs_vnop_flock.c, and noticed that struct flock64 is never
defined. So I went to edit src/afs/afs.h, and changed the
only occurance of 'flock64' to 'flock', and the whole compiling
would then succeed. Though the service cannot be started.
Because whole compiler output is too large even after compressed,
I only included the most significant parts, (in my opinion anyway),
if it is really necessary to show more information, please let me
know, I will see what I can do then.
-- Ting-jen