[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#195123: marked as done (libc6-dev: Bug in alloca.h for compilers other than gcc)



Your message dated Thu, 12 Aug 2004 08:42:31 +0900
with message-id <81acx15jiw.wl@omega.webmasters.gr.jp>
and subject line Bug#195123: libc6-dev: Bug in alloca.h for compilers other than gcc
has caused the attached Bug report to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere.  Please contact me immediately.)

Debian bug tracking system administrator
(administrator, Debian Bugs database)

--------------------------------------
Received: (at submit) by bugs.debian.org; 28 May 2003 21:01:53 +0000
>From ssb22@cam.ac.uk Wed May 28 16:01:50 2003
Return-path: <ssb22@cam.ac.uk>
Received: from gold.csi.cam.ac.uk [131.111.8.12] 
	by master.debian.org with esmtp (Exim 3.35 1 (Debian))
	id 19L83R-0000Eo-00; Wed, 28 May 2003 16:01:50 -0500
Received: from ssb22.joh.cam.ac.uk ([131.111.142.162])
	by gold.csi.cam.ac.uk with esmtp (Exim 4.20)
	id 19L83Q-0006sx-5c; Wed, 28 May 2003 22:01:48 +0100
Received: from ssb22 by ssb22.joh.cam.ac.uk with local (Exim 3.35 #1 (Debian))
	id 19L83U-0007Xn-00; Wed, 28 May 2003 22:01:52 +0100
From: "Silas S. Brown" <ssb22@cam.ac.uk>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: libc6-dev: Bug in alloca.h for compilers other than gcc
X-Mailer: reportbug 1.50
Date: Wed, 28 May 2003 22:01:52 +0100
Message-Id: <E19L83U-0007Xn-00@ssb22.joh.cam.ac.uk>
X-Cam-ScannerAdmin: mail-scanner-support@ucs.cam.ac.uk
X-Cam-AntiVirus: Not scanned
X-Cam-SpamDetails: 
Delivered-To: submit@bugs.debian.org
X-Spam-Status: No, hits=-4.8 required=4.0
	tests=BAYES_01,FROM_ENDS_IN_NUMS,HAS_PACKAGE
	version=2.53-bugs.debian.org_2003_05_24
X-Spam-Level: 
X-Spam-Checker-Version: SpamAssassin 2.53-bugs.debian.org_2003_05_24 (1.174.2.15-2003-03-30-exp)

Package: libc6-dev
Version: 2.2.5-11.5
Severity: normal

In /usr/include/alloca.h we find

--------------------------------------------------------
extern void *alloca (size_t __size) __THROW;

#ifdef	__GNUC__
# define alloca(size)	__builtin_alloca (size)
#endif /* GCC.  */
--------------------------------------------------------

Things work fine with gcc, but they don't with anything else
- the alloca referred to in the extern void* doesn't seem to
exist in the libraries.

In particular, I tried TCC (package tcc) and I used it to
compile lwc version 0.5, available at
http://students.ceid.upatras.gr/~sxanth/lwc/lwc-0.5.tar.bz2
(I replaced gcc with tcc in the Makefile) and the result was

tcc -O2 main.c objdir/*.o -o objdir/lwc
tcc: undefined symbol 'alloca'

and also I tried doing this last step with gcc, but with
similar results:

gcc -O2 main.c objdir/*.o -o objdir/lwc
objdir/dcl.o: In function `add_this':
objdir/dcl.o(.text+0x1152): undefined reference to `alloca'
objdir/dcl.o: In function `mark_function_def':
objdir/dcl.o(.text+0x2702): undefined reference to `alloca'
objdir/dcl.o: In function `pdcl_function':
objdir/dcl.o(.text+0x2871): undefined reference to `alloca'
objdir/dcl.o: In function `send_virtual':
objdir/dcl.o(.text+0x29f4): undefined reference to `alloca'
objdir/dcl.o(.text+0x2ab8): undefined reference to `alloca'
objdir/dcl.o(.text+0x32f4): more undefined references to `alloca' follow
collect2: ld returned 1 exit status

but it worked fine with gcc-3.0 in the Makefile instead of
tcc.

(I wasn't sure whether to report this as libc6 or libc6-dev)

-- System Information
Debian Release: 3.0
Architecture: i386
Kernel: Linux ssb22 2.4.21-rc1-ssb #13 Tue Apr 29 16:48:19 BST 2003 i686
Locale: LANG=en_GB, LC_CTYPE=en_GB

Versions of packages libc6-dev depends on:
ii  libc6                         2.2.5-11.5 GNU C Library: Shared libraries an


---------------------------------------
Received: (at 195123-done) by bugs.debian.org; 11 Aug 2004 23:42:37 +0000
>From gotom@debian.or.jp Wed Aug 11 16:42:37 2004
Return-path: <gotom@debian.or.jp>
Received: from omega.webmasters.gr.jp (webmasters.gr.jp) [218.44.239.78] 
	by spohr.debian.org with esmtp (Exim 3.35 1 (Debian))
	id 1Bv2jt-0002Io-00; Wed, 11 Aug 2004 16:42:37 -0700
Received: from omega.webmasters.gr.jp (localhost [127.0.0.1])
	by webmasters.gr.jp (Postfix) with ESMTP
	id 339BADEB58; Thu, 12 Aug 2004 08:42:32 +0900 (JST)
Date: Thu, 12 Aug 2004 08:42:31 +0900
Message-ID: <81acx15jiw.wl@omega.webmasters.gr.jp>
From: GOTO Masanori <gotom@debian.or.jp>
To: "Silas S. Brown" <ssb22@cam.ac.uk>, 195123-done@bugs.debian.org
Subject: Re: Bug#195123: libc6-dev: Bug in alloca.h for compilers other than gcc
In-Reply-To: <E19L83U-0007Xn-00@ssb22.joh.cam.ac.uk>
References: <E19L83U-0007Xn-00@ssb22.joh.cam.ac.uk>
User-Agent: Wanderlust/2.9.9 (Unchained Melody) SEMI/1.14.3 (Ushinoya)
 FLIM/1.14.3 (=?ISO-8859-4?Q?Unebigory=F2mae?=) APEL/10.3 Emacs/21.2
 (i386-debian-linux-gnu) MULE/5.0 (SAKAKI)
MIME-Version: 1.0 (generated by SEMI 1.14.3 - "Ushinoya")
Content-Type: text/plain; charset=US-ASCII
Delivered-To: 195123-done@bugs.debian.org
X-Spam-Checker-Version: SpamAssassin 2.60-bugs.debian.org_2004_03_25 
	(1.212-2003-09-23-exp) on spohr.debian.org
X-Spam-Status: No, hits=-6.0 required=4.0 tests=BAYES_00,HAS_BUG_NUMBER 
	autolearn=no version=2.60-bugs.debian.org_2004_03_25
X-Spam-Level: 

At Wed, 28 May 2003 22:01:52 +0100,
Silas S. Brown <ssb22@cam.ac.uk> wrote:
> In /usr/include/alloca.h we find
> 
> --------------------------------------------------------
> extern void *alloca (size_t __size) __THROW;
> 
> #ifdef	__GNUC__
> # define alloca(size)	__builtin_alloca (size)
> #endif /* GCC.  */
> --------------------------------------------------------
> 
> Things work fine with gcc, but they don't with anything else
> - the alloca referred to in the extern void* doesn't seem to
> exist in the libraries.
> 
> In particular, I tried TCC (package tcc) and I used it to
> compile lwc version 0.5, available at
> http://students.ceid.upatras.gr/~sxanth/lwc/lwc-0.5.tar.bz2
> (I replaced gcc with tcc in the Makefile) and the result was
> 
> tcc -O2 main.c objdir/*.o -o objdir/lwc
> tcc: undefined symbol 'alloca'
> 
> and also I tried doing this last step with gcc, but with
> similar results:
> 
> gcc -O2 main.c objdir/*.o -o objdir/lwc
> objdir/dcl.o: In function `add_this':
> objdir/dcl.o(.text+0x1152): undefined reference to `alloca'
> objdir/dcl.o: In function `mark_function_def':
> objdir/dcl.o(.text+0x2702): undefined reference to `alloca'
> objdir/dcl.o: In function `pdcl_function':
> objdir/dcl.o(.text+0x2871): undefined reference to `alloca'
> objdir/dcl.o: In function `send_virtual':
> objdir/dcl.o(.text+0x29f4): undefined reference to `alloca'
> objdir/dcl.o(.text+0x2ab8): undefined reference to `alloca'
> objdir/dcl.o(.text+0x32f4): more undefined references to `alloca' follow
> collect2: ld returned 1 exit status
> 
> but it worked fine with gcc-3.0 in the Makefile instead of
> tcc.

The root problem of this bug is: lwc uses alloca.  alloca depends on
the environment and compiler.  alloca is not standardized.  If you
need to use alloca with tcc, tcc should support them.

I close this bug.

Regards,
-- gotom



Reply to: