带有“输入行太长"的批处理命令vcvarsall.bat错误;在Azure DevOps服务器上

编程入门 行业动态 更新时间:2024-10-23 20:22:23
本文介绍了带有“输入行太长"的批处理命令vcvarsall.bat错误;在Azure DevOps服务器上的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我正在Azure DevOps服务器管道上运行批处理文件作为批处理脚本任务.该批处理文件在内部调用英特尔Parallel Studio编译器2019更新3,如下所示:

I am running a batch file on Azure DevOps server pipeline as batch script task. This batch file internally invokes Intel Parallel studio compiler 2019 update 3 like this:

if %ERRORLEVEL% NEQ 0 ( call "%ICPP_COMPILER19%bin\compilervars.bat" intel64 vs2017 )

并随后调用构建文件.

最近,我观察到此命令会引发错误,如下所示:

Lately, I am observing this command throws error as:

##[command]C:\build_dir\test.bat Intel(R) MPI Library 2019 Update 3 for Windows* Target Build Environment for Intel(R) 64 applications Copyright 2007-2019 Intel Corporation. Copyright (C) 1985-2019 Intel Corporation. All rights reserved. Intel(R) Compiler 19.0 Update 3 (package 203) ********************************************************************** ** Visual Studio 2017 Developer Command Prompt v15.0.26228.57 ** Copyright (c) 2017 Microsoft Corporation ********************************************************************** [vcvarsall.bat] Environment initialized for: 'x64' The input line is too long. The syntax of the command is incorrect.

这是什么错误,为什么现在呢?我看到了许多与此相关的问题,但找不到与查询相关的答案.

What is this error and why now? I saw many questions related to this but I couldn't find answers related to my query.

推荐答案

输入行太长.通常发生在百分比扩展后,结果行长于8191个字符.

The input line is too long. normally happens after a percent expansion with a resulting line longer than 8191 characters.

在您的情况下,可能是路径/includedir变量在添加某些内容后溢出.此类问题的原因可能是该批处理文件的递归或多次调用.然后您应该看到同一路径被附加了多次.

In your case it's probably a path/includedir variable overflowing after appending something. The cause for such problems could be a recursion or multiple invocation of the batch file. Then you should see that the same path was appended multiple times.

另一个问题可能是您的项目路径很长,例如 C:\ my疯狂的项目\被嵌套\到一个结构中\太深了\ ...< 2000个字符以后> \ myProject

Another problem could be that your project paths are very long, like C:\my insane Projects\are nested\into a structure\that is much too deep\...<2000 characters later>\myProject

检查您的 PATH 变量,有时它很长,而且有很多重复.

Check your PATH variable, sometimes it's ridiculous long with many repetitions.

要查找问题,请在 compilervars.bat 中添加一些 echo#123 以找到确切的行.然后分析有问题的变量.

To find your problem, add some echo #123 into compilervars.bat to find the exact line. Then analyse the problematic variable.

更多推荐

带有“输入行太长"的批处理命令vcvarsall.bat错误;在Azure DevOps服务器上

本文发布于:2023-07-14 22:04:48,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1107287.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:批处理   太长   器上   命令   错误

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!