* poisoned "malloc"
@ 2008-07-17 12:34 Stephan Zimmer
2008-07-18 15:20 ` Ian Lance Taylor
0 siblings, 1 reply; 4+ messages in thread
From: Stephan Zimmer @ 2008-07-17 12:34 UTC (permalink / raw)
To: gcc-help
Hi there,
I was trying to build a gcc cross toolchain for v850-elf. Following the advices on http://ecos.sourceware.org/build-toolchain.html, unfortunately, I failed compiling the gcc with the following error message:
-----------------------
c-parse.y:312.11-65: warning: unused value: $2
c-parse.y:2225.11-2229.37: warning: unused value: $5
/usr/bin/gcc-3.3 -DIN_GCC -DCROSS_COMPILE -g -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wtraditional -pedantic -Wno-long-long -DHAVE_CONFIG_H -I. -I. -I/tmp/stephan/src/gcc-3.2.1/gcc -I/tmp/stephan/src/gcc-3.2.1/gcc/. -I/tmp/stephan/src/gcc-3.2.1/gcc/config -I/tmp/stephan/src/gcc-3.2.1/gcc/../include \
-c /tmp/stephan/src/gcc-3.2.1/gcc/c-parse.c -o c-parse.o
c-p9871.c:380:2: warning: suggest not using #elif in traditional C
[...]
c-p9871.c:464:5: warning: suggest not using #elif in traditional C
c-p9871.c:497:43: attempt to use poisoned "malloc"
c-p9871.c: In function `yy_symbol_value_print':
c-p9871.c:2282: warning: traditional C rejects ISO C style function definitions
[...]
c-p9871.c:2716: warning: traditional C rejects ISO C style function definitions
c-p9871.c:2834: warning: implicit declaration of function `nonexistent'
c-p9871.c:2834: warning: cast to pointer from integer of different size
make[1]: *** [c-parse.o] Error 1
make[1]: Leaving directory `/tmp/stephan/build/gcc/gcc'
make: *** [all-gcc] Error 2
make: Leaving directory `/tmp/stephan/build/gcc'
-----------------------
I tried to solve the problem with the 'poisoned "malloc"' by applying the YYMALLOC patches as, e.g., described at http://gcc.gnu.org/ml/gcc/2004-09/msg00927.html. However, the error persists. Can anyone help? What actually is a "poisoned" (x){c,m}alloc?
Best,
Stephan
____________________________________________________________________
Ihre Messenger, Communities und E-Mails jetzt in einem Programm!
WEB.DE MultiMessenger http://www.produkte.web.de/messenger/?did=3071
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: poisoned "malloc"
2008-07-17 12:34 poisoned "malloc" Stephan Zimmer
@ 2008-07-18 15:20 ` Ian Lance Taylor
2008-07-18 17:31 ` Stephan Zimmer
2008-07-20 2:45 ` Wesley Smith
0 siblings, 2 replies; 4+ messages in thread
From: Ian Lance Taylor @ 2008-07-18 15:20 UTC (permalink / raw)
To: Stephan Zimmer; +Cc: gcc-help
Stephan Zimmer <st.zimmer@web.de> writes:
> c-p9871.c:497:43: attempt to use poisoned "malloc"
Try installing a new version of bison.
> I tried to solve the problem with the 'poisoned "malloc"' by
> applying the YYMALLOC patches as, e.g., described at
> http://gcc.gnu.org/ml/gcc/2004-09/msg00927.html. However, the error
> persists. Can anyone help? What actually is a "poisoned"
> (x){c,m}alloc?
This happens because gcc/system.h says
#pragma GCC poison malloc realloc
It is because gcc source code should not use malloc. In your case the
error is happening in code generated by yacc/bison.
Ian
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: poisoned "malloc"
2008-07-18 15:20 ` Ian Lance Taylor
@ 2008-07-18 17:31 ` Stephan Zimmer
2008-07-20 2:45 ` Wesley Smith
1 sibling, 0 replies; 4+ messages in thread
From: Stephan Zimmer @ 2008-07-18 17:31 UTC (permalink / raw)
To: gcc-help; +Cc: Ian Lance Taylor
Ian,
thanks for your reply.
2008/7/18 Ian Lance Taylor <iant@google.com>:
> Try installing a new version of bison.
I'm already using the most recent version of bison (2.3). Shall I
maybe try to use an older version?
Best,
Stephan
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: poisoned "malloc"
2008-07-18 15:20 ` Ian Lance Taylor
2008-07-18 17:31 ` Stephan Zimmer
@ 2008-07-20 2:45 ` Wesley Smith
1 sibling, 0 replies; 4+ messages in thread
From: Wesley Smith @ 2008-07-20 2:45 UTC (permalink / raw)
To: GCC-help
Hi,
I'm trying to figure out how to manage shared library dependencies via
g++ on ubuntu 6.10. I have a shared library I'm building that links
against some other shared libraries. For reasons particular to my
project, I'm not putting the dependencies in /usr/lib but in a
completely different dir. I can link against them just fine using -L,
but when I run ldd on the resulting lib, it can't find them. Ideally,
I'd like to add the runtime link path aka LD_RUN_PATH "./" (i.e. path
of the lib itself). How can I specify this path to g++? I've seen -R
used in some places, but g++ doesn't understand it.
thanks,
wes
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2008-07-20 2:44 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-07-17 12:34 poisoned "malloc" Stephan Zimmer
2008-07-18 15:20 ` Ian Lance Taylor
2008-07-18 17:31 ` Stephan Zimmer
2008-07-20 2:45 ` Wesley Smith
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).