[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#179781: __fixunsdfdi should be provided by libgcc_s.so.1



At Sun, 9 Feb 2003 14:45:18 +0100,
Guido Guenther wrote:
> if I understand this correctly the missing symbol is provided by
> libgcc_s.so.1, not by glibc: 
> nm -D --defined-only /lib/libgcc_s.so.1 | grep __fixunsdfdi
> 000017c0 T __fixunsdfdi
> Glibc only provides these symbols versioned as @GLIBC_2_0 on some
> architectures for backward compatibility. The program works without
> problems when one uses:
>  LD_PRELOAD=/lib/libgcc_s.so.1 dcgui 
> so I think something went wrong when linking this program. IMHO there's
> nothing glibc can do about it.

Good analysis.  I also think it's gcc problem.


BTW, I compiled dcgui on my latest sid i386 machine.  From my built
dcgui works fine.  I found:

	wurlitzer:~/bugs/179781/dcgui-0.70> objdump -x debian/dcgui/usr/bin/dcgui | grep __fixunsdfdi
	wurlitzer:~/bugs/179781/dcgui-0.70> objdump -x src/dc_gui2 | grep __fixunsdfdi
	08095ce0 l     F .text  000000b2              .hidden __fixunsdfdi

dc_gui2 has hidden attribute __fixunsdfdi, and dcgui binary has no
such entry.  dcgui is stripped from dc_gui2.  I guess it's toolchain
problem, not glibc.  My build of dcgui works fine with:

	LD_PRELOAD=/lib/libgcc_s.so.1 dcgui

Moreover, we can see this problem with glib2.0:

	wurlitzer:/usr/lib> objdump -x libgobject-2.0.a | grep __fixunsdfdi
	00000000         *UND*  00000000 __fixunsdfdi
	000007a4 R_386_PC32        __fixunsdfdi

TAGOH Akira (glib2.0 maintainer) said this problem is also existed in
RedHat beta gnome.
This problem is caused by gvaluetransform.o:

	wurlitzer:~/bugs/179781/glib2.0-2.2.1/build-tree/glib-2.2.1/gobject> objdump -x gvaluetransform.lo | grep __fixunsdfdi
	00000000         *UND*  00000000 __fixunsdfdi
	000007e1 R_386_PLT32       __fixunsdfdi
	wurlitzer:~/bugs/179781/glib2.0-2.2.1/build-tree/glib-2.2.1/gobject> objdump -x gvaluetransform.o | grep __fixunsdfdi
	00000000         *UND*  00000000 __fixunsdfdi
	000007a4 R_386_PC32        __fixunsdfdi

And gvaluetransform.o is compiled:

	/bin/sh ../libtool --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I.. -DG_LOG_DOMAIN=\"GLib-GObject\" -I.. -I../glib -I.. -DG_DISABLE_CAST_CHECKS -DG_DISABLE_DEPRECATED -DGOBJECT_COMPILATION -DG_DISABLE_CONST_RETURNS  -pthread  -g -O2 -Wall -c gvaluetransform.c
	rm -f .libs/gvaluetransform.lo
	gcc -DHAVE_CONFIG_H -I. -I. -I.. -DG_LOG_DOMAIN=\"GLib-GObject\" -I.. -I../glib -I.. -DG_DISABLE_CAST_CHECKS -DG_DISABLE_DEPRECATED -DGOBJECT_COMPILATION -DG_DISABLE_CONST_RETURNS -pthread -g -O2 -Wall -c gvaluetransform.c  -fPIC -DPIC -o .libs/gvaluetransform.lo
	gcc -DHAVE_CONFIG_H -I. -I. -I.. -DG_LOG_DOMAIN=\"GLib-GObject\" -I.. -I../glib -I.. -DG_DISABLE_CAST_CHECKS -DG_DISABLE_DEPRECATED -DGOBJECT_COMPILATION -DG_DISABLE_CONST_RETURNS -pthread -g -O2 -Wall -c gvaluetransform.c -o gvaluetransform.o >/dev/null 2>&1
	mv -f .libs/gvaluetransform.lo gvaluetransform.lo

Hmm, so I change gvaluetransform.c as:

	wurlitzer:~/bugs/179781/glib2.0-2.2.1/build-tree/glib-2.2.1/gobject> diff -e gvaluetransform.c.org gvaluetransform.c
	137,441d
	133c
	//DEFINE_CAST (double_uint64,     v_double, guint64, v_uint64);
	.

	wurlitzer:~/bugs/179781/glib2.0-2.2.1/build-tree/glib-2.2.1/gobject> objdump -x gvaluetransform.o | grep __fixunsdfdi
	wurlitzer:~/bugs/179781/glib2.0-2.2.1/build-tree/glib-2.2.1/gobject>
	
This __fixunsdfdi is vanished!  I also changed it as:

	DEFINE_CAST (double_uint64,     v_double, gint64, v_uint64);
						  ^^^^^^
This also fixes the problem.
The conclusion is:

	- dcgui should be rebuilt with the latest sid environment.
	- gobject in glib2.2 still has problem, it's related with this define_cast.

At least it's not glibc problem, but gcc problem.  I will reassign this bug
to gcc, but I would like to know the result of more investigation.
Guido, Tagoh, can you find what is the problem?

Regards,
-- gotom



Reply to: