Re: Another clang problem

From: Dimitry Andric <dim_at_FreeBSD.org>
Date: Sun, 03 Oct 2010 17:21:15 +0200
On 2010-10-03 15:41, Derek Tattersall wrote:
> In updating gnash to 8.8 the build failed while linking with libvgl.so.  My
> current system was built last week, with both kernel and world built
> with clang.  The linkage failure was due to an inlined function,
> "set4pixels" which is only referred to, as far as I can tell, within the
> source file simple.c which contains the function definition.

The problem is that set4pixels() and another function set2lines() are
defined as 'inline' functions in simple.c, but it is compiled with
-std=gnu99.  This means that these definitions cannot be called from
another object file.

So, either libvgl should be compiled with -std=gnu89, or somebody who
knows about libvgl's "official" API should decide whether these
functions must be externally accessible or not.  Since libvgl looks very
old (it was imported 8 years ago, and the last functional change was 6
years ago), the former is probably the easiest fix.


> I rebuilt libvgl.so using gcc and gnash linked properly.  It seems, at
> least in this case, that clang has some problems dealing with inlined
> functions.

Since gnash has about a gazillion dependencies, and I have the idea that
after 12 hours of building stuff, I will not be able to reproduce your
error message anyway, could you please post it (or upload it, if it is
very large)?

Also, please note that building ports with clang is still experimental,
although various people are actively working on it.  And there are
*many* ports that have totally broken configure scripts, or that just
assume the only software in the world is GNU. :)

See http://wiki.freebsd.org/PortsAndClang for some information (although
it is a little outdated now), and a link to patches.  Any help in this
area is appreciated!
Received on Sun Oct 03 2010 - 13:21:09 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:08 UTC