Go Back   ZeroC Forums > Help Center

Reply
 
LinkBack Thread Tools Rate Thread Display Modes
  #1 (permalink)  
Old 06-27-2008
kraps33 kraps33 is offline
Registered User
 
Name: Sebastien Serani
Organization: Université Bordeaux 1
Project: middleware on embedded system
 
Join Date: Jun 2008
Posts: 20
Ice Compilation

Hi,

I trying to compile ICE with a cross compiler. And the target system don't support the type wchar_t, consequently the compiler (g++) haven't wstring (Unicode).

What can I do? Thanks.

Ps : sorry for my english
Reply With Quote
  #2 (permalink)  
Old 06-27-2008
michi's Avatar
michi michi is offline
ZeroC Staff
 
Name: Michi Henning
Organization: ZeroC
Project: Ice
 
Join Date: Feb 2003
Location: Brisbane, Australia
Posts: 912
Hmmm... I haven't looked at this in any detail, but it should be possible to do without wchar_t/wstring. You'd have to modify the places in the code where we use these types (not all that many, I believe) and basically stub out the wide char functionality. I suspect that's not a trivial exercise though.

There may not be any cheap fix with a compiler that does not have wchar_t as a native type. You might just get away with redefining wchar_t as unsigned int or some such. (But again, I haven't tried this.)

Cheers,

Michi.
Reply With Quote
  #3 (permalink)  
Old 06-27-2008
dwayne's Avatar
dwayne dwayne is online now
ZeroC Staff
 
Name: Dwayne Boone
Organization: ZeroC, Inc.
Project: Internet Communications Engine
 
Join Date: Jan 2005
Location: St. John's, Newfoundland
Posts: 209
Hi,

Have you tried using Ice-E instead of Ice? With Ice-E it is possible to easily disable the wstring support. Unless there are some features of Ice that are not included in Ice-E that you require, I would suggest you take a look at Ice-E.

Dwayne
Reply With Quote
  #4 (permalink)  
Old 06-30-2008
kraps33 kraps33 is offline
Registered User
 
Name: Sebastien Serani
Organization: Université Bordeaux 1
Project: middleware on embedded system
 
Join Date: Jun 2008
Posts: 20
Thanks, but I'm interesting by IceStorm on Ice...

I trying to generate a compiler with wchar_t support, but it's difficult because the configuration test don't run.

May be i can just add the library who implement the wchar.h functions in compilation rules of GCC?

Cheers.
Reply With Quote
  #5 (permalink)  
Old 06-30-2008
dwayne's Avatar
dwayne dwayne is online now
ZeroC Staff
 
Name: Dwayne Boone
Organization: ZeroC, Inc.
Project: Internet Communications Engine
 
Join Date: Jan 2005
Location: St. John's, Newfoundland
Posts: 209
If you don't actually need to run the IceStorm server itself on the platform you are trying to cross-compile for you can still use Ice-E. Ice-E publishers/subscribers works fine with IceStorm. You just need run slice2cppe on IceStorm.ice slice file yourself, and then include the generated file in your Ice-E application.

Dwayne
Reply With Quote
  #6 (permalink)  
Old 06-30-2008
kraps33 kraps33 is offline
Registered User
 
Name: Sebastien Serani
Organization: Université Bordeaux 1
Project: middleware on embedded system
 
Join Date: Jun 2008
Posts: 20
IceE need pre installation of slice2cppe?

Because i have the same problem. IceE-trans don't run because of Unicode.h
Reply With Quote
  #7 (permalink)  
Old 06-30-2008
dwayne's Avatar
dwayne dwayne is online now
ZeroC Staff
 
Name: Dwayne Boone
Organization: ZeroC, Inc.
Project: Internet Communications Engine
 
Join Date: Jan 2005
Location: St. John's, Newfoundland
Posts: 209
Hi,

What os/compiler are you using to build slice2cppe? This would be the system you are developing on, not the target system you are cross-compiling for? You should not need to build slice2cppe for the target system itself.

Dwayne
Reply With Quote
  #8 (permalink)  
Old 06-30-2008
kraps33 kraps33 is offline
Registered User
 
Name: Sebastien Serani
Organization: Université Bordeaux 1
Project: middleware on embedded system
 
Join Date: Jun 2008
Posts: 20
It's running with the gcc of host. My OS is a RedHat.
Where i can find informations on how running both IceE and IceE-trans?

Thanks very much for your help.
Reply With Quote
  #9 (permalink)  
Old 06-30-2008
dwayne's Avatar
dwayne dwayne is online now
ZeroC Staff
 
Name: Dwayne Boone
Organization: ZeroC, Inc.
Project: Internet Communications Engine
 
Join Date: Jan 2005
Location: St. John's, Newfoundland
Posts: 209
Hi,

There are INSTALL/README files included in the Ice-E and Ice-E translators source distributions that talk about how to use them. Basically what you need to do is:

1. Download the Ice-E translator source distribution and build the translators using your development platforms regular compiler, not the cross compiler, and then add the location of the slice2cppe executable to your PATH.

2. Download the Ice-E source distribution and build that using your cross compiler.

On the Ice-E download page there are also precompiled translator binaries for RedHat 4 that you may be able to use rather than compiling the translator yourself.

Dwayne
Reply With Quote
  #10 (permalink)  
Old 07-01-2008
kraps33 kraps33 is offline
Registered User
 
Name: Sebastien Serani
Organization: Université Bordeaux 1
Project: middleware on embedded system
 
Join Date: Jun 2008
Posts: 20
Hi,

I try to compile IceE, and I think I have a biggest problem than wstring...
I haven't shutdown, getsockname, getpeername, getaddrinfo and freeaddrinfo on my target system...

And I think it's difficult to add this.
Exemple of definition on newlib-1.16.0:
_sockcall2(int,shutdown,int,fd,int,how) in socket.c

I search shutdown.c, getsockname.c,.. on net for creating a library but I don't find a "standard" implementation of this functions.

Cheers,
kraps33.
Reply With Quote
  #11 (permalink)  
Old 07-02-2008
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,542
Hi,

I'm afraid compiling Ice/E without these methods is going to be difficult. You'll need to figure out alternatives for each of the missing methods if some are available on your target platform (e.g.: getaddrinfo could be replaced with gethostbyname if it's available, etc). If not available, you'll need to figure out how to modify Ice-E to not rely on them (e.g.: getpeername is not essential since it's mostly used for tracing).

Cheers,
Benoit.
Reply With Quote
  #12 (permalink)  
Old 07-02-2008
kraps33 kraps33 is offline
Registered User
 
Name: Sebastien Serani
Organization: Université Bordeaux 1
Project: middleware on embedded system
 
Join Date: Jun 2008
Posts: 20
Hi,

Thanks for gethosbyname, its available.
For shutdown, getsockname and shutdown I think i have found solutions.
Lacking freeaddrinfo...

Without this. IceE seems to be almost comiled, only the linking part is remaining (crt0.o problem ).

Cheers.
Reply With Quote
  #13 (permalink)  
Old 07-02-2008
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,542
You don't need freeaddrinfo if you replace getaddrinfo with gethostbyname.

Cheers,
Benoit.
Reply With Quote
  #14 (permalink)  
Old 07-04-2008
kraps33 kraps33 is offline
Registered User
 
Name: Sebastien Serani
Organization: Université Bordeaux 1
Project: middleware on embedded system
 
Join Date: Jun 2008
Posts: 20
Hi,

I have created a patch for IceE -> a repository iceE-patch/ with src/ include/ lib/

I have added pthread_mutexattr_settype and gettimeofday ".c" and ".h" and others non-defined macros on my target system.

All the .o files are created but my libIceE.a don't countain this functions...
Whereas I have added -I/header_path and -L/lib_path on compilation rules.

nm libIceE.a
> U pthread_mutexattr...
> U gettimeofday
Reply With Quote
  #15 (permalink)  
Old 07-08-2008
kraps33 kraps33 is offline
Registered User
 
Name: Sebastien Serani
Organization: Université Bordeaux 1
Project: middleware on embedded system
 
Join Date: Jun 2008
Posts: 20
Hi,

It's good for my patched functions. I have forbidden #ifdef __cpluplus extern "C" {... in my header files .

Now I have a new problem.
"multiple definition" when I compile libIceE.so.
The target function is upCast.
It is possible that my compiler don't support override??? It's strange.

Cheers,
kraps33.
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
ice 3.2 compilation with VC7.1 Vivien Delage Help Center 3 03-20-2007 12:14 PM
Ice-EJ: problem with the compilation of the sources albertods Help Center 5 10-16-2006 12:58 PM
ICE 3.0.0. VC7.1 compilation error AnandRathi Bug Reports 3 11-28-2005 01:32 AM
Strange compilation error with VC6 / Ice 1.4.0 annekat Help Center 3 07-05-2004 02:15 PM
Ice-1.0.1/C++/compilation Ivan Bug Reports 2 02-25-2003 04:12 AM


All times are GMT -4. The time now is 09:45 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.