Skip to content

Update YASM to fix the command error#12324

Closed
JackBoosY wants to merge 6 commits intomicrosoft:masterfrom
JackBoosY:dev/jack/12240
Closed

Update YASM to fix the command error#12324
JackBoosY wants to merge 6 commits intomicrosoft:masterfrom
JackBoosY:dev/jack/12240

Conversation

@JackBoosY
Copy link
Contributor

@JackBoosY JackBoosY commented Jul 8, 2020

Using the new YASM binary seems to solve the path problem in the command line, so update it.

Fixes #12240 #12237.

@JackBoosY JackBoosY added the category:tool-update The issue is with build tool or build script, which requires update or should be executed correctly label Jul 8, 2020
@JackBoosY JackBoosY linked an issue Jul 8, 2020 that may be closed by this pull request
@JackBoosY
Copy link
Contributor Author

@voskrese @Neumann-A @timautry @Sibras Could you please test this PR?

Thanks.

@JackBoosY
Copy link
Contributor Author

I can't repro these regressions on my machine.

@JackBoosY JackBoosY requested a review from BillyONeal July 8, 2020 07:55
@MVoz
Copy link
Contributor

MVoz commented Jul 8, 2020

portfile.cmake

        OPTIONS
+          "/p:YASMPATH=${YASM_DIR}/"

and only test add slash

    set(SUBDIR "1.3.0.6/")
    set(PATHS "${DOWNLOADS}/tools/yasm/${SUBDIR}/") #I don't know why in two places, but it affects directory detection

@JackBoosY
Copy link
Contributor Author

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@JackBoosY
Copy link
Contributor Author

JackBoosY commented Jul 8, 2020

My log is:
"F:/12324/vcpkg/downloads/tools/yasm/1.3.0.6/"yasm.exe -Xvc -f win64 -o ...

The pipeline log is:
"D:/downloads/tools/yasm/1.3.0.6/"yasm.exe -Xvc -f win64 -o ...

But I can build successful on my machine (both Visual Studio 2017 and 2019).
Why?

@MVoz
Copy link
Contributor

MVoz commented Jul 8, 2020

cache azure subdir yasm version x84?

subdir x64 and x86

@JackBoosY
Copy link
Contributor Author

@voskrese No, they are in downloads/tools/yasm/1.3.0.6.

@MVoz
Copy link
Contributor

MVoz commented Jul 8, 2020

delete

    set(SUBDIR 1.3.0.6/)
    set(PATHS ${DOWNLOADS}/tools/yasm/${SUBDIR}/)

add


    if(VCPKG_TARGET_ARCHITECTURE STREQUAL x86)
        set(SUBDIR "1.3.0.6_x86/")
        set(PATHS ${DOWNLOADS}/tools/yasm/${SUBDIR}/)
        set(URL "https://www.tortall.net/projects/yasm/snapshots/v1.3.0.6.g1962/yasm-1.3.0.6.g1962.exe")
        set(ARCHIVE "yasm-1.3.0.6-win32.exe")
        set(_vfa_RENAME "yasm.exe")
        set(NOEXTRACT ON)
        set(HASH c1945669d983b632a10c5ff31e86d6ecbff143c3d8b2c433c0d3d18f84356d2b351f71ac05fd44e5403651b00c31db0d14615d7f9a6ecce5750438d37105c55b)
    else(VCPKG_TARGET_ARCHITECTURE STREQUAL x64)
        set(SUBDIR "1.3.0_x64/")
        set(PATHS ${DOWNLOADS}/tools/yasm/${SUBDIR}/)
        set(URL "https://github.com/yasm/yasm/releases/download/v1.3.0/yasm-1.3.0-win64.exe")
        set(ARCHIVE "yasm-1.3.0-win64.exe")
        set(_vfa_RENAME "yasm.exe")
        set(NOEXTRACT ON)
        set(HASH 73dfd4ccf93972bb6e4794c071b712de0dbffe6d10345fd9d0b0a9c2472d87cd06f6ac32770af9ba2abb715ad0f80e2a55cf02284f44627dc5e303d66065336f)
    endif()

?

@JackBoosY
Copy link
Contributor Author

JackBoosY commented Jul 8, 2020

@voskrese and I found the following code doesn't work:
In vcpkg_find_acquire_program.cmake:

    get_filename_component(YASM_DIR "${PATHS}" DIRECTORY)
    vcpkg_add_to_path(PREPEND "${YASM_DIR}")
    set(YASMPATH "${YASM_DIR}")

@MVoz
Copy link
Contributor

MVoz commented Jul 8, 2020

    get_filename_component(YASM_DIR "${PATHS}" DIRECTORY)
    vcpkg_add_to_path(PREPEND "${YASM_DIR}")
    set(YASMPATH "${YASM_DIR}")

I experimented with this for myself, plus the definition of the version
Yes, it should be deleted

@JackBoosY
Copy link
Contributor Author

@BillyONeal Could you take a look?

Thanks.

@MVoz
Copy link
Contributor

MVoz commented Jul 8, 2020

test, delete

/p:UseEnv=True

@MVoz
Copy link
Contributor

MVoz commented Jul 8, 2020

this parameter should not be present at all /p:UseEnv=True

vcpkg too isolated, where the bug crept in
ms-mpi with many patches barely collected

yasm old 2014 the possible error due to the lack of
yasm/yasm#103

MSVCR100.dll was not found ?

@JackBoosY
Copy link
Contributor Author

D:\installed\x64-windows\share\vs-yasm\yasm.targets(50,5): error MSB3721: The command ""D:/downloads/tools/yasm/1.3.0.6/x64/"yasm.exe -Xvc -f win64 -o "D:\buildtrees\gmp\x64-windows-rel\adcc6b3cc4-2b6258d695.clean\SMP\obj\ReleaseDLL\x64\libgmp\addaddmul_1msb0.obj" -rraw -pgas  "D:\buildtrees\gmp\x64-windows-rel\adcc6b3cc4-2b6258d695.clean\SMP\mpn\x86_64\addaddmul_1msb0.s"" exited with code -1073741515. 

I think this is a bug of yasm. I'll report it later.

@JackBoosY JackBoosY added the depends:upstream-changes Waiting on a change to the upstream project label Jul 9, 2020
@JackBoosY
Copy link
Contributor Author

I have to wait for the official to fix this bug.

@Neumann-A
Copy link
Contributor

Maybe we should just build a newer version of yasm ourself and use that?

@JackBoosY
Copy link
Contributor Author

@Neumann-A Therefore, we have to add yasm as a port.

@Neumann-A
Copy link
Contributor

@JackBoosY: Therefore, we cannot do it because we are not allowed to do so? Maybe the MS team should discuss again if vcpkg should support tools as ports or have a separate git for binary tools. I mean llvm/qmake etc. are already built by vcpkg, so why not the complete rest?

@JackBoosY
Copy link
Contributor Author

@Neumann-A We need to discuss it.

@MVoz
Copy link
Contributor

MVoz commented Jul 13, 2020

it may be easier to switch to the MSYS version, because it is only a tool for performing the task

yasm perl and others

pacman -S mingw-w64-x86_64-yasm

pacman -S mingw-w64-x86_64-perl

@JackBoosY
Copy link
Contributor Author

Temporary close this PR, will continue this work in the future.

@JackBoosY JackBoosY closed this Oct 27, 2020
@JackBoosY
Copy link
Contributor Author

This issue will be fixed in #14003 instead.

@JackBoosY JackBoosY deleted the dev/jack/12240 branch October 28, 2020 09:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

category:tool-update The issue is with build tool or build script, which requires update or should be executed correctly depends:upstream-changes Waiting on a change to the upstream project

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[nettle:x64-windows] build failure [gmp:x64-windows] build failure

4 participants