intelxed / xed

The X86 Encoder Decoder (XED), is a software library for encoding and decoding X86 (IA32 and Intel64) instructions
https://intelxed.github.io/
Apache License 2.0
1.39k stars 145 forks source link

Compiling on x86 Windows fails #237

Open hatRiot opened 4 years ago

hatRiot commented 4 years ago

Run from Developer Command Prompt for VS 2017:

[REMOVING] obj/xed-ild.lib
[MBUILD WARNING] Command execution failed. Waiting for remaining jobs and exiting.
R: 1 P: 0 C: 111 E: 1 / 5 secs
[COMMAND     ] PYTHON FN: _remove_libname ;;;; "C:/Program Files/Microsoft Visua
l Studio/2017/Community/VC/Tools/MSVC/14.16.27023//bin/Hostx86/x64/lib.exe" /nol
ogo /MACHINE:X86  /out:obj/xed-ild.lib obj/xed-ild-support.obj obj/xed-init-ild.
obj obj/xed-ild.obj obj/xed-chip-features.obj obj/xed-isa-set.obj obj/xed-chip-m
odes.obj obj/xed-chip-modes-override.obj obj/xed-chip-features-table.obj obj/xed
-ild-disp-l3.obj obj/xed-ild-eosz.obj obj/xed-ild-easz.obj obj/xed-ild-imm-l3.ob
j
[ARGS        ] ['obj/xed-ild.lib']
[ENV         ] some env
[EXIT_STATUS ] 1112
[OUTPUT]
REMOVED obj/xed-ild.lib
obj\xed-ild-support.obj : fatal error LNK1112: module machine type 'x64' conflicts with target machine type 'x86'

R: 0 P: 0 C: 112 E: 1 / 6 secs
        BUILT: C:\Users\bja\xed\obj\xed3-phash-lu-vv0.obj
ABORT: Library build failed

Note Hostx86/x64/lib.exe in the command path. I hacked around this by simply hard linking Hostx86/x64 to Hostx86/x86 which then built just fine.

markcharney commented 4 years ago

hi. That link should not be necessary. I suspect there is an “user/operator error” here unfortunately. Sorry. Do a clean build. Show your command line, your entire build log and what kind of command prompt you were using, then maybe we can sort this out a little more.

hatRiot commented 4 years ago

Thanks for the response. First via git-bash:

$ git clone https://github.com/intelxed/xed.git
Cloning into 'xed'...
remote: Enumerating objects: 364, done.
remote: Counting objects: 100% (364/364), done.
remote: Compressing objects: 100% (162/162), done.
remote: Total 9822 (delta 223), reused 223 (delta 200), pack-reused 9458
Receiving objects: 100% (9822/9822), 3.05 MiB | 2.28 MiB/s, done.
Resolving deltas: 100% (6506/6506), done.
Updating files: 100% (3781/3781), done.
$ git clone https://github.com/intelxed/mbuild.git
Cloning into 'mbuild'...
remote: Enumerating objects: 455, done.
remote: Total 455 (delta 0), reused 0 (delta 0), pack-reused 455
Receiving objects: 100% (455/455), 187.69 KiB | 563.00 KiB/s, done.
Resolving deltas: 100% (304/304), done.

And then inside dev command prompt:

