Opened 5 years ago

Closed 5 years ago

#23426 closed defect (fixed)

Mac app fails to build

Reported by: vbraun Owned by: mgoerner
Priority: blocker Milestone: sage-8.1
Component: build Keywords:
Cc: Merged in:
Authors: Matthias Goerner Reviewers: Volker Braun
Report Upstream: N/A Work issues:
Branch: 4459c37 (Commits, GitHub, GitLab) Commit: 4459c37cdb8b235d89b23e6e062829ca818a9a4a
Dependencies: Stopgaps:

Status badges


Applescript errors out on the buildbot:

m -f sage-8.0.rc1-OSX_10.12.5_x86_64/Applications
ln -s /Applications/ sage-8.0.rc1-OSX_10.12.5_x86_64/Applications
hdiutil create -srcfolder sage-8.0.rc1-OSX_10.12.5_x86_64 -volname sage-8.0.rc1-OSX_10.12.5_x86_64 -format UDRW
created: /Users/buildslave-sage/slave/binary_pkg/build/staging/OSX_mac_app/SageMath/src/mac-app/
mkdir -p mnt
hdiutil attach -mountpoint mnt
/dev/disk1          	GUID_partition_scheme          	
/dev/disk1s1        	EFI                            	
/dev/disk1s2        	Apple_HFS                      	/Users/buildslave-sage/slave/binary_pkg/build/staging/OSX_mac_app/SageMath/src/mac-app/mnt
osascript arrangeIcons.applescript mnt
arrangeIcons.applescript:107:111: execution error: An error of type -10810 has occurred. (-10810)
make[2]: *** [] Error 1
make[2]: Target `default' not remade because of errors.
cp: SageMath/src/mac-app/sage-8.0.rc1-*.app.dmg: No such file or directory
ERROR:root:Script failed:
rm -f $DMG
(cd SageMath/src/mac-app && make)
cp SageMath/src/mac-app/sage-8.0.rc1-*.app.dmg $DMG
Traceback (most recent call last):
  File "/Users/buildslave-sage/slave/binary_pkg/build/tools/binary-pkg/lib/python3.4/", line 170, in _run_module_as_main
    "__main__", mod_spec)
  File "/Users/buildslave-sage/slave/binary_pkg/build/tools/binary-pkg/lib/python3.4/", line 85, in _run_code
    exec(code, run_globals)
  File "/Users/buildslave-sage/slave/binary_pkg/build/binary_pkg/", line 78, in <module>
  File "/Users/buildslave-sage/slave/binary_pkg/build/binary_pkg/", line 74, in launch
  File "/Users/buildslave-sage/slave/binary_pkg/build/binary_pkg/", line 37, in run
    ['bash', self._filename], cwd=self._cwd, env=self.env())
  File "/Users/buildslave-sage/slave/binary_pkg/build/tools/binary-pkg/lib/python3.4/", line 561, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['bash', '/Users/buildslave-sage/slave/binary_pkg/build/tmp/SageMath/']' returned non-zero exit status 1
Namespace(build=False, checkout=False, config='sage.yaml', debug=False, dist=True, info=False, log=None, option_help=False, package='OSX mac app', stage=False)
make[1]: *** [dist-sage] Error 1
make: *** [bdist-sage-osx] Error 2

Change History (9)

comment:1 Changed 5 years ago by vbraun

Works while logged in on the GUI, but not when headless

comment:2 Changed 5 years ago by mgoerner

To summarize the history of this bug, there are two methods to generate the .DS_store file and get the nice background image (see Ticket #20119).

  1. Use al45tair's ds_store to generate from python. I wrote code for that in sage in src/mac-app/tools/createDSStore but then removed it in db0460e0 to favor
  2. Use AppleScript? which I did in 8e10f56 to address Ticket #22739.

Method 1. has the advantage that it is headless and faster (doesn't require an intermediate packing und unpacking a .dmg). It has the disadvantage that it doesn't work on the first release of Mac OS Sierra.

The news: It appears that Apple has fixed the bug in Finder and method 1. should work again. It can even be made to work with the one broken release of Mac OS Sierra, see al45tair's comment on bitbucket.

If we need headless, we can simply try to reinstantiate the code I deleted in db0460e0 and revert 8e10f56.

comment:3 Changed 5 years ago by vbraun

There is no need to support the first release of Sierra. Please go back to solution number 1...

comment:4 Changed 5 years ago by mgoerner

Agreed. Will do after New Year.

comment:5 Changed 5 years ago by mgoerner

  • Branch set to u/mgoerner/mac_app_fails_to_build

comment:6 Changed 5 years ago by mgoerner

  • Commit set to 4459c37cdb8b235d89b23e6e062829ca818a9a4a
  • Owner changed from (none) to mgoerner

New commits:

6c0daf8Moving arrangeIcons.applescript (used when building the .dmg for Mac OS).
9d47f2eMakefile for Mac OS .dmg: marking non_app_files as .PHONY.
4459c37When building the Mac .dmg, re-enabling createDSStore (first introduced in ticket 20119 and then removed in ticket 22739) to set the background image.

comment:7 Changed 5 years ago by mgoerner

  • Status changed from new to needs_review

comment:8 Changed 5 years ago by vbraun

  • Authors set to Matthias Goerner
  • Reviewers set to Volker Braun
  • Status changed from needs_review to positive_review


comment:9 Changed 5 years ago by vbraun

  • Branch changed from u/mgoerner/mac_app_fails_to_build to 4459c37cdb8b235d89b23e6e062829ca818a9a4a
  • Resolution set to fixed
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.