From: Francesc Rocher <francesc.rocher@gmail.com>
To: emacs-devel@gnu.org
Subject: Emacs profile & coverage
Date: Sun, 1 Mar 2009 20:25:46 +0100 [thread overview]
Message-ID: <ade856a30903011125u5cc6ea3ave8a5cc981f68a9fb@mail.gmail.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 4786 bytes --]
Hi,
I've tried to compile the latest CVS emacs version with profiling and
coverage. Under Fedora-10_x86_64 that's the environment used:
gcc --version = 4.3.2 20081105 (Red Hat 4.3.2-7)
ld -version = 2.18.50.0.9-8.fc10 20080822
autoconf --version = 2.63
automake --version = 1.10.1
glibc 2.9
CFLAGS="-pg -coverage"
LDFLAGS="-pg -coverage"
The command "./configure --prefix=/bla/bla" works fine. Then, "make"
starts to compile, failing at
gcc -nostdlib `./prefix-args -Xlinker -z nocombreloc` -pg -coverage
-Wl,-znocombreloc -o temacs pre-crt0.o /usr/lib64/crt1.o
/usr/lib64/crti.o dispnew.o frame.o scroll.o xdisp.o menu.o xmenu.o
window.o charset.o coding.o category.o ccl.o character.o chartab.o
cm.o term.o terminal.o xfaces.o xterm.o xfns.o xselect.o xrdb.o
fontset.o xsmfns.o fringe.o image.o gtkutil.o dbusbind.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 filemode.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 callproc.o region-cache.o
sound.o atimer.o doprnt.o strftime.o intervals.o textprop.o
composite.o md5.o xfont.o ftfont.o xftfont.o ftxfont.o terminfo.o
lastfile.o vm-limit.o -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgio-2.0
-lpangoft2-1.0 -lgdk_pixbuf-2.0 -lpangocairo-1.0 -lcairo -lpango-1.0
-lfreetype -lfontconfig -lgobject-2.0 -lgmodule-2.0 -lglib-2.0
-lpthread -lSM -lICE -ltiff -ljpeg -lpng -lz -lm -lgif -lXpm -lX11
-lXft -lXrender -lfontconfig -lfreetype -lX11 -lasound -lrsvg-2
-lgdk_pixbuf-2.0 -lcairo -lgobject-2.0 -lgmodule-2.0 -lglib-2.0
-L/lib64 -ldbus-1 -lgpm -lncurses -lm -lgcc -lc -lgcc
/usr/lib64/crtn.o
with the message
/usr/lib/gcc/x86_64-redhat-linux/4.3.2/libgcov.a(_gcov.o): In function
`__gcov_init':
(.text+0x148): undefined reference to `atexit'
collect2: ld returned 1 exit status
make[1]: *** [temacs] Error 1
Q1: Is this a problem of the Fedora-10 environment?
Q2: It is reproducible in other environments?
The only way I've found to get 'temacs' compiled is by manually cd-ing 'src'
directory and issuing the command
gcc `./prefix-args -Xlinker -z nocombreloc` -pg -coverage
-Wl,-znocombreloc -o temacs pre-crt0.o dispnew.o frame.o scroll.o
xdisp.o menu.o xmenu.o window.o charset.o coding.o category.o ccl.o
character.o chartab.o cm.o term.o terminal.o xfaces.o xterm.o xfns.o
xselect.o xrdb.o fontset.o xsmfns.o fringe.o image.o gtkutil.o
dbusbind.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 filemode.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 callproc.o
region-cache.o sound.o atimer.o doprnt.o strftime.o intervals.o
textprop.o composite.o md5.o xfont.o ftfont.o xftfont.o ftxfont.o
terminfo.o lastfile.o vm-limit.o -lgtk-x11-2.0 -lgdk-x11-2.0
-latk-1.0
-lgio-2.0 -lpangoft2-1.0 -lgdk_pixbuf-2.0 -lpangocairo-1.0 -lcairo
-lpango-1.0 -lfreetype -lfontconfig -lgobject-2.0 -lgmodule-2.0
-lglib-2.0 -lpthread -lSM -lICE -ltiff -ljpeg -lpng -lz -lm -lgif
-lXpm -lX11 -lXft -lXrender -lfontconfig -lfreetype -lX11 -lasound
-lrsvg-2 -lgdk_pixbuf-2.0 -lcairo -lgobject-2.0 -lgmodule-2.0
-lglib-2.0 -L/lib64 -ldbus-1 -lgpm -lncurses -lm -lgcc -lc -lgcc
That is, I had to remove '/usr/lib64/crt[1in].o' files and the flag
'-nostdlib'. Ok
then, once I had 'temacs' compiled, I continued with the 'make' command from
the top directory. Then I get the error:
`/bin/pwd`/temacs --batch --load loadup bootstrap
make[1]: *** [bootstrap-emacs] Profiling timer expired
At this point there's no way to continue unless you edit 'emacs.c' and add
this patch:
diff -c -2 -r1.462 emacs.c
*** src/emacs.c 1 Mar 2009 12:40:39 -0000 1.462
--- src/emacs.c 1 Mar 2009 19:08:32 -0000
***************
*** 787,790 ****
--- 787,792 ----
main (int argc, char **argv)
{
+ struct itimerval itval = {{0, 0}, {0, 0}};
+ setitimer (ITIMER_PROF, &itval, NULL);
#if GC_MARK_STACK
Lisp_Object dummy;
Q3: Should this patch progress to CVS?
Compiled again 'temacs' and continued with the make process, finishing
without problems. 'make install' and run 'emacs' without problems, obtaining
all information files for gprof and gcov.
-- Francesc Rocher
[-- Attachment #2: Type: text/html, Size: 5310 bytes --]
reply other threads:[~2009-03-01 19:25 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ade856a30903011125u5cc6ea3ave8a5cc981f68a9fb@mail.gmail.com \
--to=francesc.rocher@gmail.com \
--cc=emacs-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.