How to Install sel_ldr on debian ?

62 views
Skip to first unread message

lael.c...@gmail.com

unread,
Oct 23, 2016, 6:59:41 AM10/23/16
to Native-Client-Discuss
Hello, which is the binary package I need to install in order to get sel_ldr working on Debian ?
I recognize I have also no idea on how to use sel_ldr to run dynamically linked nexe outside the web browser.

Sam Clegg

unread,
Oct 24, 2016, 5:09:33 PM10/24/16
to native-cli...@googlegroups.com
https://developer.chrome.com/native-client/sdk/download

On Sun, Oct 23, 2016 at 3:59 AM, <lael.c...@gmail.com> wrote:
> Hello, which is the binary package I need to install in order to get sel_ldr
> working on Debian ?

You should download and install the SDK from:
https://developer.chrome.com/native-client/sdk/download

> I recognize I have also no idea on how to use sel_ldr to run dynamically
> linked nexe outside the web browser.

There is a tool called tools/sel_ldr.py in the SDK which should be of
some help to you.

>
> --
> You received this message because you are subscribed to the Google Groups
> "Native-Client-Discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to native-client-di...@googlegroups.com.
> To post to this group, send email to native-cli...@googlegroups.com.
> Visit this group at https://groups.google.com/group/native-client-discuss.
> For more options, visit https://groups.google.com/d/optout.

lael.c...@gmail.com

unread,
Oct 24, 2016, 5:42:31 PM10/24/16
to Native-Client-Discuss
Le lundi 24 octobre 2016 23:09:33 UTC+2, Sam Clegg a écrit :
https://developer.chrome.com/native-client/sdk/download

On Sun, Oct 23, 2016 at 3:59 AM,  <lael.c...@gmail.com> wrote:
> Hello, which is the binary package I need to install in order to get sel_ldr
> working on Debian ?

You should download and install the SDK from:
https://developer.chrome.com/native-client/sdk/download

Yes, but if I do so, it will overwrite some of my installed files like the native binutils or gcc. So I’d like to use a binary package for my distribution.
> I recognize I have also no idea on how to use sel_ldr to run dynamically
> linked nexe outside the web browser.

There is a tool called tools/sel_ldr.py in the SDK which should be of
some help to you.
How to use it ? I mean with which command argument ? 

Sam Clegg

unread,
Oct 24, 2016, 5:50:44 PM10/24/16
to native-cli...@googlegroups.com
On Mon, Oct 24, 2016 at 2:42 PM, <lael.c...@gmail.com> wrote:
> Le lundi 24 octobre 2016 23:09:33 UTC+2, Sam Clegg a écrit :
>>
>> https://developer.chrome.com/native-client/sdk/download
>>
>> On Sun, Oct 23, 2016 at 3:59 AM, <lael.c...@gmail.com> wrote:
>> > Hello, which is the binary package I need to install in order to get
>> > sel_ldr
>> > working on Debian ?
>>
>> You should download and install the SDK from:
>> https://developer.chrome.com/native-client/sdk/download
>>
> Yes, but if I do so, it will overwrite some of my installed files like the
> native binutils or gcc. So I’d like to use a binary package for my
> distribution.

The SDK installs into a directory of your choosing (normally somewhere
in your $HOME). It won't effect the system files or directories or
interfere with your distro. It does not require root privileges to
install.


>>
>> > I recognize I have also no idea on how to use sel_ldr to run dynamically
>> > linked nexe outside the web browser.
>>
>> There is a tool called tools/sel_ldr.py in the SDK which should be of
>> some help to you.
>
> How to use it ? I mean with which command argument ?

In the most simply case just pass the nexe itself as the argument and
it will be run. See --help for more options if you need them.

lael.c...@gmail.com

unread,
Oct 25, 2016, 4:31:16 PM10/25/16
to Native-Client-Discuss
Le lundi 24 octobre 2016 23:50:44 UTC+2, Sam Clegg a écrit :
The SDK installs into a directory of your choosing (normally somewhere
in your $HOME).  It won't effect the system files or directories or
interfere with your distro.  It does not require root privileges to
install.
Ok, so it’s impossible to install it globally, isn’t it ? (something that Fedora provides through packages) 
In the most simply case just pass the nexe itself as the argument and
it will be run.   See --help for more options if you need them.
I’m interested into debugging the validator, How I can build sel_ldr ?

