cmd/go: dylib built as buildmode=c-shared causes 'overlapping segments' after codesign by Xcode on OS X #12700
Comments
/cc @crawshaw |
Does anyone know any more about what is going wrong here? |
just a guess, the -o dy.dylib looks suspicious, as I expect a .so as output. http://stackoverflow.com/questions/2339679/what-are-the-differences-between-so-and-dylib-on-osx
|
Sooooo this is a huge |
@qix, the shared library build modes are a "still being implemented" feature (especially on OSX) -- only some of the new buildmodes that Ian defined in the spec are implemented, and support across platforms is still quite limited. You can help by playing with the feature and reporting rough edges in your specific cases. |
@glycerine such as on linux, writing to a |
Is this still an issue? Using go 1.6.1 under 10.11.4, I'm able to produce a
|
This doesn't seem to work under Go 1.8 on OS X 10.12 Sierra. |
Save test code as
dy.go
Build
Use it in an Xcode app project
Add

dy.dylib
to an Xcode app project for linking and setup the project inTARGETS > [targetname] > Build Phases
Notice that the option
Code Sign on Copy
is selected, otherwise the whole bundle cannot pass code sign. In the screenshot, the text forRun Script
isBuild the Xcode project successfully and run it
Here is the error,
The text was updated successfully, but these errors were encountered: