Thread overview | |||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
August 13, 2016 DUB saying my Linux exe file is "not an executable file" even though DUB built it | ||||
---|---|---|---|---|
| ||||
Not a lot to work with here. I'm a beginner Linux user. $ dub build --force Performing "debug" build using dmd for x86_64. derelict-util 2.0.6: building configuration "library"... derelict-gl3 1.0.18: building configuration "library"... derelict-glfw3 3.1.0: building configuration "derelict-glfw3-dynamic"... 01_01_hello_window ~master: building configuration "application"... Linking... $ dub run Performing "debug" build using dmd for x86_64. derelict-util 2.0.6: target for configuration "library" is up to date. derelict-gl3 1.0.18: target for configuration "library" is up to date. derelict-glfw3 3.1.0: target for configuration "derelict-glfw3-dynamic" is up to date. 01_01_hello_window ~master: target for configuration "application" is up to date. To force a rebuild of up-to-date targets, run again with --force. Running ./bin/HelloWindow Not an executable file: ./bin/HelloWindow My sdl file looks like: name "01_01_hello_window" description "A Simple Window" authors "generic" copyright "Copyright © 2016, generic" license "proprietary" dependency "derelict-util" version="~>2.0.6" dependency "derelict-gl3" version="~>1.0.18" dependency "derelict-glfw3" version="~>3.1.0" targetPath "bin" targetName "HelloWindow" targetType "executable" |
August 13, 2016 Re: DUB saying my Linux exe file is "not an executable file" even though DUB built it | ||||
---|---|---|---|---|
| ||||
Posted in reply to WhatMeWorry | $ sudo chmod -v 777 * mode of 'HelloWindow' changed from 0644 (rw-r--r--) to 0777 (rwxrwxrwx) $ ls -al total 3016 drwxr-xr-x 2 generic generic 4096 Aug 13 16:48 . drwxr-xr-x 7 generic generic 4096 Aug 12 23:14 .. -rw-r--r-- 1 generic generic 3080080 Aug 13 16:48 HelloWindow Now I'm really gobsmacked. |
August 13, 2016 Re: DUB saying my Linux exe file is "not an executable file" even though DUB built it | ||||
---|---|---|---|---|
| ||||
Posted in reply to WhatMeWorry | On Saturday, 13 August 2016 at 21:56:49 UTC, WhatMeWorry wrote:
>
> $ sudo chmod -v 777 *
> mode of 'HelloWindow' changed from 0644 (rw-r--r--) to 0777 (rwxrwxrwx)
> $ ls -al
> total 3016
> drwxr-xr-x 2 generic generic 4096 Aug 13 16:48 .
> drwxr-xr-x 7 generic generic 4096 Aug 12 23:14 ..
> -rw-r--r-- 1 generic generic 3080080 Aug 13 16:48 HelloWindow
>
>
> Now I'm really gobsmacked.
Hmm any specific project you are trying to build? Is it available anywhere to test?
Which dub version do you use?
It seems like you might be hitting a dub bug there, but I am blindly guessing.
|
August 14, 2016 Re: DUB saying my Linux exe file is "not an executable file" even though DUB built it | ||||
---|---|---|---|---|
| ||||
Posted in reply to WhatMeWorry | On Saturday, 13 August 2016 at 21:56:49 UTC, WhatMeWorry wrote: > > $ sudo chmod -v 777 * > mode of 'HelloWindow' changed from 0644 (rw-r--r--) to 0777 (rwxrwxrwx) > $ ls -al > total 3016 > drwxr-xr-x 2 generic generic 4096 Aug 13 16:48 . > drwxr-xr-x 7 generic generic 4096 Aug 12 23:14 .. > -rw-r--r-- 1 generic generic 3080080 Aug 13 16:48 HelloWindow > > > Now I'm really gobsmacked. Can you post the result of > $file HelloWindow ? |
August 14, 2016 Re: DUB saying my Linux exe file is "not an executable file" even though DUB built it | ||||
---|---|---|---|---|
| ||||
Posted in reply to Basile B. | On Sunday, 14 August 2016 at 01:05:33 UTC, Basile B. wrote: > On Saturday, 13 August 2016 at 21:56:49 UTC, WhatMeWorry wrote: >> >> $ sudo chmod -v 777 * >> mode of 'HelloWindow' changed from 0644 (rw-r--r--) to 0777 (rwxrwxrwx) >> $ ls -al >> total 3016 >> drwxr-xr-x 2 generic generic 4096 Aug 13 16:48 . >> drwxr-xr-x 7 generic generic 4096 Aug 12 23:14 .. >> -rw-r--r-- 1 generic generic 3080080 Aug 13 16:48 HelloWindow >> >> >> Now I'm really gobsmacked. > > Can you post the result of > >> $file HelloWindow > > ? Certainly. $file * HelloWindow: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux.so.2, for GNU/Linux 2.6.32, BuildID[sha1]=1ee19ed1fe36d068ad24f1a16f9990b6b7ff4438, not stripped I'm running Ubuntu (actually Xubuntu) 16.04.1 LTS And I've got the very latest dmd and dub general releases. I might be doing something unusual that may not even be allowed. I've got a USB flash drive that I'm trying to share between two physical machines: one Windows and the other Linux. The dub project, bin, source code etc. is on the flash drive. I compiled my little HelloWorld in dub to create a HelloWorld.exe on my Windows machine. This compiled and ran fine. I then moved the USB flash drive over to the Linux machine and reran dub build/run to create the executable HelloWorld that is now causing the trouble. Should I not be trying to share a flash drive like this? |
August 14, 2016 Re: DUB saying my Linux exe file is "not an executable file" even though DUB built it | ||||
---|---|---|---|---|
| ||||
Posted in reply to WhatMeWorry | On Saturday, 13 August 2016 at 18:28:20 UTC, WhatMeWorry wrote:
> $ dub run
> Performing "debug" build using dmd for x86_64.
> Running ./bin/HelloWindow
> Not an executable file: ./bin/HelloWindow
I kinda betcha dub is lying about 64 bit. Linux likes to spew that kind of nonsense if you run a 32 bit program on a 64 bit install without the 32 bit add on stuff.
|
August 14, 2016 Re: DUB saying my Linux exe file is "not an executable file" even though DUB built it | ||||
---|---|---|---|---|
| ||||
Posted in reply to Adam D. Ruppe | On Sunday, 14 August 2016 at 03:20:02 UTC, Adam D. Ruppe wrote:
> On Saturday, 13 August 2016 at 18:28:20 UTC, WhatMeWorry wrote:
>> $ dub run
>> Performing "debug" build using dmd for x86_64.
>> Running ./bin/HelloWindow
>> Not an executable file: ./bin/HelloWindow
>
> I kinda betcha dub is lying about 64 bit. Linux likes to spew that kind of nonsense if you run a 32 bit program on a 64 bit install without the 32 bit add on stuff.
Clear. I don't know how he manages do do that but I think he tries to run a 32 application on a 64 bit OS. Maybe because of an hypervisor ?!
Can you try to add the DFlag -m64 ? and also tell us which is your system ?
|
August 14, 2016 Re: DUB saying my Linux exe file is "not an executable file" even though DUB built it | ||||
---|---|---|---|---|
| ||||
Posted in reply to Basile B. | On Sunday, 14 August 2016 at 03:42:34 UTC, Basile B. wrote:
> On Sunday, 14 August 2016 at 03:20:02 UTC, Adam D. Ruppe wrote:
>> On Saturday, 13 August 2016 at 18:28:20 UTC, WhatMeWorry wrote:
>>> $ dub run
>>> Performing "debug" build using dmd for x86_64.
>>> Running ./bin/HelloWindow
>>> Not an executable file: ./bin/HelloWindow
>>
>> I kinda betcha dub is lying about 64 bit. Linux likes to spew that kind of nonsense if you run a 32 bit program on a 64 bit install without the 32 bit add on stuff.
>
> Clear. I don't know how he manages do do that but I think he tries to run a 32 application on a 64 bit OS. Maybe because of an hypervisor ?!
>
> Can you try to add the DFlag -m64 ? and also tell us which is your system ?
no :/ what am i saying here. he gave the details, that's not that.
|
August 14, 2016 Re: DUB saying my Linux exe file is "not an executable file" even though DUB built it | ||||
---|---|---|---|---|
| ||||
Posted in reply to WhatMeWorry | On Sunday, 14 August 2016 at 03:10:28 UTC, WhatMeWorry wrote: > On Sunday, 14 August 2016 at 01:05:33 UTC, Basile B. wrote: >> On Saturday, 13 August 2016 at 21:56:49 UTC, WhatMeWorry wrote: >>> >>> $ sudo chmod -v 777 * >>> mode of 'HelloWindow' changed from 0644 (rw-r--r--) to 0777 (rwxrwxrwx) >>> $ ls -al >>> total 3016 >>> drwxr-xr-x 2 generic generic 4096 Aug 13 16:48 . >>> drwxr-xr-x 7 generic generic 4096 Aug 12 23:14 .. >>> -rw-r--r-- 1 generic generic 3080080 Aug 13 16:48 HelloWindow >>> >>> >>> Now I'm really gobsmacked. >> >> Can you post the result of >> >>> $file HelloWindow >> >> ? > > Certainly. > > $file * > HelloWindow: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux.so.2, for GNU/Linux 2.6.32, BuildID[sha1]=1ee19ed1fe36d068ad24f1a16f9990b6b7ff4438, not stripped > > > I'm running Ubuntu (actually Xubuntu) 16.04.1 LTS And I've got the very latest dmd and dub general releases. Ubuntu 64 bit or 32 bit ? > I might be doing something unusual that may not even be allowed. I've got a USB flash drive that I'm trying to share between two physical machines: one Windows and the other Linux. > The dub project, bin, source code etc. is on the flash drive. > I compiled my little HelloWorld in dub to create a HelloWorld.exe on my Windows machine. This compiled and ran fine. I then moved the USB flash drive over to the Linux machine and reran dub build/run to create the executable HelloWorld that is now causing the trouble. Should I not be trying to share a flash drive like this? IDK, I'm doing something similar but I have distinct copies of everything on each hard drive. Have you tried to delete all the binaries produced on Windows and delete the hidden DUB stuff (dub.selection.json + .dub folder) and retry ? |
August 14, 2016 Re: DUB saying my Linux exe file is "not an executable file" even though DUB built it | ||||
---|---|---|---|---|
| ||||
Posted in reply to WhatMeWorry | On Sunday, 14 August 2016 at 03:10:28 UTC, WhatMeWorry wrote:
> On Sunday, 14 August 2016 at 01:05:33 UTC, Basile B. wrote:
>> On Saturday, 13 August 2016 at 21:56:49 UTC, WhatMeWorry wrote:
>>>
>>> $ sudo chmod -v 777 *
>>> mode of 'HelloWindow' changed from 0644 (rw-r--r--) to 0777 (rwxrwxrwx)
>>> $ ls -al
>>> total 3016
>>> drwxr-xr-x 2 generic generic 4096 Aug 13 16:48 .
>>> drwxr-xr-x 7 generic generic 4096 Aug 12 23:14 ..
>>> -rw-r--r-- 1 generic generic 3080080 Aug 13 16:48 HelloWindow
>>>
>>>
>>> Now I'm really gobsmacked.
>>
>> Can you post the result of
>>
>>> $file HelloWindow
>>
>> ?
>
> Certainly.
>
> $file *
> HelloWindow: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux.so.2, for GNU/Linux 2.6.32, BuildID[sha1]=1ee19ed1fe36d068ad24f1a16f9990b6b7ff4438, not stripped
>
>
> I'm running Ubuntu (actually Xubuntu) 16.04.1 LTS And I've got the very latest dmd and dub general releases.
>
> I might be doing something unusual that may not even be allowed. I've got a USB flash drive that I'm trying to share between two physical machines: one Windows and the other Linux.
> The dub project, bin, source code etc. is on the flash drive.
> I compiled my little HelloWorld in dub to create a HelloWorld.exe on my Windows machine. This compiled and ran fine. I then moved the USB flash drive over to the Linux machine and reran dub build/run to create the executable HelloWorld that is now causing the trouble. Should I not be trying to share a flash drive like this?
This is the actual problem that cause trouble. Your flash drive is probably Fat32 or NTFS formatted rather than ext4. Since those file systems do not support "executable attribute", Linux will silently fail to give files the attribute which results in these sort of surprises. You may wonder why the same thing doesn't happen on NTFS formatted partition of your hard drive. I guess this is because Linux assumes internal hard drive is trustable, thus all files have executable attribute by default (that's what happens on my pc).
|
Copyright © 1999-2021 by the D Language Foundation