Ticket #4173 (new defect)

Opened 3 days ago

[patch] libtool copies objects for unification which slows down build

Reported by: psprint Owned by:
Priority: major Milestone: Future Releases
Component: mc-core Version: master
Keywords: Cc:
Blocked By: Blocking:
Branch state: no branch Votes for changeset:

Description

Hi,
I've had enough straying at the make message:

copying selected object files to avoid basename conflicts...

and I've decided to fix it – i.e.: to make the names of objects unique – patch is attached. It renames things such as lib/util.c and src/util.c so that their basename is unique (lib/sub-util.c in this case, for subroutine library…).

However, this is not enough to make the message (and the pause) go away. I've added following snippet into mc/libtool at line 11122 to get the names of the objects that still conflict:

            for obj in $oldobjs
	    do
	      func_basename "$obj"
	      $ECHO "$func_basename_result"
	    done | sort | sort >/tmp/libtool-info.txt 2>&1

and it turned out that there are plenty of such files. It looks like if some internal static library has been linked twice. I cannot go further than this point. Could anyone help?

I've tried removing libmc.la from:

– src/diffviewer/Makefile.am,
– src/filemanager/Makefile.am,
– src/viewer/Makefile.am,

the only places where it is (excessively, apparently) added to the linked libs but the effect is the same and the libtool-info.txt list doesn't change. Funny, isn't it?

Also, it looks like the main libmc.la reference is also not needed somehow, because changing:

mc_LDADD = \
	libinternal.la \
	$(top_builddir)/lib/libmc.la

to:

mc_LDADD = \
	libinternal.la

doesn't result in any build or runtime error. Funny again, isn't it?

From where do the duplicates come from? Has anyone some idea?

Attachments

0001-Resolve-file-name-base-conflicts-to-avoid-libtool-co.patch (70.5 KB) - added by psprint 3 days ago.
a patch that makes all conflicting source files unique
libtool-info.txt (3.5 KB) - added by psprint 3 days ago.
libtool trace on the list of objects that ·should· be unique

Change History

Changed 3 days ago by psprint

a patch that makes all conflicting source files unique

Changed 3 days ago by psprint

libtool trace on the list of objects that ·should· be unique

Note: See TracTickets for help on using tickets.