c:\Users\bjafx\source\repos\build\xed>py mfile.py
[MBUILD WARNING] Could not find 32b RC command in SDK directory; assuming on PATH
[PYTHON VERSION] 3.8.3
[GIT VERSION] 11.2.0-6-gafbb851
[EXTF PROCESSING] ./datafiles/files.cfg
[EXTF PROCESSING] ./datafiles/files-xregs.cfg
[EXTF PROCESSING] ./datafiles/files-via-padlock.cfg
[EXTF PROCESSING] ./datafiles/files-amd.cfg
[EXTF PROCESSING] ./datafiles/amdxop/files.cfg
[EXTF PROCESSING] ./datafiles/mpx/files.cfg
[EXTF PROCESSING] ./datafiles/cet/files.cfg
[EXTF PROCESSING] ./datafiles/rdrand/files.cfg
[EXTF PROCESSING] ./datafiles/glm/files.cfg
[EXTF PROCESSING] ./datafiles/sha/files.cfg
[EXTF PROCESSING] ./datafiles/xsaveopt/files.cfg
[EXTF PROCESSING] ./datafiles/xsaves/files.cfg
[EXTF PROCESSING] ./datafiles/xsavec/files.cfg
[EXTF PROCESSING] ./datafiles/clflushopt/files.cfg
[EXTF PROCESSING] ./datafiles/rdseed/files.cfg
[EXTF PROCESSING] ./datafiles/fsgsbase/files.cfg
[EXTF PROCESSING] ./datafiles/smap/files.cfg
[EXTF PROCESSING] ./datafiles/sgx/files.cfg
[EXTF PROCESSING] ./datafiles/rdpid/files.cfg
[EXTF PROCESSING] ./datafiles/pt/files.cfg
[EXTF PROCESSING] ./datafiles/tremont/files.cfg
[EXTF PROCESSING] ./datafiles/movdir/files.cfg
[EXTF PROCESSING] ./datafiles/waitpkg/files.cfg
[EXTF PROCESSING] ./datafiles/cldemote/files.cfg
[EXTF PROCESSING] ./datafiles/sgx-enclv/files.cfg
[EXTF PROCESSING] ./datafiles/avx/files.cfg
[Clearing file list for type dec-spine: [ ./datafiles/xed-spine.txt ]] 
[EXTF PROCESSING] ./datafiles/ivbavx/files.cfg
[EXTF PROCESSING] ./datafiles/hswavx/files.cfg
[EXTF PROCESSING] ./datafiles/hswbmi/files.cfg
[EXTF PROCESSING] ./datafiles/hsw/files.cfg
[EXTF PROCESSING] ./datafiles/bdw/files.cfg
[EXTF PROCESSING] ./datafiles/skl/files.cfg
[EXTF PROCESSING] ./datafiles/skx/files.cfg
[EXTF PROCESSING] ./datafiles/pku/files.cfg
[EXTF PROCESSING] ./datafiles/clwb/files.cfg
[EXTF PROCESSING] ./datafiles/clx/files.cfg
[EXTF PROCESSING] ./datafiles/vnni/files.cfg
[EXTF PROCESSING] ./datafiles/cpx/files.cfg
[EXTF PROCESSING] ./datafiles/bf16/files.cfg
[EXTF PROCESSING] ./datafiles/knl/files.cfg
[EXTF PROCESSING] ./datafiles/knm/files.cfg
[EXTF PROCESSING] ./datafiles/4fmaps-512/files.cfg
[EXTF PROCESSING] ./datafiles/4vnniw-512/files.cfg
[EXTF PROCESSING] ./datafiles/vpopcntdq-512/files.cfg
[EXTF PROCESSING] ./datafiles/avx512f/shared-files.cfg
[Clearing file list for type dec-spine: [ ./datafiles/avx/avx-spine.txt ]] 
CONSIDERING SOURCE c:\Users\bjafx\source\repos\build\xed\datafiles\knc\xed-operand-values-interface-uisa.c source 1
ADDING SOURCE c:\Users\bjafx\source\repos\build\xed\datafiles\knc\xed-operand-values-interface-uisa.c source 1
[EXTF PROCESSING] ./datafiles/avx512f/files.cfg
[EXTF PROCESSING] ./datafiles/avx512cd/files.cfg
[EXTF PROCESSING] ./datafiles/avx512-skx/files.cfg
[EXTF PROCESSING] ./datafiles/cnl/files.cfg
[EXTF PROCESSING] ./datafiles/avx512ifma/files.cfg
[EXTF PROCESSING] ./datafiles/avx512vbmi/files.cfg
[EXTF PROCESSING] ./datafiles/icl/files.cfg
[EXTF PROCESSING] ./datafiles/wbnoinvd/files.cfg
[EXTF PROCESSING] ./datafiles/pconfig/files.cfg
[EXTF PROCESSING] ./datafiles/bitalg/files.cfg
[EXTF PROCESSING] ./datafiles/vbmi2/files.cfg
[EXTF PROCESSING] ./datafiles/gfni-vaes-vpcl/files-sse.cfg
[EXTF PROCESSING] ./datafiles/gfni-vaes-vpcl/files-avx-avx512.cfg
[EXTF PROCESSING] ./datafiles/vpopcntdq-vl/files.cfg
[EXTF PROCESSING] ./datafiles/tgl/files.cfg
[EXTF PROCESSING] ./datafiles/vp2intersect/files.cfg
[EXTF PROCESSING] ./datafiles/spr/files.cfg
[EXTF PROCESSING] ./datafiles/enqcmd/files.cfg
[EXTF PROCESSING] ./datafiles/tsx-ldtrk/files.cfg
[EXTF PROCESSING] ./datafiles/serialize/files.cfg
[EXTF PROCESSING] ./datafiles/future/files.cfg
[EMIT BUILD DEFINES HEADER FILE] 
R: 1 P: 0 C: 0 E: 0 / 30 msecs [decprep]
[TOUCH] obj/dummy-prep
R: 0 P: 0 C: 1 E: 0 / 1 secs 
    BUILT: C:\Users\bjafx\source\repos\build\xed\obj\dummy-prep
R: 2 P: 0 C: 1 E: 0 / 1 secs [decgen encgen]
R: 2 P: 0 C: 1 E: 0 / 21 secs [decgen encgen]
[WRITING] obj/DEC-OUT.txt
[WRITING] obj/DEC-ERR.txt
[DEC-GEN] Return code: 0
R: 1 P: 0 C: 2 E: 0 / 23 secs [encgen]
    BUILT: C:\Users\bjafx\source\repos\build\xed\obj\DECGEN-OUTPUT-FILES.txt
[WRITING] obj/ENC-OUT.txt
[WRITING] obj/ENC-ERR.txt
[ENC-GEN] Return code: 0
R: 0 P: 0 C: 3 E: 0 / 26 secs 
    BUILT: C:\Users\bjafx\source\repos\build\xed\obj\ENCGEN-OUTPUT-FILES.txt
R: 4 P: 107 C: 0 E: 0 / 15 msecs 
R: 4 P: 106 C: 1 E: 0 / 218 msecs 
    BUILT: C:\Users\bjafx\source\repos\build\xed\obj\xed-operand-ctype-enum.obj
R: 4 P: 105 C: 2 E: 0 / 218 msecs 
    BUILT: C:\Users\bjafx\source\repos\build\xed\obj\xed-address-width-enum.obj
R: 4 P: 104 C: 3 E: 0 / 218 msecs 
    BUILT: C:\Users\bjafx\source\repos\build\xed\obj\xed-attribute-enum.obj
R: 4 P: 103 C: 4 E: 0 / 218 msecs 
    BUILT: C:\Users\bjafx\source\repos\build\xed\obj\xed-reg-enum.obj
R: 4 P: 102 C: 5 E: 0 / 328 msecs 
    BUILT: C:\Users\bjafx\source\repos\build\xed\obj\xed-reg-class-enum.obj
R: 4 P: 101 C: 6 E: 0 / 328 msecs 
    BUILT: C:\Users\bjafx\source\repos\build\xed\obj\xed-operand-enum.obj
R: 4 P: 100 C: 7 E: 0 / 343 msecs 
    BUILT: C:\Users\bjafx\source\repos\build\xed\obj\xed-operand-action-enum.obj
R: 4 P: 99 C: 8 E: 0 / 343 msecs 
    BUILT: C:\Users\bjafx\source\repos\build\xed\obj\xed-operand-visibility-enum.obj
R: 4 P: 98 C: 9 E: 0 / 437 msecs 
    BUILT: C:\Users\bjafx\source\repos\build\xed\obj\xed-operand-width-enum.obj
R: 4 P: 97 C: 10 E: 0 / 453 msecs 
    BUILT: C:\Users\bjafx\source\repos\build\xed\obj\xed-nonterminal-enum.obj
R: 4 P: 96 C: 11 E: 0 / 453 msecs 
    BUILT: C:\Users\bjafx\source\repos\build\xed\obj\xed-operand-element-xtype-enum.obj
R: 4 P: 95 C: 12 E: 0 / 453 msecs 
    BUILT: C:\Users\bjafx\source\repos\build\xed\obj\xed-error-enum.obj
R: 4 P: 94 C: 13 E: 0 / 515 msecs 
    BUILT: C:\Users\bjafx\source\repos\build\xed\obj\xed-cpuid-bit-enum.obj
R: 4 P: 93 C: 14 E: 0 / 515 msecs 
    BUILT: C:\Users\bjafx\source\repos\build\xed\obj\xed-iclass-enum.obj
R: 4 P: 92 C: 15 E: 0 / 531 msecs 
    BUILT: C:\Users\bjafx\source\repos\build\xed\obj\xed-chip-enum.obj
R: 4 P: 91 C: 16 E: 0 / 531 msecs 
    BUILT: C:\Users\bjafx\source\repos\build\xed\obj\xed-operand-element-type-enum.obj
R: 4 P: 90 C: 17 E: 0 / 578 msecs 
    BUILT: C:\Users\bjafx\source\repos\build\xed\obj\xed-extension-enum.obj
R: 4 P: 89 C: 18 E: 0 / 578 msecs 
    BUILT: C:\Users\bjafx\source\repos\build\xed\obj\xed-category-enum.obj
R: 4 P: 88 C: 19 E: 0 / 624 msecs 
    BUILT: C:\Users\bjafx\source\repos\build\xed\obj\xed-operand-convert-enum.obj
R: 4 P: 87 C: 20 E: 0 / 624 msecs 
    BUILT: C:\Users\bjafx\source\repos\build\xed\obj\xed-operand-type-enum.obj
R: 4 P: 86 C: 21 E: 0 / 671 msecs 
    BUILT: C:\Users\bjafx\source\repos\build\xed\obj\xed-machine-mode-enum.obj
R: 4 P: 85 C: 22 E: 0 / 671 msecs 
    BUILT: C:\Users\bjafx\source\repos\build\xed\obj\xed-flag-action-enum.obj
R: 4 P: 84 C: 23 E: 0 / 703 msecs 
    BUILT: C:\Users\bjafx\source\repos\build\xed\obj\xed-exception-enum.obj
R: 4 P: 83 C: 24 E: 0 / 718 msecs 
    BUILT: C:\Users\bjafx\source\repos\build\xed\obj\xed-flag-enum.obj
R: 4 P: 82 C: 25 E: 0 / 738 msecs 
    BUILT: C:\Users\bjafx\source\repos\build\xed\obj\xed-syntax-enum.obj
R: 4 P: 81 C: 26 E: 0 / 769 msecs 
    BUILT: C:\Users\bjafx\source\repos\build\xed\obj\xed-reg-role-enum.obj
R: 4 P: 80 C: 27 E: 0 / 769 msecs 
    BUILT: C:\Users\bjafx\source\repos\build\xed\obj\xed-isa-set-enum.obj
R: 4 P: 79 C: 28 E: 0 / 816 msecs 
    BUILT: C:\Users\bjafx\source\repos\build\xed\obj\xed-version.obj
R: 4 P: 78 C: 29 E: 0 / 832 msecs 
    BUILT: C:\Users\bjafx\source\repos\build\xed\obj\xed-iformfl-enum.obj
R: 4 P: 77 C: 30 E: 0 / 832 msecs 
    BUILT: C:\Users\bjafx\source\repos\build\xed\obj\xed-operand-action.obj
R: 4 P: 76 C: 31 E: 0 / 878 msecs 
    BUILT: C:\Users\bjafx\source\repos\build\xed\obj\xed-immdis.obj
R: 4 P: 75 C: 32 E: 0 / 878 msecs 
    BUILT: C:\Users\bjafx\source\repos\build\xed\obj\xed-iform-enum.obj
R: 4 P: 74 C: 33 E: 0 / 925 msecs 
    BUILT: C:\Users\bjafx\source\repos\build\xed\obj\xed-portability.obj
R: 4 P: 73 C: 34 E: 0 / 941 msecs 
    BUILT: C:\Users\bjafx\source\repos\build\xed\obj\xed-immed.obj
R: 4 P: 72 C: 35 E: 0 / 1 secs 
    BUILT: C:\Users\bjafx\source\repos\build\xed\obj\xed-state.obj
R: 4 P: 71 C: 36 E: 0 / 1 secs 
    BUILT: C:\Users\bjafx\source\repos\build\xed\obj\xed-ild-support.obj
R: 4 P: 70 C: 37 E: 0 / 1 secs 
    BUILT: C:\Users\bjafx\source\repos\build\xed\obj\xed-util.obj
R: 4 P: 69 C: 38 E: 0 / 1 secs 
    BUILT: C:\Users\bjafx\source\repos\build\xed\obj\xed-operand-accessors.obj
R: 4 P: 68 C: 39 E: 0 / 1 secs 
    BUILT: C:\Users\bjafx\source\repos\build\xed\obj\xed-agen.obj
R: 4 P: 67 C: 40 E: 0 / 1 secs 
    BUILT: C:\Users\bjafx\source\repos\build\xed\obj\xed-chip-modes-override.obj
R: 4 P: 66 C: 41 E: 0 / 1 secs 
    BUILT: C:\Users\bjafx\source\repos\build\xed\obj\xed-encoder-hl.obj
R: 4 P: 65 C: 42 E: 0 / 1 secs 
    BUILT: C:\Users\bjafx\source\repos\build\xed\obj\xed-flags.obj
R: 4 P: 64 C: 43 E: 0 / 1 secs 
    BUILT: C:\Users\bjafx\source\repos\build\xed\obj\xed-encode-isa-functions.obj
R: 4 P: 63 C: 44 E: 0 / 1 secs 
    BUILT: C:\Users\bjafx\source\repos\build\xed\obj\xed-reg-class.obj
R: 4 P: 62 C: 45 E: 0 / 1 secs 
    BUILT: C:\Users\bjafx\source\repos\build\xed\obj\xed-chip-modes.obj
R: 4 P: 61 C: 46 E: 0 / 1 secs 
    BUILT: C:\Users\bjafx\source\repos\build\xed\obj\xed-attributes-list.obj
R: 4 P: 60 C: 47 E: 0 / 1 secs 
    BUILT: C:\Users\bjafx\source\repos\build\xed\obj\xed-classifiers.obj
R: 4 P: 59 C: 48 E: 0 / 1 secs 
    BUILT: C:\Users\bjafx\source\repos\build\xed\obj\xed-attributes-init.obj
R: 4 P: 58 C: 49 E: 0 / 1 secs 
    BUILT: C:\Users\bjafx\source\repos\build\xed\obj\xed-table-sizes.obj
R: 4 P: 57 C: 50 E: 0 / 1 secs 
    BUILT: C:\Users\bjafx\source\repos\build\xed\obj\xed-enc-operand-lu.obj
R: 4 P: 56 C: 51 E: 0 / 1 secs 
    BUILT: C:\Users\bjafx\source\repos\build\xed\obj\xed-chip-features-table.obj
R: 4 P: 55 C: 52 E: 0 / 1 secs 
    BUILT: C:\Users\bjafx\source\repos\build\xed\obj\xed-encoder-iforms-init.obj
R: 4 P: 54 C: 53 E: 0 / 1 secs 
    BUILT: C:\Users\bjafx\source\repos\build\xed\obj\xed-cpuid-tables.obj
R: 4 P: 53 C: 54 E: 0 / 1 secs 
    BUILT: C:\Users\bjafx\source\repos\build\xed\obj\xed-encoder-order-init.obj
R: 4 P: 52 C: 55 E: 0 / 1 secs 
    BUILT: C:\Users\bjafx\source\repos\build\xed\obj\xed-flags-complex.obj
R: 4 P: 51 C: 56 E: 0 / 1 secs 
    BUILT: C:\Users\bjafx\source\repos\build\xed\obj\xed-flags-simple.obj
R: 4 P: 50 C: 57 E: 0 / 1 secs 
    BUILT: C:\Users\bjafx\source\repos\build\xed\obj\xed-flags-actions.obj
R: 4 P: 49 C: 58 E: 0 / 1 secs 
    BUILT: C:\Users\bjafx\source\repos\build\xed\obj\xed-iform-max.obj
R: 4 P: 48 C: 59 E: 0 / 1 secs 
    BUILT: C:\Users\bjafx\source\repos\build\xed\obj\xed-iclass-string.obj
R: 4 P: 47 C: 60 E: 0 / 1 secs 
    BUILT: C:\Users\bjafx\source\repos\build\xed\obj\xed-ild-disp-l3.obj
R: 4 P: 46 C: 61 E: 0 / 2 secs 
    BUILT: C:\Users\bjafx\source\repos\build\xed\obj\xed-iform-map-init.obj
R: 4 P: 45 C: 62 E: 0 / 2 secs 
    BUILT: C:\Users\bjafx\source\repos\build\xed\obj\xed-ild-easz.obj
R: 4 P: 44 C: 63 E: 0 / 2 secs 
    BUILT: C:\Users\bjafx\source\repos\build\xed\obj\xed-ild-eosz.obj
