Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 17 Oct 2013 16:38:22 GMT
From:      Mark Willson <cdr.nil@gmail.com>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/183064: emacs-nox11 port won't build with CLANG
Message-ID:  <201310171638.r9HGcM95029824@oldred.freebsd.org>
Resent-Message-ID: <201310171640.r9HGe0cR036466@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         183064
>Category:       ports
>Synopsis:       emacs-nox11 port won't build with CLANG
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Oct 17 16:40:00 UTC 2013
>Closed-Date:
>Last-Modified:
>Originator:     Mark Willson
>Release:        FreeBSD 10.,0-BETA1
>Organization:
>Environment:
FreeBSD chrome 10.0-BETA1 FreeBSD 10.0-BETA1 #0 r256504: Tue Oct 15 15:49:08 BST 2013     root@chrome.hydrus.org.uk:/usr/obj/usr/src/sys/GENERIC  i386
>Description:
Build failed with:

  if test "no" = "yes"; then \
  rm -f bootstrap-emacs; \
  ln temacs bootstrap-emacs; \
  else \
  `/bin/pwd`/temacs --batch --load loadup bootstrap || exit 1; \
  test "X" = X ||  -zex emacs; \
  mv -f emacs bootstrap-emacs; \
  fi
  Loading loadup.el (source)...
  Using load-path (/usr/ports/editors/emacs-nox11/work/emacs-24.3/lisp \
   /usr/ports/editors/emacs-nox11/work/emacs-24.3/lisp/emacs-lisp \
   /usr/ports/editors/emacs-nox11/work/emacs-24.3/lisp/language \
   /usr/ports/editors/emacs-nox11/work/emacs-24.3/lisp/international \
   /usr/ports/editors/emacs-nox11/work/emacs-24.3/lisp/textmodes)
  Loading emacs-lisp/byte-run...
  Loading emacs-lisp/backquote...
  Loading subr...
  Loading version...
  Segmentation fault (core dumped)
  gmake[2]: *** [bootstrap-emacs] Error 1
  gmake[2]: Leaving directory `/usr/ports/editors/emacs-nox11/work/emacs-24.3/src'
  gmake[1]: *** [src] Error 2
  gmake[1]: Leaving directory `/usr/ports/editors/emacs-nox11/work/emacs-24.3'
  ===> Compilation failed unexpectedly.
  Try to set MAKE_JOBS_UNSAFE=yes and rebuild before reporting the failure to
  the maintainer.
  *** Error code 1

  Stop.
  make: stopped in /usr/ports/editors/emacs-nox11

Setting MAKE_JOBS_UNSAFE=yes didn't change things. I changed CFLAGS from the default of "-O -pipe" to "-g" to obtain more info from the core dump, but the build then produced this:

  cc -nostdlib -Demacs -I. -I/usr/ports/editors/emacs-nox11/work/emacs-24.3/src
    -I../lib -I/usr/ports/editors/emacs-nox11/work/emacs-24.3/src/../lib \
    -MMD -MF deps/.d -MP     -g -march=pentiumpro   -L/usr/local/lib \
    -Wl,-rpath=/usr/lib:/usr/local/lib -Wl,-znocombreloc \
    -o temacs pre-crt0.o /usr/lib/crt1.o /usr/lib/crti.o dispnew.o frame.o \
    scroll.o xdisp.o menu.o  window.o charset.o coding.o category.o ccl.o \
    character.o chartab.o bidi.o cm.o term.o terminal.o xfaces.o    emacs.o \
    keyboard.o macros.o keymap.o sysdep.o buffer.o filelock.o insdel.o \
    marker.o minibuf.o fileio.o dired.o cmds.o casetab.o casefiddle.o \
    indent.o search.o regex.o undo.o alloc.o data.o doc.o editfns.o \
    callint.o eval.o floatfns.o fns.o font.o print.o lread.o syntax.o \
    unexelf.o bytecode.o process.o gnutls.o callproc.o region-cache.o \
    sound.o atimer.o doprnt.o intervals.o textprop.o composite.o xml.o \
    profiler.o         terminfo.o lastfile.o gmalloc.o   vm-limit.o   \
    ../lib/libgnu.a            -lrt  -lexecinfo    \
    -lutil -lncurses         -lpthread   -lm -lgcc -lc -lgcc /usr/lib/crtn.o
  xdisp.o: In function `get_next_display_element':
  /usr/ports/editors/emacs-nox11/work/emacs-24.3/src/xdisp.c:6887: 
  undefined reference to `face_for_font'
  cc: error: linker command failed with exit code 1 (use -v to see invocation)
  gmake[2]: *** [temacs] Error 1
  gmake[2]: Leaving directory `/usr/ports/editors/emacs-nox11/work/emacs-24.3/src'
  gmake[1]: *** [src] Error 2
  gmake[1]: Leaving directory `/usr/ports/editors/emacs-nox11/work/emacs-24.3'
  ===> Compilation failed unexpectedly.
  Try to set MAKE_JOBS_UNSAFE=yes and rebuild before reporting the failure to
  the maintainer.
  *** Error code 1

This has been recently reported (http://emacs.1067599.n5.nabble.com/bug-15484-24-3-50-link-error-xdisp-c-uses-windowing-functions-for-terminal-only-case-td298573.html).  I applied the changes to xdisp.c from trunk revision 114482 and the build succeeded.
>How-To-Repeat:
# cd /usr/ports/editors/emacs-nox11
# echo "CLAGS=-O -pipe" >>/etc/make.conf
# make
>Fix:
Apply the following changes to /usr/ports/editors/emacs-nox11/work/emacs-24.3/src/xdisp.c

  # diff /home/mark/dev/emacs-24.3/src/xdisp.c work/emacs-24.3/src/xdisp.c
  6872c6872
  < #ifdef HAVE_WINDOW_SYSTEM
  ---
  >
  6913c6913
  < #endif /* HAVE_WINDOW_SYSTEM */

>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201310171638.r9HGcM95029824>