Go Back   ZeroC Forums > Help Center

Reply
 
LinkBack Thread Tools Rate Thread Display Modes
  #1 (permalink)  
Old 06-07-2007
Andjeo Andjeo is offline
Registered User
 
Name: Maja Dimitrijevic
Organization: Geomant
Project: GEMB
 
Join Date: Jun 2007
Posts: 6
Problems with compailing autogenerated files Printer on Solaris

Hello,

I'm just starting with Ice and I have problems with compailing the sample Printer file from demo folder. When I executed the command
c++ -I. -I/usr/Ice-3.2.0/include -c Printer.cpp Server.cpp

I keep getting error:

/opt/Ice-3.2.0/include/IceUtil/Exception.h:19: `exception' is not a class or nam
espace
/opt/Ice-3.2.0/include/IceUtil/Exception.h:19: confused by earlier errors, baili
ng out.

Line number 19 in Exception.h is
"class ICE_UTIL_API IllegalArgumentException : public Exception".

Also, when I tried with make command, I got error:

"make: Fatal error in reader: Makefile, line 34: Unexpected end of line seen".

Line 34 in Makefile is "CPPFLAGS := -I. $(CPPFLAGS)"

Can someone help me with this?

Thanks in advance,

Maja
Reply With Quote
  #2 (permalink)  
Old 06-07-2007
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
Welcome to the ZeroC forums.

Which compiler and operating system (and which versions) are you using?
Reply With Quote
  #3 (permalink)  
Old 06-07-2007
Andjeo Andjeo is offline
Registered User
 
Name: Maja Dimitrijevic
Organization: Geomant
Project: GEMB
 
Join Date: Jun 2007
Posts: 6
I'm using Solaris 10 and gcc-3.4.6.
Reply With Quote
  #4 (permalink)  
Old 06-07-2007
matthew's Avatar
matthew matthew is online now
ZeroC Staff
 
Name: Matthew Newhook
Organization: ZeroC, Inc.
Project: Internet Communications Engine
 
Join Date: Feb 2003
Location: NL, Canada
Posts: 1,088
As can be seen on http://www.zeroc.com/platforms.html this combination is not officially supported and therefore may or may work. Unfortunately for you it appears that it does not work.

Since you are using /opt I guess you are using some binary distribution you downloaded from us? If so, this cannot and will not work since its for use with Sun C++ 5.8 (part of Sun Studio 11). So, first you must build Ice with gcc, and that appears to have some problem. What you could try is editing include/IceUtil/Exception.h and adding #include <exception> to the top of the file. That may get you further along in the compilation process.

Your problem with make is likely because you are not using GNU make. This is required to build Ice, as stated in INSTALL.SOLARIS:

Code:
GNU Make 3.80
-------------

GNU Make 3.80 is required to build Ice on SPARC/Solaris. GNU make is
distributed on the "Solaris 10 OS Companion Software DVD":

http://www.sun.com/software/solaris/freeware/
That all being said I suspect you will have a far less frustrating experience if you use what we actually support on this platform -- Sun C++ 5.8. This compiler is free -- so unless you have a compelling reason to use gcc I would use this compiler instead.
Reply With Quote
  #5 (permalink)  
Old 06-13-2007
Andjeo Andjeo is offline
Registered User
 
Name: Maja Dimitrijevic
Organization: Geomant
Project: GEMB
 
Join Date: Jun 2007
Posts: 6
I installed Sun Studio 11 and I'm using Sun C++, but I still have problems.

I got error :
"Fatal error in reader: ../../../config/Make.rules, line 119: Unexpected end of line seen".

Can you help me with that?
Reply With Quote
  #6 (permalink)  
Old 06-13-2007
benoit's Avatar
benoit benoit is offline
ZeroC Staff
 
Name: Benoit Foucher
Organization: ZeroC, Inc.
Project: Ice
 
Join Date: Feb 2003
Location: Rennes, France
Posts: 1,564
Hi,

It looks like you're still not using GNU make as Matthew mentioned above. What does "make -v" say on your Solaris machine?

Cheers,
Benoit.
Reply With Quote
  #7 (permalink)  
Old 06-13-2007
Andjeo Andjeo is offline
Registered User
 
Name: Maja Dimitrijevic
Organization: Geomant
Project: GEMB
 
Join Date: Jun 2007
Posts: 6
The sam error:

"make -v: Fatal error in reader: Makefile, line 34: Unexpected end of line seen"
Reply With Quote
  #8 (permalink)  
Old 06-13-2007
benoit's Avatar
benoit benoit is offline
ZeroC Staff
 
Name: Benoit Foucher
Organization: ZeroC, Inc.
Project: Ice
 
Join Date: Feb 2003
Location: Rennes, France
Posts: 1,564
Yes, this indicates that you're not using the GNU make. If you were using GNU make you would see:

Code:
GNU Make 3.80
Copyright (C) 2002  Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
Did you try using the "gmake" command instead of "make"? Depending on the platforms, GNU make might be installed as "gmake" instead of "make".

If this doesn't work, this means that GNU make is not found in your PATH. You should check if it's installed on your machine and add it to your PATH. If not installed, you should install it, you'll find it on the "Solaris 10 OS Companion Software DVD" as Matthew mentioned above.

Cheers,
Benoit.
Reply With Quote
  #9 (permalink)  
Old 06-13-2007
Andjeo Andjeo is offline
Registered User
 
Name: Maja Dimitrijevic
Organization: Geomant
Project: GEMB
 
Join Date: Jun 2007
Posts: 6
I tried gmake. I got error:

"gmake: execvp: /opt/Ice-3.2.0/bin/slice2cpp: Invalid argument"

Everything is added to PATH.
Reply With Quote
  #10 (permalink)  
Old 06-13-2007
benoit's Avatar
benoit benoit is offline
ZeroC Staff
 
Name: Benoit Foucher
Organization: ZeroC, Inc.
Project: Ice
 
Join Date: Feb 2003
Location: Rennes, France
Posts: 1,564
Sorry, it's difficult to help if you don't provide more information.

From which directory are you running gmake?

Are you trying to compile the Ice source distribution? Or did you install the Ice binary distribution in /opt/Ice-3.2.0 and now try to compile the demos?

Cheers,
Benoit.
Reply With Quote
  #11 (permalink)  
Old 06-13-2007
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
Also, try "gmake --recon", and post the output here.
Reply With Quote
  #12 (permalink)  
Old 06-13-2007
bernard's Avatar
bernard bernard is offline
ZeroC Staff
 
Name: Bernard Normier
Organization: ZeroC, Inc.
Project: Ice
 
Join Date: Feb 2003
Location: Palm Beach Gardens, FL
Posts: 834
Hi Maja,

Quote:
Originally Posted by Andjeo View Post
I tried gmake. I got error:

"gmake: execvp: /opt/Ice-3.2.0/bin/slice2cpp: Invalid argument"

Everything is added to PATH.
Please verify that you have execute permission on slice2cpp and icecpp in that directory.

Best regards,
Bernard
__________________
Bernard Normier
ZeroC, Inc.
Reply With Quote
  #13 (permalink)  
Old 06-14-2007
Andjeo Andjeo is offline
Registered User
 
Name: Maja Dimitrijevic
Organization: Geomant
Project: GEMB
 
Join Date: Jun 2007
Posts: 6
gmake --recon returns:

"rm -f Printer.cpp Printer.h
/opt/Ice-3.2.0/bin/slice2cpp Printer.ice
rm -f Printer.cpp Printer.h
/opt/Ice-3.2.0/bin/slice2cpp Printer.ice
CC -c -I. -I/opt/Ice-3.2.0/include -mt +p -features=tmplife -xldscope=hidden +w -erroff=hidef,wvarhidenmem,wvarhidemem -KPIC -g Printer.cpp
CC -c -I. -I/opt/Ice-3.2.0/include -mt +p -features=tmplife -xldscope=hidden +w -erroff=hidef,wvarhidenmem,wvarhidemem -KPIC -g Client.cpp
rm -f client
CC -mt +p -features=tmplife -xldscope=hidden +w -erroff=hidef,wvarhidenmem,wvarhidemem -KPIC -g -R /opt/Ice-3.2/lib:/usr/sfw/lib -z text -mt +p -features=tmplife -xldscope=hidden +w -erroff=hidef,wvarhidenmem,wvarhidemem -KPIC -g -L/opt/Ice-3.2.0/lib -o client Printer.o Client.o -lIce -lIceUtil -lpthread
CC -c -I. -I/opt/Ice-3.2.0/include -mt +p -features=tmplife -xldscope=hidden +w -erroff=hidef,wvarhidenmem,wvarhidemem -KPIC -g Server.cpp
rm -f server
CC -mt +p -features=tmplife -xldscope=hidden +w -erroff=hidef,wvarhidenmem,wvarhidemem -KPIC -g -R /opt/Ice-3.2/lib:/usr/sfw/lib -z text -mt +p -features=tmplife -xldscope=hidden +w -erroff=hidef,wvarhidenmem,wvarhidemem -KPIC -g -L/opt/Ice-3.2.0/lib -o server Printer.o Server.o -lIce -lIceUtil -lpthread "

Slice2cpp, icecpp have execute premission. I install Ice binary distribution in /opt/Ice-3.2.0 and sample programs for binary archivesand I try to compile the demos.
Reply With Quote
  #14 (permalink)  
Old 06-14-2007
benoit's Avatar
benoit benoit is offline
ZeroC Staff
 
Name: Benoit Foucher
Organization: ZeroC, Inc.
Project: Ice
 
Join Date: Feb 2003
Location: Rennes, France
Posts: 1,564
Hi Maja,

From the printer demo directory, could try running the following and see if it works?

/opt/Ice-3.2.0/bin/slice2cpp Printer.ice

On which architecture do you run Solaris 10, SPARC or x86? The Ice-3.2.0 Solaris 10 binary installer was compiled for the SPARC architecture. So if you use a x86 platform it won't work and most likely result in the gmake error you're getting.

To use Ice with Solaris 10 on an Intel/AMD platform, you'll need to compile Ice from the source distribution. You can download the Ice source distribution from our download page. Follow the instructions from the INSTALL.SOLARIS file at the top level of the source distribution to compile Ice.

Cheers,
Benoit.
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
Can't figure out why the Printer autogenerated files are not compiling caos1234 Help Center 7 05-31-2007 05:55 PM
Unknow exception in "Printer" sample code wangh705 Help Center 6 10-26-2006 01:01 PM
I can use the Ice on Solaris 8 and Solaris 10? tjl02040 Help Center 1 09-07-2006 10:06 AM
slice2cpp Printer.ice error? ificanfly Help Center 1 07-31-2006 09:26 AM
More solaris template problems marlowa Bug Reports 7 03-05-2003 04:46 AM


All times are GMT -4. The time now is 11:32 PM.


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