Opened 15 years ago

Closed 14 years ago

Last modified 14 years ago

#20936 closed defect (fixed)

emacs-app fails to build on Snow Leopard

Reported by: cssdev Owned by: cssdev
Priority: Normal Milestone:
Component: ports Version: 1.8.0
Keywords: Cc: vipul.delwadia@…, julian@…, tonytung@…, james.mcbride+trac_ext@…, kiwi.2008@…, macports@…, vdesjardins@…, bgraw3@…, macports@…, kalyaka@…, distant.journey.dreaming.journey@…, colding@…, agl2015, lorne@…, eddieh (Eddie Hillenbrand), chalin@…, easye, mfisher@…, bloosqr@…, jochen@…, ggeremy@…, jochen3941@…, hawkins22@…, jpenney (Jason Penney), davida@…, hgbrauen@…, dcreager@…, marcin.zalewski@…, league@…, squarepegsys (Mike Hostetler), lambda@…, jbarnette@…, whitley@…, andy@…, hvitved@…, wouter.beek@…, tim@…, travis.vachon@…, bonelake@…, hiroki.ora@…, mrb@…, overcyn@…, nlavine@…, nerdling (Jeremy Lavergne), royliu@…, vallon (Justin), larryv (Lawrence Velázquez), tolsen (Tim Olsen), julienb@…, livin.stephen@…, andreas.wilm@…, ldeck
Port: emacs-app emacs-app-devel

Description (last modified by cssdev)

The emacs-app source fails to build properly on Snow Leopard.

--->  Building emacs-app
Error: Target org.macports.build returned: shell command " cd "/opt/local/var/macports/build/_Users_Shared_macports_dports_aqua_emacs-app/work/emacs-23.1" && /usr/bin/make -j2 all " returned error 2
Command output: nsterm.m: In function '-[EmacsView keyDown:]':
nsterm.m:4611: warning: 'wantsToDelayTextChangeNotifications' is deprecated (declared at /System/Library/Frameworks/AppKit.framework/Headers/NSInputManager.h:112)
nsterm.m: In function '-[EmacsView characterIndexForPoint:]':
nsterm.m:4820: warning: conflicting types for '-(unsigned int)characterIndexForPoint:(NSPoint)thePoint'
/System/Library/Frameworks/AppKit.framework/Headers/NSInputManager.h:45: warning: previous declaration of '-(NSUInteger)characterIndexForPoint:(NSPoint)thePoint'
nsterm.m: In function '-[EmacsView initFrameFromEmacs:]':
nsterm.m:5219: warning: class 'EmacsView' does not implement the 'NSWindowDelegate' protocol
nsterm.m: In function '-[EmacsView draggingEntered:]':
nsterm.m:5497: warning: conflicting types for '-(unsigned int)draggingEntered:(id <NSDraggingInfo>)sender'
/System/Library/Frameworks/AppKit.framework/Headers/NSDragging.h:56: warning: previous declaration of '-(NSDragOperation)draggingEntered:(id <NSDraggingInfo>)sender'
nsterm.m: In function '+[EmacsScroller scrollerWidth]':
nsterm.m:5782: warning: conflicting types for '+(float)scrollerWidth'
/System/Library/Frameworks/AppKit.framework/Headers/NSScroller.h:76: warning: previous declaration of '+(CGFloat)scrollerWidth'
nsterm.m: In function '-[EmacsScroller setPosition:portion:whole:]':
nsterm.m:5912: warning: 'setFloatValue:knobProportion:' is deprecated (declared at /System/Library/Frameworks/AppKit.framework/Headers/NSScroller.h:107)
nsterm.m:5919: warning: 'setFloatValue:knobProportion:' is deprecated (declared at /System/Library/Frameworks/AppKit.framework/Headers/NSScroller.h:107)
nsterm.m: In function '-[EmacsScroller mouseDown:]':
nsterm.m:6024: warning: format '%d' expects type 'int', but argument 3 has type 'NSScrollerPart'
make[1]: *** [nsterm.o] Error 1
make[1]: *** Waiting for unfinished jobs....
In file included from nsterm.h:20,
                 from nsfns.m:37:
dispextern.h:1250: error: array type has incomplete element type
nsfns.m: In function 'Fxw_color_values':
nsfns.m:2252: warning: passing argument 1 of 'getRed:green:blue:alpha:' from incompatible pointer type
nsfns.m:2252: warning: passing argument 2 of 'getRed:green:blue:alpha:' from incompatible pointer type
nsfns.m:2252: warning: passing argument 3 of 'getRed:green:blue:alpha:' from incompatible pointer type
nsfns.m:2252: warning: passing argument 4 of 'getRed:green:blue:alpha:' from incompatible pointer type
make[1]: *** [nsfns.o] Error 1
make: *** [src] Error 2

Error: Status 1 encountered during processing.

I tried to fix that using the latest nsfns.m, but that only led to additional errors. The latest cvs checkout from savannah fails to build for others as well, so it looks like this port needs to wait for more significant upstream fixes.

Attachments (5)

emacs-app.txt.bz2 (7.4 KB) - added by colding@… 15 years ago.
Output of "sudo port -d install emacs-app 2>&1 | tee ~/emacs-app.txt"
emacs-app-snow-leopard.patch (5.5 KB) - added by eddieh (Eddie Hillenbrand) 15 years ago.
This patch should allow emacs.app to be built on Snow Leopard. Thanks goes to Erik Charlebois who posted instructions to the emacs-devel list. After the patch is applied there are still a few warnings…
emacs-app-Portfile-snow-leopard.patch (531 bytes) - added by dcreager@… 15 years ago.
Patch to Portfile that allows installation on Snow Leopard
emacs-23.1-snow-leopard.patch (20.4 KB) - added by dcreager@… 15 years ago.
Source tree patch used by emacs-app Portfile
port-patch.tar.gz (7.8 KB) - added by royliu@… 14 years ago.
A patch for the port itself, after integrating all earlier patches.

Download all attachments as: .zip

Change History (84)

comment:1 Changed 15 years ago by vipul.delwadia@…

Cc: vipul.delwadia@… added

Cc Me!

comment:2 Changed 15 years ago by julian@…

Cc: julian@… added

Cc Me!

comment:3 Changed 15 years ago by nerdling (Jeremy Lavergne)

Port: emacs-app-devel added

comment:4 Changed 15 years ago by tonytung@…

Cc: tonytung@… added

Cc Me!

comment:5 Changed 15 years ago by james.mcbride+trac_ext@…

Cc: james.mcbride+trac_ext@… added

Cc Me!

comment:6 Changed 15 years ago by kiwi.2008@…

Cc: kiwi.2008@… added

Cc Me!

comment:7 Changed 15 years ago by macports@…

Cc: macports@… added

Cc Me!

comment:8 Changed 15 years ago by vdesjardins@…

Cc: vdesjardins@… added

Cc Me!

comment:9 Changed 15 years ago by bgraw3@…

Cc: bgraw3@… added

Cc Me!

comment:10 Changed 15 years ago by macports@…

Cc: macports@… added

Cc Me!

comment:11 Changed 15 years ago by kalyaka@…

Cc: kalyaka@… added

Cc Me!

comment:12 Changed 15 years ago by distant.journey.dreaming.journey@…

Cc: distant.journey.dreaming.journey@… added

Cc Me!

comment:13 Changed 15 years ago by nerdling (Jeremy Lavergne)

Cc: colding@… added

Adding reporter of duplicate #21114.

comment:14 Changed 15 years ago by nerdling (Jeremy Lavergne)

Cc: artemiogl@… added

Adding reporter of duplicate #21109.

comment:15 Changed 15 years ago by cssdev

Description: modified (diff)
Status: newassigned

Changed 15 years ago by colding@…

Attachment: emacs-app.txt.bz2 added

Output of "sudo port -d install emacs-app 2>&1 | tee ~/emacs-app.txt"

comment:16 Changed 15 years ago by lorne@…

Cc: lorne@… added

Cc Me!

comment:17 Changed 15 years ago by eddieh (Eddie Hillenbrand)

Cc: eh88@… added

Cc Me!

comment:18 Changed 15 years ago by chalin@…

Cc: chalin@… added

Cc Me!

comment:19 Changed 15 years ago by easye

Cc: easieste added

comment:20 Changed 15 years ago by easye

Cc: easieste@… added; easieste removed

comment:21 Changed 15 years ago by mfisher@…

Cc: mfisher@… added

Cc Me!

Changed 15 years ago by eddieh (Eddie Hillenbrand)

This patch should allow emacs.app to be built on Snow Leopard. Thanks goes to Erik Charlebois who posted instructions to the emacs-devel list. After the patch is applied there are still a few warnings...

comment:22 Changed 15 years ago by cssdev

MacPorts fails to apply this patch. It probably needs some modifications to conform to the details on creating patches. After you built it, did it work?

comment:23 Changed 15 years ago by bloosqr@…

Cc: bloosqr@… added

Cc Me!

comment:24 Changed 15 years ago by eddieh (Eddie Hillenbrand)

Oh oops. The patch was against emacs cvs not the portfile. Erik Charlebois has now put his patch up on the emacs-devel list which is more complete than my minimalist patch. Maybe someone can modify the emacs-app-devel port so that it applies the patch file. I don't really know the policy for source code patches, perhaps it would be better to wait till the patches are applied upstream.

comment:25 Changed 15 years ago by jochen@…

Cc: jochen@… added

Cc Me!

comment:26 Changed 15 years ago by ggeremy@…