R: 4 P: 43 C: 64 E: 0 / 2 secs 
    BUILT: C:\Users\bjafx\source\repos\build\xed\obj\xed-ild-imm-l3.obj
R: 4 P: 42 C: 65 E: 0 / 2 secs 
    BUILT: C:\Users\bjafx\source\repos\build\xed\obj\xed-init-inst-table-data.obj
R: 4 P: 41 C: 66 E: 0 / 2 secs 
    BUILT: C:\Users\bjafx\source\repos\build\xed\obj\xed-init-inst-table-0.obj
R: 4 P: 40 C: 67 E: 0 / 2 secs 
    BUILT: C:\Users\bjafx\source\repos\build\xed\obj\xed-init-inst-table.obj
R: 4 P: 39 C: 68 E: 0 / 2 secs 
    BUILT: C:\Users\bjafx\source\repos\build\xed\obj\xed-init-operand-sequences.obj
R: 4 P: 38 C: 69 E: 0 / 2 secs 
    BUILT: C:\Users\bjafx\source\repos\build\xed\obj\xed-init-operand-data.obj
R: 4 P: 37 C: 70 E: 0 / 2 secs 
    BUILT: C:\Users\bjafx\source\repos\build\xed\obj\xed-init-operand-type-mappings.obj
R: 4 P: 36 C: 71 E: 0 / 2 secs 
    BUILT: C:\Users\bjafx\source\repos\build\xed\obj\xed-init-width.obj
R: 4 P: 35 C: 72 E: 0 / 2 secs 
    BUILT: C:\Users\bjafx\source\repos\build\xed\obj\xed-rep-map.obj
R: 4 P: 34 C: 73 E: 0 / 2 secs 
    BUILT: C:\Users\bjafx\source\repos\build\xed\obj\xed-init-reg-class.obj
R: 4 P: 33 C: 74 E: 0 / 2 secs 
    BUILT: C:\Users\bjafx\source\repos\build\xed\obj\xed-init.obj
R: 4 P: 32 C: 75 E: 0 / 2 secs 
    BUILT: C:\Users\bjafx\source\repos\build\xed\obj\xed-operand-convert-init.obj
R: 4 P: 31 C: 76 E: 0 / 2 secs 
    BUILT: C:\Users\bjafx\source\repos\build\xed\obj\xed-cpuid.obj
R: 4 P: 30 C: 77 E: 0 / 2 secs 
    BUILT: C:\Users\bjafx\source\repos\build\xed\obj\xed-decoded-init.obj
R: 4 P: 29 C: 78 E: 0 / 2 secs 
    BUILT: C:\Users\bjafx\source\repos\build\xed\obj\xed-rep-prefix.obj
R: 4 P: 28 C: 79 E: 0 / 2 secs 
    BUILT: C:\Users\bjafx\source\repos\build\xed\obj\xed-decoded-inst.obj
R: 4 P: 27 C: 80 E: 0 / 2 secs 
    BUILT: C:\Users\bjafx\source\repos\build\xed\obj\xed-inst.obj
R: 4 P: 26 C: 81 E: 0 / 2 secs 
    BUILT: C:\Users\bjafx\source\repos\build\xed\obj\xed-iform-map.obj
R: 4 P: 25 C: 82 E: 0 / 2 secs 
    BUILT: C:\Users\bjafx\source\repos\build\xed\obj\xed-enc-dec.obj
R: 4 P: 24 C: 83 E: 0 / 2 secs 
    BUILT: C:\Users\bjafx\source\repos\build\xed\obj\xed-patch.obj
R: 4 P: 23 C: 84 E: 0 / 2 secs 
    BUILT: C:\Users\bjafx\source\repos\build\xed\obj\xed-convert-table-init.obj
R: 4 P: 22 C: 85 E: 0 / 3 secs 
    BUILT: C:\Users\bjafx\source\repos\build\xed\obj\xed-init-ild.obj
R: 4 P: 21 C: 86 E: 0 / 3 secs 
    BUILT: C:\Users\bjafx\source\repos\build\xed\obj\xed-enc-patterns.obj
R: 4 P: 20 C: 87 E: 0 / 3 secs 
    BUILT: C:\Users\bjafx\source\repos\build\xed\obj\xed-enc-groups.obj
R: 4 P: 19 C: 88 E: 0 / 3 secs 
    BUILT: C:\Users\bjafx\source\repos\build\xed\obj\xed-encoder-2.obj
R: 4 P: 18 C: 89 E: 0 / 3 secs 
    BUILT: C:\Users\bjafx\source\repos\build\xed\obj\xed-encoder-1.obj
R: 4 P: 17 C: 90 E: 0 / 3 secs 
    BUILT: C:\Users\bjafx\source\repos\build\xed\obj\xed-encoder-0.obj
R: 4 P: 16 C: 91 E: 0 / 3 secs 
    BUILT: C:\Users\bjafx\source\repos\build\xed\obj\xed-encoder-4.obj
R: 4 P: 15 C: 92 E: 0 / 3 secs 
    BUILT: C:\Users\bjafx\source\repos\build\xed\obj\xed-encoder-3.obj
R: 4 P: 14 C: 93 E: 0 / 3 secs 
    BUILT: C:\Users\bjafx\source\repos\build\xed\obj\xed-encode.obj
R: 4 P: 13 C: 94 E: 0 / 3 secs 
    BUILT: C:\Users\bjafx\source\repos\build\xed\obj\xed-encoder-init.obj
R: 4 P: 12 C: 95 E: 0 / 3 secs 
    BUILT: C:\Users\bjafx\source\repos\build\xed\obj\xed-encoder-pattern-lu.obj
R: 4 P: 11 C: 96 E: 0 / 3 secs 
    BUILT: C:\Users\bjafx\source\repos\build\xed\obj\xed-init-pointer-names.obj
R: 4 P: 10 C: 97 E: 0 / 3 secs 
    BUILT: C:\Users\bjafx\source\repos\build\xed\obj\xed-operand-ctype-map.obj
R: 4 P: 9 C: 98 E: 0 / 3 secs 
    BUILT: C:\Users\bjafx\source\repos\build\xed\obj\xed-operand-values-interface.obj
R: 4 P: 8 C: 99 E: 0 / 3 secs 
    BUILT: C:\Users\bjafx\source\repos\build\xed\obj\xed-operand-values-interface-uisa.obj
R: 4 P: 7 C: 100 E: 0 / 3 secs 
    BUILT: C:\Users\bjafx\source\repos\build\xed\obj\xed-isa-set.obj
R: 4 P: 6 C: 101 E: 0 / 4 secs 
    BUILT: C:\Users\bjafx\source\repos\build\xed\obj\xed-disas.obj
R: 4 P: 5 C: 102 E: 0 / 4 secs 
    BUILT: C:\Users\bjafx\source\repos\build\xed\obj\xed-chip-features.obj
R: 4 P: 4 C: 103 E: 0 / 4 secs 
    BUILT: C:\Users\bjafx\source\repos\build\xed\obj\xed3-static-decode.obj
R: 4 P: 3 C: 104 E: 0 / 4 secs 
    BUILT: C:\Users\bjafx\source\repos\build\xed\obj\xed-decode.obj
R: 4 P: 2 C: 105 E: 0 / 4 secs 
    BUILT: C:\Users\bjafx\source\repos\build\xed\obj\xed3-operand-lu.obj
R: 4 P: 1 C: 106 E: 0 / 4 secs 
    BUILT: C:\Users\bjafx\source\repos\build\xed\obj\xed3-phash-lu-vv1.obj
R: 4 P: 0 C: 107 E: 0 / 4 secs 
    BUILT: C:\Users\bjafx\source\repos\build\xed\obj\xed3-dynamic-decode.obj
R: 3 P: 0 C: 108 E: 0 / 4 secs 
    BUILT: C:\Users\bjafx\source\repos\build\xed\obj\xed3-phash-lu-vv3.obj
R: 2 P: 0 C: 109 E: 0 / 4 secs 
    BUILT: C:\Users\bjafx\source\repos\build\xed\obj\xed-ild.obj
R: 2 P: 0 C: 110 E: 0 / 5 secs 
[REMOVING] obj/xed-ild.lib
    BUILT: C:\Users\bjafx\source\repos\build\xed\obj\xed3-phash-lu-vv2.obj
[MBUILD WARNING] Command execution failed. Waiting for remaining jobs and exiting.
R: 1 P: 0 C: 111 E: 1 / 5 secs 
[COMMAND     ] PYTHON FN: _remove_libname ;;;; "C:/Program Files/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.16.27023//bin/Hostx86/x64/lib.exe" /nologo /MACHINE:X86  /out:obj/xed-ild.lib obj/xed-ild-support.obj obj/xed-init-ild.obj obj/xed-ild.obj obj/xed-chip-features.obj obj/xed-isa-set.obj obj/xed-chip-modes.obj obj/xed-chip-modes-override.obj obj/xed-chip-features-table.obj obj/xed-ild-disp-l3.obj obj/xed-ild-eosz.obj obj/xed-ild-easz.obj obj/xed-ild-imm-l3.obj
[ARGS        ] ['obj/xed-ild.lib']
[ENV         ] some env
[EXIT_STATUS ] 1112
[OUTPUT] 
REMOVED obj/xed-ild.lib
obj\xed-ild-support.obj : fatal error LNK1112: module machine type 'x64' conflicts with target machine type 'x86'

R: 0 P: 0 C: 112 E: 1 / 6 secs 
    BUILT: C:\Users\bjafx\source\repos\build\xed\obj\xed3-phash-lu-vv0.obj
markcharney commented 4 years ago

are you trying to do a cross compile for some reason? i think you may have opened the wrong kind of cmd.exe.

this is what looks strange to me: /Hostx86/x64/

hatRiot commented 4 years ago

I'm not, no. This is on a 32-bit Windows 7 machine so everything should be 32-bit.

ifratric commented 3 years ago

I can also reproduce this on a clean VM with 32-bit Windows 10, version 2004 and Visual Studio 2019. I also see /Hostx86/x64/ in the compiler / linker path and I believe mbuild is somehow getting this wrong, and unfortunately even explicitly setting --vc-dir to the /Hostx86/x86/ equivalent does not help.

Edit: so far, the only workaround I found was to set --cc --ar and --linker manually.

ghost commented 3 years ago

Same errors. Compiling the lib is ok but compiling the example failed. Windows 10 64bit + VS2019 version16.8.6


