Opened 9 years ago

Closed 9 years ago

Last modified 8 years ago

#49962 closed defect (worksforme)

MacVim @7.4.snapshot85: build *still* fails

Reported by: MaurizioLoreti Owned by: raimue (Rainer Müller)
Priority: Normal Milestone:
Component: ports Version: 2.3.4
Keywords: elcapitan Cc: hardwhack, jonathan@…
Port: MacVim

Description

While the chmod trick worked on my iMac, fails on a MacBook. Both with OS X 10.11.2 and Xcode 7.2. Black magic?

MLO@mlojoat 2 $ sudo chmod 755 /Applications/Xcode.app/Contents/Developer/Library/PrivateFrameworks/CoreSimulator.framework/Versions/A/XPCServices/com.apple.CoreSimulator.CoreSimulatorService.xpc
MLO@mlojoat 3 $ sudo port -cu upgrade MacVim
--->  Computing dependencies for MacVim
--->  Building MacVim
Error: org.macports.build for port MacVim returned: command execution failed
Please see the log file for port MacVim for details:
    /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_editors_MacVim/MacVim/main.log
Error: Unable to upgrade port: 1
To report a bug, follow the instructions in the guide:
    http://guide.macports.org/#project.tickets

Attachments (1)

main.log (39.2 KB) - added by MaurizioLoreti 9 years ago.

Download all attachments as: .zip

Change History (13)

Changed 9 years ago by MaurizioLoreti

Attachment: main.log added

comment:1 Changed 9 years ago by hardwhack

Cc: pjkim00@… added

Cc Me!

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

Cc: raimue@… removed
Keywords: elcapitan added
Owner: changed from macports-tickets@… to raimue@…

I see "com.apple.CoreSimulator.CoreSimulatorService" errors in your log. If this persists after running "sudo port clean MacVim", please report the problem to Apple.

comment:3 Changed 9 years ago by MaurizioLoreti

Maybe I have understood why the behavior is different between my iMac and m MacBook; their Xcode has been installed in two different ways.

The iMac Xcode.app has been updated to 7.2 through the Apple store; the MacBook not. Because the Apple store most be called for upgrade on every computer, and that means 3-4 hours download per computer for me, I downloaded the Xcode 7.2 dmg package directly from the Apple developer site and I used the same .dmg download for two MacBooks I have - mine and my wife's.

Now I uninstalled Xcode from my MacBook, and started the Apple store download... I'll let you know if something changes. If not, it will be a mystery for me - the same MacPorts, the same OS, the same Xcode and different behavior.

comment:4 Changed 9 years ago by raimue (Rainer Müller)

Probably there is still another path with wrong permissions that would need to be fixed. Which one is can only be guessed without deeper analysis (a dtruss trace), or knowledge about these checks that Apple would have.

comment:5 Changed 9 years ago by MaurizioLoreti

Well, it worked :-)

I reinstalled Xcode 7.2, this time from the Apple store. Then I did as usual an xcode-select --install (command line tools were already installed; but, since they were downloaded in a .dmg from the Apple developer site, and not from the Apple store update section, I had to check) and a sudo xcodebuild -license (not really sure if I had to give this command, but who cares); and, last, I chmod'ed the file you know of.

After that, port clean MacVim and port upgrade MacVim succeeded. I don't know what happened.

I could make more tests for you; but this in turn would mean removing and reinstalling Xcode - that I DON'T WANT to do.

Thank you for your kindness, and thank you for maintaining such an useful software as MacVim.

comment:6 Changed 9 years ago by hardwhack

I used the App Store version of Xcode 7.2 and the build failed. I think the relevant parts of my log file are:

:info:build Could not find service "com.apple.CoreSimulator.CoreSimulatorService" in domain for uid: 502
:info:build 2015-12-10 15:58:53.647 xcodebuild[24747:291850] launchctl print returned an error code: 28928
:info:build 2015-12-10 15:58:53.647 xcodebuild[24747:291850] Failed to locate a valid instance of CoreSimulatorService in the bootstrap.  Adding it now.
:info:build Could not find service "com.apple.CoreSimulator.CoreSimulatorService" in domain for uid: 502
:info:build 2015-12-10 15:58:53.673 xcodebuild[24747:291850] launchctl print returned an error code: 28928
:info:build 2015-12-10 15:58:53.673 xcodebuild[24747:291850] *** Assertion failure in -[SimServiceContext reloadServiceIfMovedOrAbortIfWeAreInvalid], /BuildRoot/Library/Caches/com.apple.xbs/Sources/CoreSimulator/CoreSimulator-201.3/CoreSimulator/SimServiceContext.m:451
:info:build ** INTERNAL ERROR: Uncaught exception **
:info:build Exception: Unable to lookup com.apple.CoreSimulator.CoreSimulatorService in the bootstrap.  This can happen if running with a sandbox profile.  When running with a sandbox profile, make sure that com.apple.CoreSimulator.CoreSimulatorService.xpc is owned by root, not group writable, and not world writable.  See <rdar://problem/22142915>.
:info:build Stack:
:info:build   0  0x00007fff882b4aca __exceptionPreprocess (in CoreFoundation)

I tried the chmod, chgrp, chown fixes listed at https://trac.macports.org/wiki/ProblemHotlist#xcode7.2 and then everything worked just fine. Thanks everybody.

comment:7 Changed 9 years ago by jonathan@…

I tried the fixes mentioned in the Problem Hotlist, and I still received the following:

(I'm running XCode 7.2 on 10.10.5)

:info:build xcodebuild -project MacVim/MacVim.xcodeproj CACHE_ROOT=/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_editors_MacVim/MacVim/work/caches
:info:build Build settings from command line:
:info:build     CACHE_ROOT = /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_editors_MacVim/MacVim/work/caches
:info:build
:info:build Assertion failed: (self.serviceContext.connectionType != SimServiceConnectionTypeClient), function -[SimDeviceSet saveToDisk], file /BuildRoot/Library/Caches/com.apple.xbs/Sources/CoreSimulator/CoreSimulator-201.3/CoreSimulator/SimDeviceSet.m, line 313.
:info:build make[1]: *** [macvim] Abort trap: 6
:info:build make[1]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_editors_MacVim/MacVim/work/macvim-snapshot-85/src'
:info:build make: *** [all] Error 2
:info:build make: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_editors_MacVim/MacVim/work/macvim-snapshot-85'
:info:build Command failed:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_editors_MacVim/MacVim/work/macvim-snapshot-85" && /usr/bin/make -j8 -w all XCODEFLAGS="CACHE_ROOT=/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_editors_MacVim/MacVim/work/caches" PYTHON=/opt/local/bin/python2.7
:info:build Exit code: 2
:error:build org.macports.build for port MacVim returned: command execution failed
:debug:build Error code: CHILDSTATUS 34013 2
:debug:build Backtrace: command execution failed
    while executing
"system -nice 0 $fullcmdstring"
    ("eval" body line 1)
    invoked from within
"eval system $notty $nice \$fullcmdstring"
    invoked from within
"command_exec build"
    (procedure "portbuild::build_main" line 8)
    invoked from within
"portbuild::build_main org.macports.build"
    ("eval" body line 1)
    invoked from within
"eval $procedure $targetname"
:info:build Warning: targets not executed for MacVim: org.macports.install org.macports.build org.macports.destroot
:notice:build Please see the log file for port MacVim for details:
    /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_editors_MacVim/MacVim/main.log

comment:8 Changed 9 years ago by jonathan@…

Cc: jonathan@… added

Cc Me!

comment:9 in reply to:  7 ; Changed 9 years ago by raimue (Rainer Müller)

This is still a problem in xcodebuild, but it looks different. This error message looks similar to #49101. Please check the solutions suggested there.

comment:10 in reply to:  9 Changed 9 years ago by jonathan@…

Replying to raimue@…:

This is still a problem in xcodebuild, but it looks different. This error message looks similar to #49101. Please check the solutions suggested there.

The solution there solved my problem. Thanks!

comment:11 Changed 9 years ago by raimue (Rainer Müller)

Resolution: worksforme
Status: newclosed

The main issue in this ticket was about the Xcode 7.2 permission problem. Since the workaround is now documented, closing as worksforme as it wasn't a bug in MacVim itself.

comment:12 Changed 8 years ago by soulne4ny (Alexey Luchko)

I've followed #49101 recommendation and it worked. All that was required for me:

% ls ~macports
ls: /opt/local/var/macports/home: No such file or directory

% sudo mkdir -p /opt/local/var/macports/home
% sudo chown macports:macports /opt/local/var/macports/home
Note: See TracTickets for help on using tickets.