modified glibc compilation segfault on making sunrpc

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

modified glibc compilation segfault on making sunrpc

Sharath George-2

Hi

I modfied the  glibc-2.4/sysdeps/unix/sysv/linux/i386/sysdep.h as a part of
the research Im doing. The modifcaion includes a change in the way it traps
into the kernel but all the modifications are in sysdep.h and nowhere else.

Once i begin compilation, it segfaults when it makes sunrpc
make  subdir=sunrpc -C sunrpc ..=../ others
make[2]: Entering directory `/usr/src/glibc/trial2/glibc-2.4/sunrpc'
make[2]: Leaving directory `/usr/src/glibc/trial2/glibc-2.4/sunrpc'
make[2]: Entering directory `/usr/src/glibc/trial2/glibc-2.4/sunrpc'
gcc rpc_main.c -c -std=gnu99 -O2 -Wall -Winline -Wwrite-strings
-fmerge-all-constants -fno-stack-protector -g -Wstrict-prototypes
-mpreferred-stack-boundary=2     -I../include
-I/usr/src/glibc/trial2/build/sunrpc -I/usr/src/glibc/trial2/build
-I../sysdeps/i386/elf -I../nptl/sysdeps/unix/sysv/linux/i386/i686
-I../nptl/sysdeps/unix/sysv/linux/i386 -I../sysdeps/unix/sysv/linux/i386
-I../nptl/sysdeps/unix/sysv/linux -I../nptl/sysdeps/pthread
-I../sysdeps/pthread -I../sysdeps/unix/sysv/linux -I../sysdeps/gnu
-I../sysdeps/unix/common -I../sysdeps/unix/mman -I../sysdeps/unix/inet
-I../sysdeps/unix/sysv/i386 -I../nptl/sysdeps/unix/sysv
-I../sysdeps/unix/sysv -I../sysdeps/unix/i386 -I../nptl/sysdeps/unix
-I../sysdeps/unix -I../sysdeps/posix -I../sysdeps/i386/i686/fpu
-I../nptl/sysdeps/i386/i686 -I../sysdeps/i386/i686 -I../sysdeps/i386/i486
-I../nptl/sysdeps/i386/i486 -I../sysdeps/i386/fpu -I../nptl/sysdeps/i386
-I../sysdeps/i386 -I../sysdeps/wordsize-32 -I../sysdeps/ieee754/ldbl-96
-I../sysdeps/ieee754/dbl-64 -I../sysdeps/ieee754/flt-32 -I../sysdeps/ieee754
-I../sysdeps/generic/elf -I../sysdeps/generic -I../nptl  -I.. -I../libio -I.
-I /lib/modules/2.6.16.33-xenU/build/include -D_LIBC_REENTRANT -include
../include/libc-symbols.h   -DNOT_IN_libc=1    -D_RPC_THREAD_SAFE_ -o
/usr/src/glibc/trial2/build/sunrpc/rpc_main.o -MD -MP -MF
/usr/src/glibc/trial2/build/sunrpc/rpc_main.o.dt -MT
/usr/src/glibc/trial2/build/sunrpc/rpc_main.o
gcc -nostdlib -nostartfiles -o /usr/src/glibc/trial2/build/sunrpc/rpcgen  
-Wl,-dynamic-linker=/usr/local2/lib/ld-linux.so.2   -Wl,-z,combreloc
-Wl,-z,relro /usr/src/glibc/trial2/build/csu/crt1.o
/usr/src/glibc/trial2/build/csu/crti.o `gcc --print-file-name=crtbegin.o`
/usr/src/glibc/trial2/build/sunrpc/rpc_main.o
/usr/src/glibc/trial2/build/sunrpc/rpc_hout.o
/usr/src/glibc/trial2/build/sunrpc/rpc_cout.o
/usr/src/glibc/trial2/build/sunrpc/rpc_parse.o
/usr/src/glibc/trial2/build/sunrpc/rpc_scan.o
/usr/src/glibc/trial2/build/sunrpc/rpc_util.o
/usr/src/glibc/trial2/build/sunrpc/rpc_svcout.o
/usr/src/glibc/trial2/build/sunrpc/rpc_clntout.o
/usr/src/glibc/trial2/build/sunrpc/rpc_tblout.o
/usr/src/glibc/trial2/build/sunrpc/rpc_sample.o  
-Wl,-rpath-link=/usr/src/glibc/trial2/build:/usr/src/glibc/trial2/build/math:/usr/src/glibc/trial2/build/elf:/usr/src/glibc/trial2/build/dlfcn:/usr/src/glibc/trial2/build/nss:/usr/src/glibc/trial2/build/nis:/usr/src/glibc/trial2/build/rt:/usr/src/glibc/trial2/build/resolv:/usr/src/glibc/trial2/build/crypt:/usr/src/glibc/trial2/build/nptl
/usr/src/glibc/trial2/build/libc.so.6
/usr/src/glibc/trial2/build/libc_nonshared.a -lgcc -Wl,--as-needed -lgcc_s  
-Wl,--no-as-needed `gcc --print-file-name=crtend.o`
/usr/src/glibc/trial2/build/csu/crtn.o
gcc rpcinfo.c -c -std=gnu99 -O2 -Wall -Winline -Wwrite-strings
-fmerge-all-constants -fno-stack-protector -g -Wstrict-prototypes
-mpreferred-stack-boundary=2     -I../include
-I/usr/src/glibc/trial2/build/sunrpc -I/usr/src/glibc/trial2/build
-I../sysdeps/i386/elf -I../nptl/sysdeps/unix/sysv/linux/i386/i686
-I../nptl/sysdeps/unix/sysv/linux/i386 -I../sysdeps/unix/sysv/linux/i386
-I../nptl/sysdeps/unix/sysv/linux -I../nptl/sysdeps/pthread
-I../sysdeps/pthread -I../sysdeps/unix/sysv/linux -I../sysdeps/gnu
-I../sysdeps/unix/common -I../sysdeps/unix/mman -I../sysdeps/unix/inet
-I../sysdeps/unix/sysv/i386 -I../nptl/sysdeps/unix/sysv
-I../sysdeps/unix/sysv -I../sysdeps/unix/i386 -I../nptl/sysdeps/unix
-I../sysdeps/unix -I../sysdeps/posix -I../sysdeps/i386/i686/fpu
-I../nptl/sysdeps/i386/i686 -I../sysdeps/i386/i686 -I../sysdeps/i386/i486
-I../nptl/sysdeps/i386/i486 -I../sysdeps/i386/fpu -I../nptl/sysdeps/i386
-I../sysdeps/i386 -I../sysdeps/wordsize-32 -I../sysdeps/ieee754/ldbl-96
-I../sysdeps/ieee754/dbl-64 -I../sysdeps/ieee754/flt-32 -I../sysdeps/ieee754
-I../sysdeps/generic/elf -I../sysdeps/generic -I../nptl  -I.. -I../libio -I.
-I /lib/modules/2.6.16.33-xenU/build/include -D_LIBC_REENTRANT -include
../include/libc-symbols.h   -DNOT_IN_libc=1    -D_RPC_THREAD_SAFE_ -o
/usr/src/glibc/trial2/build/sunrpc/rpcinfo.o -MD -MP -MF
/usr/src/glibc/trial2/build/sunrpc/rpcinfo.o.dt -MT
/usr/src/glibc/trial2/build/sunrpc/rpcinfo.o
gcc -nostdlib -nostartfiles -o /usr/src/glibc/trial2/build/sunrpc/rpcinfo  
-Wl,-dynamic-linker=/usr/local2/lib/ld-linux.so.2   -Wl,-z,combreloc
-Wl,-z,relro /usr/src/glibc/trial2/build/csu/crt1.o
/usr/src/glibc/trial2/build/csu/crti.o `gcc --print-file-name=crtbegin.o`
/usr/src/glibc/trial2/build/sunrpc/rpcinfo.o  
-Wl,-rpath-link=/usr/src/glibc/trial2/build:/usr/src/glibc/trial2/build/math:/usr/src/glibc/trial2/build/elf:/usr/src/glibc/trial2/build/dlfcn:/usr/src/glibc/trial2/build/nss:/usr/src/glibc/trial2/build/nis:/usr/src/glibc/trial2/build/rt:/usr/src/glibc/trial2/build/resolv:/usr/src/glibc/trial2/build/crypt:/usr/src/glibc/trial2/build/nptl
/usr/src/glibc/trial2/build/libc.so.6
/usr/src/glibc/trial2/build/libc_nonshared.a -lgcc -Wl,--as-needed -lgcc_s  
-Wl,--no-as-needed `gcc --print-file-name=crtend.o`
/usr/src/glibc/trial2/build/csu/crtn.o
CPP='gcc -E -x c-header'  /usr/src/glibc/trial2/build/elf/ld-linux.so.2
--library-path
/usr/src/glibc/trial2/build:/usr/src/glibc/trial2/build/math:/usr/src/glibc/trial2/build/elf:/usr/src/glibc/trial2/build/dlfcn:/usr/src/glibc/trial2/build/nss:/usr/src/glibc/trial2/build/nis:/usr/src/glibc/trial2/build/rt:/usr/src/glibc/trial2/build/resolv:/usr/src/glibc/trial2/build/crypt:/usr/src/glibc/trial2/build/nptl
/usr/src/glibc/trial2/build/sunrpc/rpcgen -Y ../scripts -c
rpcsvc/bootparam_prot.x -o
/usr/src/glibc/trial2/build/sunrpc/xbootparam_prot.T
Segmentation fault
make[2]: *** [/usr/src/glibc/trial2/build/sunrpc/xbootparam_prot.stmp] Error
139
make[2]: Leaving directory `/usr/src/glibc/trial2/glibc-2.4/sunrpc'
make[1]: *** [sunrpc/others] Error 2
make[1]: Leaving directory `/usr/src/glibc/trial2/glibc-2.4'
make: *** [all] Error 2


on going to that folder and trying to run the rpcgen bit i get the following
error
/usr/src/glibc/trial2/glibc-2.4/sunrpc#    rpcgen -Y ../scripts -c
rpcsvc/bootparam_prot.x -o
/usr/src/glibc/trial2/build/sunrpc/xbootparam_prot.T
exec: 6: -C: not found
rpcgen: C preprocessor failed with exit code 2

Im running Ubuntu and im compiling this on a domU kernel. The compilation
works fine when it is unmodified. Is there anyway I can skip the sunrpc
directory or is this a necessary part of the libc. I do not need to test
this new libc for anything to do with rpc.


Thanks in advance,
Sharath

_________________________________________________________________
Career Aptitude Test. Based on the most scientific MBT Test.
http://ss1.richmedia.in/recurl.asp?pid=64

Reply | Threaded
Open this post in threaded view
|

Re: modified glibc compilation segfault on making sunrpc

Jakub Jelinek
On Tue, Jun 12, 2007 at 01:34:01PM +0530, Sharath George wrote:
> Im running Ubuntu and im compiling this on a domU kernel. The compilation
> works fine when it is unmodified. Is there anyway I can skip the sunrpc
> directory or is this a necessary part of the libc. I do not need to test
> this new libc for anything to do with rpc.

rpcgen is the first program which is executed through the newly built ld.so
using new libc.so.  Therefore rpcgen failure during a glibc build means
the newly built ld.so is buggy.  You can try to run say elf/ld.so --library-path . /bin/true
as a simpler program.

        Jakub