From: Eitan Adler on
On Tue, Jun 29, 2010 at 11:00 PM, Anonymous <swell.k(a)gmail.com> wrote:
> Eitan Adler <lists(a)eitanadler.com> writes:
>
>>> One difference I notice between your environment and mine is that, according
>>> to your bug report, your program links against
>>> /usr/local/lib/gcc46/libstdc++.so.6, while mine links against
>>> /usr/lib/libstdc++.so.6.
>>>
>>> -Boris
>>>
>> I forgot about that. I use gcc46 to build ports and have
>> libstdc++.so.6  gcc46/libstdc++.so.6
>> in /etc/libmap.conf
>
> I have clang++ (devel/llvm-devel) built by g++45 and linked against
> gcc45/libstdc++.so.6. It compiles your test case fine. But I'm running
> 9-current on amd64 so it may not be that useful.
>
> IMO, gcc46 being a development branch is prone to miscompile and have bugs.

I'm not that familiar with with mapping. Since g++46/* is built with
g++46 and my program is compiled by clang++ is it expected that they
be compatible?
If yes does that mean this is a bug in g++46 or clang++?

--
Eitan Adler
_______________________________________________
freebsd-ports(a)freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscribe(a)freebsd.org"

From: Anonymous on
Eitan Adler <lists(a)eitanadler.com> writes:

> On Tue, Jun 29, 2010 at 11:00 PM, Anonymous <swell.k(a)gmail.com> wrote:
>> Eitan Adler <lists(a)eitanadler.com> writes:
>>
>>>> One difference I notice between your environment and mine is that, according
>>>> to your bug report, your program links against
>>>> /usr/local/lib/gcc46/libstdc++.so.6, while mine links against
>>>> /usr/lib/libstdc++.so.6.
>>>>
>>>> -Boris
>>>>
>>> I forgot about that. I use gcc46 to build ports and have
>>> libstdc++.so.6  gcc46/libstdc++.so.6
>>> in /etc/libmap.conf
>>
>> I have clang++ (devel/llvm-devel) built by g++45 and linked against
>> gcc45/libstdc++.so.6. It compiles your test case fine. But I'm running
>> 9-current on amd64 so it may not be that useful.
>>
>> IMO, gcc46 being a development branch is prone to miscompile and have bugs.
>
> I'm not that familiar with with mapping.

> Since g++46/* is built with g++46

It's more interesting which gcc version you used for compiling clang.

> and my program is compiled by clang++ is it expected that they be
> compatible? If yes does that mean this is a bug in g++46 or clang++?

Either -lstdc++ from gcc46 is buggy or just clang++ doesn't like it.
It's better to use -lstdc++ from same version of gcc by which the
program using it was compiled.
_______________________________________________
freebsd-ports(a)freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscribe(a)freebsd.org"

From: Eitan Adler on
>>> I have clang++ (devel/llvm-devel) built by g++45 and linked against
>>> gcc45/libstdc++.so.6. It compiles your test case fine. But I'm running
>>> 9-current on amd64 so it may not be that useful.
>>>
>>> IMO, gcc46 being a development branch is prone to miscompile and have bugs.
>>
>> I'm not that familiar with with mapping.
>
>> Since g++46/* is built with g++46
>
> It's more interesting which gcc version you used for compiling clang.

I forgot. Most likely it was base gcc as I have an exemption in my
/etc/make.conf for it.

>> and my program is compiled by clang++ is it expected that they be
>> compatible? If yes does that mean this is a bug in g++46 or clang++?
>
> Either -lstdc++ from gcc46 is buggy or just clang++ doesn't like it.
> It's better to use -lstdc++ from same version of gcc by which the
> program using it was compiled.

Is it possible to determine which one?
Is this something that is my fault for playing around too much or did
I expose a bug ?



--
Eitan Adler
_______________________________________________
freebsd-ports(a)freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscribe(a)freebsd.org"

From: Anonymous on
Eitan Adler <lists(a)eitanadler.com> writes:

>>>> I have clang++ (devel/llvm-devel) built by g++45 and linked against
>>>> gcc45/libstdc++.so.6. It compiles your test case fine. But I'm running
>>>> 9-current on amd64 so it may not be that useful.
>>>>
>>>> IMO, gcc46 being a development branch is prone to miscompile and have bugs.
>>>
>>> I'm not that familiar with with mapping.
>>
>>> Since g++46/* is built with g++46
>>
>> It's more interesting which gcc version you used for compiling clang.
>
> I forgot. Most likely it was base gcc as I have an exemption in my
> /etc/make.conf for it.

Try to remove that conditional and rebuild with gcc46. If it doesn't
compile/work try again with gcc45.

>
>>> and my program is compiled by clang++ is it expected that they be
>>> compatible? If yes does that mean this is a bug in g++46 or clang++?
>>
>> Either -lstdc++ from gcc46 is buggy or just clang++ doesn't like it.
>> It's better to use -lstdc++ from same version of gcc by which the
>> program using it was compiled.
>
> Is it possible to determine which one?

No. If there is an easy way I think strings(1) would show.

> Is this something that is my fault for playing around too much or did
> I expose a bug ?

It can be both. ;) I remember gcc45 segfaulting on me pretty often when
it was a devel branch.
_______________________________________________
freebsd-ports(a)freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscribe(a)freebsd.org"

From: Anonymous on
Anonymous <swell.k(a)gmail.com> writes:

>>> It's better to use -lstdc++ from same version of gcc by which the
>>> program using it was compiled.
>>
>> Is it possible to determine which one?
>
> No. If there is an easy way I think strings(1) would show.

Doh,

$ strings $LOCALBASE/lib/libLLVM* | fgrep GCC
GCC: (GNU) 4.5.1 20100617 (prerelease)
_______________________________________________
freebsd-ports(a)freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscribe(a)freebsd.org"