digitalmars.D.learn - DUB saying my Linux exe file is "not an executable file" even though
- WhatMeWorry (35/35) Aug 13 2016 Not a lot to work with here. I'm a beginner Linux user.
- WhatMeWorry (9/9) Aug 13 2016 $ sudo chmod -v 777 *
- Seb (6/15) Aug 13 2016 Hmm any specific project you are trying to build? Is it available
- Basile B. (3/13) Aug 13 2016 ?
- WhatMeWorry (20/36) Aug 13 2016 Certainly.
- Basile B. (7/46) Aug 13 2016 IDK, I'm doing something similar but I have distinct copies of
- NX (10/49) Aug 14 2016 This is the actual problem that cause trouble. Your flash drive
- WhatMeWorry (6/15) Aug 14 2016 Just wanted to thank everybody again and do a recap. Yes, it was
- Adam D. Ruppe (4/8) Aug 13 2016 I kinda betcha dub is lying about 64 bit. Linux likes to spew
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"
Aug 13 2016
$ 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.
Aug 13 2016
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.
Aug 13 2016
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?
Aug 13 2016
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: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?$ 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?
Aug 13 2016
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:Ubuntu 64 bit or 32 bit ?On Saturday, 13 August 2016 at 21:56:49 UTC, WhatMeWorry wrote: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.$ 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?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 ?
Aug 13 2016
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: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).On Saturday, 13 August 2016 at 21:56:49 UTC, WhatMeWorry wrote: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?$ 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?
Aug 14 2016
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).Just wanted to thank everybody again and do a recap. Yes, it was the FAT32 flash drive. I read that FAT23 supported rw on both Windows and Linux but was ignorant about the "exec attr". Redid everything on the flash drive formatted to ext4 and everything works fine between both systems. (need to install Ext2Fsd.exe on Windows, however).
Aug 14 2016
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/HelloWindowI 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.
Aug 13 2016
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: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 ?$ dub run Performing "debug" build using dmd for x86_64. Running ./bin/HelloWindow Not an executable file: ./bin/HelloWindowI 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.
Aug 13 2016
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:no :/ what am i saying here. he gave the details, that's not that.On Saturday, 13 August 2016 at 18:28:20 UTC, WhatMeWorry wrote: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 ?$ dub run Performing "debug" build using dmd for x86_64. Running ./bin/HelloWindow Not an executable file: ./bin/HelloWindowI 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.
Aug 13 2016