Skip to content

Segfault on LLVM setup due to inconsistent clang and dsymutil for darwin x86_64 #1386

@igormcoelho

Description

@igormcoelho

Sorry if this is the wrong place to comment, it's my first julia C++ package and it builds fine for all architectures except for x86_64-apple-darwin

The error is a strange segfault after compiling my library with the following command:

c++ --std=c++20 -I./include -Wall -pedantic -O3 --shared ./MyLibrary.cpp -o build/mylibrary_lib.so -fPIC

/opt/bin/x86_64-apple-darwin14-libgfortran5-cxx11/x86_64-apple-darwin14-dsymutil: line 5:    59 Segmentation fault      (core dumped) "$@"
clang++: error: dsymutil command failed with exit code 139 (use -v to see invocation)

This is the WORKSPACE:

# uname -a
Darwin pc 14.5.0 Darwin Kernel Version 14.5.0: Wed Feb 13 00:49:00 UTC 2013; root:xnu-9000/RELEASE_X86_64 x86_64

I checked clang version from WORKSPACE and it is 18.1.7:

# clang --version
clang version 18.1.7 (/home/tim/.cache/BinaryBuilder/downloads/clones/llvm-project.git-1df819a03ecf6890e3787b27bfd4f160aeeeeacd50a98d003be8b0893f11a9be 768118d1ad38bf13c545828f67bd6b474d61fc55)
Target: x86_64-apple-darwin14
Thread model: posix
InstalledDir: /opt/x86_64-linux-musl/bin

I checked dsymutil and it seems old...

# dsymutil --version
LLVM (http://llvm.org/):
  LLVM version 8.0.0svn
  Optimized build.
  Default target: x86_64-apple-darwin6.8.0-60-generic
  Host CPU: znver1

I don't know how these things are installed together, but maybe somehow this dsymutil version could be upgraded?

My solution is to remove -g from my compilation line only for x86_64 Darwin, since it works fine on the others and it helps to have debugging symbols on the library.

Thanks a lot!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions