lunixbochs / usercorn

dynamic binary analysis via platform emulation

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

dsymutil failed

jief666 opened this issue · comments

Hi,
I got this when I try to compile.

/usr/local/Cellar/go/1.9/libexec/pkg/tool/darwin_amd64/link: /usr/local/Cellar/go/1.9/libexec/pkg/tool/darwin_amd64/link: running dsymutil failed: signal: abort trap
error: invalid abbreviation code [110] for DIE at 0x0013694e in '/var/folders/m2/gg5jd9917hz2h5twr9rbw0sr0000gn/T/go-link-235546615/go.o'
Assertion failed: (ref_addr_die != NULL), function AppendDependants, file /SourceCache/dwarf_utilities/dwarf_utilities-121/source/DWARFDebugInfoEntry.cpp, line 375.

Any clue on what's going on ? A Go problem ?

Mac Pro with Yosemite up to date.

Mac Pro with Yosemite up to date.

I was trying things and I got it compiled by putting the gnu version of a bunch of utilities in front ou my path.
So some scripts are probably using a gnu extension of a command line tool. "Sed" Osx version is a usual troublemaker. Would be nice to the problem. May do that sometime...

It compiled perfectly with my PATH modified. Probably no need for binary.

May I ask something unrelated. It's not an issue but I didn't find anywhere in github for questions. I want to call one function from a library compiled for ARM/Thumb/Neon, from an os x software. The goal is to definitively integrate this call, it's not for debugging. Could you pointed in the direction on how I could do that ? Is there any example ? Where to look in your source on how to load a library, setup things and call the symbol ?

Thanks.

Ok, I've spotted it. I was wrong about the fact it could be a command line tool like sed.
The problem came from the fact that in my command line tools (they were from xcode 6.3), the dsymutil is the classic one. In newer version of command line tools, dsymutil is a symlink to llvm-dsymutil. In the PATH I've put, there was plenty of gnu tools (make, cmake, sed etc.), but also, but mistake, a newer version of dsymutil.
Not a usercorn problem, for sure. Sorry for the issue.
How I fix, for information :
install manually the package Command_Line_Tools_OS_X_10.10_for_Xcode_7.2_dec_2015
sudo xcode-select --switch /
You'll get plenty of warning like "was built for newer OSX version (10.11) than being linked (10.10)". It's just a warning, but to get rid of it, copy usr/bin/ld from command line tools 6 to /Library/Developer/CommandLineTools/usr/bin/ld.

Don't I need to load the library and call the initializers ? Do you know any project that did something similar ?

It really depends on the code you're trying to run.