Opened 8 years ago

Closed 8 years ago

#14521 closed defect (fixed)

Fix Sage.app on OS X 10.4

Reported by: iandrus Owned by: was
Priority: major Milestone: sage-5.10
Component: user interface Keywords: mac app
Cc: kcrisman Merged in: sage-5.10.beta3
Authors: Jeroen Demeyer Reviewers: Michael Welsh, Karl-Dieter Crisman
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Description (last modified by jdemeyer)

Sage.app doesn't build on OS X 10.4 with error

CompileC build/Sage.build/Debug/Sage.build/Objects-normal/ppc/PreferencePanelController.o /Users/buildbot/build/sage/moufang-1/moufang_binary/build/sage-5.9/devel/ext-main/sage/ext/mac-app/PreferencePanelController.m normal ppc objective-c com.apple.compilers.gcc.4_0
   cd /Users/buildbot/build/sage/moufang-1/moufang_binary/build/sage-5.9/devel/ext-main/sage/ext/mac-app
   /usr/bin/gcc-4.0 -x objective-c -arch ppc -pipe -std=gnu99 -Wno-trigraphs -fpascal-strings -fasm-blocks -g -O0 -Wreturn-type -Wunused-variable -fmessage-length=0 -mtune=G5 -fvisibility=hidden -mfix-and-continue -mmacosx-version-min=10.4 -iquote /Users/buildbot/build/sage/moufang-1/moufang_binary/build/sage-5.9/devel/ext-main/sage/ext/mac-app/build/Sage.build/Debug/Sage.build/Sage-generated-files.hmap -I/Users/buildbot/build/sage/moufang-1/moufang_binary/build/sage-5.9/devel/ext-main/sage/ext/mac-app/build/Sage.build/Debug/Sage.build/Sage-own-target-headers.hmap -I/Users/buildbot/build/sage/moufang-1/moufang_binary/build/sage-5.9/devel/ext-main/sage/ext/mac-app/build/Sage.build/Debug/Sage.build/Sage-all-target-headers.hmap -iquote /Users/buildbot/build/sage/moufang-1/moufang_binary/build/sage-5.9/devel/ext-main/sage/ext/mac-app/build/Sage.build/Debug/Sage.build/Sage-project-headers.hmap -F/Users/buildbot/build/sage/moufang-1/moufang_binary/build/sage-5.9/devel/ext-main/sage/ext/mac-app/build/Debug -I/Users/buildbot/build/sage/moufang-1/moufang_binary/build/sage-5.9/devel/ext-main/sage/ext/mac-app/build/Debug/include -I/Users/buildbot/build/sage/moufang-1/moufang_binary/build/sage-5.9/devel/ext-main/sage/ext/mac-app/build/Sage.build/Debug/Sage.build/DerivedSources -isysroot /Developer/SDKs/MacOSX10.4u.sdk -include /Library/Caches/com.apple.Xcode.503/SharedPrecompiledHeaders/Sage_Prefix-fekoqvarwfxuuqgwyquzfcvvikcr/Sage_Prefix.pch -c /Users/buildbot/build/sage/moufang-1/moufang_binary/build/sage-5.9/devel/ext-main/sage/ext/mac-app/PreferencePanelController.m -o /Users/buildbot/build/sage/moufang-1/moufang_binary/build/sage-5.9/devel/ext-main/sage/ext/mac-app/build/Sage.build/Debug/Sage.build/Objects-normal/ppc/PreferencePanelController.o
/Users/buildbot/build/sage/moufang-1/moufang_binary/build/sage-5.9/devel/ext-main/sage/ext/mac-app/PreferencePanelController.m:122: error: parse error before 'NSInteger'
** BUILD FAILED **
Failed to build Sage.app.
If you don't wish to build Sage.app set SAGE_APP_BUNDLE=no

See this thread on sage-devel.

Apply 14521_no_NSInteger.patch to devel/ext.

Attachments (1)

14521_no_NSInteger.patch (761 bytes) - added by jdemeyer 8 years ago.

Download all attachments as: .zip

Change History (15)

Changed 8 years ago by jdemeyer

comment:1 Changed 8 years ago by jdemeyer

  • Authors set to Jeroen Demeyer
  • Description modified (diff)
  • Status changed from new to needs_review

