NetBSD Problem Report #46802
From www@NetBSD.org Wed Aug 15 09:36:08 2012
Received: from mail.netbsd.org (mail.netbsd.org [184.108.40.206])
by www.NetBSD.org (Postfix) with ESMTP id EC47663B882
for <gnats-bugs@gnats.NetBSD.org>; Wed, 15 Aug 2012 09:36:07 +0000 (UTC)
Date: Wed, 15 Aug 2012 09:36:05 +0000 (UTC)
Subject: lang/clang: path issue due to being built on system compiler
>Synopsis: lang/clang: path issue due to being built on system compiler
>Arrival-Date: Wed Aug 15 09:40:00 +0000 2012
>Closed-Date: Tue Apr 16 12:43:22 +0000 2013
>Last-Modified: Tue Apr 16 12:43:22 +0000 2013
>Originator: John Marino
>Release: DragonFly 3.1
Clang apparently doesn't bootstrap itself, but builds with the system compiler.
The DragonFly compilers will automatically insert an rpath of "/usr/lib/gcc41" or "/usr/lib/gcc44" to every built executable. And it's doing it for clang.
> readelf -a /usr/pkg/bin/clang++ | grep -i rpath
0x000000000000000f (RPATH) Library rpath: [/usr/lib/gcc44:/usr/pkg/lib]
> ldd /usr/pkg/bin/clang++
libpthread.so.0 => /usr/lib/libpthread.so.0 (0x802359000)
libstdc++.so.9 => /usr/lib/gcc44/libstdc++.so.9 (0x802570000)
libm.so.3 => /usr/lib/libm.so.3 (0x802884000)
libc.so.7 => /usr/lib/libc.so.7 (0x802aa3000)
The result is that clang tries to use system gcc libstd++ which doesn't end well.
Build clang on any compiler that automatically inserts a base runpath. Perhaps DragonFly is unique here.
Clang needs to build itself, and it needs to specify it's own libstd++ inside the build directory rather than relying on system libstdc++.
From: John Marino <email@example.com>
Subject: Re: pkg/46802: lang/clang: path issue due to being built on system
Date: Tue, 16 Apr 2013 14:02:37 +0200
This PR can be closed.
1) The original report was in error, this was caused by something else
2) It's been resolved in recent clang packages and recently upstream as
State-Changed-When: Tue, 16 Apr 2013 12:43:22 +0000
$NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.