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

Bug#178661: mklibs: Confuses libm and libmd5



Package: mklibs
Version: 0.1.8
Severity: important
Tags: patch

      calling gcc -nostdlib -nostartfiles -shared -Wl,-soname=libm.so.6 -ufesetround -o lib//libm.so.6-so  /home/anthony/cvs/cvs.derobert.net/Soekris/src/libmd5/lib/libmd5_pic.a   -Wl,--version-script=/usr/lib/libm_pic.map -lgcc -L lib/ -L/home/anthony/cvs/cvs.derobert.net/Soekris/src/Anthony/SpecialCGILib/lib -L/home/anthony/cvs/cvs.derobert.net/Soekris/src/libmd5/lib -L/usr/lib/gcc-lib/i386-linux/3.0.4/ -L/lib/ -L/usr/lib/ -L/usr/X11R6/lib/ -lc

Notice:
      calling gcc [...]	\
	  -o lib//libm.so.6-so \
	  /home/anthony/cvs/cvs.derobert.net/Soekris/src/libmd5/lib/libmd5_pic.a [...]

mklibs seems to confuse libm and libmd5! Oddly enough, this is only
happening on my woody system; maybe because libm is never requested on
sarge due to a _pic.a file for libstdc++.

I think the reason is:
	def find_pic(lib):
		base_name = so_pattern.match(lib).group(1)
		for path in lib_path:
			for file in glob.glob(path + "/" + base_name + "*_pic.a"):
			                                                ^
															|
														evil splat!

Indeed, removing that splat fixes it on my woody system. Checking the
names of all the _pic.a files on both my woody and sarge systems shows:

WOODY:
	anthony@whosthere:anthony$ locate _pic.a
	/home/anthony/cvs/cvs.derobert.net/Soekris/src/libmd5/lib/libmd5_pic.a
	/usr/lib/libc_pic.a
	/usr/lib/libm_pic.a
	/usr/lib/libresolv_pic.a

SARGE:
	/usr/i386-linux-uclibc/lib/libcrypt_pic.a
	/usr/i386-linux-uclibc/lib/libc_pic.a
	/usr/i386-linux-uclibc/lib/libdl_pic.a
	/usr/i386-linux-uclibc/lib/libm_pic.a
	/usr/i386-linux-uclibc/lib/libpthread_pic.a
	/usr/i386-linux-uclibc/lib/libresolv_pic.a
	/usr/i386-linux-uclibc/lib/libutil_pic.a
	/usr/lib/gcc-lib/i386-linux/3.2.1/libstdc++_pic.a
	/usr/lib/libc_pic.a
	/usr/lib/libm_pic.a
	/usr/lib/libresolv_pic.a

So, this appears to be a safe patch to apply (not quite tested...):

diff -rdbU3 mklibs-0.1.8/mklibs.py mklibs-0.1.8asd1/mklibs.py
--- mklibs-0.1.8/mklibs.py	Mon Oct 28 13:23:21 2002
+++ mklibs-0.1.8asd1/mklibs.py	Mon Jan 27 16:31:48 2003
@@ -174,7 +174,7 @@
 def find_pic(lib):
     base_name = so_pattern.match(lib).group(1)
     for path in lib_path:
-        for file in glob.glob(path + "/" + base_name + "*_pic.a"):
+        for file in glob.glob(path + "/" + base_name + "_pic.a"):
             if os.access(file, os.F_OK):
                 return resolve_link(file)
     return ""
@@ -183,7 +183,7 @@
 def find_pic_map(lib):
     base_name = so_pattern.match(lib).group(1)
     for path in lib_path:
-        for file in glob.glob(path + "/" + base_name + "*_pic.map"):
+        for file in glob.glob(path + "/" + base_name + "_pic.map"):
             if os.access(file, os.F_OK):
                 return resolve_link(file)
     return ""

-- System Information
Debian Release: 3.0
Architecture: i386
Kernel: Linux whosthere 2.4.18-whosthere #1 Mon Dec 16 16:19:07 EST 2002 i686
Locale: LANG=C, LC_CTYPE=

Versions of packages mklibs depends on:
ii  binutils               2.12.90.0.1-4     The GNU assembler, linker and bina
ii  gcc [c-compiler]       2:2.95.4-14       The GNU C compiler.
ii  gcc-2.95 [c-compiler]  1:2.95.4-11woody1 The GNU C compiler.
ii  gcc-3.0 [c-compiler]   1:3.0.4-7         The GNU C compiler.
ii  libc6-pic              2.2.5-11.2        GNU C Library: PIC archive library
ii  python                 2.1.3-3.2         An interactive object-oriented scr




Reply to: