Go Back   ZeroC Forums > Help Center

Reply
 
LinkBack Thread Tools Rate Thread Display Modes
  #1 (permalink)  
Old 08-20-2008
pjtait pjtait is offline
Registered User
 
Name: Philip Tait
Organization: Subaru Telescope
Project: FMOS
 
Join Date: Aug 2008
Posts: 16
Building Ice-3.3.0 on Red Hat 9

I have openssl-0.9.8g installed, but get the following error during make in the cpp directory. Clues welcome:

make[2]: Entering directory `/home/philip/Ice-3.3.0/cpp/src/IceSSL'
/usr/local/gcc/4.3.1/bin/c++ -c -I.. -I../../include -DICE_SSL_API_EXPORTS -ftemplate-depth-128 -Wall -D_REENTRANT -I/usr/include/nptl -I/usr/kerberos/include -I//usr/local/ssl/include -fPIC -g Instance.cpp
Instance.cpp: In function ‘long unsigned int IceSSL_opensslThreadIdCallback()’:
Instance.cpp:76: error: invalid static_cast from type ‘__opaque_pthread*’ to type ‘long unsigned int’
make[2]: *** [Instance.o] Error 1
make[2]: Leaving directory `/home/philip/Ice-3.3.0/cpp/src/IceSSL'
make[1]: *** [all] Error 1
make[1]: Leaving directory `/home/philip/Ice-3.3.0/cpp/src'
make: *** [all] Error 1
Reply With Quote
  #2 (permalink)  
Old 08-20-2008
matthew's Avatar
matthew matthew is offline
ZeroC Staff
 
Name: Matthew Newhook
Organization: ZeroC, Inc.
Project: Internet Communications Engine
 
Join Date: Feb 2003
Location: NL, Canada
Posts: 1,060
Sorry, this isn't a supported platform. For a full list of supported platforms see http://www.zeroc.com/platforms.html.

For this particular problem, assuming you can't upgrade to supported version of Linux, and you need the SSL plug-in, you can probably use the reinterpret_cast from the previous code block.

Code:
unsigned long
IceSSL_opensslThreadIdCallback()
{
#if defined(_WIN32)
    return static_cast<unsigned long>(GetCurrentThreadId());
#elif defined(__FreeBSD__) || defined(__APPLE__) || defined(__osf1__)
    //
    // On some platforms, pthread_t is a pointer to a per-thread structure.
    //
    return reinterpret_cast<unsigned long>(pthread_self());
#elif (defined(__linux) || defined(__sun) || defined(__hpux)) || defined(_AIX)
    //
    // On Linux, Solaris, HP-UX and AIX, pthread_t is an integer.
    //
    return static_cast<unsigned long>(pthread_self());
#else
#   error "Unknown platform"
#endif
}
Note that you might well run into further problems down the road, however!
Reply With Quote
  #3 (permalink)  
Old 08-20-2008
pjtait pjtait is offline
Registered User
 
Name: Philip Tait
Organization: Subaru Telescope
Project: FMOS
 
Join Date: Aug 2008
Posts: 16
De-selecting SSL plugin

I don't need the SSL plugin, but I can't see how to unselect it. Is it somewhere in config/Make.rules.Linux ?
Reply With Quote
  #4 (permalink)  
Old 08-21-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 want to compile SSL, edit cpp/src/Makefile and remove IceSSL from the list of subdirectories to compile.
Reply With Quote
  #5 (permalink)  
Old 08-21-2008
pjtait pjtait is offline
Registered User
 
Name: Philip Tait
Organization: Subaru Telescope
Project: FMOS
 
Join Date: Aug 2008
Posts: 16
No IceBox.h file in tarball

Thanks, that was a big help.

Next hurdle:

make[3]: Entering directory `/home/philip/Ice-3.3.0/cpp/test/IceBox/configuration'
make[3]: *** No rule to make target `../../../include/IceBox/IceBox.h', needed by `Service.o'. Stop.

Looks like editing items out of cpp/src/Makefile disrupted dependency resolution. Solved by changing directory to src/IceBox and running make there.

Last edited by pjtait : 08-21-2008 at 06:29 PM.
Reply With Quote
  #6 (permalink)  
Old 08-21-2008
mes's Avatar
mes mes is online now
ZeroC Staff
 
Name: Mark Spruiell
Organization: ZeroC, Inc.
Project: Ice Developer
 
Join Date: Feb 2003
Location: California
Posts: 971
Hi,

IceBox.h is generated as part of the build process, but you have to build the cpp/src/IceBox subdirectory.

As you can see, if you are building only certain portions of the Ice source distribution, you will encounter build failures elsewhere in the tests and demos that depend on the components you've skipped.

Take care,
Mark
Reply With Quote
  #7 (permalink)  
Old 09-03-2008
pjtait pjtait is offline
Registered User
 
Name: Philip Tait
Organization: Subaru Telescope
Project: FMOS
 
Join Date: Aug 2008
Posts: 16
Another compile error

I reported that Freeze/BackgroundSaveEvictorI.cpp gave a compilation error. Some further Googling gave me the answer - the '--enable-cxx' option must be provided when building BerkeleyDB.4.6. Hopefully, this will help someone else, too.

Last edited by pjtait : 09-03-2008 at 06:11 PM. Reason: Found the solution
Reply With Quote
  #8 (permalink)  
Old 09-03-2008
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: 816
Hi Philip,

When building Ice from source, I recommend reading the INSTALL.<OS> for your system, for example INSTALL.LINUX.

Another useful file is the README in the third-party source distribution available from our download page. It describes in particular the requirements for Berkeley DB.

Although INSTALL.LINUX points to this third-party source distribution, I agree that some build failures can be confusing. Maybe a FAQ entry would help?

Cheers,
Bernard
__________________
Bernard Normier
ZeroC, Inc.
Reply With Quote
  #9 (permalink)  
Old 09-03-2008
pjtait pjtait is offline
Registered User
 
Name: Philip Tait
Organization: Subaru Telescope
Project: FMOS
 
Join Date: Aug 2008
Posts: 16
README in Third Party sources tarball

You're right, I shouldn't have missed that.

For the next Ice release, it might be worth having the tarball set to unpack into a subdirectory, so that important files don't get overlooked in cluttered home directories... :-)

It's very encouraging to get such helpful responses.
Reply With Quote
  #10 (permalink)  
Old 09-04-2008
pjtait pjtait is offline
Registered User
 
Name: Philip Tait
Organization: Subaru Telescope
Project: FMOS
 
Join Date: Aug 2008
Posts: 16
Successful build, but 'make test' fails

*** running tests 2/61 in /home/philip/Ice-3.3.0/cpp/test/IceUtil/thread
*** configuration: Default
*** test started: 09/04/08 08:11:16
starting client... ok
running mutex test... Cond.cpp:314: IceUtil::ThreadSyscallException:
syscall exception: Invalid argument failed
test mutex failed
('test in /home/philip/Ice-3.3.0/cpp/test/IceUtil/thread failed with exit status', 256)
Reply With Quote
  #11 (permalink)  
Old 09-04-2008
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: 816
If you look at the corresponding code (line 314 in IceUtil/Cond.cpp), you'll see the issue:

Code:
#if !defined(__hpux) && !defined(__APPLE__)
    rc = pthread_condattr_setclock(&attr, CLOCK_MONOTONIC); 
    if(rc != 0)
    {
        throw ThreadSyscallException(__FILE__, __LINE__, rc);
    }
#endif
It looks like condition variables on Red Hat 9 don't support a monotonic clock, at least not with the standard POSIX API. You should ifdef this out on your system as well.

Cheers,
Bernard
__________________
Bernard Normier
ZeroC, Inc.
Reply With Quote
  #12 (permalink)  
Old 09-05-2008
pjtait pjtait is offline
Registered User
 
Name: Philip Tait
Organization: Subaru Telescope
Project: FMOS
 
Join Date: Aug 2008
Posts: 16
Next test failure

Skipping test 8/61, I found the failure message for 9/61 indicated the problem was the lack of the epoll() system call. Undefining ICE_USE_EPOLL in src/Ice/Selector.h fixed the problem with 9/61, and 8/61 also. Onward...

Last edited by pjtait : 09-05-2008 at 10:57 PM. Reason: Resolved
Reply With Quote
  #13 (permalink)  
Old 09-05-2008
pjtait pjtait is offline
Registered User
 
Name: Philip Tait
Organization: Subaru Telescope
Project: FMOS
 
Join Date: Aug 2008
Posts: 16
Test 61/61, "Servname not supported for ai_socktype"

1 thru 60 all pass, 61 gives:

*** running tests 61/61 in /home/philip/Ice-3.3.0/cpp/test/Glacier2/staticFiltering
*** configuration: Default
*** test started: 09/05/08 16:10:50
testing category filter..Network.cpp:346: Ice:NSException:
DNS error: Servname not supported for ai_socktype
host:
. DNS error: Servname not supported for ai_socktype
host:
/home/philip/Ice-3.3.0/cpp/test/Glacier2/staticFiltering/client: Network.cpp:1387: Ice:NSException:
DNS error: Servname not supported for ai_socktype
host:
('test in /home/philip/Ice-3.3.0/cpp/test/Glacier2/staticFiltering failed with exit status', 256)
Reply With Quote
  #14 (permalink)  
Old 09-08-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,541
Hi,

Most likely this failure occurs when using an empty -h option in endpoints. You can try to reproduce it with the hello demo, the hello client should throw a similar exception. It should work if you add "-h localhost" to the endpoints of the Hello.Proxy in the demo/Ice/hello/config.client file. To workaround this problem, you can try replacing:

Code:
            rs = getaddrinfo(0, "1", &hints, &info);
with

Code:
            rs = getaddrinfo(0, 0, &hints, &info);
in the src/Ice/Network.cpp file, line 335 and 1365.

Cheers,
Benoit.
Reply With Quote
  #15 (permalink)  
Old 09-08-2008
pjtait pjtait is offline
Registered User
 
Name: Philip Tait
Organization: Subaru Telescope
Project: FMOS
 
Join Date: Aug 2008
Posts: 16
Solved getaddrinfo(3) issue

Thanks for the guidance, Benoit.

I now recall having problems with getaddrinfo(3) on RH9 a couple of years ago - it doesn't behave quite the same as current implementations.

Your suggestion of setting the 'service' parameter to 0 didn't fix the problem, but setting it to "tcpmux" did.

Now I have all 61 tests passing for 'cpp'. :-)

Next up: 'py'!
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
Red Hat Enterprise Linux 5 support bernard Announcements 0 06-13-2007 05:54 PM
Build error on Red Hat Linux (kernel:2.4.18) rc_hz Help Center 3 11-26-2005 08:58 PM
building ice for C# aditi Help Center 4 11-13-2004 09:37 PM
Make on Red Hat Enterprise Linux ES release 2.1 (Panama) fails ahartveld Bug Reports 6 10-07-2003 12:07 PM


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