Sam Clegg

unread,
Oct 27, 2016, 12:38:21 PM10/27/16
to native-cli...@googlegroups.com
On Tue, Oct 25, 2016 at 1:31 PM, <lael.c...@gmail.com> wrote:
> Le lundi 24 octobre 2016 23:50:44 UTC+2, Sam Clegg a écrit :
>>
>> The SDK installs into a directory of your choosing (normally somewhere
>> in your $HOME). It won't effect the system files or directories or
>> interfere with your distro. It does not require root privileges to
>> install.
>
> Ok, so it’s impossible to install it globally, isn’t it ? (something that
> Fedora provides through packages)

Its not impossible, its just that there are no pre-built packages for
any specific linux distribution such as redhat or debian. The only
official binary are in simple tar archives.

>>
>> In the most simply case just pass the nexe itself as the argument and
>> it will be run. See --help for more options if you need them.
>
> I’m interested into debugging the validator, How I can build sel_ldr ?

If you want to build stuff yourself you will want to checkout the source:
https://chromium.googlesource.com/native_client/src/native_client.git

You will need to use gclient to get the source plus any dependencies.
See: https://chromium.googlesource.com/native_client/src/native_client/+/master/docs/source.md.

Once you have that you can can use `gn` to build the ninja build file
and then `ninja` to build build sel_ldr or the validator on its own
(ncval).

lael.c...@gmail.com

unread,
Oct 28, 2016, 7:31:18 PM10/28/16
to Native-Client-Discuss


Le jeudi 27 octobre 2016 18:38:21 UTC+2, Sam Clegg a écrit :
On Tue, Oct 25, 2016 at 1:31 PM,  <lael.c...@gmail.com> wrote:
> Le lundi 24 octobre 2016 23:50:44 UTC+2, Sam Clegg a écrit :
>>
>> The SDK installs into a directory of your choosing (normally somewhere
>> in your $HOME).  It won't effect the system files or directories or
>> interfere with your distro.  It does not require root privileges to
>> install.
>
> Ok, so it’s impossible to install it globally, isn’t it ? (something that
> Fedora provides through packages)

Its not impossible, its just that there are no pre-built packages for
any specific linux distribution such as redhat or debian.  The only
official binary are in simple tar archives.

>>
>> In the most simply case just pass the nexe itself as the argument and
>> it will be run.   See --help for more options if you need them.
>
> I’m interested into debugging the validator, How I can build sel_ldr ?

If you want to build stuff yourself you will want to checkout the source:
https://chromium.googlesource.com/native_client/src/native_client.git

You will need to use gclient to get the source plus any dependencies.
See: https://chromium.googlesource.com/native_client/src/native_client/+/master/docs/source.md.

Once you have that you can can use `gn` to build the ninja build file
and then `ninja` to build build sel_ldr or the validator on its own
(ncval).
And how I can compile gn (or download it as a pre‑built binary) without having to download the complete chromium source code ?
In fact I’d like to build native_client with my system provided clang package (fedora) .

lael.c...@gmail.com

unread,
Oct 28, 2016, 7:35:39 PM10/28/16
to Native-Client-Discuss
Le jeudi 27 octobre 2016 18:38:21 UTC+2, Sam Clegg a écrit :
Its not impossible, its just that there are no pre-built packages for
any specific linux distribution such as redhat or debian.  The only
official binary are in simple tar archives.
On Fedora, you can definitely install the native client ꜱᴅᴋ with yum without third party repositories. Though ɢᴅʙ is missing.

Sam Clegg

unread,
Oct 31, 2016, 7:45:53 PM10/31/16
to native-cli...@googlegroups.com
That is interesting. I wasn't aware of any distributions that had
packages the NaCl SDK. Do you have any links to the package?
Googling for "native client sdk rpm package" didn't seem to come up
with anything.

Sam Clegg

unread,
Oct 31, 2016, 7:51:32 PM10/31/16
to native-cli...@googlegroups.com
Actually I mis-spoke. If you want to build native_client standalone
the easiest is the scons build. For example to build sel_ldr, you
would run something like this:

./scons platform=x86_64 MODE=nacl,dbg-host sel_ldr

The gn build is mostly used to building withing chromium builds.

lael.c...@gmail.com

