[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Tinycc-devel] Symbol collision for function error
From: |
Andrea Fazzi |
Subject: |
Re: [Tinycc-devel] Symbol collision for function error |
Date: |
Thu, 09 Jul 2009 11:59:48 +0200 |
User-agent: |
Sup/git |
Excerpts from grischka's message of mer lug 08 12:19:02 +0200 2009:
> Andrea Fazzi wrote:
> > Hi all,
> >
> > I wonder if is planned a fix for the issue described in the first
> > part of the post below:
> >
> > http://lists.gnu.org/archive/html/tinycc-devel/2007-04/msg00007.html
> >
> > I'm developing a ruby binding for libtcc and I've got the same issue with
> > the "error" symbol. Fixing the Makefile as indicated in the post solves the
> > problem.
> >
> > Why that patch is not in the mob branch? Is a glibc problem?
>
> The patch is just a quick hack. If at all we could rename error
> to tcc_error all over the source code. Nut I'm not quite sure
> that libc should have a symbol called "error".
>
> And what is the problem exactly? Does TCC use the wrong "error"
> or does something else use tcc's error? Also there should be a
> warning AFAIK, with duplicate symbols in libraries.
Unfortunately, at the moment I'm not able to reproduce the error in a C
program. Consider I'm interfacing to libtcc through an FFI layer[1][2], if
this can help. BTW, it seems that TCC is using the wrong error function.
When I try to compile wrong C code like this:
void boom() { boom
I get weird error messages on stderr:
ruby: �C���ם�: Bad font file format
Now, I guess that the expected error message should be:
<string>:1: error: 'boom' undeclared
It's worth noting that looking at the two messages we can recognize the
pattern %s:%d:%s ...
[1] - http://github.com/remogatto/ffi-tcc
[2] - http://kenai.com/projects/ruby-ffi
Thanks in advance.
Andrea
--
Andrea Fazzi @ alca.le.it
Follow me on http://twitter.com/remogatto