Opened 15 years ago

Closed 15 years ago

#22364 closed defect (fixed)

emacs-22.3 link error on snow leopard

Reported by: reto.stockli@… Owned by: darren.bane@…
Priority: Normal Milestone:
Component: ports Version: 1.8.1
Keywords: Cc: ross@…, drkp (Dan Ports), ctm@…
Port: emacs

Description (last modified by mf2k (Frank Schima))

I've looked through the tickets but haven't found this one yet!

Thanks for looking at it in advance. Reto

gcc version 4.2.1 (Apple Inc. build 5646)
X-code version 3.2
% sudo port clean emacs
Password:
--->  Cleaning emacs
% sudo port install emacs
--->  Computing dependencies for emacs
--->  Fetching emacs
--->  Verifying checksum(s) for emacs
--->  Extracting emacs
--->  Applying patches to emacs
--->  Configuring emacs
--->  Building emacs
Error: Target org.macports.build returned: shell command " cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_editors_emacs/work/emacs-22.3" && /usr/bin/make -j2 all " returned error 2
Command output:       _turn_on_face in term.o
      _turn_on_face in term.o
      _delete_glyphs in term.o
      _delete_glyphs in term.o
      _delete_glyphs in term.o
      _delete_glyphs in term.o
      _set_scroll_region in term.o
      _reset_terminal_modes in term.o
      _reset_terminal_modes in term.o
      _reset_terminal_modes in term.o
      _reset_terminal_modes in term.o
      _write_glyphs in term.o
      _insert_glyphs in term.o
      _insert_glyphs in term.o
      _insert_glyphs in term.o
      _insert_glyphs in term.o
      _clear_end_of_line in term.o
      _set_terminal_modes in term.o
      _set_terminal_modes in term.o
      _set_terminal_modes in term.o
      _clear_to_end in term.o
      _ins_del_lines in term.o
      _ins_del_lines in term.o
      _ins_del_lines in term.o
      _clear_frame in term.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
make[1]: *** [temacs] Error 1
make[1]: *** Waiting for unfinished jobs....
make: *** [src] Error 2

Error: Status 1 encountered during processing.

Attachments (1)

patch-emacs-10.6.diff (4.1 KB) - added by drkp (Dan Ports) 15 years ago.

Download all attachments as: .zip

Change History (9)

comment:1 Changed 15 years ago by mf2k (Frank Schima)

Description: modified (diff)
Owner: changed from macports-tickets@… to darren.bane@…

comment:2 Changed 15 years ago by ross@…

Cc: ross@… added

Cc Me!

comment:3 Changed 15 years ago by ross@…

I am getting a similar error...

gcc version 4.2.1 (Apple Inc. build 5646) (dot 1)
Xcode 3.2.1 for Mac OS X 10.6 Snow Leopard
% sudo port install emacs
--->  Computing dependencies for emacs
--->  Fetching emacs
--->  Verifying checksum(s) for emacs
--->  Extracting emacs
--->  Applying patches to emacs
--->  Configuring emacs
--->  Building emacs
Error: Target org.macports.build returned: shell command " cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_editors_emacs/work/emacs-22.3" && /usr/bin/make -j2 all " returned error 2
Command output:                            __la_symbol_ptr  0x100152070    0x628
                           __program_vars   0x1001526a0     0x28
                           __const          0x1001526e0    0x730
                           __data           0x100152e20 0x1df3e8
                           __bss            0x100332220  0x51830
                           __common         0x100383a60  0x103f9
3 LC_SEGMENT_64          72 __LINKEDIT       0x100394000  0x46000
4 unknown                48
5 LC_SYMTAB              24
6 LC_DYSYMTAB            80
7 LC_LOAD_DYLINKER       32
8 LC_UUID                24
9 LC_UNIXTHREAD         184
10 LC_LOAD_DYLIB          64
11 LC_LOAD_DYLIB          56
0x100dfc080 (sz:   0x3f24/  0x3f28)
0x100d00000 (sz:  0x4a6d5/ 0xfc080)
0x100afc080 (sz:   0x3f25/  0x3f28)
0x100a00000 (sz:  0xfc07f/ 0xfc080)
0x1017f8000 (sz:   0x26ca/  0x7fa0)
0x101000000 (sz: 0x26a7fd/0x7f8000)
0x10044c000 (sz:        0/  0x1000)
--- Load Commands written to Output File ---
Writing segment __PAGEZERO       @        0 (       0/0x100000000 @          0)
Writing segment __TEXT           @        0 (0x152000/0x152000 @ 0x100000000)
Writing segment __DATA           @ 0x152000 (0x242000/0x242000 @ 0x100152000)
        section __nl_symbol_ptr  at 0x152000 - 0x152070 (sz:     0x70)
        section __la_symbol_ptr  at 0x152070 - 0x152698 (sz:    0x628)
make[1]: *** [emacs] Error 1
make: *** [src] Error 2

Error: Status 1 encountered during processing.

comment:4 in reply to:  description Changed 15 years ago by ross@…

After searching the web, I found someone claiming here that compiling emacs from CVS will work. I managed to verify this; below is a workaround that will let you hack the solution into MacPorts:

# go to your homedir
cd
# grab the source from CVS, purposefully misnaming the version
cvs -z3 -d:pserver:anonymous@cvs.savannah.gnu.org:/sources/emacs co emacs-22.3
# tar it up
tar zcf emacs-22.3.tar.gz emacs-22.3/
# just to be anal, verify that MacPorts' emacs really is failing
sudo port clean emacs
sudo port install emacs
# assuming it failed, replace the MacPorts source with the new one
cd /opt/local/var/macports/distfiles/emacs
sudo mv emacs-22.3.tar.gz emacs-22.3.tar.gz.orig
sudo cp ~/emacs-22.3.tar.gz .
md5 emacs-22.3.tar.gz # remember this output
# prepare to edit the Portfile
cd /opt/local/var/macports/sources/rsync.macports.org/release/ports/editors/emacs
sudo cp Portfile Portfile.orig
sudo vi Portfile
# we need to change two things in the Portfile:
# 1) change the md5 sum to the one calculated earlier
# 2) remove the patchfiles section, i.e., delete this:
# patchfiles	patch-Makefile.in.diff \
# 		patch-leim-Makefile.in.diff
# now try building it
sudo port clean emacs
sudo port install emacs

NOTE: if MacPorts releases an updated Portfile that fixes the problem, and it still refers to the same version of emacs, then you will need to restore the original source. For example:

# restore the real 22.3
cd /opt/local/var/macports/distfiles/emacs
sudo mv emacs-22.3.tar.gz emacs-22.3.tar.gz.cvs
sudo mv emacs-22.3.tar.gz.orig emacs-22.3.tar.gz
sudo port clean emacs
sudo port upgrade emacs

comment:5 Changed 15 years ago by drkp (Dan Ports)

Cc: dports@… added

Cc Me!

comment:6 Changed 15 years ago by ctm@…

Cc: ctm@… added

Cc Me!

comment:7 Changed 15 years ago by drkp (Dan Ports)

Attached is a patch for the port that makes it compile under 10.6. This takes the patches from the CVS trunk and applies them to the released 22.3 source. Credit for the patch itself goes to YAMAMOTO Mitsuharu (see http://osdir.com/ml/general/2009-08/msg15089.html).

I believe the same patch will work with 23.1 (perhaps with some tweaking to get it to apply cleanly) if this port gets updated.

I see that the port appears to be abandoned (ticket #21273); perhaps someone else can apply the patch?

Changed 15 years ago by drkp (Dan Ports)

Attachment: patch-emacs-10.6.diff added

comment:8 Changed 15 years ago by blair (Blair Zajac)

Resolution: fixed
Status: newclosed

Fixed in r62682. See #23165 for more information.

Note: See TracTickets for help on using tickets.