unread,
Oct 31, 2016, 7:59:07 PM10/31/16
to Native-Client-Discuss
Le mardi 1 novembre 2016 00:45:53 UTC+1, Sam Clegg a écrit :
That is interesting.  I wasn't aware of any distributions that had
packages the NaCl SDK.  Do you have any links to the package?
Googling for "native client sdk rpm package" didn't seem to come up
with anything.
You should have more luck with things like “nacl-gcc-debuginfo-4.4.3-18.20150504gitf80d6b9.fc25.x86_64.rpm”  or “nacl-binutils-2.24-8.git1d8592c.fc24.x86_64.rpm”

lael.c...@gmail.com

unread,
Oct 31, 2016, 8:04:17 PM10/31/16
to Native-Client-Discuss
Le mardi 1 novembre 2016 00:51:32 UTC+1, Sam Clegg a écrit :
Actually I mis-spoke.  If you want to build native_client standalone
the easiest is the scons build.   For example to build sel_ldr, you
would run something like this:

./scons platform=x86_64 MODE=nacl,dbg-host sel_ldr

The gn build is mostly used to building withing chromium builds.
I would like to build just sel_ldr with intel mpx. How I can provide my own compile flags.
Also, would scons download the source code for me or do I have to use to git clone first ?

Sam Clegg

unread,
Oct 31, 2016, 8:59:37 PM10/31/16
to native-cli...@googlegroups.com
scons won't download anything, no. The source code is fetched by the
"gclient sync" phase (which fetches from several git repositories).

Sam Clegg

unread,
Oct 31, 2016, 9:08:11 PM10/31/16
to native-cli...@googlegroups.com
Ah, indeed, it looks like someone on the fedora project did package
(or attempt to package) some version of the NaC toolchain:
https://admin.fedoraproject.org/pkgdb/package/rpms/nacl-gcc/

I was not aware of such packages, and would be interested to know how
actively they are maintained. The maintainer did not reach out to us
(the NaCl team) when creating these but if they work then great. It
does look like some key components are missing though, such as
nacl-clang and also the entire pnacl toolchain.

lael.c...@gmail.com

unread,
Oct 31, 2016, 9:11:24 PM10/31/16
to Native-Client-Discuss
Le mardi 1 novembre 2016 01:59:37 UTC+1, Sam Clegg a écrit :
scons won't download anything, no.  The source code is fetched by the
"gclient sync" phase (which fetches from several git repositories).
How can I customise compile flags in order to build sel_ldr with Intel® xmp ?

lael.c...@gmail.com

unread,
Oct 31, 2016, 9:13:35 PM10/31/16
to Native-Client-Discuss
Le mardi 1 novembre 2016 02:08:11 UTC+1, Sam Clegg a écrit :
Ah, indeed, it looks like someone on the fedora project did package
(or attempt to package) some version of the NaC toolchain:
https://admin.fedoraproject.org/pkgdb/package/rpms/nacl-gcc/

I was not aware of such packages, and would be interested to know how
actively they are maintained.  The maintainer did not reach out to us
(the NaCl team) when creating these but if they work then great.  It
does look like some key components are missing though, such as
nacl-clang and also the entire pnacl toolchain.
For ᴘɴaᴄl you should  look to “chromium-native_client-52.0.2743.82-1.20160725git7d72623.fc25.x86_64.rpm”. Though it doesn’t provide anything in the system $PATH

Sam Clegg

unread,
Nov 1, 2016, 12:26:29 PM11/1/16
to native-cli...@googlegroups.com
You'll need to take a look at how the scons build system works. A good
place to start is the top level SConstruct file. As a quick hack it
looks like you could add flags in `MakeUnixLikeEnv` on line 2337.

lael.c...@gmail.com

unread,
Nov 1, 2016, 3:19:35 PM11/1/16
to Native-Client-Discuss
Le mardi 1 novembre 2016 17:26:29 UTC+1, Sam Clegg a écrit :
You'll need to take a look at how the scons build system works. A good
place to start is the top level SConstruct file.  As a quick hack it
looks like you could add flags in `MakeUnixLikeEnv` on line 2337.
The compiler command isn"t gcc but gcc‑5 (gcc≥5 is still for beta packages and gcc4.x doesn’t support mpx). How to change the host compiler name without getting a
No such tool named
kind of error ?
Reply all
Reply to author
Forward
0 new messages