Opened 4 years ago

Closed 4 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

Description

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 tmp-sage-8.0.rc1-OSX_10.12.5_x86_64.app.dmg
created: /Users/buildslave-sage/slave/binary_pkg/build/staging/OSX_mac_app/SageMath/src/mac-app/tmp-sage-8.0.rc1-OSX_10.12.5_x86_64.app.dmg
mkdir -p mnt
hdiutil attach tmp-sage-8.0.rc1-OSX_10.12.5_x86_64.app.dmg -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 SageMath-8.0.rc1.app
arrangeIcons.applescript:107:111: execution error: An error of type -10810 has occurred. (-10810)
make[2]: *** [tmp-sage-8.0.rc1-OSX_10.12.5_x86_64.app.dmg] 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:
ERROR:root:DMG=/Users/buildslave-sage/slave/binary_pkg/build/dist/sage-8.0.rc1-OSX_10.12.5-x86_64.app.dmg
rm -f $DMG
pwd
(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/runpy.py", line 170, in _run_module_as_main
    "__main__", mod_spec)
  File "/Users/buildslave-sage/slave/binary_pkg/build/tools/binary-pkg/lib/python3.4/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/Users/buildslave-sage/slave/binary_pkg/build/binary_pkg/cmdline.py", line 78, in <module>
    launch()
  File "/Users/buildslave-sage/slave/binary_pkg/build/binary_pkg/cmdline.py", line 74, in launch
    package.dist_script.run()
  File "/Users/buildslave-sage/slave/binary_pkg/build/binary_pkg/bash_script.py", 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/subprocess.py", line 561, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['bash', '/Users/buildslave-sage/slave/binary_pkg/build/tmp/SageMath/tmpeawae8g9.sh']' 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 4 years ago by vbraun

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

comment:2 Changed 4 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 4 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 4 years ago by mgoerner

Agreed. Will do after New Year.

comment:5 Changed 4 years ago by mgoerner

  • Branch set to u/mgoerner/mac_app_fails_to_build

comment:6 Changed 4 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 4 years ago by mgoerner

  • Status changed from new to needs_review

comment:8 Changed 4 years ago by vbraun

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

thanks!

comment:9 Changed 4 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.