https://sourceware.org/bugzilla/show_bug.cgi?id=27297
Bug ID: 27297 Summary: libctf.a malformed, build fails on x86_64-apple-darwin18.7.0 Product: binutils Version: 2.36 Status: NEW Severity: normal Priority: P2 Component: libctf Assignee: unassigned at sourceware dot org Reporter: casner at acm dot org Target Milestone: --- Created attachment 13182 --> https://sourceware.org/bugzilla/attachment.cgi?id=13182&action=edit 2.36 build log I first encountered this problem when trying to build a pdp11-aout cross on x86_64-apple-darwin18.7.0, but the problem is there for the native build as well. I have not tested to see if other hosts are affected (this is all I have). This build is using the macOS system tools (clang, etc.). This problem does NOT occur with 2.35.2. It DOES occur with 2.36 and HEAD. The problem arises here: /bin/sh ./libtool --tag=CC --mode=link gcc -std=gnu99 -Wall -W -Wall -Wno-narrowing -Wwrite-strings -Wmissing-format-attribute -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -pedantic -Wno-long-long -I/Users/casner/src/gnu/binutils-gdb/libctf/../zlib -g -O2 -version-info 0:0:0 -export-symbols-regex ctf_.* -Wl,-no_pie -o libctf.la -rpath /usr/local/lib libctf_la-ctf-archive.lo libctf_la-ctf-dump.lo libctf_la-ctf-create.lo libctf_la-ctf-decl.lo libctf_la-ctf-error.lo libctf_la-ctf-hash.lo libctf_la-ctf-labels.lo libctf_la-ctf-dedup.lo libctf_la-ctf-link.lo libctf_la-ctf-lookup.lo libctf_la-ctf-open.lo libctf_la-ctf-sha1.lo libctf_la-ctf-string.lo libctf_la-ctf-subr.lo libctf_la-ctf-types.lo libctf_la-ctf-util.lo libctf_la-ctf-open-bfd.lo ../bfd/libbfd.la -L/Users/casner/src/gnu/binutils-gdb/native/libctf/../libiberty -liberty ./../intl/libintl.a -liconv -L./../zlib -lz *** Warning: Linking the shared library libctf.la against the *** static library ./../intl/libintl.a is not portable! libtool: link: ar rc .libs/libctf.a ./../intl/libintl.a libctf_la-ctf-archive.o libctf_la-ctf-dump.o libctf_la-ctf-create.o libctf_la-ctf-decl.o libctf_la-ctf-error.o libctf_la-ctf-hash.o libctf_la-ctf-labels.o libctf_la-ctf-dedup.o libctf_la-ctf-link.o libctf_la-ctf-lookup.o libctf_la-ctf-open.o libctf_la-ctf-sha1.o libctf_la-ctf-string.o libctf_la-ctf-subr.o libctf_la-ctf-types.o libctf_la-ctf-util.o libctf_la-ctf-open-bfd.o This causes libctf.a to contain libintl.a as its first component file: auge48> ar -t libctf/.libs/libctf.a __.SYMDEF SORTED libintl.a libctf_la-ctf-archive.o libctf_la-ctf-dump.o libctf_la-ctf-create.o libctf_la-ctf-decl.o libctf_la-ctf-error.o libctf_la-ctf-hash.o libctf_la-ctf-labels.o libctf_la-ctf-dedup.o libctf_la-ctf-link.o libctf_la-ctf-lookup.o libctf_la-ctf-open.o libctf_la-ctf-sha1.o libctf_la-ctf-string.o libctf_la-ctf-subr.o libctf_la-ctf-types.o libctf_la-ctf-util.o libctf_la-ctf-open-bfd.o That causes the link of objdump to fail, ending the build: libtool: link: gcc -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Wshadow -Werror -I/Users/casner/src/gnu/binutils-gdb/binutils/../zlib -g -O2 -Wl,-no_pie -o objdump objdump.o dwarf.o prdbg.o rddbg.o debug.o stabs.o rdcoff.o bucomm.o version.o filemode.o elfcomm.o od-macho.o ../opcodes/.libs/libopcodes.a ../libctf/.libs/libctf.a -L/Users/casner/src/gnu/binutils-gdb/native/zlib -L/Users/casner/src/gnu/binutils-gdb/native/libctf/../libiberty /Users/casner/src/gnu/binutils-gdb/native/bfd/.libs/libbfd.a -liberty ../bfd/.libs/libbfd.a -ldl -lz ../libiberty/libiberty.a ./../intl/libintl.a -liconv ld: warning: ignoring file ../libctf/.libs/libctf.a, building for macOS-x86_64 but attempting to link with file built for macOS-x86_64 Undefined symbols for architecture x86_64: "_ctf_archive_iter", referenced from: _dump_bfd in objdump.o "_ctf_bfdopen_ctfsect", referenced from: _dump_bfd in objdump.o "_ctf_close", referenced from: _dump_bfd in objdump.o "_ctf_dict_close", referenced from: _dump_bfd in objdump.o "_ctf_dict_open", referenced from: _dump_bfd in objdump.o "_ctf_dump", referenced from: _dump_ctf_archive_member in objdump.o "_ctf_errmsg", referenced from: _dump_bfd in objdump.o _dump_ctf_errs in objdump.o _dump_ctf_archive_member in objdump.o "_ctf_errno", referenced from: _dump_ctf_archive_member in objdump.o "_ctf_errwarning_next", referenced from: _dump_ctf_errs in objdump.o "_ctf_import", referenced from: _dump_ctf_archive_member in objdump.o ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation) -- You are receiving this mail because: You are on the CC list for the bug.