comment:2 Changed 8 years ago by yomcat

  • Reviewers set to Michael Welsh
  • Status changed from needs_review to positive_review

Works fine for me on 10.8.

If someone else can test on 10.5/6, that'll be good, though I can't see anything different happening (the change is more a post/pre-10.5 change inside OS X), hence the positive review.

comment:3 follow-up: Changed 8 years ago by kcrisman

I'm asking the dumb question... did anyone test the actual built Sage.app on these systems, not just building Sage.app? Though I can't imagine this is going to be a problem, but still, without this patch

$ cd mac-app/
$ grep -R NSInteger .
./PreferencePanelController.m:- (void)alertDidEnd:(NSAlert *)alert returnCode:(NSInteger)returnCode contextInfo:(void *)contextInfo {
$ grep -R long .
./AppDelegate.m:// From here down are methods from NSApplicationDelegate, which probably do belong in another file.
./loading-page.html:  <h3>If you think you have waited long enough...</h2>

for what it's worth.

I can try building the app on 10.7 later today. I agree that it probably will not make a difference, though it's still worth trying on a few different ones just to make sure.

comment:4 in reply to: ↑ 3 Changed 8 years ago by jdemeyer

Replying to kcrisman:

I'm asking the dumb question... did anyone test the actual built Sage.app on these systems, not just building Sage.app?

Not a dumb question. On OS X 10.4 PPC, I only tried building the Sage App.

comment:5 follow-up: Changed 8 years ago by kcrisman

I'm having trouble getting things to start on 10.7 with this. The Sage terminal stuff works fine but in the notebook

exceptions.ImportError: No module named openid

Failed to load application: No module named openid

and

sage/devel/sagenb/sagenb/notebook/run_notebook.py", line 608, in notebook_run
    raise socket.error
socket.error

This sounds familiar with the NB upgrade but I don't know why this one change would have made it happen. This is with 5.9.rc1, I believe.

I'm currently bdisting 5.8.beta4 on 10.4 PPC but it will probably only be ready on Monday.


Just for reference, this was introduced in #10556.

comment:6 follow-up: Changed 8 years ago by kcrisman

  • Status changed from positive_review to needs_info

In particular, yomcat, did you actually try a bdisted Sage with this? Just asking - I assume yes, in which case I'm wondering what went wrong with mine...

comment:7 in reply to: ↑ 6 Changed 8 years ago by yomcat

Replying to kcrisman:

In particular, yomcat, did you actually try a bdisted Sage with this?

No, same as jdemeyer, I just built it.

I ran it just now, and it worked fine. I'm with 5.9.rc1 as well.

comment:8 in reply to: ↑ 5 Changed 8 years ago by jdemeyer

Replying to kcrisman:

This sounds familiar with the NB upgrade but I don't know why this one change would have made it happen.

I don't really understand this sentence. If you mean that you're using the upgraded notebook (not the one that came with Sage), then probably the problem isn't this ticket, but the notebook upgrade.

comment:9 Changed 8 years ago by kcrisman

  • Reviewers changed from Michael Welsh to Michael Welsh, Karl-Dieter Crisman

Indeed, I was using the upstream sagenb linked in, which definitely has something to do with it. This does actually work on 10.4 - I have tried a bdist! I am going to try this on a non-corrupted one on 10.7 now, and if that works then I think we should be okay.

comment:10 follow-up: Changed 8 years ago by kcrisman

Okay, 10.7 looks good as well. Strange business. Ivan, do you have any idea on whether this could conceivably break anything?

comment:11 Changed 8 years ago by kcrisman

  • Status changed from needs_info to needs_review

comment:12 Changed 8 years ago by kcrisman

  • Status changed from needs_review to positive_review

Or, Jeroen, do we need to somehow test for this build? You mentioned this on the sage-devel thread, but I haven't got a clue how to do it.

comment:13 in reply to: ↑ 10 Changed 8 years ago by iandrus

Replying to kcrisman:

Okay, 10.7 looks good as well. Strange business. Ivan, do you have any idea on whether this could conceivably break anything?

No, I don't think this change could possibly break anything. Of course, I didn't think NSInteger would break either. :-) But NSInteger is just a long so it should be fine. Unless of course Apple decides to change NSInteger to be something else in the next release...

comment:14 Changed 8 years ago by jdemeyer

  • Merged in set to sage-5.10.beta3
  • Resolution set to fixed
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.