GNOME Bugzilla – Bug 142099
Cannot compile ORBit2 on Solaris with Forte compiler
Last modified: 2005-03-22 14:12:51 UTC
I'm trying to compile ORBit2 on Solaris. I can compile it fine with GCC-3.3.2, but this time I have to use Sun's compiler. Compilation stops while making Garnome in ORBit2 package: gmake[9]: Entering directory `/net/poseidon/export/BGSgnome/garnome-2.6.0_bgs_forte/platform/ORBit2/work/main.d/ORBit2-2.10.1/include/orbit/orb-core' (rm -f corba-defs.h corba-defs-stubs.c corba-defs-skels.c corba-defs-common.c corba-defs-imodule.c corba-defs-skelimpl.c || true) > /dev/null ../../../src/idl-compiler/orbit-idl-2 -I../../../src/idl/CORBA_PIDL -I../../../src/idl/CORBA -I../../../src/idl/interop --noskels --nodefskels --nostubs --noidata --nocommon --showcpperrors --define=Object=OObject --define=TypeCode=TTypeCode --deps ./.deps/corba-defs.idl.P ../../../src/orb/orb-core/corba-defs.idl orbit-idl-2 2.10.1 compiling mode, show preprocessor errors, passes: headers skel_impl imodule ../../../src/orb/orb-core/corba-defs.idl:27: Error: syntax error, unexpected TOK_SRCFILE, expecting TOK_ENUM or TOK_STRUCT or TOK_UNION ** (process:10821): WARNING **: ../../../src/orb/orb-core/corba-defs.idl compilation failed gmake[9]: *** [corba-defs.h] Error 1 gmake[9]: Leaving directory `/net/poseidon/export/BGSgnome/garnome-2.6.0_bgs_forte/platform/ORBit2/work/main.d/ORBit2-2.10.1/include/orbit/orb-core' I've tried to upgrade ORBit2 to latest version (currently 2.10.1), but did not work When I try to replace .../../../src/idl-compiler/orbit-idl-2 with /usr/bin/orbit-idl-2 (Sun Gnome 2.0 version), it makes no warning. But I don't want to mix versions, releases and/or distributions. Environment: CC = cc CXX = CC CFLAGS += -xO3 -xlinkopt=0 -xtarget=ultra2 -xvis=yes CXXFLAGS is the same as CFLAGS PATH contains /opt/SUNWspro/bin GNU make 3.80 and other GNU utils are present and in path. I have also tried: CPP = /usr/lib/cpp export CPP CXXCPP = /usr/lib/cpp export CXXCPP LC_ALL=C LANG=C export LC_ALL export LANG I'm almost sure, the compiler is causing this, as I can build whole GNOME with GCC-3.3.2. I've searched Google and Bugzilla, but none of solutions have worked.
Forgot the versions: CC: Sun C++ 5.5 2003/03/12 cc: Sun C 5.5 2003/03/12
Well, lucky day! You need to export CPP=/usr/lib/cpp in the ORbit2 AND in the libIDL, which is compiled BEFORE ORBit2 !!! After uninstalling libIDL, changing Makefile to contain CPP (just to be sure, I've added CPP, CXCPP, LC_ALL, LANG) with the same value, compilation works like the charm! Marking fixed. Looking forward for another.
I found that as I am in a complex environment with multiple compilers the version of cpp was important too. I had a few to choose from. I built the application with cc: Sun C 5.6 Patch 117551-03 2004/11/23, but the Sun 2001 revision of /usr/lib/cpp was too old. I used the Gnu cpp (GCC) 3.4.3 release instead. Also the CXCPP is actually CXXCPP, the Preprocessor for the C++ compiler.