4

I am trying to configure the environment for OpenDDS, but I could not run the configure script. Would really appreciate much, if there are any insight from you guys. =D

So basically, after I download the OpenDDS-3.12.zip from here. I have extracted to a folder and tried to run the configure file with this command in VS command prompt (VS2017)

configure --compiler=gcc

Next, the "ACE+TAO-2.2a_with_latest_patches_NO_makefiles" is downloaded and I extract the zip file to the root folder.

Then it shows this message.

ACE_ROOT/ace/config.h exists, skipping configuration of ACE+TAO 
Use of uninitialized value $mpctype in string eq at configure line 1103.                                                
Use of uninitialized value $mpctype in concatenation (.) or string at configure line 1257.                              
Use of uninitialized value $mpctype in string eq at configure line 1266.                                                
Running MPC to generate project files.                                                                                  
MPC_ROOT was set to C:\src\OpenDDS-DDS-3.12.2\ACE_wrappers\MPC.                                                         
Using .../OpenDDS-DDS- 
3.12.2/ACE_wrappers/bin/MakeProjectCreator/config/MPC.cfg                                         
ERROR: Invalid type: C:\src\OpenDDS-DDS-3.12.2\DDS_TAOv2_all.mwc                                                        
mwc.pl v4.1.28                                                                                                          

...
/*lots of explanation of each file here*
*then followed by*/
...

ERROR: Error from MPC, stopped at configure line 1270.   

I have both Visual Studio 2017 and Perl 5.22 installed as well, I am not sure whether if this is a compiler issue or any other issue. The following is the configure script that printed the error above.

@@ line 1268 -- 1270 @@
  if (!$opts{'dry-run'}) {
if (system("perl \"$ENV{'ACE_ROOT'}/bin/mwc.pl\" $mwcargs") != 0) {
  die "ERROR: Error from MPC, stopped";
}
}
Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62
Leon Teng
  • 41
  • 2
  • 1
    Figure out where `$mpctype` is defined, maybe you are missing an environmental variable or command switch. – xxfelixxx May 18 '18 at 02:33
  • 1
    Also, generally the first warning / error is the most useful for looking at the code, not the last, so here I would start looking before line 1103 instead of line 1266. – xxfelixxx May 18 '18 at 02:35
  • 1
    Don't use `--compiler=gcc`, you are not using gcc but Visual Studio – Johnny Willemsen May 18 '18 at 08:32
  • Maybe I should start with the base of the problem. When I tried to use only `--compiler` , it show me this instead, `ERROR: Can't find a compiler, set PATH or run this script with the --compiler option. For Microsoft Visual C++, run this script from the Visual Studio Command Prompt. Stopped at configure line 378.` I have check my PATH in my system, that perl is in it, or is there anything I missed out? – Leon Teng May 20 '18 at 20:29
  • @JohnnyWillemsen, so which command should I use? It seems to can't find a compiler. – Leon Teng May 21 '18 at 07:41
  • 1
    You should the command from a Visual Studio command prompt, are you doing that? – Johnny Willemsen May 21 '18 at 09:41

3 Answers3

1

$mpctype is defined here:

my $mpctype = ($slash eq '/' ||
              ($cross_compile && $buildEnv->{'build'} eq 'target'))
            ? 'gnuace' : $opts{'compiler_version'};

It seems to be looking at $opts{'compiler_version'}, which is apparently empty. %opts is defined here:

my %opts = %{parseArgs()};

so it looks like you should define the compiler_version in the command line or define the target platform. It's probably better if you check out the INSTALL options thoroughly

jjmerelo
  • 22,578
  • 8
  • 40
  • 86
  • I have checked the INSTALL options, but still no where to any solution. The TAO and ACE environment is correct. how do you define `compiler_version`? – Leon Teng May 21 '18 at 07:40
  • @LeonTeng You can try --compiler_version=dummy and see what it does, but maybe you can try "gcc" and other you might have installed in your system. – jjmerelo May 21 '18 at 12:02
  • 2
    Thank you so much for the insight, problem is solved. It is the missing compiler in Visual Studio that caused the problem. Apparently Visual Studio did not install C++ by default, so what to do it is just rerun the setup, select modify and check C++, and then everything works fine. – Leon Teng May 21 '18 at 21:03
1

VS2017 doesn't install c++ compiler by default.

  • Modify VS 2017 and select c++ compiler and install if VS 2017 already install.
  • configure (without --compiler=gcc flag)
Farhana Naaz Ansari
  • 7,524
  • 26
  • 65
  • 105
1

I had a similar question. Being a newbie, I started with the getting started with java and windows on https://opendds.org/quickstart/GettingStartedWindows.html . Step 5, "configure (To enable Java support, use configure --java)" didn't work in a visual studio command window despite having set JAVA_HOME. I had sent ACE_ROOT, DDS_ROOT, TAO_ROOT and MPC_ROOT though the tutorial didn't specify based on trying to debug this problem. When using the "--compiler" option I get errors similar to the ones in this thread. Was there any resolution just to get the" "off-the-shelf" tutorial working. Using Windows 10.

D:\data\OpenDDS-3.13.3>configure --java --compiler="C:\Program Files\Java\jdk1.8.0_221\bin" ACE_ROOT/ace/config.h exists, skipping configuration of ACE+TAO Use of uninitialized value $mpctype in string eq at configure line 1482. Use of uninitialized value $mpctype in concatenation (.) or string at configure line 1646. Use of uninitialized value $mpctype in string eq at configure line 1655. Running MPC to generate project files. MPC_ROOT was set to D:\data\OpenDDS-3.13.3\ACE_WRAPPERS\MPC. Using .../OpenDDS-3.13.3/ACE_WRAPPERS/bin/MakeProjectCreator/config/MPC.cfg ERROR: Invalid type: D:\data\OpenDDS-3.13.3\DDS_TAOv2_all.mwc mwc.pl v4.1.44 ... ERROR: Error from MPC, stopped at configure line 1659.