Quuxplusone / LLVMBugzillaTest

0 stars 0 forks source link

Crash when linking a G++-6 compiled project #30440

Closed Quuxplusone closed 7 years ago

Quuxplusone commented 7 years ago
Bugzilla Link PR31467
Status RESOLVED INVALID
Importance P normal
Reported by Akim Demaille (akim.demaille@gmail.com)
Reported on 2016-12-25 07:17:05 -0800
Last modified on 2016-12-25 12:44:44 -0800
Version unspecified
Hardware Macintosh MacOS X
CC anton@korobeynikov.info, llvm-bugs@lists.llvm.org
Fixed by commit(s)
Attachments ld-snapshots.tz2 (2658 bytes, application/octet-stream)
Blocks
Blocked by
See also
Created attachment 17781
self-generated snapshots

Hi!

I'm not sure whether this is the appropriate place to report a bug from Apple's
linker:

$ ld -v
@(#)PROGRAM:ld  PROJECT:ld64-274.2
configured to support archs: armv6 armv7 armv7s arm64 i386 x86_64 x86_64h
armv6m armv7k armv7m armv7em (tvOS)
LTO support using: LLVM version 8.0.0, (clang-800.0.42.1)
TAPI support using: Apple TAPI version 1.30

Please, don't shoot if it's the wrong place.

My project uses heavily templates, and Boost.  For a long while, I was not able
to compile it with GCC on macOS because of incompatibility of the
implementation of the C++ library with which Boost.Python was compiled, but
finally, it works!  Well, sort-of: it compiles, but it fails when it links
either of the three monster shared object of my project.

  CXX      lib/ctx/lib_liblal_char_z_la-libctx.lo
  CXXLD    lib/liblal_char_z.la
0  0x1069ec608  __assert_rtn + 144
1  0x1069ffa1b
mach_o::relocatable::Parser<x86_64>::parse(mach_o::relocatable::ParserOptions
const&) + 3195
2  0x1069f7572  mach_o::relocatable::Parser<x86_64>::parse(unsigned char
const*, unsigned long long, char const*, long, ld::File::Ordinal,
mach_o::relocatable::ParserOptions const&) + 342
3  0x106a38a9c  ld::tool::InputFiles::makeFile(Options::FileInfo const&, bool)
+ 824
4  0x106a3b2fb  ld::tool::InputFiles::parseWorkerThread() + 495
5  0x7fffb150baab  _pthread_body + 180
6  0x7fffb150b9f7  _pthread_body + 0
A linker snapshot was created at:
    /tmp/liblal_char_z.0.dylib-2016-11-25-141702.ld-snapshot
ld: Assertion failed: (cfiStartsArray[i] != cfiStartsArray[i-1]), function
parse, file /Library/Caches/com.apple.xbs/Sources/ld64/ld64-
274.2/src/ld/parsers/macho_relocatable_file.cpp, line 1893.
collect2: error: ld returned 1 exit status
Makefile:2412 : la recette pour la cible « lib/liblal_char_z.la » a échouée

I'm attaching these directories.  Please, let me know what else you need.

Cheers!
Quuxplusone commented 7 years ago

Attached ld-snapshots.tz2 (2658 bytes, application/octet-stream): self-generated snapshots

Quuxplusone commented 7 years ago

Please report all the problems with Apple-provided tools to Apple bugtracker. LLVM project is not connected with Apple's ld64.