skip to Main Content

I am trying to configure OpenDDS library with Windows 11 and Visual Studio 2022.

I ran the configure file through the Visual Studio Command Prompt and I get the following error.

Downloading ACE+TAO 2.2a with latest patches
Extracting archive ACE+TAO-2.2a_with_latest_patches_NO_makefiles.zip
Use of uninitialized value $prop_value in scalar chomp at configure line 473.
Couldn't get submodule.tools/rapidjson.openddsConfigureCommit from .gitmodules
Stopped at configure line 475.
ERROR: configure failed with errorcode 1

The configure.cmd file has the following code

@echo off
:: Win32 configure script wrapper for OpenDDS
:: Distributed under the OpenDDS License.
:: See: http://www.opendds.org/license.html

for %%x in (perl.exe) do set PERLPATH=%%~dp$PATH:x
if "x%PERLPATH%"=="x" (
  echo ERROR: perl.exe was not found.  This script requires Perl.
  exit /b 1
)
set PERLPATH=
perl configure %*
if %ERRORLEVEL% NEQ 0 (
  echo ERROR: configure failed with errorcode %errorlevel%
  exit /b %errorlevel%
)
if exist setenv.cmd call setenv.cmd

And I believe the configure file with perl is here https://github.com/objectcomputing/OpenDDS/blob/master/configure

I cross referenced this question "Use of uninitialized value in scalar chomp" in Perl, but I unfortunately do not code in Perl so I do not know how to solve this issue.

2

Answers


  1. Chosen as BEST ANSWER

    Like @TLP mentioned https://stackoverflow.com/a/74026678/8869703, it was indeed a failure with git.

    The compressed file from OpenDDS did not contain a git package, so I could not rely on the file from https://opendds.org/downloads.html.

    I followed the following steps that I found from the comments by @simpsont-oci here https://github.com/objectcomputing/OpenDDS/discussions/3784 :

    • git clone https://github.com/objectcomputing/OpenDDS.git
    • In the OpenDDS folder -> git submodule init
    • git submodule update
    • Through the VS Command Line configure

    This worked for me.


  2. This is about a pipe file handle that has failed to read what it was supposed to, as described in the code you linked. Line 473 is inside this relatively brief subroutine:

    sub git_submodule_prop {
      my $path = shift;
      my $prop_name = shift;
      my $full_prop_name = "submodule.$path.$prop_name";
      open(my $fd, "-|", "git config --file .gitmodules --get $full_prop_name")
        or die("git_submodule_prop open failed: $!nStopped");
      my $prop_value = <$fd>;
      close($fd);
      chomp($prop_value);
      if (!$prop_value) {
        die("Couldn't get $full_prop_name from .gitmodulesnStopped");
      }
      return $prop_value;
    }
    

    The error message says nothing especially noteworthy, except that the function chomp is used on an undefined value. The "real" error message comes below it:

    Couldn't get submodule.tools/rapidjson.openddsConfigureCommit from .gitmodules
    Stopped at configure line 475.
    

    In the code you can see it tries to open a pipe to a git process, which apparently did open (because it did not die there), but then does not read anything from the file handle

    my $prop_value = <$fd>;
    

    Which then causes the code to die.

      if (!$prop_value) {
        die("Couldn't get $full_prop_name from .gitmodulesnStopped");
      }
    

    What you need to investigate, perhaps, is why the git process did not read anything from the pipe.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search