ADLINK-IST / opensplice

This is the Vortex OpenSplice Community Edition source repository. For our commercial offering see
https://www.adlinktech.com/en/vortex-opensplice-data-distribution-service
Apache License 2.0
259 stars 157 forks source link

Error when trying to make OpenSplice on Ubuntu 20.10 #158

Open splinterds opened 3 years ago

splinterds commented 3 years ago

I tried to make Opensplice on my Ubuntu 20.10. I configured it with 10 > x86_64.linux-dev and 15 > x86_64.linux-release. Configuration works but then I get the following makeerror

/home/splinterdl/opensplice/src/tools/cppgen/code/fe_extern.cpp:98:15: warning: ‘yyin’ violates the C++ One Definition Rule [-Wodr]
   98 | extern File * yyin;
      |               ^
lex.yy.c:349:7: note: type name ‘_IO_FILE’ should match type name ‘File’
../../include/fe_extern.h:94:7: note: the incompatible type is defined here
   94 | class File;
      |       ^
lex.yy.c:349:7: note: ‘yyin’ was previously declared here
collect2: error: ld returned 1 exit status
make[5]: *** [/home/splinterdl/opensplice/setup/makefiles/target-only.mak:113: cppgen] Error 1
make[5]: Leaving directory '/home/splinterdl/opensplice/src/tools/cppgen/bld/x86_64.linux-release'
make[4]: *** [makefile:6: all] Error 2
make[4]: Leaving directory '/home/splinterdl/opensplice/src/tools/cppgen'
make[3]: *** [../../makefile.mak:159: build_tools_stage_cppgen] Error 2
make[3]: Leaving directory '/home/splinterdl/opensplice/src/osplcore/bld/x86_64.linux-release'
make[2]: *** [makefile:6: link] Error 2
make[2]: Leaving directory '/home/splinterdl/opensplice/src/osplcore'
make[1]: *** [/home/splinterdl/opensplice/setup/makefiles/subsystem.mak:5: osplcore.ss_link] Error 2
make[1]: Leaving directory '/home/splinterdl/opensplice/src'
make: *** [/home/splinterdl/opensplice/setup/makefiles/subsystem.mak:5: src.ss_link] Error 2

any help would be much appreciated

bitpet commented 2 years ago

I'm seeing the same issue with Ubuntu 22.04 and gcc version 11.2.0 Help would be much appreciated...

bitpet commented 2 years ago

We were able to compile by using a gcc version less than 10. (gcc-9 in our case) It's somewhat tricky to let the build system know which compiler to use:

  1. make sure gcc, g++ (and more) symlinks do point to the version you want to use for compilation
  2. set env. variables CXX and CC
  3. Include statements to CMakeList.txt (above the porject statement of the project) setting c and c++ compilers.

Alternatively try passing the -fcommon flag to newer versions of gcc.