Which On Windows

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

Which On Windows

Onorio Catenacci

   1. Re:  Erlang Build 21.1.1 on Windows 10 (Luke Bakken)
----------------------------------------------------------------------

Message: 1
Date: Mon, 12 Nov 2018 09:58:48 +0000
From: Luke Bakken <[hidden email]>
To: [hidden email]
Cc: [hidden email]
Subject: Re: [erlang-questions] Erlang Build 21.1.1 on Windows 10
Message-ID:
        <CADFEJufN9jW7V3qHAKymXnT=i-dPqi_VdQL0_wNS8p1r19xW=[hidden email]>
Content-Type: text/plain; charset="UTF-8"

Hi Michael -

The build executes the "mt" command, and it is failing with invalid arguments:

> usage: mt [-V] [-f device] operation [count]

https://docs.microsoft.com/en-us/windows/desktop/sbscs/mt-exe

I suspect that you may have another command named "mt" that has higher
precedence in your PATH. Run "which -a mt" to see what the output is.

Thanks,
Luke


--

_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
Reply | Threaded
Open this post in threaded view
|

Re: Which On Windows

Luke Bakken-2
On Mon, Nov 12, 2018 at 1:27 PM Onorio Catenacci <[hidden email]> wrote:

>> I suspect that you may have another command named "mt" that has higher
>> precedence in your PATH. Run "which -a mt" to see what the output is.
>>
>> Thanks,
>> Luke
>>
>
> Minor point Luke--on Windows it's "where" not which.
>
> https://stackoverflow.com/questions/304319/is-there-an-equivalent-of-which-on-the-windows-command-line

The build environment is Cygwin, so which is the correct command to
use. I'm not even sure if "where" works within Cygwin - probably not,
as the PATH is in the wrong format. The same applies to a MSYS2
environment.

http://erlang.org/doc/installation_guide/INSTALL-WIN32.html#tools-you-need-and-their-environment

Since "which" couldn't find the correct mt.exe executable, that points
to something in the original poster's environment.

Thanks,
Luke
_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
Reply | Threaded
Open this post in threaded view
|

Re: Which On Windows

Michael S
Hello together,

may it could help with my following output "where mt" on Windows 10
user_1@WINDOWS10 ~/erlbuild/otp
$ where mt
C:\cygwin64\bin\mt.exe


An then I call mt to test it, which looks like the beam.smp.dll error during compile.

user_1@WINDOWS10 ~/erlbuild/otp
$ mt
usage: mt [-V] [-f device] operation [count]


Regards
Michael


Am 12.11.18 um 15:38 schrieb Luke Bakken:
On Mon, Nov 12, 2018 at 1:27 PM Onorio Catenacci [hidden email] wrote:
I suspect that you may have another command named "mt" that has higher
precedence in your PATH. Run "which -a mt" to see what the output is.

Thanks,
Luke

Minor point Luke--on Windows it's "where" not which.

https://stackoverflow.com/questions/304319/is-there-an-equivalent-of-which-on-the-windows-command-line
The build environment is Cygwin, so which is the correct command to
use. I'm not even sure if "where" works within Cygwin - probably not,
as the PATH is in the wrong format. The same applies to a MSYS2
environment.

http://erlang.org/doc/installation_guide/INSTALL-WIN32.html#tools-you-need-and-their-environment

Since "which" couldn't find the correct mt.exe executable, that points
to something in the original poster's environment.

Thanks,
Luke
_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
.



_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
Reply | Threaded
Open this post in threaded view
|

Re: Which On Windows

Onorio Catenacci
In reply to this post by Luke Bakken-2
You're right Luke--I should have read the question more closely.  Apologies for not being more careful in my reading of the question.

