Thread overview | |||||||||
---|---|---|---|---|---|---|---|---|---|
|
August 06, 2016 Windows 10 Linux Bash Shell: Compiling linux app on windows | ||||
---|---|---|---|---|
| ||||
Hi, I play around with the new windows 10 feature to run a linux sub system on windows. -> Installing dmd is working fine with the command curl -fsS https://dlang.org/install.sh | bash -s dmd -> Activating dmd is also working source ~/dlang/dmd-2.071.1/activate -> dmd can be started and shows correct version dmd --version. -> Compiling a hello world works, linking fails "dmd test -c" creates a test.o file but "dmd test" fails with error: cc: no such file or directory --- errorlevel 255 Do you have an idea how to fix the linker issue? Kind regards André |
August 06, 2016 Re: Windows 10 Linux Bash Shell: Compiling linux app on windows | ||||
---|---|---|---|---|
| ||||
Posted in reply to Andre Pany | On Saturday, 6 August 2016 at 17:18:51 UTC, Andre Pany wrote:
> Hi,
>
> I play around with the new windows 10 feature to run a linux
> sub system on windows.
>
> -> Installing dmd is working fine with the command
> curl -fsS https://dlang.org/install.sh | bash -s dmd
>
> -> Activating dmd is also working
> source ~/dlang/dmd-2.071.1/activate
>
> -> dmd can be started and shows correct version
> dmd --version.
>
> -> Compiling a hello world works, linking fails
> "dmd test -c" creates a test.o file
>
> but "dmd test" fails with error:
> cc: no such file or directory
> --- errorlevel 255
>
> Do you have an idea how to fix the linker issue?
>
> Kind regards
> André
ld must be found in the environment ?
|
August 06, 2016 Re: Windows 10 Linux Bash Shell: Compiling linux app on windows | ||||
---|---|---|---|---|
| ||||
Posted in reply to Rattle Weird Hole | On Saturday, 6 August 2016 at 17:26:05 UTC, Rattle Weird Hole wrote:
> ld must be found in the environment ?
Yes ld was missing, by installing the build-essentials dmd is running fine:
sudo apt-get install build-essential
Kind regards
André
|
August 06, 2016 Re: Windows 10 Linux Bash Shell: Compiling linux app on windows | ||||
---|---|---|---|---|
| ||||
Posted in reply to Andre Pany | On Saturday, 6 August 2016 at 17:18:51 UTC, Andre Pany wrote: > Hi, > > I play around with the new windows 10 feature to run a linux > sub system on windows. > > -> Installing dmd is working fine with the command > curl -fsS https://dlang.org/install.sh | bash -s dmd > > -> Activating dmd is also working > source ~/dlang/dmd-2.071.1/activate > > -> dmd can be started and shows correct version > dmd --version. > > -> Compiling a hello world works, linking fails > "dmd test -c" creates a test.o file > > but "dmd test" fails with error: > cc: no such file or directory > --- errorlevel 255 > > Do you have an idea how to fix the linker issue? > > Kind regards > André Just like on a regular linux distro, you need to have installed standard development tools such as a C compiler toolchain. Since the install script on dlang's homepage is not a deb package it doesn't verify if those dependencies are fulfilled. I think running "sudo apt-get install build-essential" in bash.exe should do it (install C compiler and a "cc" alias to it). The other option is to download the Ubuntu/Debian x86_64 .deb package and do "sudo dpkg -i" on it: http://downloads.dlang.org/releases/2.x/2.071.1/dmd_2.071.1-0_amd64.deb and it will find the missing dependencies, so you can later install them, like described here: http://superuser.com/questions/196864/how-to-install-local-deb-packages-with-apt-get |
August 06, 2016 [OT] Curl pipe | ||||
---|---|---|---|---|
| ||||
Posted in reply to Andre Pany | On Saturday, 6 August 2016 at 17:18:51 UTC, Andre Pany wrote:
> Hi,
>
> I play around with the new windows 10 feature to run a linux
> sub system on windows.
>
> -> Installing dmd is working fine with the command
> curl -fsS https://dlang.org/install.sh | bash -s dmd
Just a side note but it's a really bad idea to pipe curl in bash as it opens the door to remote unknown code exploitation. Even checking what curl returns beforehand isn't enough as a piped curl is distinguishable server-side so a different script could be provided dynamically.
(Ok, with dlang.org there shouldn't be much problem but still)
|
Copyright © 1999-2021 by the D Language Foundation