Go Back   ZeroC Forums > Help Center

Reply
 
LinkBack Thread Tools Rate Thread Display Modes
  #1 (permalink)  
Old 03-10-2005
annekat annekat is offline
Registered User
 
Name: Christophe Avare
Organization: Dassault Systèmes
Project: n/a at the moment
 
Join Date: Jul 2004
Location: Paris
Posts: 34
Red face ICE 2.1: slice2java compiler regression?

Hi,

It was great news when ICE 2.1 is born, thanks for the Java SSL support!

Alas, our first steps when into an unexpected wall as none of our build procedures are working due to some change in the slice2java compiler!

We have tracked down the problem to the following assessment:
Our project directory structure uses a 'ice' directory for slice definitions and a 'freeze' directory for objects that need to use the BerkeleyDB persistency.
We generate the Java classes in a directory 'icesrc'.

With 2.0, commands like:

Code:
slice2java --output-dir icesrc -Iice ice/*.ice -Ifreeze freeze/*.ice
did the job.

With 2.1, the same command issue an error:

Code:
slice2java: input files must end with `.ice'
Certainly, the way arguments are parsed have changed.
Trying a supposedly better command like:

Code:
slice2java --output-dir icesrc -Iice -Ifreeze ice/*.ice freeze/*.ice
Raises another kind of error (xxx, yyy, zzz are fake names):

Code:
freeze/xxx.ice:9: yyy.ice: No such file or directory
freeze/xxx.ice:29: `zzz' is not defined
More interestingly, when using only one source directory at one time like in:

Code:
slice2java --output-dir icesrc -Iice -Ifreeze ice/*.ice freeze/*.ice (OK )
slice2java --output-dir icesrc -Iice -Ifreeze freeze/*.ice (KO!)
shows that there must be something different in the way includes are searched (we allow definitions in freeze/ to include files from ice/ but not the opposite).

Does it be possible that multiple -I are no longer supported?
Reply With Quote
  #2 (permalink)  
Old 03-10-2005
annekat annekat is offline
Registered User
 
Name: Christophe Avare
Organization: Dassault Systèmes
Project: n/a at the moment
 
Join Date: Jul 2004
Location: Paris
Posts: 34
More (strange) info.

We have a basic ant test file that DO work:

Code:
<?xml version="1.0" encoding="UTF-8"?>
<project name="SLICE2JAVA" default="generate.proxies" basedir=".">
	<target name="generate.proxies">
		<delete dir="icesrc"/>
		<mkdir dir="icesrc"/>
		<exec executable="slice2java">
			<arg line="--output-dir icesrc -Iice -Ifreeze ice/*.ice freeze/*.ice"/>
		</exec>
	</target>
</project>
The command line:

slice2java --output-dir icesrc -Iice -Ifreeze ice/*.ice freeze/*.ice

still issue errors when launch from a windows console.

Hope that helps
Reply With Quote
  #3 (permalink)  
Old 03-10-2005
marc's Avatar
marc marc is offline
ZeroC Staff
 
Name: Marc Laukien
Organization: ZeroC, Inc.
Project: The Internet Communications Engine
 
Join Date: Feb 2003
Location: Florida
Posts: 1,781
Thanks for the bug report. We will look into this asap.
Reply With Quote
  #4 (permalink)  
Old 03-10-2005
benoit's Avatar
benoit benoit is online now
ZeroC Staff
 
Name: Benoit Foucher
Organization: ZeroC, Inc.
Project: Ice
 
Join Date: Feb 2003
Location: Rennes, France
Posts: 1,532
Command line option parsing indeed changed a bit, the options now need to appear first, before the arguments. However, the following should work and I don't understand why it doesn't work for you:

Code:
  slice2java --output-dir icesrc -Iice -Ifreeze ice/*.ice freeze/*.ice
I've tried to reproduce it with a similar directory structure and I don't have any issues. Here's the slice files I used to try to reproduce:

Code:
A/base.ice:
------------
module M 
{
   interface Base { };
};


A/a.ice:
--------
#include <base.ice>
module M 
{
   interface A extends Base { };
};


B/b.ice:
--------
#include <a.ice>
module M 
{
   interface B extends A {};
};
I can translate these slice files without any problems with:
Code:
$ slice2java --output-dir classes -IA -IB A/*.ice B/*.ice
Can you perhaps send us a similar test case which would allow us to reproduce the problem or tell us how your slice files differ from the test case above?

Thanks!

Benoit.
Reply With Quote
  #5 (permalink)  
Old 03-14-2005
michi's Avatar
michi michi is offline
ZeroC Staff
 
Name: Michi Henning
Organization: ZeroC
Project: Ice
 
Join Date: Feb 2003
Location: Brisbane, Australia
Posts: 907
I have just posted a patch for this at Patch #1 for Ice 2.1.0, all languages. My apologies for this -- I recently refactored all our code that parses command-line options and got a bit carried away on the error checking. The new parser is less fascist than the old one

This version continues to parse for options that follow arguments. For example,
Code:
slice2cpp -I. x.ice -I.. y.ice
will compile both x.ice and y.ice, using both . and .. as the include search path for each of them.
Cheers,

Michi.

Cheers,

Michi.
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Intel(R) C++ Compiler 9.0 level Help Center 1 06-15-2005 05:02 AM
CS: compiler warning DeepDiver Bug Reports 2 01-10-2005 08:31 PM
IceJ regression test failed! rc_hz Help Center 2 12-23-2004 03:10 AM
compiler error code Help Center 1 11-27-2004 04:36 PM
using Borland C++ Compiler Adanz Help Center 1 09-20-2004 10:20 PM


All times are GMT -4. The time now is 04:50 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.0.0
(c) 2008 ZeroC, Inc.