Since the mt.exe which is on Windows is part of the windows sdk (https://docs.microsoft.com/en-us/windows/desktop/sbscs/mt-exe) I wonder if the original poster is trying to run Cygwin from a Visual Studio command prompt?  I mean I don't think mt.exe would be in the path unless someone were to start a Visual Studio command prompt (the "Developer Command Prompt for Visual Studio" on the Windows menu). 

On Mon, Nov 12, 2018 at 9:38 AM Luke Bakken <[hidden email]> wrote:
On Mon, Nov 12, 2018 at 1:27 PM Onorio Catenacci <[hidden email]> wrote:
>> I suspect that you may have another command named "mt" that has higher
>> precedence in your PATH. Run "which -a mt" to see what the output is.
>>
>> Thanks,
>> Luke
>>
>
> Minor point Luke--on Windows it's "where" not which.
>
> https://stackoverflow.com/questions/304319/is-there-an-equivalent-of-which-on-the-windows-command-line

The build environment is Cygwin, so which is the correct command to
use. I'm not even sure if "where" works within Cygwin - probably not,
as the PATH is in the wrong format. The same applies to a MSYS2
environment.

http://erlang.org/doc/installation_guide/INSTALL-WIN32.html#tools-you-need-and-their-environment

Since "which" couldn't find the correct mt.exe executable, that points
to something in the original poster's environment.

Thanks,
Luke


--

_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
Reply | Threaded
Open this post in threaded view
|

Re: Which On Windows

Luke Bakken-2
In reply to this post by Michael S
Right, because that isn't the correct mt.exe command. Something in the
build steps isn't setting the PATH correctly, or you don't have the
tool anywhere -

http://erlang.org/doc/installation_guide/INSTALL-WIN32.html#Short-Version

Your next step could be to search your drive for mt.exe, make a note
of it, and see if the following command adds the correct directory to
your PATH:

eval `./otp_build env_win32 x64`

Thanks,
Luke

On Mon, Nov 12, 2018 at 3:46 PM Michael Scharrer <[hidden email]> wrote:

>
> Hello together,
>
> may it could help with my following output "where mt" on Windows 10
>
> user_1@WINDOWS10 ~/erlbuild/otp
> $ where mt
> C:\cygwin64\bin\mt.exe
>
>
> An then I call mt to test it, which looks like the beam.smp.dll error during compile.
>
> user_1@WINDOWS10 ~/erlbuild/otp
> $ mt
> usage: mt [-V] [-f device] operation [count]
_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
Reply | Threaded
Open this post in threaded view
|

Re: Which On Windows

Luke Bakken-2
In reply to this post by Onorio Catenacci
Hi Onorio -

Please read the build instructions -

http://erlang.org/doc/installation_guide/INSTALL-WIN32.html#Short-Version

You *shouldn't* have to use a VS command prompt. That's not to say
something hasn't changed in recent Windows / SDK versions that
interferes with the process.

Michael could start a VS command prompt, *then* run the cygwin.bat
command within that terminal to more likely have the correct
environment. But, it would be most helpful to the Erlang/OTP team to
figure out why the build isn't working as per the instructions in this
case.

Luke

On Mon, Nov 12, 2018 at 3:51 PM Onorio Catenacci <[hidden email]> wrote:
>
> You're right Luke--I should have read the question more closely.  Apologies for not being more careful in my reading of the question.
>
> Since the mt.exe which is on Windows is part of the windows sdk (https://docs.microsoft.com/en-us/windows/desktop/sbscs/mt-exe) I wonder if the original poster is trying to run Cygwin from a Visual Studio command prompt?  I mean I don't think mt.exe would be in the path unless someone were to start a Visual Studio command prompt (the "Developer Command Prompt for Visual Studio" on the Windows menu).
_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
Reply | Threaded
Open this post in threaded view
|

Re: Which On Windows

Onorio Catenacci
I wasn’t saying he did need to run from a VS command prompt. I was offering a possible reason for mt.exe being in the path.
On Mon, Nov 12, 2018 at 6:32 PM Luke Bakken <[hidden email]> wrote:
Hi Onorio -

Please read the build instructions -

http://erlang.org/doc/installation_guide/INSTALL-WIN32.html#Short-Version

You *shouldn't* have to use a VS command prompt. That's not to say
something hasn't changed in recent Windows / SDK versions that
interferes with the process.

Michael could start a VS command prompt, *then* run the cygwin.bat
command within that terminal to more likely have the correct
environment. But, it would be most helpful to the Erlang/OTP team to
figure out why the build isn't working as per the instructions in this
case.

Luke

On Mon, Nov 12, 2018 at 3:51 PM Onorio Catenacci <[hidden email]> wrote:
>
> You're right Luke--I should have read the question more closely.  Apologies for not being more careful in my reading of the question.
>
> Since the mt.exe which is on Windows is part of the windows sdk (https://docs.microsoft.com/en-us/windows/desktop/sbscs/mt-exe) I wonder if the original poster is trying to run Cygwin from a Visual Studio command prompt?  I mean I don't think mt.exe would be in the path unless someone were to start a Visual Studio command prompt (the "Developer Command Prompt for Visual Studio" on the Windows menu).

_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
Reply | Threaded
Open this post in threaded view
|

Re: Which On Windows

Michael S
In reply to this post by Luke Bakken-2
Hi Luke,

i think there is a litte issue in the documentation for building erlang on windows, because the VCPATH or else are not cygwin'ish... with make_winpath() or make_upath() or else which you are able to set in the .bash_profile and this don´t work for me in the newest cygwin 64.
It would be great if you can test this later...


Just here the example
## The PATH variable should be Cygwin'ish
VCPATH=
$VISUAL_STUDIO_ROOT/VC/bin/amd64:\
$VISUAL_STUDIO_ROOT/VC/vcpackages:\
$VISUAL_STUDIO_ROOT/Common7/IDE:\
$VISUAL_STUDIO_ROOT/Common7/Tools:\
$SDK/bin/x86


Are you sure, that it uses for a x64 build of erlang the Windows Kit´s for x86 for the tools rc and mt?
Because in the documentation I have a example "The first part of the 64 bit template is identical to the 32 bit one, but there are some environment variable differences:" and mentioned VCPATH with
$SDK/bin/x86

 C:\Program Files (x86)\Windows Kits\8.1\bin\x86\rc.exe
 C:\Program Files (x86)\Windows Kits\8.1\bin\x86\mt.exe

or should it be

 C:\Program Files (x86)\Windows Kits\8.1\bin\x64\rc.exe
 C:\Program Files (x86)\Windows Kits\8.1\bin\x64\mt.exe



Thanks
michael



Am 13.11.18 um 00:28 schrieb Luke Bakken:
Right, because that isn't the correct mt.exe command. Something in the
build steps isn't setting the PATH correctly, or you don't have the
tool anywhere -

http://erlang.org/doc/installation_guide/INSTALL-WIN32.html#Short-Version

Your next step could be to search your drive for mt.exe, make a note
of it, and see if the following command adds the correct directory to
your PATH:

eval `./otp_build env_win32 x64`

Thanks,
Luke

On Mon, Nov 12, 2018 at 3:46 PM Michael Scharrer [hidden email] wrote:
Hello together,

may it could help with my following output "where mt" on Windows 10

user_1@WINDOWS10 ~/erlbuild/otp
$ where mt
C:\cygwin64\bin\mt.exe


An then I call mt to test it, which looks like the beam.smp.dll error during compile.

user_1@WINDOWS10 ~/erlbuild/otp
$ mt
usage: mt [-V] [-f device] operation [count]
.



_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
Reply | Threaded
Open this post in threaded view
|

Re: Which On Windows

Dave Cottlehuber-5
On Tue, 13 Nov 2018, at 13:06, Michael Scharrer wrote:

> Hi Luke,
>
> i think there is a litte issue in the documentation for building erlang
> on windows, because the VCPATH or else are not cygwin'ish... with
> make_winpath() or make_upath() or else which you are able to set in
> the .bash_profile and this don´t work for me in the newest cygwin 64.
> It would be great if you can test this later...
>
>
> Just here the example
>
> ## The PATH variable should be Cygwin'ish
> VCPATH=
> $VISUAL_STUDIO_ROOT/VC/bin/amd64:\
> $VISUAL_STUDIO_ROOT/VC/vcpackages:\
> $VISUAL_STUDIO_ROOT/Common7/IDE:\
> $VISUAL_STUDIO_ROOT/Common7/Tools:\
> $SDK/bin/x86
>
>
>
> Are you sure, that it uses for a x64 build of erlang the Windows Kit´s
> for x86 for the tools rc and mt?

Yes. This is correct. 32-bit compiler toolchain can generate 64-bit
artefacts.

A+
Dave
_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions