Bug 32127

Summary: shared-mime-info-0.90 fails to build
Product: shared-mime-info Reporter: Nikos Chantziaras <realnc>
Component: generalAssignee: Shared Mime Info group <shared_mime_info>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: medium CC: brant, devurandom
Version: unspecified   
Hardware: Other   
OS: Linux (All)   
URL: http://bugs.gentoo.org/show_bug.cgi?id=347870
Whiteboard:
i915 platform: i915 features:
Attachments: Fix parallel make bug in Makefile.am

Description Nikos Chantziaras 2010-12-06 02:05:18 UTC
(This is on Gentoo Linux AMD64, with GCC 4.5.1, vanilla shared-mime-info-0.90.tar.bz2 downloaded from http://freedesktop.org/wiki/Software/shared-mime-info without any patches applied.)

Trying to build shared-mime-info-0.90:

./configure
make -j2

results in:

gcc -I/usr/include/libxml2 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include   -g -O2 -Wall -Wstrict-prototypes -Wmissing-prototypes -Wwrite-strings   -o update-mime-database update_mime_database-update-mime-database.o -lxml2 -lglib-2.0
/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.1/../../../../x86_64-pc-linux-gnu/bin/ld: can not read symbols: File truncated
/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.1/../../../../x86_64-pc-linux-gnu/bin/ld: BFD (GNU Binutils) 2.20.1.20100303 internal error, aborting at /var/tmp/portage/sys-devel/binutils-2.20.1-r1/work/binutils-2.20.1/bfd/merge.c line 872 in _bfd_merged_section_offset

/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.1/../../../../x86_64-pc-linux-gnu/bin/ld: Please report this bug.

collect2: ld returned 1 exit status
Comment 1 Pino Toscano 2010-12-06 02:11:50 UTC
This is a bug in your binutils, it seems.
Please report the problem to Gentoo.
Comment 2 Samuli Suominen 2010-12-06 02:20:55 UTC
I don't think so, it fails randomly with different -j flags, for me -j2 doesn't print anything about binutils, but this:

$ make -j2
gcc -DHAVE_CONFIG_H -I. -I/usr/include/libxml2 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include     -I/usr/include/libxml2 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include   -g -O2 -Wall -Wstrict-prototypes -Wmissing-prototypes -Wwrite-strings -MT update_mime_database-update-mime-database.o -MD -MP -MF .deps/update_mime_database-update-mime-database.Tpo -c -o update_mime_database-update-mime-database.o `test -f 'update-mime-database.c' || echo './'`update-mime-database.c
Making check in .
make[1]: Entering directory `/tmp/shared-mime-info-0.90'
gcc -DHAVE_CONFIG_H -I. -I/usr/include/libxml2 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include     -I/usr/include/libxml2 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include   -g -O2 -Wall -Wstrict-prototypes -Wmissing-prototypes -Wwrite-strings -MT update_mime_database-update-mime-database.o -MD -MP -MF .deps/update_mime_database-update-mime-database.Tpo -c -o update_mime_database-update-mime-database.o `test -f 'update-mime-database.c' || echo './'`update-mime-database.c
update-mime-database.c: In function ‘main’:
update-mime-database.c:3579:9: warning: ignoring return value of ‘fwrite’, declared with attribute warn_unused_result
update-mime-database.c:3679:9: warning: ignoring return value of ‘fwrite’, declared with attribute warn_unused_result
update-mime-database.c: In function ‘main’:
update-mime-database.c:3579:9: warning: ignoring return value of ‘fwrite’, declared with attribute warn_unused_result
update-mime-database.c:3679:9: warning: ignoring return value of ‘fwrite’, declared with attribute warn_unused_result
update-mime-database.c: In function ‘write_magic_children’:
update-mime-database.c:1786:9: warning: ignoring return value of ‘fwrite’, declared with attribute warn_unused_result
update-mime-database.c:1790:10: warning: ignoring return value of ‘fwrite’, declared with attribute warn_unused_result
update-mime-database.c: In function ‘write16’:
update-mime-database.c:1012:8: warning: ignoring return value of ‘fwrite’, declared with attribute warn_unused_result
update-mime-database.c: In function ‘write_namespaces’:
update-mime-database.c:1946:9: warning: ignoring return value of ‘fwrite’, declared with attribute warn_unused_result
update-mime-database.c: In function ‘write_magic_children’:
update-mime-database.c:1786:9: warning: ignoring return value of ‘fwrite’, declared with attribute warn_unused_resultupdate-mime-database.c: In function ‘write_subclass’:

update-mime-database.c:1790:10: warning: ignoring return value of ‘fwrite’, declared with attribute warn_unused_resultupdate-mime-database.c:1964:9: warning: ignoring return value of ‘fwrite’, declared with attribute warn_unused_result

update-mime-database.c: In function ‘write_aliases’:
update-mime-database.c:2005:9: warning: ignoring return value of ‘fwrite’, declared with attribute warn_unused_result
update-mime-database.c: In function ‘write16’:
update-mime-database.c:1012:8: warning: ignoring return value of ‘fwrite’, declared with attribute warn_unused_result
update-mime-database.c: In function ‘write_types’:update-mime-database.c: In function ‘write_namespaces’:

update-mime-database.c:2036:9: warning: ignoring return value of ‘fwrite’, declared with attribute warn_unused_resultupdate-mime-database.c:1946:9: warning: ignoring return value of ‘fwrite’, declared with attribute warn_unused_result

update-mime-database.c: In function ‘write_one_icon’:
update-mime-database.c:2053:8: warning: ignoring return value of ‘fwrite’, declared with attribute warn_unused_result
update-mime-database.c: In function ‘write_subclass’:
update-mime-database.c:1964:9: warning: ignoring return value of ‘fwrite’, declared with attribute warn_unused_result
update-mime-database.c: In function ‘write_aliases’:
update-mime-database.c:2005:9: warning: ignoring return value of ‘fwrite’, declared with attribute warn_unused_result
update-mime-database.c: In function ‘write_types’:
update-mime-database.c:2036:9: warning: ignoring return value of ‘fwrite’, declared with attribute warn_unused_result
update-mime-database.c: In function ‘write_one_icon’:
update-mime-database.c:2053:8: warning: ignoring return value of ‘fwrite’, declared with attribute warn_unused_result
mv -f .deps/update_mime_database-update-mime-database.Tpo .deps/update_mime_database-update-mime-database.Po
gcc -DHAVE_CONFIG_H -I. -I/usr/include/libxml2 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include     -I/usr/include/libxml2 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include   -g -O2 -Wall -Wstrict-prototypes -Wmissing-prototypes -Wwrite-strings -MT test_subclassing-test-subclassing.o -MD -MP -MF .deps/test_subclassing-test-subclassing.Tpo -c -o test_subclassing-test-subclassing.o `test -f 'test-subclassing.c' || echo './'`test-subclassing.c
mv -f .deps/update_mime_database-update-mime-database.Tpo .deps/update_mime_database-update-mime-database.Po
mv: cannot stat `.deps/update_mime_database-update-mime-database.Tpo': No such file or directory
make[1]: *** [update_mime_database-update-mime-database.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make -C po shared-mime-info.pot
make[1]: Entering directory `/tmp/shared-mime-info-0.90/po'
make[1]: `shared-mime-info.pot' is up to date.
make[1]: Leaving directory `/tmp/shared-mime-info-0.90/po'
gcc -I/usr/include/libxml2 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include   -g -O2 -Wall -Wstrict-prototypes -Wmissing-prototypes -Wwrite-strings   -o update-mime-database update_mime_database-update-mime-database.o -lxml2 -lglib-2.0   
mv -f .deps/test_subclassing-test-subclassing.Tpo .deps/test_subclassing-test-subclassing.Po
make[1]: Leaving directory `/tmp/shared-mime-info-0.90'
make: *** [check-recursive] Error 1
make: *** Waiting for unfinished jobs....
Comment 3 Samuli Suominen 2010-12-06 03:37:34 UTC
Created attachment 40820 [details] [review]
Fix parallel make bug in Makefile.am

Patch to fix the issue
Comment 4 Bastien Nocera 2010-12-06 11:47:35 UTC
commit 68e31f61f5e50e5222bc05437d1123e932922796
Author: Samuli Suominen <ssuominen@gentoo.org>
Date:   Mon Dec 6 19:46:57 2010 +0000

    Fix parallel build
    
    https://bugs.freedesktop.org/show_bug.cgi?id=32127

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.