Exec format error on Linux with downloaded ninja binary

317 views
Skip to first unread message

fifteen...@gmail.com

unread,
Sep 26, 2015, 3:07:32 PM9/26/15
to ninja-build
Hi all,
I cannot run the downloaded release 1.6/1.5.3 on my opensuse 13.1 linux box.
NOTE: I did not try older releases.

> strace ~/ninja
execve("/home/w/ninja", ["/home/w/ninja"], [/* 118 vars */]) = -1 ENOEXEC (Exec format error)

 uname -a
Linux linux 3.11.10-29-desktop #1 SMP PREEMPT Thu Mar 5 16:24:00 UTC 2015 (338c513) i686 i686 i386 GNU/Linux

This is sad, since I want to help spread Ninja and created a plugin for Jenkins which automatically downloads and installs Ninja on a build node. But if the downloaded ninja fails to run, the plugin is nearly useless.

Martin


Evan Martin

unread,
Sep 26, 2015, 3:10:01 PM9/26/15
to fifteen...@gmail.com, ninja-build

It seems likely the provided Linux binary is for 64-bit Linux.  I haven't seen a 32-bit Linux system in quite a while!  You should be able to build Ninja on an OpenSUSE system with little trouble.

brevity due to phone

--
You received this message because you are subscribed to the Google Groups "ninja-build" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ninja-build...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Martin Weber

unread,
Sep 26, 2015, 3:24:36 PM9/26/15
to Evan Martin, ninja-build
Am Samstag, 26. September 2015, 12:10:00 schrieb Evan Martin:
> It seems likely the provided Linux binary is for 64-bit Linux. I haven't
> seen a 32-bit Linux system in quite a while! You should be able to build
> Ninja on an OpenSUSE system with little trouble.

Quite sure! But I am more focused on the Jenkins installer plugin for ninja
than in maintaining a download site for ninja binaries.

brevity due to coding in parallel



> brevity due to phone
>
> On Sep 26, 2015 12:07 PM, <fifteen...@gmail.com> wrote:
> > Hi all,
> > I cannot run the downloaded release 1.6/1.5.3 on my opensuse 13.1 linux
> > box.
> > NOTE: I did not try older releases.
> >
> > > strace ~/ninja
> >
> > execve("/home/w/ninja", ["/home/w/ninja"], [/* 118 vars */]) = -1 ENOEXEC
> > (Exec format error)
> >
> > uname -a
> >
> > Linux linux 3.11.10-29-desktop #1 SMP PREEMPT Thu Mar 5 16:24:00 UTC 2015
> > (338c513) i686 i686 i386 GNU/Linux
> >
> > This is sad, since I want to help spread Ninja and created a plugin for
> > Jenkins <https://github.com/15knots/jenkins-ninja-installer> which
> > automatically downloads and installs Ninja on a build node. But if the
> > downloaded ninja fails to run, the plugin is nearly useless.
> >
> > Martin
> >
> >
> > --
> > You received this message because you are subscribed to the Google Groups
> > "ninja-build" group.
> > To unsubscribe from this group and stop receiving emails from it, send an
> > email to ninja-build...@googlegroups.com.
> > For more options, visit https://groups.google.com/d/optout.

--
Cd wrttn wtht vwls s mch trsr.


Konstantin Tokarev

unread,
Sep 26, 2015, 3:34:23 PM9/26/15
to Martin Weber, Evan Martin, ninja-build


26.09.2015, 22:24, "Martin Weber" <fifteen...@gmail.com>:
> Am Samstag, 26. September 2015, 12:10:00 schrieb Evan Martin:
>>  It seems likely the provided Linux binary is for 64-bit Linux. I haven't
>>  seen a 32-bit Linux system in quite a while! You should be able to build
>>  Ninja on an OpenSUSE system with little trouble.
>
> Quite sure! But I am more focused on the Jenkins installer plugin for ninja
> than in maintaining a download site for ninja binaries.

You should install ninja from package manager, or just download sources and
build them on build node instead of downloading binary.
Regards,
Konstantin

Martin Weber

unread,
Oct 17, 2015, 12:42:15 PM10/17/15
to ninja-build
Am Samstag, 26. September 2015, 22:34:17 schrieb Konstantin Tokarev:
> 26.09.2015, 22:24, "Martin Weber" <fifteen...@gmail.com>:
> > Am Samstag, 26. September 2015, 12:10:00 schrieb Evan Martin:
> >> It seems likely the provided Linux binary is for 64-bit Linux. I haven't
> >> seen a 32-bit Linux system in quite a while! You should be able to build
> >> Ninja on an OpenSUSE system with little trouble.
> >
> > Quite sure! But I am more focused on the Jenkins installer plugin for
> > ninja
> > than in maintaining a download site for ninja binaries.
>
> You should install ninja from package manager, or just download sources and
> build them on build node instead of downloading binary.

Unfortunately, building ninja on the build node is not an option for Windows
nodes, which require python to be installed.

Is it possible to cross-compile ninja on linux for windows and os X? At least
the configure.py suggest that (--platform)?

Nico Weber

