Opened 6 years ago

Closed 6 years ago

#41008 closed defect (fixed)

textmate2: build fails on Mavericks, "code object is not signed at all"

Reported by: lpsinger (Leo Singer) Owned by: neverpanic (Clemens Lang)
Priority: Normal Milestone:
Component: ports Version: 2.2.0
Keywords: haspatch Cc: ryandesign (Ryan Schmidt), macports@…
Port: textmate2

Description

textmate2 fails to build on Mavericks. The issue seems to be related to changes in code signing on Mavericks. The relevant part of the log (attached) is:

[900/901] cp -p /opt/local/var/macports/build/_Users_lady3jane_ports-local_editors_textmate2/textmate2/work/textmate-2.0-alpha.9487/build/Applications/TextMate/about/Contributions.html /opt/local/var/macports/build/_Users_lady3jane_ports-local_editors_textmate2/textmate2/work/textmate-2.0-alpha.9487/build/Applications/TextMate/TextMate.app/Contents/Resources/Contributions.html
[901/901] codesign -fs "-" /opt/local/var/macports/build/_Users_lady3jane_ports-local_editors_textmate2/textmate2/work/textmate-2.0-alpha.9487/build/Applications/TextMate/TextMate.app && touch /opt/local/var/macports/build/_Users_lady3jane_ports-local_editors_textmate2/textmate2/work/textmate-2.0-alpha.9487/build/Applications/TextMate/TextMate.app.sign
FAILED: codesign -fs "-" /opt/local/var/macports/build/_Users_lady3jane_ports-local_editors_textmate2/textmate2/work/textmate-2.0-alpha.9487/build/Applications/TextMate/TextMate.app && touch /opt/local/var/macports/build/_Users_lady3jane_ports-local_editors_textmate2/textmate2/work/textmate-2.0-alpha.9487/build/Applications/TextMate/TextMate.app.sign
/opt/local/var/macports/build/_Users_lady3jane_ports-local_editors_textmate2/textmate2/work/textmate-2.0-alpha.9487/build/Applications/TextMate/TextMate.app: code object is not signed at all
In subcomponent: /opt/local/var/macports/build/_Users_lady3jane_ports-local_editors_textmate2/textmate2/work/textmate-2.0-alpha.9487/build/Applications/TextMate/TextMate.app/Contents/Frameworks/authorization.dylib
ninja: build stopped: subcommand failed.

This Stack Overflow post might be related:

http://stackoverflow.com/questions/17263967/codesign-of-dropbox-api-fails-in-xcode-4-6-3-code-object-is-not-signed-at-all

and so might this blog post:

http://furbo.org/2013/10/17/code-signing-and-mavericks/

Attachments (1)

patch-textmate2-gen_build.diff (309 bytes) - added by hardwhack 6 years ago.

Download all attachments as: .zip

Change History (13)

comment:1 Changed 6 years ago by ryandesign (Ryan Schmidt)

Cc: ryandesign@… added

Cc Me!

comment:2 Changed 6 years ago by hardwhack

Had the same error message, in addition to others (see Ticket #41060). When I went into the Textmate build directory (/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_editors_textmate2/textmate2/work/textmate-2.0-alpha.9487/build/Applications/TextMate), there is a Textmate.app bundle which is actually functional! I copied it to my /Applications folder and as far as I can tell, it works properly despite the code sign error message. Something still needs to be tweaked, but at least build actually produces a working product.

comment:3 Changed 6 years ago by hardwhack

Found fix to build textmate2 cleanly. Need to change build.ninja file at line 123 from

  command = codesign -fs "$identity" $in && touch $out

to

  command = codesign --deep -fs "$identity" $in && touch $out
Last edited 6 years ago by hardwhack (previous) (diff)

comment:4 Changed 6 years ago by neverpanic (Clemens Lang)

Status: newassigned

Thanks, that might be helpful. I'll try to get to this as soon as my rebuild cycle hits textmate2, but unfortunately I think it will be at least a couple of days until that happens (my box is slow, I have lots of ports installed and we don't have a buildbot yet). If somebody wants to take this upstream or commit this to the textmate2 before I have a chance to do so, feel free.

comment:5 in reply to:  4 ; Changed 6 years ago by hardwhack

Replying to cal@…:

Thanks, that might be helpful. I'll try to get to this as soon as my rebuild cycle hits textmate2, but unfortunately I think it will be at least a couple of days until that happens (my box is slow, I have lots of ports installed and we don't have a buildbot yet). If somebody wants to take this upstream or commit this to the textmate2 before I have a chance to do so, feel free.

Would like to help, but don't have the first clue as to where to start. Can you point me in the right direction?

comment:6 in reply to:  5 ; Changed 6 years ago by lpsinger (Leo Singer)

Replying to pjkim00@…:

Replying to cal@…:

Thanks, that might be helpful. I'll try to get to this as soon as my rebuild cycle hits textmate2, but unfortunately I think it will be at least a couple of days until that happens (my box is slow, I have lots of ports installed and we don't have a buildbot yet). If somebody wants to take this upstream or commit this to the textmate2 before I have a chance to do so, feel free.

Would like to help, but don't have the first clue as to where to start. Can you point me in the right direction?

https://github.com/textmate/textmate

You can also get there from port gohome textmate2.

Last edited 6 years ago by lpsinger (Leo Singer) (previous) (diff)

comment:7 Changed 6 years ago by macports@…

Cc: macports@… added

Cc Me!

comment:8 in reply to:  6 Changed 6 years ago by hardwhack

Replying to aronnax@…:

https://github.com/textmate/textmate

You can also get there from port gohome textmate2.

I cloned the project from github but between trying to build textmate2 in a different directory and trying to grok the ninja build system, I can not figure out how to submit a proper fix. Sorry.

Update. Found a fix. Attached diff file for bin/gen_build.

Last edited 6 years ago by hardwhack (previous) (diff)

Changed 6 years ago by hardwhack

comment:9 Changed 6 years ago by ryandesign (Ryan Schmidt)

comment:10 Changed 6 years ago by ryandesign (Ryan Schmidt)

Keywords: haspatch added

comment:11 in reply to:  9 Changed 6 years ago by hardwhack

Replying to ryandesign@…:

Yup, looks like that's already been changed upstream: https://github.com/textmate/textmate/commit/a9a1c380069006c64eaa7821c337958b9f35537f

Oh well. At least I learned a lot about how the MacPort system works. And if civilization ever needs to be rebuilt, I have a head start on reinventing the wheel.

comment:12 Changed 6 years ago by neverpanic (Clemens Lang)

Resolution: fixed
Status: assignedclosed

This is fixed by updating the textmate2 port to a9495 in r112904. I don't see where we've been re-inventing the wheel here, though.

Sorry for not getting to this earlier, but my box is quite old and I have a huge number of ports installed that needed to be rebuilt after the Mavericks update before getting to this.

Note: See TracTickets for help on using tickets.