* Recent changes to regex.c break bootstrapping
@ 2006-02-20 6:10 Luc Teirlinck
2006-02-20 7:47 ` Jan D.
2006-02-20 22:05 ` Richard M. Stallman
0 siblings, 2 replies; 7+ messages in thread
From: Luc Teirlinck @ 2006-02-20 6:10 UTC (permalink / raw)
After bootstrapping failed due to an undefined reference to xalloc, I
made the obvious correction to xmalloc and installed in CVS, but after
that bootstrapping still fails with:
regex.o: In function `extend_range_table_work_area':
/home/teirllm/emacscvsdir/emacs/lib-src/../src/regex.c:2069: undefined
reference to `xrealloc'
/home/teirllm/emacscvsdir/emacs/lib-src/../src/regex.c:2072: undefined
reference to `xmalloc'
regex.o: In function `regcomp':
/home/teirllm/emacscvsdir/emacs/lib-src/../src/regex.c:6295: undefined
reference to `xmalloc'
/home/teirllm/emacscvsdir/emacs/lib-src/../src/regex.c:6301: undefined
reference to `xmalloc'
collect2: ld returned 1 exit status
make[3]: *** [etags] Error 1
make[3]: Leaving directory `/home/teirllm/emacscvsdir/emacs/lib-src'
make[2]: *** [lib-src] Error 2
make[2]: Leaving directory `/home/teirllm/emacscvsdir/emacs'
make[1]: *** [bootstrap-build] Error 2
make[1]: Leaving directory `/home/teirllm/emacscvsdir/emacs'
make: *** [bootstrap] Error 2
lisp.h is, at least conditionally, already included in regex.c
Sincerely,
Luc.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Recent changes to regex.c break bootstrapping
2006-02-20 6:10 Recent changes to regex.c break bootstrapping Luc Teirlinck
@ 2006-02-20 7:47 ` Jan D.
2006-02-20 15:02 ` Andreas Schwab
` (2 more replies)
2006-02-20 22:05 ` Richard M. Stallman
1 sibling, 3 replies; 7+ messages in thread
From: Jan D. @ 2006-02-20 7:47 UTC (permalink / raw)
Cc: emacs-devel
Luc Teirlinck wrote:
> After bootstrapping failed due to an undefined reference to xalloc, I
> made the obvious correction to xmalloc and installed in CVS, but after
> that bootstrapping still fails with:
>
> regex.o: In function `extend_range_table_work_area':
> /home/teirllm/emacscvsdir/emacs/lib-src/../src/regex.c:2069: undefined
> reference to `xrealloc'
> /home/teirllm/emacscvsdir/emacs/lib-src/../src/regex.c:2072: undefined
> reference to `xmalloc'
> regex.o: In function `regcomp':
> /home/teirllm/emacscvsdir/emacs/lib-src/../src/regex.c:6295: undefined
> reference to `xmalloc'
> /home/teirllm/emacscvsdir/emacs/lib-src/../src/regex.c:6301: undefined
> reference to `xmalloc'
> collect2: ld returned 1 exit status
> make[3]: *** [etags] Error 1
> make[3]: Leaving directory `/home/teirllm/emacscvsdir/emacs/lib-src'
> make[2]: *** [lib-src] Error 2
> make[2]: Leaving directory `/home/teirllm/emacscvsdir/emacs'
> make[1]: *** [bootstrap-build] Error 2
> make[1]: Leaving directory `/home/teirllm/emacscvsdir/emacs'
> make: *** [bootstrap] Error 2
>
> lisp.h is, at least conditionally, already included in regex.c
No, it is only included if emacs is #define:d (-Demacs), and it is not when
compiling from lib-src. But what are we trying to do, use xrealloc or define
xrealloc as realloc?
In the first case alloc.c needs to be linked in also, or perhaps
xrealloc/xmalloc defined in regex.c also (as it is in termcap.s for example).
Jan D.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Recent changes to regex.c break bootstrapping
2006-02-20 7:47 ` Jan D.
@ 2006-02-20 15:02 ` Andreas Schwab
2006-02-20 16:26 ` Chong Yidong
2006-02-20 17:08 ` Chong Yidong
2 siblings, 0 replies; 7+ messages in thread
From: Andreas Schwab @ 2006-02-20 15:02 UTC (permalink / raw)
Cc: Luc Teirlinck, emacs-devel
"Jan D." <jan.h.d@swipnet.se> writes:
> No, it is only included if emacs is #define:d (-Demacs), and it is not when
> compiling from lib-src. But what are we trying to do, use xrealloc or define
> xrealloc as realloc?
IMHO this should just be reverted.
Andreas.
--
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
PGP key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Recent changes to regex.c break bootstrapping
2006-02-20 7:47 ` Jan D.
2006-02-20 15:02 ` Andreas Schwab
@ 2006-02-20 16:26 ` Chong Yidong
2006-02-20 17:08 ` Chong Yidong
2 siblings, 0 replies; 7+ messages in thread
From: Chong Yidong @ 2006-02-20 16:26 UTC (permalink / raw)
Cc: Luc Teirlinck, emacs-devel
> No, it is only included if emacs is #define:d (-Demacs), and it is not
> when compiling from lib-src. But what are we trying to do, use
> xrealloc or define xrealloc as realloc?
>
> In the first case alloc.c needs to be linked in also, or perhaps
> xrealloc/xmalloc defined in regex.c also (as it is in termcap.s for
> example).
I went ahead and added xmalloc/xrealloc definitions for the non-emacs
part of regex.c.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Recent changes to regex.c break bootstrapping
2006-02-20 7:47 ` Jan D.
2006-02-20 15:02 ` Andreas Schwab
2006-02-20 16:26 ` Chong Yidong
@ 2006-02-20 17:08 ` Chong Yidong
2006-02-20 22:53 ` Giorgos Keramidas
2 siblings, 1 reply; 7+ messages in thread
From: Chong Yidong @ 2006-02-20 17:08 UTC (permalink / raw)
Cc: Luc Teirlinck, emacs-devel
The 2006-02-19 change to regex.c, changing malloc and realloc to
xmalloc and xrealloc, doesn't do what it is apparently supposed to do,
since regex.c defines malloc as xmalloc, realloc as xrealloc, and free
as xfree when linked with Emacs. For the case when it is not linked
with Emacs, I added xmalloc and xrealloc definitions (no need for
xfree, since its only purpose is to call BLOCK_INPUT), and put in the
same malloc -> xmalloc, realloc -> xrealloc redefinitions.
I hope this is correct way to go. One worry: if another
non-Emacs-linked file #includes regex.c and defines its own xmalloc,
ugliness may ensue.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Recent changes to regex.c break bootstrapping
2006-02-20 17:08 ` Chong Yidong
@ 2006-02-20 22:53 ` Giorgos Keramidas
0 siblings, 0 replies; 7+ messages in thread
From: Giorgos Keramidas @ 2006-02-20 22:53 UTC (permalink / raw)
Cc: Jan D., Luc Teirlinck, emacs-devel
On 2006-02-20 12:08, Chong Yidong <cyd@stupidchicken.com> wrote:
> The 2006-02-19 change to regex.c, changing malloc and realloc to
> xmalloc and xrealloc, doesn't do what it is apparently supposed to do,
> since regex.c defines malloc as xmalloc, realloc as xrealloc, and free
> as xfree when linked with Emacs. For the case when it is not linked
> with Emacs, I added xmalloc and xrealloc definitions (no need for
> xfree, since its only purpose is to call BLOCK_INPUT), and put in the
> same malloc -> xmalloc, realloc -> xrealloc redefinitions.
>
> I hope this is correct way to go. One worry: if another
> non-Emacs-linked file #includes regex.c and defines its own xmalloc,
> ugliness may ensue.
If the intent is to make regex.[ch] as self-reliant as possible,
it may be better to copy xrealloc/xmalloc into regex.c and make
them static.
The etags build is easy to fix with a small patch to etags.c, which
I posted earlier, but I'm not sure if it's ok for regex.c to rely on
its callers to support xrealloc() and xmalloc().
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Recent changes to regex.c break bootstrapping
2006-02-20 6:10 Recent changes to regex.c break bootstrapping Luc Teirlinck
2006-02-20 7:47 ` Jan D.
@ 2006-02-20 22:05 ` Richard M. Stallman
1 sibling, 0 replies; 7+ messages in thread
From: Richard M. Stallman @ 2006-02-20 22:05 UTC (permalink / raw)
Cc: emacs-devel
My change to regex.c turns out to be incorrect, and unnecessary,
since malloc is redefined as xmalloc when compiling for Emacs.
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2006-02-20 22:53 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-02-20 6:10 Recent changes to regex.c break bootstrapping Luc Teirlinck
2006-02-20 7:47 ` Jan D.
2006-02-20 15:02 ` Andreas Schwab
2006-02-20 16:26 ` Chong Yidong
2006-02-20 17:08 ` Chong Yidong
2006-02-20 22:53 ` Giorgos Keramidas
2006-02-20 22:05 ` Richard M. Stallman
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.