Go Back   ZeroC Forums > Help Center

Reply
 
LinkBack Thread Tools Rate Thread Display Modes
  #1 (permalink)  
Old 03-10-2005
aclysma aclysma is offline
Registered User
 
 
Join Date: Mar 2005
Posts: 3
Question Freeze does not compile for me in Ice 2.1.0

I'm pretty sure this is NOT a 2.1.0 bug because I had the same problem before. I was kind of hoping the problem would go away with 2.1.0.

Anyways, my build freezes when it hits freeze. How ironic. I've looked around on the forum and it seems that not having the right kind of berkley db installed would do this.

I am using 4.2.52-90, and I imagine suse does the compile option for c++ because the suse 9.2 built in rpm "provides" libdb-4.2.so and libdb_cxx-4.2.so

Please keep in mind I'm pretty new to linux, so don't rule anything out that should be obvious! I probably havn't done it.

I'll post an excerpt of my build. For grins, I also tried it as root.

Code:
IC -Wall -D_REENTRANT ConnectionF.cpp
c++ -c -I.. -I../../include  -DFREEZE_API_EXPORTS   -g  -ftemplate-depth-128 -fPIC -Wall -D_REENTRANT ConnectionI.cpp
In file included from ../Freeze/ConnectionI.h:15,
                 from ConnectionI.cpp:10:
../Freeze/TransactionI.h:14:20: db_cxx.h: No such file or directory
In file included from ../Freeze/ConnectionI.h:16,
                 from ConnectionI.cpp:10:
../Freeze/SharedDbEnv.h:16:20: db_cxx.h: No such file or directory
In file included from ../Freeze/MapI.h:14,
                 from ConnectionI.cpp:11:
../Freeze/SharedDb.h:14:20: db_cxx.h: No such file or directory
In file included from ../Freeze/MapI.h:14,
                 from ConnectionI.cpp:11:
../Freeze/SharedDb.h:41: error: `Db' was not declared in this scope
../Freeze/SharedDb.h:41: error: syntax error before `,' token
../Freeze/SharedDb.h:48: error: syntax error before `*' token
../Freeze/SharedDb.h:53: error: semicolon missing after declaration of `
   Freeze::MapIndexI'
../Freeze/SharedDb.h: In member function `const std::string
   Freeze::MapIndexI::name() const':
../Freeze/SharedDb.h:45: error: `_index' undeclared (first use this function)
../Freeze/SharedDb.h:45: error: (Each undeclared identifier is reported only
   once for each function it appears in.)
../Freeze/SharedDb.h: At global scope:
../Freeze/SharedDb.h:53: error: syntax error before `:' token
../Freeze/SharedDb.h:56: error: `Db' was not declared in this scope
../Freeze/SharedDb.h:56: error: template argument 1 is invalid
../Freeze/SharedDb.h:56: error: ISO C++ forbids declaration of `_db' with no
   type
I'm using a fairly "normal" suse 9.2 pro, with gcc-v

Code:
philipd@linux:~> gcc -v
Reading specs from /usr/lib/gcc-lib/i586-suse-linux/3.3.4/specs
Configured with: ../configure --enable-threads=posix --prefix=/usr --with-local-prefix=/usr/local --infodir=/usr/share/info --mandir=/usr/share/man --enable-languages=c,c++,f77,objc,java,ada --disable-checking --libdir=/usr/lib --enable-libgcj --with-gxx-include-dir=/usr/include/g++ --with-slibdir=/lib --with-system-zlib --enable-shared --enable-__cxa_atexit i586-suse-linux
Thread model: posix
gcc version 3.3.4 (pre 3.3.5 20040809)
Whatever I need to do or whatever information is needed, I'll be more than happy to oblige.

Thanks
Philip
Reply With Quote
  #2 (permalink)  
Old 03-10-2005
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,402
Hi,

My guess is that you don't have the berkeley db 4.2.52 development RPM (db-devel 4.2.52) installed since the compilation is not finding db_cxx.h. Try installing this http://www.novell.com/products/linux.../db-devel.html RPM and let us know if this solves your problem.

Regards, Matthew
Reply With Quote
  #3 (permalink)  
Old 03-11-2005
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: 921
Depending on your distribution, your db-devel or db4-devel will or will not include the libdb_cxx.so symbolic link.

It should be included, but it's unfortunately not obvious to everybody:
https://bugzilla.redhat.com/beta/show_bug.cgi?id=149191

If you don't have this symbolic link, I recommend to create it yourself (as root); alternatively you can edit Ice's config/Make.rules and replace -ldb_cxx with -ldb_cxx-4.2.

Cheers,
Bernard
Reply With Quote
  #4 (permalink)  
Old 03-11-2005
aclysma aclysma is offline
Registered User
 
 
Join Date: Mar 2005
Posts: 3
Question gcc 3.3

Excelent advice. Installing the development package fixed it for me. Like I said... something simple

But now I have another problem.

Code:
philipd@linux:~/build/Ice-2.1.0/bin> ./slice2cpp
./slice2cpp: error while loading shared libraries: libstdc++.so.6: cannot open shared object file: No such file or directory
I think this is caused by using gcc 3. Is there something I need to do to make it work with libstdc++.so.5?

Thanks
Philip

Last edited by aclysma : 03-11-2005 at 03:49 AM. Reason: I didn't mean to post yet!
Reply With Quote
  #5 (permalink)  
Old 03-11-2005
aclysma aclysma is offline
Registered User
 
 
Join Date: Mar 2005
Posts: 3
mysteriously is working

Well, I somehow mysteriously got it working. It isn't working under root but it is working under my username, philipd. I'm not sure why and if someone knows offhand, I'd appreciate the education But regardless, it works, and now I get to play with Ice.

By the way, thanks for putting out such a great product and lending a hand so readily. This is such a great community.

Thanks
Philip
Reply With Quote
  #6 (permalink)  
Old 03-11-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,928
I'm glad you got it work . I must say I was a bit puzzled by the error! I don't quite understand why it's looking for libstdc++.so.6 if you only have libstdc++.so.5 installed. It sounds like the root user and your regular user have different environments... The best way to track this down is to compare the LD_LIBRARY_PATH environment variable under both accounts. You can also use the ldd command to see against which library slice2cpp is linked and how the libraries are resolved in the current environment:

$ ldd ./slice2cpp

You should try this under both accounts and see the differences.

Hope this helps!

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
Compile 64 bit ice on non 64 bit OS Andrew S Help Center 2 03-31-2009 01:43 PM
Can't compile with gcj mefoster Bug Reports 4 05-22-2008 08:21 AM
Freeze::ConnectionPtr from Freeze::Map Obj paolo Comments 1 01-05-2008 05:02 PM
Compile on AIX 5L with gcc zephyr007 Help Center 1 02-02-2005 04:04 AM
How to compile ICE in HP-UX using GCC? jeylee Help Center 1 06-03-2004 08:56 AM


All times are GMT -4. The time now is 12:44 PM.


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