unread,
Oct 17, 2015, 2:04:38 PM10/17/15
to Martin Weber, ninja-build
On Sat, Oct 17, 2015 at 9:42 AM, Martin Weber <fifteen...@gmail.com> wrote:
Am Samstag, 26. September 2015, 22:34:17 schrieb Konstantin Tokarev:
> 26.09.2015, 22:24, "Martin Weber" <fifteen...@gmail.com>:
> > Am Samstag, 26. September 2015, 12:10:00 schrieb Evan Martin:
> >>  It seems likely the provided Linux binary is for 64-bit Linux. I haven't
> >>  seen a 32-bit Linux system in quite a while! You should be able to build
> >>  Ninja on an OpenSUSE system with little trouble.
> >
> > Quite sure! But I am more focused on the Jenkins installer plugin for
> > ninja
> > than in maintaining a download site for ninja binaries.
>
> You should install ninja from package manager, or just download sources and
> build them on build node instead of downloading binary.

Unfortunately, building ninja on the build node is not an option for Windows
nodes, which require python to be installed.

Does the prebuilt Windows binary work for you? I think the Windows binary might even be 32-bit (but I'm not sure).

Martin Weber

unread,
Oct 17, 2015, 2:23:49 PM10/17/15
to ninja-build
Am Samstag, 17. Oktober 2015, 11:04:35 schrieb Nico Weber:
> On Sat, Oct 17, 2015 at 9:42 AM, Martin Weber <fifteen...@gmail.com>
>
> wrote:
> > Am Samstag, 26. September 2015, 22:34:17 schrieb Konstantin Tokarev:
> > > 26.09.2015, 22:24, "Martin Weber" <fifteen...@gmail.com>:
> > > > Am Samstag, 26. September 2015, 12:10:00 schrieb Evan Martin:
> > > >> It seems likely the provided Linux binary is for 64-bit Linux. I
...
> Does the prebuilt Windows binary work for you? I think the Windows binary
> might even be 32-bit (but I'm not sure).

I cannot tell about the windows binaries, since I'm on Linux. But I guess,
they are 64 bit, too.

Would be nice if the binaries were all 32 bit, since each 64-bit OS can run
32-bit binaries, but not vice versa.

Nico Weber

unread,
Oct 17, 2015, 2:30:21 PM10/17/15
to Martin Weber, ninja-build
On Sat, Oct 17, 2015 at 11:23 AM, Martin Weber <fifteen...@gmail.com> wrote:
Am Samstag, 17. Oktober 2015, 11:04:35 schrieb Nico Weber:
> On Sat, Oct 17, 2015 at 9:42 AM, Martin Weber <fifteen...@gmail.com>
>
> wrote:
> > Am Samstag, 26. September 2015, 22:34:17 schrieb Konstantin Tokarev:
> > > 26.09.2015, 22:24, "Martin Weber" <fifteen...@gmail.com>:
> > > > Am Samstag, 26. September 2015, 12:10:00 schrieb Evan Martin:
> > > >>  It seems likely the provided Linux binary is for 64-bit Linux. I
...
> Does the prebuilt Windows binary work for you? I think the Windows binary
> might even be 32-bit (but I'm not sure).

I cannot tell about the windows binaries, since I'm on Linux. But I guess,
they are 64 bit, too.

They're (currently) 32-bit:

$ file ~/Downloads/ninja.exe 
/Users/thakis/Downloads/ninja.exe: PE32 executable for MS Windows (console) Intel 80386 32-bit
 
Would be nice if the binaries were all 32 bit, since each 64-bit OS can run
32-bit binaries, but not vice versa.

The 64-bit binaries are a tad faster and run almost everywhere. (The Windows binaries being 32-bit is a bit of an accident.) Ninja's easy to build, people who need 32-bit binaries can build them themselves, I feel.

Nico

Martin Weber

unread,
Oct 17, 2015, 2:56:14 PM10/17/15
to Nico Weber, ninja-build
Am Samstag, 17. Oktober 2015, 11:30:19 schrieb Nico Weber:
> On Sat, Oct 17, 2015 at 11:23 AM, Martin Weber <fifteen...@gmail.com>
>
> wrote:
...
> $ file ~/Downloads/ninja.exe

OK, could have checked that my myself:-)

> The 64-bit binaries are a tad faster and run almost everywhere. (The
Citing my original posting:

"This is sad, since I want to help spread Ninja and created a plugin for
Jenkins <https://github.com/15knots/jenkins-ninja-installer> which
automatically downloads and installs Ninja on a build node. But if the
downloaded ninja fails to run, the plugin is nearly useless."

Personally, I can live without a plugin that automatically installs ninja on a
jenkins slave. But ninja is such a great performance improvement compared to
make, that I would like other be using ninja. And those who already use cmake
can get the performance benefit easily (by just switching the generator to
ninja).

Martin

Evan Martin

unread,
Oct 17, 2015, 3:05:01 PM10/17/15
to Martin Weber, ninja-build
On Sat, Oct 17, 2015 at 9:42 AM, Martin Weber <fifteen...@gmail.com> wrote:
> Is it possible to cross-compile ninja on linux for windows and os X? At least
> the configure.py suggest that (--platform)?

It's possible but can be painful depending on how you do it. It's
discussed in HACKING.md.
Reply all
Reply to author
Forward
0 new messages