Cc: ggeremy@… added

Cc Me!

comment:27 Changed 15 years ago by ggeremy@…

please how to apply the patch ?

tx

comment:28 Changed 15 years ago by jochen3941@…

Cc: jochen3941@… added

Cc Me!

comment:29 Changed 15 years ago by hawkins22@…

Cc: hawkins22@… added

Cc Me!

comment:30 Changed 15 years ago by jpenney (Jason Penney)

Cc: jpenney@… added

Cc Me!

comment:31 Changed 15 years ago by davida@…

Cc: davida@… added

Cc Me!

comment:32 Changed 15 years ago by hgbrauen@…

Cc: hgbrauen@… added

Cc Me!

comment:33 Changed 15 years ago by dcreager@…

I've been able to get emacs-app to work on Snow Leopard. I had to use Erik Charlebois's patch (referenced earlier), as well as a patch from Yamamoto Mitsuharu. With these two patches, emacs-app compiles and installs cleanly from a local ports archive.

I haven't been able to test whether the port still works on Leopard and earlier with this patch.

I'll attach the Portfile patch and the source patch that it uses.

Changed 15 years ago by dcreager@…

Patch to Portfile that allows installation on Snow Leopard

Changed 15 years ago by dcreager@…

Source tree patch used by emacs-app Portfile

comment:34 Changed 15 years ago by dcreager@…

Cc: dcreager@… added

Cc Me!

comment:35 Changed 15 years ago by jamshid@…

If like me you're new to macports and wondering what to do with those two .patch files, good luck, this seemed to work for me:

sudo port clean emacs-app
sudo port install emacs-app
cd $(port dir emacs-app)
sudo patch -p0 < ~/Downloads/emacs-app-Portfile-snow-leopard.patch 
sudo cp emacs-23.1-snow-leopard.patch ./files/
sudo port -D . install

Now open Finder to /Applications/MacPorts/Emacs.app.

comment:36 Changed 15 years ago by marcin.zalewski@…

Cc: marcin.zalewski@… added

Cc Me!

comment:37 Changed 15 years ago by marcin.zalewski@…

Cc: marcin.zalewski@… removed

Cc Me!

comment:38 Changed 15 years ago by marcin.zalewski@…

Cc: marcin.zalewski@… added

Cc Me!

comment:39 Changed 15 years ago by league@…

Cc: league@… added

Cc Me!

comment:40 Changed 15 years ago by squarepegsys (Mike Hostetler)

Cc: mike@… added

Cc Me!

comment:41 Changed 15 years ago by lambda@…

Cc: lambda@… added

Cc Me!

comment:42 Changed 14 years ago by royliu@…

Hi all, I've converted the patches talked about above into a MacPorts-compliant format, and have successfully built emacs-app. Would the SVN maintainers of the port be able to commit it? I've attached a patch archive for the port itself, port-patch.tar.gz. In it, you will find: files-add/, a directory of patches that need to be added to the port; and files-patch/, a directory of files that need to be patched.

Changed 14 years ago by royliu@…

Attachment: port-patch.tar.gz added

A patch for the port itself, after integrating all earlier patches.

comment:43 in reply to:  42 Changed 14 years ago by cssdev

Replying to royliu@…:

Would the SVN maintainers of the port be able to commit it?

I had hoped that there would be more activity upstream to integrate all required changes to make things work on snow leopard. I don't want to manage a completely separate set of sources. I'll test and commit the changes. Thanks for rolling everything together!

comment:44 in reply to:  42 Changed 14 years ago by cssdev

Replying to royliu@…:

I've attached a patch archive for the port itself, port-patch.tar.gz.

Safari doesn't like that ... it tries to download the page, not the attachment itself. I had to manually use the full URL https://trac.macports.org/attachment/ticket/20936/port-patch.tar.gz to get the patch. I'll try the patch.

comment:45 Changed 14 years ago by jbarnette@…

Cc: jbarnette@… added

Cc Me!

comment:46 Changed 14 years ago by whitley@…

Cc: whitley@… added

Cc Me!

comment:47 Changed 14 years ago by andy@…

Cc: andy@… added

Cc Me!

comment:48 Changed 14 years ago by hvitved@…

Cc: hvitved@… added

Cc Me!

comment:49 Changed 14 years ago by earcar@…

Cc: earcar@… added

Cc Me!

comment:50 Changed 14 years ago by wouter.beek@…

Cc: wouter.beek@… added

Cc Me!

comment:51 Changed 14 years ago by tim@…

Cc: tim@… added

Cc Me!

comment:52 Changed 14 years ago by travis.vachon@…

Cc: travis.vachon@… added

Cc Me!

comment:53 Changed 14 years ago by bonelake@…

Cc: bonelake@… added

Cc Me!

comment:54 Changed 14 years ago by hiroki.ora@…

