Menu ▾ ▴

#657 Space in TEMP causes build failure in extension libraries

6.36
pending
Build (58)
1
2026-11-03
2026-11-03
No

In 6.36, "source/ocf/vc.mak" has:

!if [..\parse_version.bat OWL "..\..\include\owl\version.h" >$(TEMP)\COOLPRJ_VERSION.tmp]

Note that the temporary file path constructed here is not quoted. Hence, if the temporary folder for the current user has a space, and $(TEMP) expands to the long-form of the name, this will fail. For example, when you run OWLMaker from Visual Studio, the long-form may be used, while the short-form (8.3) may be shown on the command prompt, and be used when OWLMaker is run stand-alone.

Also, as noted in our documentation, 8.3 supports may not be enabled on the drive.

The other extension libraries have the same issue.

For the OWL core, the temporary file path was quoted in [r1876] as a fix for "Build fails for non-English edition of Visual Studio" [bugs:#241].

In 6.44 and 7, "vc.mak" has been changed to use $(OBJDIR) instead:

!if [..\parse_version.bat OWL "..\..\include\owl\version.h" >$(OBJDIR)\OCF_VERSION.tmp]

While this is also not quoted for the extension libraries makefiles, $(OBJDIR) is defined as a relative path, guaranteed to not have spaces (unless it has been overridden).

This issue was spotted by Claude.

Related

Bugs: #241
Commit: [r1876]
Commit: [r9253]
News: 2026/11/owlmaker-build-9531-is-released

Discussion

  • Vidar Hasfjord

    Vidar Hasfjord - 2026-11-03

    A mitigation for this issue has been implemented in OWLMaker [r9242]. It will allow existing source code to build (provided 8.3 is supported by the drive).

     

    Related

    Commit: [r9242]

  • Vidar Hasfjord

    Vidar Hasfjord - 2026-11-03

    A patch for 6.36 is attached.

     
    • Ognyan Chernokozhev

      Thanks for the patch! Applied to 6.36 in [r9252].

      While checking the other build scripts, I found the same problem in "source/owlcore/bcmake.bat" (the C++Builder build) in 6.36 and 6.44. The temporary version file is written to a quoted path, but read back unquoted:

      for /f "tokens=1,2 delims==" %%i in (%OWL_VERSION_TMP%) do set %%i=%%j
      

      With a space in TEMP, "for /f" sees two file names, so OWL_VERSION stays empty and the build stops with "Unable to parse the version number". This now uses "usebackq" with a quoted path, as trunk already does:

      for /f "usebackq tokens=1,2 delims==" %%i in ("%OWL_VERSION_TMP%") do set %%i=%%j
      

      Fixed in [r9252] (6.36) and [r9253] (6.44).

      Tested by running the changed sections with TEMP set to a folder with a space in its name. Before the fix, nmake failed with U1052 (the unquoted redirection created a stray file named after the first part of the path), and bcmake.bat got an empty version. After the fix, all of them parse the version correctly.

      Other branches:

      • Trunk and 7 are not affected: they use the relative $(OBJDIR), and trunk's "set_version_environment_variable.bat" quotes the path and uses "usebackq".
      • 6.30 has the same problem in all libraries, including OWL core ([r1876] did not reach it). I have left it as is, since the OWLMaker mitigation in [r9242] covers it when 8.3 names are available.
       
      👍
      1

      Related

      Commit: [r1876]
      Commit: [r9242]
      Commit: [r9252]

  • Ognyan Chernokozhev

    • status: open --> pending
    • assigned_to: Ognyan Chernokozhev
    • Group: unspecified --> 6.36
     

Log in to post a comment.