malxau / yori

Yori is a CMD replacement shell that supports backquotes, job control, and improves tab completion, file matching, aliases, command history, and more.
http://www.malsmith.net/yori/
MIT License
1.24k stars 31 forks source link

Errors building current source using nmake of MSVC v14.16.27023 tools #75

Closed aleaksunder closed 3 years ago

aleaksunder commented 3 years ago

Theese errors I get trying to build current source code. Since originally my messages not in english, I tried to translate it as exact as I can.

*** Linking for
yfor.exe
for.obj : error LNK2019: unresolved external symbol _YoriLibShIsArgumentSeperator@16 referenced in function _ForBreakArgumentsAsNeeded@8
yfor.exe : fatal error LNK1120: 1 unresolved externals
NMAKE : fatal error U1077: "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.16.27023\bin\HostX64\x86\link.exe" : возвращенный код "0x460"
Stop.

*** Linking make
ymake.exe
exec.obj : error LNK2019: unresolved external symbol _YoriLibShGetProcessOutputBuffer@8 referenced in function _MakeProcessCompletion@4
exec.obj : error LNK2019: unresolved external symbol _YoriLibShTeardownProcessBuffersIfCompleted@4 referenced in function _MakeProcessCompletion@4
exec.obj : error LNK2019: unresolved external symbol _YoriLibShWaitForProcessBufferToFinalize@4 referenced in function _MakeProcessCompletion@4
exec.obj : error LNK2019: unresolved external symbol _YoriLibShCommenceProcessBuffersIfNeeded@4 referenced in function _MakeLaunchNextCmd@4
exec.obj : error LNK2019: unresolved external symbol _YoriLibShCreateProcess@12 referenced in function _MakeLaunchNextCmd@4
exec.obj : error LNK2019: unresolved external symbol _YoriLibShBuildCmdContextForCmdBuckPass@8 referenced in function _MakeLaunchNextCmd@4
exec.obj : error LNK2019: unresolved external symbol _YoriLibShFreeCmdContext@4 referenced in function _MakeFreeCmdContextIfNecessary@4
exec.obj : error LNK2019: unresolved external symbol _YoriLibShFreeExecPlan@4 referenced in function _MakeFreeCmdContextIfNecessary@4
exec.obj : error LNK2019: unresolved external symbol _YoriLibShParseCmdContextToExecPlan@24 referenced in function _MakeLaunchNextCmd@4
exec.obj : error LNK2019: unresolved external symbol _YoriLibShParseCmdlineToCmdContext@12 referenced in function _MakeLaunchNextCmd@4
ymake.exe : fatal error LNK1120: 10 unresolved externals
NMAKE : fatal error U1077: "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.16.27023\bin\HostX64\x86\link.exe" : return code "0x460"

*** Linking sh
   Создается библиотека yori.lib и объект yori.exp