Cc: hiroki.ora@… added

Cc Me!

comment:55 Changed 14 years ago by mrb@…

Cc: mrb@… added

Cc Me!

comment:56 Changed 14 years ago by overcyn@…

Cc: overcyn@… added

Cc Me!

comment:57 Changed 14 years ago by nlavine@…

Cc: nlavine@… added

Cc Me!

comment:58 Changed 14 years ago by nlavine@…

I find that this issue still happens. To clarify, has the patch that fixed the old issue been put in the ports tree, or does it still have the old version?

comment:59 Changed 14 years ago by royliu@…

Build issues seem to be fixed in the upstream. I checked out with

cvs -z3 -d:pserver:anonymous@cvs.savannah.gnu.org:/sources/emacs co emacs

did

./configure --with-ns

and the build went fine. Could someone with commit privileges update emacs-app-devel to reflect this change (check out from a more recent revision)?

comment:60 in reply to:  59 Changed 14 years ago by cssdev

Replying to royliu@…:

Build issues seem to be fixed in the upstream.

Great! Last weekend's checkout (10/26) still exhibited problems, but I'll try with today. If it works, I'll commit to emacs-app-devel.

comment:61 Changed 14 years ago by cssdev

Committed to emacs-app-devel in r60082.

comment:62 Changed 14 years ago by nerdling (Jeremy Lavergne)

Cc: snc@… added

Cc Me!

comment:63 Changed 14 years ago by royliu@…

Cc: royliu@… added

Cc Me!

comment:64 Changed 14 years ago by vallon (Justin)

Cc: JustinVallon@… added

Cc Me!

comment:65 Changed 14 years ago by larryv (Lawrence Velázquez)

Cc: larry.velazquez@… added

Cc Me!

comment:66 Changed 14 years ago by tolsen (Tim Olsen)

Cc: tolsen@… added

Cc Me!

comment:67 Changed 14 years ago by julienb@…

Cc: julienb@… added

Cc Me!

comment:68 Changed 14 years ago by livin.stephen@…

Cc: livin.stephen@… added

Cc Me!

comment:69 Changed 14 years ago by andreas.wilm@…

Cc: andreas.wilm@… added

Cc Me!

comment:70 Changed 14 years ago by ldeck

This is *still* happening. Any movement on this?

comment:71 Changed 14 years ago by ldeck

Cc: lachlan.deck@… added

Cc Me!

comment:72 Changed 14 years ago by cssdev

Use emacs-app-devel until there's an upstream release with Snow Leopard support.

comment:73 in reply to:  72 Changed 14 years ago by cssdev

Replying to css@…:

Use emacs-app-devel until there's an upstream release with Snow Leopard support.

I guess it's time to see if emacs 23.2 works ...

comment:74 Changed 14 years ago by cssdev

Seems to work for me. I committed emacs-app 23.2 in r67427. Please verify that it works for you, and this ticket might finally be closed!

comment:75 in reply to:  74 Changed 14 years ago by larryv (Lawrence Velázquez)

Replying to css@…:

I committed emacs-app 23.2 in r67427. Please verify that it works for you, and this ticket might finally be closed!

I've successfully built emacs-app @23.2_0 on 10.6.3, and the resulting Emacs.app seems to run fine.

:)

comment:76 Changed 14 years ago by easye

Under the new port, my emacsclient doesn't seem to be working. Setting EDITOR to '/Applications/MacPorts/Emacs.app/Contents/MacOS/bin/emacsclient', invoking M-x server-start in Emacs and then executing a program from the commandline that uses EDITOR, results in the following error message:

/Applications/MacPorts/Emacs.app/Contents/MacOS/bin/emacsclient: can't find socket; have you started the server?
To start the server in Emacs, type "M-x server-start".
/Applications/MacPorts/Emacs.app/Contents/MacOS/bin/emacsclient: No socket or alternate editor.  Please use:

	--socket-name
	--server-file      (or environment variable EMACS_SERVER_FILE)
	--alternate-editor (or environment variable ALTERNATE_EDITOR)

comment:77 in reply to:  76 Changed 14 years ago by easye

Replying to easieste@…:

Under the new port, my emacsclient doesn't seem to be working. Setting EDITOR to '/Applications/MacPorts/Emacs.app/Contents/MacOS/bin/emacsclient', invoking M-x server-start in Emacs and then executing a program from the commandline that uses EDITOR, results in the following error message:

My apologies:

False error report, please ignore (a copy of emacs-22 was being invoked by mistake)

comment:78 Changed 14 years ago by cssdev

Resolution: fixed
Status: assignedclosed

Thanks for the feedback. I'm closing this ticket, so if other issues arise with emacs-app, please file those into new tickets.

comment:79 Changed 14 years ago by earcar@…

Cc: earcar@… removed

Cc Me!

Note: See TracTickets for help on using tickets.