Erlang Build 21.1.1 on Windows 10

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

Erlang Build 21.1.1 on Windows 10

Michael S
Hello,

I want to build the OTP Version 21.1.1 from Github on Windows 10, and I do the steps from "http://erlang.org/doc/installation_guide/INSTALL-WIN32.html#using-git"
with the following commands running in cygwin:

git clone https://github.com/erlang/otp.git
cd otp
git checkout OTP-21.1.1

eval `./otp_build env_win32 x64`

./otp_build autoconf
./otp_build configure --without-wx --with-ssl=/cygdrive/c/OpenSSL-Win64/bin
./otp_build release -a /home/user_1/otp_21_1_1


This is the error log, and it stops with make for beam.smp.dll, and I don´t know why. I have downloaded the Windows Kit 8.1 and Visual Studio 2013 (12.0):


user_1@WINDOWS10 ~/erlbuild/otp
$ which cl.exe
/cygdrive/c/PROGRA~2/MICROS~1.0/VC/bin/amd64/cl.exe

user_1@WINDOWS10 ~/erlbuild/otp
$ which rc.exe
/cygdrive/c/PROGRA~2/MICROS~1.0/VC/bin/amd64/rc.exe

user_1@WINDOWS10 ~/erlbuild/otp
$ ./otp_build release -a /home/user_1/otp_21_1_1
 MAKE   emulator
make[1]: Verzeichnis „/home/user_1/erlbuild/otp/erts“ wird betreten
make[2]: Verzeichnis „/home/user_1/erlbuild/otp/erts“ wird betreten
make[3]: Verzeichnis „/home/user_1/erlbuild/otp/erts/emulator“ wird betreten
 MAKE   opt
make[4]: Verzeichnis „/home/user_1/erlbuild/otp/erts/emulator“ wird betreten
 GEN    win32/gen_git_version.mk
 LD     /home/user_1/erlbuild/otp/bin/win32/beam.smp.dll
usage: mt [-V] [-f device] operation [count]
   Bibliothek "C:/cygwin64/home/user_1/erlbuild/otp/bin/win32/erl_dll.lib" und Objekt "C:/cygwin64/home/user_1/erlbuild/otp/bin/win32/erl_dll.exp" werden erstellt.
make[4]: *** [win32/Makefile:1091: /home/user_1/erlbuild/otp/bin/win32/beam.smp.dll] Fehler 1
make[4]: Verzeichnis „/home/user_1/erlbuild/otp/erts/emulator“ wird verlassen
make[3]: *** [/home/user_1/erlbuild/otp/make/run_make.mk:35: opt] Fehler 2
make[3]: Verzeichnis „/home/user_1/erlbuild/otp/erts/emulator“ wird verlassen
make[2]: *** [Makefile:45: opt] Fehler 2
make[2]: Verzeichnis „/home/user_1/erlbuild/otp/erts“ wird verlassen
make[1]: *** [Makefile:54: smp] Fehler 2
make[1]: Verzeichnis „/home/user_1/erlbuild/otp/erts“ wird verlassen
make: *** [Makefile:473: emulator] Fehler 2


Regards,

Michael

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

Re: Erlang Build 21.1.1 on Windows 10

Lukas Larsson-8
Hello,

On Mon, Nov 12, 2018 at 9:35 AM Michael Scharrer <[hidden email]> wrote:
git clone https://github.com/erlang/otp.git
cd otp
git checkout OTP-21.1.1

eval `./otp_build env_win32 x64`

./otp_build autoconf
./otp_build configure --without-wx --with-ssl=/cygdrive/c/OpenSSL-Win64/bin
./otp_build release -a /home/user_1/otp_21_1_1
If you set "V=1" before you run "./otp_build release" you will get a full printout of the command that is run. This should help to pinpoint the problem. i.e.

> V=1 ./otp_build release -a /home/user_1/otp_21_1_1

Lukas

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

Re: Erlang Build 21.1.1 on Windows 10

Michael S
Hi Lukas,

now the output with V=1 is:

user_1@WINDOWS10 ~/erlbuild/otp
$ V=1 ./otp_build release -a /home/user_1/otp_21_1_1
cd erts && ERL_TOP=/home/user_1/erlbuild/otp PATH=/home/user_1/erlbuild/otp/erts/etc/win32/cygwin_tools/vc:/home/user_1/erlbuild/otp/erts/etc/win32/cygwin_tools:/home/user_1/erlbuild/otp/bootstrap/bin:"${PATH}" \
  make NO_START_SCRIPTS=true  FLAVOR= PROFILE=
make[1]: Verzeichnis „/home/user_1/erlbuild/otp/erts“ wird betreten
for type in opt; do \
        ( make $type ) || exit $?; \
done
make[2]: Verzeichnis „/home/user_1/erlbuild/otp/erts“ wird betreten
for d in emulator etc epmd lib_src; do \
        if test -d $d; then \
                ( cd $d && make opt ) || exit $?; \
        fi ; \
done
make[3]: Verzeichnis „/home/user_1/erlbuild/otp/erts/emulator“ wird betreten
make -f win32/Makefile TYPE=opt
make[4]: Verzeichnis „/home/user_1/erlbuild/otp/erts/emulator“ wird betreten
if utils/gen_git_version win32/gen_git_version.mk; then touch beam/erl_bif_info.c; fi
cc.sh -dll -def:sys/win32/erl.def -implib:/home/user_1/erlbuild/otp/bin/win32/erl_dll.lib -o /home/user_1/erlbuild/otp/bin/win32/beam.smp.dll \
  obj/win32/opt/smp/erl_main.o  obj/win32/opt/smp/beams.res obj/win32/opt/smp/beam_emu.o obj/win32/opt/smp/erl_process.o obj/win32/opt/smp/beam_opcodes.o obj/win32/opt/smp/beam_load.o         obj/win32/opt/smp/beam_bif_load.o obj/win32/opt/smp/beam_debug.o                obj/win32/opt/smp/beam_bp.o obj/win32/opt/smp/beam_catches.o    obj/win32/opt/smp/code_ix.o obj/win32/opt/smp/beam_ranges.o obj/win32/opt/smp/erl_alloc.o          obj/win32/opt/smp/erl_mtrace.o obj/win32/opt/smp/erl_alloc_util.o       obj/win32/opt/smp/erl_goodfit_alloc.o obj/win32/opt/smp/erl_bestfit_alloc.o     obj/win32/opt/smp/erl_afit_alloc.o obj/win32/opt/smp/erl_init.o obj/win32/opt/smp/erl_atom_table.o      obj/win32/opt/smp/erl_bif_table.o obj/win32/opt/smp/erl_bif_ddll.o         obj/win32/opt/smp/erl_bif_guard.o obj/win32/opt/smp/erl_bif_info.o      obj/win32/opt/smp/erl_bif_op.o obj/win32/opt/smp/erl_bif_os.o           obj/win32/opt/smp/erl_bif_lists.o obj/win32/opt/smp/erl_bif_trace.o     obj/win32/opt/smp/erl_bif_unique.o obj/win32/opt/smp/erl_bif_wrap.o     obj/win32/opt/smp/erl_nfunc_sched.o obj/win32/opt/smp/erl_guard_bifs.o     obj/win32/opt/smp/erl_dirty_bif_wrap.o obj/win32/opt/smp/erl_trace.o            obj/win32/opt/smp/copy.o obj/win32/opt/smp/utils.o              obj/win32/opt/smp/bif.o obj/win32/opt/smp/io.o                  obj/win32/opt/smp/erl_printf_term.o obj/win32/opt/smp/erl_debug.o               obj/win32/opt/smp/erl_md5.o obj/win32/opt/smp/erl_message.o                obj/win32/opt/smp/erl_proc_sig_queue.o obj/win32/opt/smp/erl_process_dict.o     obj/win32/opt/smp/erl_process_lock.o obj/win32/opt/smp/erl_port_task.o  obj/win32/opt/smp/erl_arith.o obj/win32/opt/smp/time.o          obj/win32/opt/smp/erl_time_sup.o obj/win32/opt/smp/external.o           obj/win32/opt/smp/dist.o obj/win32/opt/smp/binary.o                obj/win32/opt/smp/erl_db.o obj/win32/opt/smp/erl_db_util.o              obj/win32/opt/smp/erl_db_hash.o obj/win32/opt/smp/erl_db_tree.o         obj/win32/opt/smp/erl_thr_progress.o obj/win32/opt/smp/big.o                    obj/win32/opt/smp/hash.o obj/win32/opt/smp/index.o              obj/win32/opt/smp/atom.o obj/win32/opt/smp/module.o                obj/win32/opt/smp/export.o obj/win32/opt/smp/register.o         obj/win32/opt/smp/break.o obj/win32/opt/smp/erl_async.o         obj/win32/opt/smp/erl_lock_check.o obj/win32/opt/smp/erl_gc.o           obj/win32/opt/smp/erl_lock_count.o obj/win32/opt/smp/erl_posix_str.o obj/win32/opt/smp/erl_bits.o               obj/win32/opt/smp/erl_math.o obj/win32/opt/smp/erl_fun.o             obj/win32/opt/smp/erl_bif_port.o obj/win32/opt/smp/erl_term.o                 obj/win32/opt/smp/erl_node_tables.o obj/win32/opt/smp/erl_monitor_link.o        obj/win32/opt/smp/erl_process_dump.o obj/win32/opt/smp/erl_hl_timer.o   obj/win32/opt/smp/erl_cpu_topology.o obj/win32/opt/smp/erl_drv_thread.o      obj/win32/opt/smp/erl_bif_chksum.o obj/win32/opt/smp/erl_bif_re.o             obj/win32/opt/smp/erl_unicode.o obj/win32/opt/smp/packet_parser.o       obj/win32/opt/smp/safe_hash.o obj/win32/opt/smp/erl_zlib.o              obj/win32/opt/smp/erl_nif.o obj/win32/opt/smp/erl_bif_binary.o      obj/win32/opt/smp/erl_ao_firstfit_alloc.o obj/win32/opt/smp/erl_thr_queue.o obj/win32/opt/smp/erl_sched_spec_pre_alloc.o obj/win32/opt/smp/erl_ptab.o          obj/win32/opt/smp/erl_map.o obj/win32/opt/smp/erl_msacc.o               obj/win32/opt/smp/erl_lock_flags.o obj/win32/opt/smp/erl_io_queue.o obj/win32/opt/smp/win_con.o obj/win32/opt/smp/dll_sys.o obj/win32/opt/smp/driver_tab.o obj/win32/opt/smp/gzio.o obj/win32/opt/smp/sys_float.o obj/win32/opt/smp/sys_time.o obj/win32/opt/smp/sys_interrupt.o obj/win32/opt/smp/sys_env.o obj/win32/opt/smp/dosmap.o obj/win32/opt/smp/win_prim_file.o obj/win32/opt/smp/erl_poll.o obj/win32/opt/smp/erl_check_io.o obj/win32/opt/smp/erl_mseg.o obj/win32/opt/smp/erl_mmap.o obj/win32/opt/smp/erl_osenv.o obj/win32/opt/smp/erl_win32_sys_ddll.o obj/win32/opt/smp/erl_mtrace_sys_wrap.o obj/win32/opt/smp/erl_sys_common_misc.o obj/win32/opt/smp/erl_os_monotonic_time_extender.o  obj/win32/opt/smp/erlang_lttng.o obj/win32/opt/smp/registry_drv.o obj/win32/opt/smp/inet_drv.o obj/win32/opt/smp/ram_file_drv.o obj/win32/opt/smp/ttsl_drv.o obj/win32/opt/smp/erl_tracer_nif.o obj/win32/opt/smp/prim_buffer_nif.o obj/win32/opt/smp/prim_file_nif.o obj/win32/opt/smp/zlib_nif.o  \
 -lsocket -lmswsock  -L../lib/internal/win32  -L/home/user_1/erlbuild/otp/erts/emulator/zlib/obj/win32/opt -lz -L/home/user_1/erlbuild/otp/erts/emulator/pcre/obj/win32/opt -lepcre  -lethread -lerts_internal_r
usage: mt [-V] [-f device] operation [count]
   Bibliothek "C:/cygwin64/home/user_1/erlbuild/otp/bin/win32/erl_dll.lib" und Objekt "C:/cygwin64/home/user_1/erlbuild/otp/bin/win32/erl_dll.exp" werden erstellt.
make[4]: *** [win32/Makefile:1091: /home/user_1/erlbuild/otp/bin/win32/beam.smp.dll] Fehler 1
make[4]: Verzeichnis „/home/user_1/erlbuild/otp/erts/emulator“ wird verlassen
make[3]: *** [/home/user_1/erlbuild/otp/make/run_make.mk:35: opt] Fehler 2
make[3]: Verzeichnis „/home/user_1/erlbuild/otp/erts/emulator“ wird verlassen
make[2]: *** [Makefile:45: opt] Fehler 2
make[2]: Verzeichnis „/home/user_1/erlbuild/otp/erts“ wird verlassen
make[1]: *** [Makefile:54: smp] Fehler 2
make[1]: Verzeichnis „/home/user_1/erlbuild/otp/erts“ wird verlassen
make: *** [Makefile:473: emulator] Fehler 2


Am 12.11.18 um 09:46 schrieb Lukas Larsson:
Hello,

On Mon, Nov 12, 2018 at 9:35 AM Michael Scharrer <[hidden email]> wrote:
git clone https://github.com/erlang/otp.git
cd otp
git checkout OTP-21.1.1

eval `./otp_build env_win32 x64`

./otp_build autoconf
./otp_build configure --without-wx --with-ssl=/cygdrive/c/OpenSSL-Win64/bin
./otp_build release -a /home/user_1/otp_21_1_1
If you set "V=1" before you run "./otp_build release" you will get a full printout of the command that is run. This should help to pinpoint the problem. i.e.

> V=1 ./otp_build release -a /home/user_1/otp_21_1_1

Lukas



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

Re: Erlang Build 21.1.1 on Windows 10

Luke Bakken-2
In reply to this post by Michael S
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: Erlang Build 21.1.1 on Windows 10

Michael S
Hi Luke,

the result in cygwin is (so i got two results) /usr/bin/mt
but it seems like the same paths hmmm.. curious

$ which -a mt
/usr/bin/mt
/usr/bin/mt


Regards,

Michael

Am 12.11.18 um 10:58 schrieb Luke Bakken:

> 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: Erlang Build 21.1.1 on Windows 10

Luke Bakken-2
I wonder if the following command isn't setting the PATH correctly on your system:
eval `./otp_build env_win32 x64`
Try running "otp_build env_win32 x64" to see what the output looks like. There should be a "visual studio command prompt" sort of shortcut that will set up a cmd.exe-based build environment. Maybe comparing the environment to the output of the otp_build command will show something.
Luke
On Mon, Nov 12, 2018, 1:12 PM Michael Scharrer <[hidden email] wrote:
Hi Luke,

the result in cygwin is (so i got two results) /usr/bin/mt
but it seems like the same paths hmmm.. curious

$ which -a mt
/usr/bin/mt
/usr/bin/mt


Regards,

Michael

Am 12.11.18 um 10:58 schrieb Luke Bakken:
> 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: Erlang Build 21.1.1 on Windows 10

Michael S
Hi Luke,

thank you I will look. Is it maybe possible that you can share me your output what you´re getting on windows ./otp_build env_win32 x64
So that I can see some differences and compare it with my paths and system configuration.

Thanks,
Michael

Am 12.11.18 um 14:16 schrieb Luke Bakken:
I wonder if the following command isn't setting the PATH correctly on your system:
eval `./otp_build env_win32 x64`
Try running "otp_build env_win32 x64" to see what the output looks like. There should be a "visual studio command prompt" sort of shortcut that will set up a cmd.exe-based build environment. Maybe comparing the environment to the output of the otp_build command will show something.
Luke
On Mon, Nov 12, 2018, 1:12 PM Michael Scharrer <[hidden email] wrote:
Hi Luke,

the result in cygwin is (so i got two results) /usr/bin/mt
but it seems like the same paths hmmm.. curious

$ which -a mt
/usr/bin/mt
/usr/bin/mt


Regards,

Michael

Am 12.11.18 um 10:58 schrieb Luke Bakken:
> 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: Erlang Build 21.1.1 on Windows 10

Dave Cottlehuber-5
On Mon, 12 Nov 2018, at 14:35, Michael Scharrer wrote:
> Hi Luke,
>
> thank you I will look. Is it maybe possible that you can share me your
> output what you´re getting on windows ./otp_build env_win32 x64
> So that I can see some differences and compare it with my paths and
> system configuration.
>
> Thanks,
> Michael

Hi Michael,

Luke is right, you need to have the Windows SDK tools before the cygwin
stuff in the path.


I've been through this in detail many times. Most of the acquired wisdom
is documented here; for more details and example order see
https://github.com/apache/couchdb-glazier#make-a-new-prompt-shortcut

I strongly recommend doing your windows builds on a dedicated VM and
ensuring you have regular snapshots to clean up and roll back to.

Once you have the path and dependencies organised, building multiple
versions of OTP is cake.

Good luck.

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

Re: Erlang Build 21.1.1 on Windows 10

Dan Gudmundsson-3
We only use msys (and msys2) here at OTP nowadays, so using cygwin have not been tested for several years.
So the instructions and/or scripts may not be 100% accurate for cygwin.

/Dan

On Fri, Nov 16, 2018 at 12:47 AM Dave Cottlehuber <[hidden email]> wrote:
On Mon, 12 Nov 2018, at 14:35, Michael Scharrer wrote:
> Hi Luke,
>
> thank you I will look. Is it maybe possible that you can share me your
> output what you´re getting on windows ./otp_build env_win32 x64
> So that I can see some differences and compare it with my paths and
> system configuration.
>
> Thanks,
> Michael

Hi Michael,

Luke is right, you need to have the Windows SDK tools before the cygwin
stuff in the path.


I've been through this in detail many times. Most of the acquired wisdom
is documented here; for more details and example order see
https://github.com/apache/couchdb-glazier#make-a-new-prompt-shortcut

I strongly recommend doing your windows builds on a dedicated VM and
ensuring you have regular snapshots to clean up and roll back to.

Once you have the path and dependencies organised, building multiple
versions of OTP is cake.

Good luck.

A+
Dave
_______________________________________________
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