input.obj : error LNK2001: unresolved external symbol "_YoriLibShBuildCmdlineFromCmdContext@20"
job.obj : error LNK2001: unresolved external symbol "_YoriLibShBuildCmdlineFromCmdContext@20"
alias.obj : error LNK2001: unresolved external symbol "_YoriLibShBuildCmdlineFromCmdContext@20"
builtin.obj : error LNK2001: unresolved external symbol "_YoriLibShBuildCmdlineFromCmdContext@20"
complete.obj : error LNK2001: unresolved external symbol "_YoriLibShBuildCmdlineFromCmdContext@20"
exec.obj : error LNK2001: unresolved external symbol "_YoriLibShBuildCmdlineFromCmdContext@20"
input.obj : error LNK2001: unresolved external symbol "_YoriLibShFreeCmdContext@4"
alias.obj : error LNK2001: unresolved external symbol "_YoriLibShFreeCmdContext@4"
builtin.obj : error LNK2001: unresolved external symbol "_YoriLibShFreeCmdContext@4"
complete.obj : error LNK2001: unresolved external symbol "_YoriLibShFreeCmdContext@4"
exec.obj : error LNK2001: unresolved external symbol "_YoriLibShFreeCmdContext@4"
input.obj : error LNK2001: unresolved external symbol "_YoriLibShParseCmdlineToCmdContext@12"
alias.obj : error LNK2001: unresolved external symbol "_YoriLibShParseCmdlineToCmdContext@12"
builtin.obj : error LNK2001: unresolved external symbol "_YoriLibShParseCmdlineToCmdContext@12"
complete.obj : error LNK2001: unresolved external symbol "_YoriLibShParseCmdlineToCmdContext@12"
exec.obj : error LNK2001: unresolved external symbol "_YoriLibShParseCmdlineToCmdContext@12"
builtin.obj : error LNK2019: unresolved external symbol _YoriLibShCreateNewProcessBuffer@4 referenced in function _YoriShExecuteInProc@8
builtin.obj : error LNK2019: unresolved external symbol _YoriLibShAppendToExistingProcessBuffer@4 referenced in function _YoriShExecuteInProc@8
builtin.obj : error LNK2019: unresolved external symbol _YoriLibShForwardProcessBufferToNextProcess@4 referenced in function _YoriShExecuteInProc@8
builtin.obj : error LNK2019: unresolved external symbol _YoriLibShWaitForProcessBufferToFinalize@4 referenced in function _YoriShExecuteInProc@8
exec.obj : error LNK2001: unresolved external symbol "_YoriLibShWaitForProcessBufferToFinalize@4"
builtin.obj : error LNK2019: unresolved external symbol _YoriLibShInitializeRedirection@12 referenced in function _YoriShExecuteInProc@8
exec.obj : error LNK2001: unresolved external symbol "_YoriLibShInitializeRedirection@12"
builtin.obj : error LNK2019: unresolved external symbol _YoriLibShRevertRedirection@4 referenced in function _YoriShExecuteInProc@8
exec.obj : error LNK2001: unresolved external symbol "_YoriLibShRevertRedirection@4"
builtin.obj : error LNK2019: unresolved external symbol _YoriLibShBuildCmdContextForCmdBuckPass@8 referenced in function _YoriShBuckPassToCmd@4
builtin.obj : error LNK2019: unresolved external symbol _YoriLibShCheckIfArgNeedsQuotes@8 referenced in function _YoriShBuckPass
complete.obj : error LNK2001: unresolved external symbol "_YoriLibShCheckIfArgNeedsQuotes@8"
exec.obj : error LNK2001: unresolved external symbol "_YoriLibShCheckIfArgNeedsQuotes@8"
builtin.obj : error LNK2019: unresolved external symbol _YoriLibShCopyArg@16 referenced in function _YoriShBuckPass
input.obj : error LNK2001: unresolved external symbol "_YoriLibShCopyArg@16"
builtin.obj : error LNK2019: unresolved external symbol _YoriLibShFreeExecPlan@4 referenced in function _YoriShExecuteBuiltinString@4
complete.obj : error LNK2001: unresolved external symbol "_YoriLibShFreeExecPlan@4"
exec.obj : error LNK2001: unresolved external symbol "_YoriLibShFreeExecPlan@4"
builtin.obj : error LNK2019: unresolved external symbol _YoriLibShParseCmdContextToExecPlan@24 referenced in function _YoriShExecuteBuiltinString@4
complete.obj : error LNK2001: unresolved external symbol "_YoriLibShParseCmdContextToExecPlan@24"
exec.obj : error LNK2001: unresolved external symbol "_YoriLibShParseCmdContextToExecPlan@24"
builtin.obj : error LNK2019: unresolved external symbol _YoriLibShRemoveEscapesFromCmdContext@8 referenced in function _YoriShExecuteInProc@8
complete.obj : error LNK2019: unresolved external symbol _YoriLibShFindBestBackquoteSubstringAtOffset@12 referenced in function _YoriShFindStringSubsetForCompletion@28
exec.obj : error LNK2019: unresolved external symbol _YoriLibShGetProcessOutputBuffer@8 referenced in function _YoriShExecuteExpressionAndCaptureOutput@8
job.obj : error LNK2001: unresolved external symbol "_YoriLibShGetProcessOutputBuffer@8"
exec.obj : error LNK2019: unresolved external symbol _YoriLibShCleanupFailedProcessLaunch@4 referenced in function _YoriShExecuteSingleProgram@4
exec.obj : error LNK2019: unresolved external symbol _YoriLibShCommenceProcessBuffersIfNeeded@4 referenced in function _YoriShExecuteSingleProgram@4
exec.obj : error LNK2019: unresolved external symbol _YoriLibShCreateProcess@12 referenced in function _YoriShExecuteSingleProgram@4
exec.obj : error LNK2019: unresolved external symbol _YoriLibShDereferenceExecContext@8 referenced in function _YoriShPumpProcessDebugEventsAndApplyEnvironmentOnExit@4
exec.obj : error LNK2019: unresolved external symbol _YoriLibShFindNextBackquoteSubstring@12 referenced in function _YoriShExpandBackquotes@8
exec.obj : error LNK2019: unresolved external symbol _YoriLibShReferenceExecContext@4 referenced in function _YoriShWaitForProcessToTerminate@4
job.obj : error LNK2019: unresolved external symbol _YoriLibShDereferenceProcessBuffer@4 referenced in function _YoriShFreeJob@4
job.obj : error LNK2019: unresolved external symbol _YoriLibShReferenceProcessBuffer@4 referenced in function _YoriShCreateNewJob@12
job.obj : error LNK2019: unresolved external symbol _YoriLibShGetProcessErrorBuffer@8 referenced in function _YoriShGetJobOutput@12
job.obj : error LNK2019: unresolved external symbol _YoriLibShPipeProcessBuffers@12 referenced in function _YoriShPipeJobOutput@12
main.obj : error LNK2019: unresolved external symbol _YoriLibShScanProcessBuffersForTeardown@4 referenced in function _ymain@8
builtins.lib(mod_for.obj) : error LNK2019: unresolved external symbol _YoriLibShIsArgumentSeperator@16 referenced in function _ForBreakArgumentsAsNeeded@8
yori.exe : fatal error LNK1120: 29 unresolved externals
NMAKE : fatal error U1077: "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.16.27023\bin\HostX64\x86\link.exe" : return code "0x460"
Stop.
*** Installing sh
NMAKE : fatal error U1077: if : return code "0x1"
Stop.
malxau commented 3 years ago

I hit the same thing and had a fix lined up, commit ede73f14966dc8890c9dbce413e9fa0dc6f046c1 .

Also related is commit 85c6450ceb67f6d424587ed6b4ccd0e6a33ba1d6 . Commit 67fd78ccbfe6244b7ca330d0ef9b917bbf6d3da6 unintentionally changed yfor.exe's behavior when given a multi-command expression, as in for %i in (*) do "command1 %i && command2 %i" which is something that is used when the nmake build is used with yfor. I should probably remove this support anyway, because if somebody is willing to use Yori binaries to compile it they should probably go the whole way to ymake instead. Judging by the output here, your nmake build isn't using yfor so this shouldn't affect it.

aleaksunder commented 3 years ago

Yes, can confirm that now is all ok... arm32, arm64, x86 and x64 builds now makes without any errors! Thank you