All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Brian Cain" <bcain@codeaurora.org>
To: 'Nick Desaulniers' <ndesaulniers@google.com>,
	'Christoph Hellwig' <hch@lst.de>
Cc: "'Manning, Sid'" <sidneym@quicinc.com>,
	'Nathan Chancellor' <nathan@kernel.org>,
	'Sid Manning' <sidneym@codeaurora.org>,
	'Arnd Bergmann' <arnd@arndb.de>,
	linux-hexagon@vger.kernel.org, linux-kernel@vger.kernel.org,
	clang-built-linux@googlegroups.com
Subject: RE: how can we test the hexagon port in mainline
Date: Thu, 8 Jul 2021 13:35:49 -0500	[thread overview]
Message-ID: <0a6801d77428$13c88060$3b598120$@codeaurora.org> (raw)
In-Reply-To: <CAKwvOd=iRLQPum8-jaCG90TPyxDptNB31yRHMEWgSMxjv=KuHA@mail.gmail.com>

> -----Original Message-----
> From: Nick Desaulniers <ndesaulniers@google.com>
> Sent: Thursday, July 8, 2021 12:54 PM
> To: Christoph Hellwig <hch@lst.de>
> Cc: Nathan Chancellor <nathan@kernel.org>; Brian Cain
> <bcain@codeaurora.org>; Sid Manning <sidneym@codeaurora.org>; Arnd
> Bergmann <arnd@arndb.de>; linux-hexagon@vger.kernel.org; linux-
> kernel@vger.kernel.org; clang-built-linux@googlegroups.com
> Subject: Re: how can we test the hexagon port in mainline
> 
> On Wed, Jul 7, 2021 at 10:27 PM Christoph Hellwig <hch@lst.de> wrote:
> >
> > On Wed, Jul 07, 2021 at 10:42:27AM -0700, Nathan Chancellor wrote:
> > >> hch@brick:~/work/linux$ make -j4 ARCH=hexagon
> > >> CROSS_COMPILE=hexagon-unknown-linux-musl LLVM=1 LLVM_IAS=1
> defconfig all
> > >> HOSTCC  scripts/basic/fixdep
> > >> clang: error while loading shared libraries: libtinfo.so.5: cannot open
> shared object file: No such file or directory
> > >
> > > Hmmm, is that with libtinfo5 installed (or whatever the ncurses-compat
> > > equivalent is on your distribution installed)? I had that problem on Debian
> > > until I insta
> >
> > I did install libtinfo5, which just gets me to the next error:
> >
> > hch@brick:~/work/linux$ export PATH=/opt/clang+llvm-12.0.0-cross-
> hexagon-unknown-linux-musl/x86_64-linux-gnu/bin/:$PATH
> > hch@brick:~/work/linux$ make -j4 ARCH=hexagon
> CROSS_COMPILE=hexagon-unknown-linux-musl LLVM=1 LLVM_IAS=1 defconfig
> all
> >   HOSTCC  scripts/basic/fixdep
> > clang: error while loading shared libraries: libc++.so.1: cannot open shared
> object file: No such file or directory
> 
> ^ Nathan did mention earlier in the thread that he "had to install
> libtinfo5 and libc++1-7 on Debian Buster." Emphasis on the _and
> libc++_ part.
> 
> I'm not sure if that binary distribution came with a libc++.so.1; if
> so, that path needs to be specified via LD_LIBRARY_PATH so that the
> runtime loader can find it.  Perhaps rpath wasn't set when the clang
> binary was built.

The only libc++ builds in this distribution are the target hexagon ones.  I did not include a host x86_64 libc++.so library, but it does seem like it would be more convenient if we did.

Nathan suggested disabling the terminfo dependency, I will include that change for the next release that we produce.  Also, the upcoming clang-13 release from releases.llvm.org should contain all the necessary fixes (discussed recently) to build kernel code for hexagon.

> We're looking into statically linked images of clang to prevent these
> kinds of games.

Statically linking against libc++/libc++abi at least seems like a good idea.  Let me know if we can help.

-Brian


WARNING: multiple messages have this Message-ID (diff)
From: "Brian Cain" <bcain@codeaurora.org>
To: "'Nick Desaulniers'" <ndesaulniers@google.com>,
	"'Christoph Hellwig'" <hch@lst.de>
Cc: "'Manning, Sid'" <sidneym@quicinc.com>,
	"'Nathan Chancellor'" <nathan@kernel.org>,
	"'Sid Manning'" <sidneym@codeaurora.org>,
	"'Arnd Bergmann'" <arnd@arndb.de>,
	<linux-hexagon@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	<clang-built-linux@googlegroups.com>
Subject: RE: how can we test the hexagon port in mainline
Date: Thu, 8 Jul 2021 13:35:49 -0500	[thread overview]
Message-ID: <0a6801d77428$13c88060$3b598120$@codeaurora.org> (raw)
In-Reply-To: <CAKwvOd=iRLQPum8-jaCG90TPyxDptNB31yRHMEWgSMxjv=KuHA@mail.gmail.com>

> -----Original Message-----
> From: Nick Desaulniers <ndesaulniers@google.com>
> Sent: Thursday, July 8, 2021 12:54 PM
> To: Christoph Hellwig <hch@lst.de>
> Cc: Nathan Chancellor <nathan@kernel.org>; Brian Cain
> <bcain@codeaurora.org>; Sid Manning <sidneym@codeaurora.org>; Arnd
> Bergmann <arnd@arndb.de>; linux-hexagon@vger.kernel.org; linux-
> kernel@vger.kernel.org; clang-built-linux@googlegroups.com
> Subject: Re: how can we test the hexagon port in mainline
> 
> On Wed, Jul 7, 2021 at 10:27 PM Christoph Hellwig <hch@lst.de> wrote:
> >
> > On Wed, Jul 07, 2021 at 10:42:27AM -0700, Nathan Chancellor wrote:
> > >> hch@brick:~/work/linux$ make -j4 ARCH=hexagon
> > >> CROSS_COMPILE=hexagon-unknown-linux-musl LLVM=1 LLVM_IAS=1
> defconfig all
> > >> HOSTCC  scripts/basic/fixdep
> > >> clang: error while loading shared libraries: libtinfo.so.5: cannot open
> shared object file: No such file or directory
> > >
> > > Hmmm, is that with libtinfo5 installed (or whatever the ncurses-compat
> > > equivalent is on your distribution installed)? I had that problem on Debian
> > > until I insta
> >
> > I did install libtinfo5, which just gets me to the next error:
> >
> > hch@brick:~/work/linux$ export PATH=/opt/clang+llvm-12.0.0-cross-
> hexagon-unknown-linux-musl/x86_64-linux-gnu/bin/:$PATH
> > hch@brick:~/work/linux$ make -j4 ARCH=hexagon
> CROSS_COMPILE=hexagon-unknown-linux-musl LLVM=1 LLVM_IAS=1 defconfig
> all
> >   HOSTCC  scripts/basic/fixdep
> > clang: error while loading shared libraries: libc++.so.1: cannot open shared
> object file: No such file or directory
> 
> ^ Nathan did mention earlier in the thread that he "had to install
> libtinfo5 and libc++1-7 on Debian Buster." Emphasis on the _and
> libc++_ part.
> 
> I'm not sure if that binary distribution came with a libc++.so.1; if
> so, that path needs to be specified via LD_LIBRARY_PATH so that the
> runtime loader can find it.  Perhaps rpath wasn't set when the clang
> binary was built.

The only libc++ builds in this distribution are the target hexagon ones.  I did not include a host x86_64 libc++.so library, but it does seem like it would be more convenient if we did.

Nathan suggested disabling the terminfo dependency, I will include that change for the next release that we produce.  Also, the upcoming clang-13 release from releases.llvm.org should contain all the necessary fixes (discussed recently) to build kernel code for hexagon.

> We're looking into statically linked images of clang to prevent these
> kinds of games.

Statically linking against libc++/libc++abi at least seems like a good idea.  Let me know if we can help.

-Brian


  reply	other threads:[~2021-07-08 18:35 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-23 14:18 how can we test the hexagon port in mainline Christoph Hellwig
2021-06-23 14:39 ` Brian Cain
2021-06-23 14:39   ` Brian Cain
2021-06-23 14:53   ` Arnd Bergmann
2021-06-23 15:15     ` Brian Cain
2021-06-23 15:17       ` 'Christoph Hellwig'
2021-06-23 15:35         ` Arnd Bergmann
2021-06-24  4:06           ` Nathan Chancellor
2021-07-07 14:10             ` Christoph Hellwig
2021-07-07 17:42               ` Nathan Chancellor
2021-07-08  5:27                 ` Christoph Hellwig
2021-07-08 17:54                   ` Nick Desaulniers
2021-07-08 18:35                     ` Brian Cain [this message]
2021-07-08 18:35                       ` Brian Cain
2021-07-08 19:08                       ` Nick Desaulniers
2021-06-23 15:10   ` 'Christoph Hellwig'

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='0a6801d77428$13c88060$3b598120$@codeaurora.org' \
    --to=bcain@codeaurora.org \
    --cc=arnd@arndb.de \
    --cc=clang-built-linux@googlegroups.com \
    --cc=hch@lst.de \
    --cc=linux-hexagon@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nathan@kernel.org \
    --cc=ndesaulniers@google.com \
    --cc=sidneym@codeaurora.org \
    --cc=sidneym@quicinc.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.