D:\code\c++\IntelXED\xed>py -3 mfile.py --static --opt=3  examples
[MBUILD WARNING] Could not find 64b RC command in SDK directory; assuming on PATH
[PYTHON VERSION] 3.9.0
[GIT VERSION] 12.0.1-30-g42830f1
[EXTF PROCESSING] ./datafiles/files.cfg
[EXTF PROCESSING] ./datafiles/files-xregs.cfg
[EXTF PROCESSING] ./datafiles/via/files-via-padlock.cfg
[EXTF PROCESSING] ./datafiles/amd/files-amd.cfg
[EXTF PROCESSING] ./datafiles/amd/amdxop/files.cfg
[EXTF PROCESSING] ./datafiles/mpx/files.cfg
[EXTF PROCESSING] ./datafiles/cet/files.cfg
[EXTF PROCESSING] ./datafiles/rdrand/files.cfg
[EXTF PROCESSING] ./datafiles/glm/files.cfg
[EXTF PROCESSING] ./datafiles/sha/files.cfg
[EXTF PROCESSING] ./datafiles/xsaveopt/files.cfg
[EXTF PROCESSING] ./datafiles/xsaves/files.cfg
[EXTF PROCESSING] ./datafiles/xsavec/files.cfg
[EXTF PROCESSING] ./datafiles/clflushopt/files.cfg
[EXTF PROCESSING] ./datafiles/rdseed/files.cfg
[EXTF PROCESSING] ./datafiles/fsgsbase/files.cfg
[EXTF PROCESSING] ./datafiles/smap/files.cfg
[EXTF PROCESSING] ./datafiles/sgx/files.cfg
[EXTF PROCESSING] ./datafiles/rdpid/files.cfg
[EXTF PROCESSING] ./datafiles/pt/files.cfg
[EXTF PROCESSING] ./datafiles/tremont/files.cfg
[EXTF PROCESSING] ./datafiles/movdir/files.cfg
[EXTF PROCESSING] ./datafiles/waitpkg/files.cfg
[EXTF PROCESSING] ./datafiles/cldemote/files.cfg
[EXTF PROCESSING] ./datafiles/sgx-enclv/files.cfg
[EXTF PROCESSING] ./datafiles/avx/files.cfg
[Clearing file list for type dec-spine: [ ./datafiles/xed-spine.txt ]]
[EXTF PROCESSING] ./datafiles/ivbavx/files.cfg
[EXTF PROCESSING] ./datafiles/hswavx/files.cfg
[EXTF PROCESSING] ./datafiles/hswbmi/files.cfg
[EXTF PROCESSING] ./datafiles/hsw/files.cfg
[EXTF PROCESSING] ./datafiles/bdw/files.cfg
[EXTF PROCESSING] ./datafiles/skl/files.cfg
[EXTF PROCESSING] ./datafiles/skx/files.cfg
[EXTF PROCESSING] ./datafiles/pku/files.cfg
[EXTF PROCESSING] ./datafiles/clwb/files.cfg
[EXTF PROCESSING] ./datafiles/clx/files.cfg
[EXTF PROCESSING] ./datafiles/vnni/files.cfg
[EXTF PROCESSING] ./datafiles/cpx/files.cfg
[EXTF PROCESSING] ./datafiles/avx512-bf16/files.cfg
[EXTF PROCESSING] ./datafiles/knl/files.cfg
[EXTF PROCESSING] ./datafiles/knm/files.cfg
[EXTF PROCESSING] ./datafiles/4fmaps-512/files.cfg
[EXTF PROCESSING] ./datafiles/4vnniw-512/files.cfg
[EXTF PROCESSING] ./datafiles/vpopcntdq-512/files.cfg
[EXTF PROCESSING] ./datafiles/avx512f/shared-files.cfg
[Clearing file list for type dec-spine: [ ./datafiles/avx/avx-spine.txt ]]
[CONSIDERING SOURCE] D:\code\c++\IntelXED\xed\datafiles\knc\xed-operand-values-interface-uisa.c source 1
[ADDING SOURCE] D:\code\c++\IntelXED\xed\datafiles\knc\xed-operand-values-interface-uisa.c source 1
[EXTF PROCESSING] ./datafiles/avx512f/files.cfg
[EXTF PROCESSING] ./datafiles/avx512cd/files.cfg
[EXTF PROCESSING] ./datafiles/avx512-skx/files.cfg
[EXTF PROCESSING] ./datafiles/cnl/files.cfg
[EXTF PROCESSING] ./datafiles/avx512ifma/files.cfg
[EXTF PROCESSING] ./datafiles/avx512vbmi/files.cfg
[EXTF PROCESSING] ./datafiles/icl/files.cfg
[EXTF PROCESSING] ./datafiles/wbnoinvd/files.cfg
[EXTF PROCESSING] ./datafiles/pconfig/files.cfg
[EXTF PROCESSING] ./datafiles/bitalg/files.cfg
[EXTF PROCESSING] ./datafiles/vbmi2/files.cfg
[EXTF PROCESSING] ./datafiles/gfni-vaes-vpcl/files-sse.cfg
[EXTF PROCESSING] ./datafiles/gfni-vaes-vpcl/files-avx-avx512.cfg
[EXTF PROCESSING] ./datafiles/vpopcntdq-vl/files.cfg
[EXTF PROCESSING] ./datafiles/tgl/files.cfg
[EXTF PROCESSING] ./datafiles/vp2intersect/files.cfg
[EXTF PROCESSING] ./datafiles/keylocker/files.cfg
[EXTF PROCESSING] ./datafiles/adl/files.cfg
[EXTF PROCESSING] ./datafiles/hreset/files.cfg
[EXTF PROCESSING] ./datafiles/avx-vnni/files.cfg
[EXTF PROCESSING] ./datafiles/spr/files.cfg
[EXTF PROCESSING] ./datafiles/uintr/files.cfg
[EXTF PROCESSING] ./datafiles/amx-spr/files.cfg
[EXTF PROCESSING] ./datafiles/enqcmd/files.cfg
[EXTF PROCESSING] ./datafiles/tsx-ldtrk/files.cfg
[EXTF PROCESSING] ./datafiles/serialize/files.cfg
[EXTF PROCESSING] ./datafiles/future/files.cfg
[EXTF PROCESSING] ./datafiles/tdx/files.cfg
[EMIT BUILD DEFINES HEADER FILE]
R: 0 P: 0 C: 0 E: 0 / 39 msecs
R: 0 P: 0 C: 0 E: 0 / 30 msecs
[PYTHON VERSION] 3.9.0
[CMDLINE] D:\code\c++\IntelXED\xed\obj\wkit\examples\obj\xed.exe
[BUILDING EXAMPLES]
R: 4 P: 17 C: 0 E: 0 / 16 msecs
[MBUILD WARNING] Command execution failed. Waiting for remaining jobs and exiting.
R: 3 P: 17 C: 1 E: 1 / 104 msecs
[COMMAND     ] "e:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.28.29333//bin/Hostx64/x64/link.exe"     /nologo  /MACHINE:X64  /OPT:REF /OPT:ICF=3 /NXCOMPAT /DYNAMICBASE  /OUT:obj/wkit/examples/obj/xed-size.exe obj/wkit/examples/obj/xed-size.obj obj/wkit/lib/xed.lib
[EXIT_STATUS ] 1120
[OUTPUT]
xed-size.obj : error LNK2019: unresolved external symbol __acrt_iob_func referenced in function printf
xed-size.obj : error LNK2019: unresolved external symbol __stdio_common_vfprintf referenced in function _vfprintf_l
LINK : error LNK2001: unresolved external symbol mainCRTStartup
e:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.28.29333\lib\x86\LIBCMT.lib : warning LNK4272: library machine type 'x86' conflicts with target machine type 'x64'
obj\wkit\examples\obj\xed-size.exe : fatal error LNK1120: 3 unresolved externals

[MBUILD WARNING] Command execution failed. Waiting for remaining jobs and exiting.
R: 2 P: 17 C: 2 E: 2 / 215 msecs
[COMMAND     ] "e:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.28.29333//bin/Hostx64/x64/link.exe"     /nologo  /MACHINE:X64  /OPT:REF /OPT:ICF=3 /NXCOMPAT /DYNAMICBASE  /OUT:obj/wkit/examples/obj/xed-ex5-enc.exe obj/wkit/examples/obj/xed-ex5-enc.obj obj/wkit/lib/xed.lib
[EXIT_STATUS ] 1112
[OUTPUT]
LIBCMT.lib(chkstk.obj) : fatal error LNK1112: module machine type 'x86' conflicts with target machine type 'x64'

[MBUILD WARNING] Command execution failed. Waiting for remaining jobs and exiting.
R: 1 P: 17 C: 3 E: 3 / 251 msecs
[COMMAND     ] "e:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.28.29333//bin/Hostx64/x64/link.exe"     /nologo  /MACHINE:X64  /OPT:REF /OPT:ICF=3 /NXCOMPAT /DYNAMICBASE  /OUT:obj/wkit/examples/obj/xed-asmparse-main.exe obj/wkit/examples/obj/xed-asmparse-main.obj obj/wkit/examples/obj/xed-asmparse.obj obj/wkit/examples/obj/xed-examples-util.obj obj/wkit/examples/obj/xed-dot.obj obj/wkit/examples/obj/xed-dot-prep.obj obj/wkit/examples/obj/xed-enc-lang.obj obj/wkit/lib/xed.lib  
[EXIT_STATUS ] 1112
[OUTPUT]
LIBCMT.lib(chkstk.obj) : fatal error LNK1112: module machine type 'x86' conflicts with target machine type 'x64'

R: 0 P: 17 C: 4 E: 3 / 968 msecs
        BUILT: D:\code\c++\IntelXED\xed\obj\wkit\examples\obj\xed-disas-pecoff.obj
ABORT: XED EXAMPLES build failed```
ghost commented 3 years ago

I took some time to read the code and I think I know the reason now...

@hatRiot I think you use Windows 32bit and CPU 64bit , but those python scrips assumes some vars such as here if you don't give the arguments. For your case , I guess the scripts want to compile 64bit program on 32bit OS.

For me 's case , I use the default "VS Command Prompt " --- this is for x86!!! But I have Win64bit and CPU64bit.

How to solve: Use the specific arguments with the py script no matter whatever you want to build. build 32bit program&lib: 1 open "x86 native tools command " 2 input "mfiles.py" or "mfiles.py --host-cpu=ia32"

build 64bit program&lib: 1 open "x64 native tools command" 2 input "mfile.py" or "mfiles.py --host-cpu=x86-64"

If still not work, see the verbose output(mfiles.py -v xx ) to check the arguments passed to the cl.exe and link.exe.

markcharney commented 3 years ago

Thanks, blackbeaf. (Or is it Mr.Beaf? :-) )

yes. which VS command prompt you open matters. Let me know if you are still encountering issues.