|
|
|
|||||
|
Ice-3.0.1 with a non standard install of DB
Here's the context diffs to get ICE to link with a non stanard location for the database.
==== //depot/src/Tools/Distributed/Ice/Ice-3.0.1/demo/Freeze/backup/Makefile#1 - /home/jody/src/Tools/Distributed/Ice/Ice-3.0.1/demo/Freeze/backup/Makefile ==== *************** *** 25,31 **** $(CLIENT): $(OBJS) $(COBJS) rm -f $@ ! $(CXX) $(LDFLAGS) -o $@ $(OBJS) $(COBJS) -lFreeze $(LIBS) IntLongMap.h IntLongMap.cpp: $(SLICE2FREEZE) rm -f IntLongMap.h IntLongMap.cpp --- 25,31 ---- $(CLIENT): $(OBJS) $(COBJS) rm -f $@ ! $(CXX) $(LDFLAGS) -o $@ $(OBJS) $(COBJS) -lFreeze $(DB_LIBS) $(LIBS) IntLongMap.h IntLongMap.cpp: $(SLICE2FREEZE) rm -f IntLongMap.h IntLongMap.cpp ==== //depot/src/Tools/Distributed/Ice/Ice-3.0.1/demo/Freeze/bench/Makefile#1 - /home/jody/src/Tools/Distributed/Ice/Ice-3.0.1/demo/Freeze/bench/Makefile ==== *************** *** 25,31 **** $(CLIENT): $(OBJS) $(COBJS) rm -f $@ ! $(CXX) $(LDFLAGS) -o $@ $(OBJS) $(COBJS) -lFreeze $(LIBS) BenchTypes.h BenchTypes.cpp: Test.ice $(SLICE2FREEZE) rm -f BenchTypes.h BenchTypes.cpp --- 25,31 ---- $(CLIENT): $(OBJS) $(COBJS) rm -f $@ ! $(CXX) $(LDFLAGS) -o $@ $(OBJS) $(COBJS) -lFreeze $(DB_LIBS) $(LIBS) BenchTypes.h BenchTypes.cpp: Test.ice $(SLICE2FREEZE) rm -f BenchTypes.h BenchTypes.cpp ==== //depot/src/Tools/Distributed/Ice/Ice-3.0.1/demo/Freeze/library/Makefile#1 - /home/jody/src/Tools/Distributed/Ice/Ice-3.0.1/demo/Freeze/library/Makefile ==== *************** *** 55,65 **** $(SERVER): $(OBJS) $(SOBJS) rm -f $@ ! $(CXX) $(LDFLAGS) -o $@ $(OBJS) $(SOBJS) -lFreeze $(LIBS) $(COLLOCATED): $(OBJS) $(COLOBJS) rm -f $@ ! $(CXX) $(LDFLAGS) -o $@ $(OBJS) $(COLOBJS) -lFreeze $(LIBS) $(READLINE_LIBS) LibraryTypes.h LibraryTypes.cpp: Library.ice $(SLICE2FREEZE) rm -f LibraryTypes.h LibraryTypes.cpp --- 55,65 ---- $(SERVER): $(OBJS) $(SOBJS) rm -f $@ ! $(CXX) $(LDFLAGS) -o $@ $(OBJS) $(SOBJS) -lFreeze $(DB_LIBS) $(LIBS) $(COLLOCATED): $(OBJS) $(COLOBJS) rm -f $@ ! $(CXX) $(LDFLAGS) -o $@ $(OBJS) $(COLOBJS) -lFreeze $(DB_LIBS) $(LIBS) $(READLINE_LIBS) LibraryTypes.h LibraryTypes.cpp: Library.ice $(SLICE2FREEZE) rm -f LibraryTypes.h LibraryTypes.cpp ==== //depot/src/Tools/Distributed/Ice/Ice-3.0.1/demo/Freeze/phonebook/Makefile#1 - /home/jody/src/Tools/Distributed/Ice/Ice-3.0.1/demo/Freeze/phonebook/Makefile ==== *************** *** 55,65 **** $(SERVER): $(OBJS) $(SOBJS) rm -f $@ ! $(CXX) $(LDFLAGS) -o $@ $(OBJS) $(SOBJS) -lFreeze $(LIBS) $(COLLOCATED): $(OBJS) $(COLOBJS) rm -f $@ ! $(CXX) $(LDFLAGS) -o $@ $(OBJS) $(COLOBJS) -lFreeze $(LIBS) $(READLINE_LIBS) NameIndex.h NameIndex.cpp: PhoneBook.ice $(SLICE2FREEZE) rm -f NameIndex.h NameIndex.cpp --- 55,65 ---- $(SERVER): $(OBJS) $(SOBJS) rm -f $@ ! $(CXX) $(LDFLAGS) -o $@ $(OBJS) $(SOBJS) -lFreeze $(DB_LIBS) $(LIBS) $(COLLOCATED): $(OBJS) $(COLOBJS) rm -f $@ ! $(CXX) $(LDFLAGS) -o $@ $(OBJS) $(COLOBJS) -lFreeze $(DB_LIBS) $(LIBS) $(READLINE_LIBS) NameIndex.h NameIndex.cpp: PhoneBook.ice $(SLICE2FREEZE) rm -f NameIndex.h NameIndex.cpp
__________________
Joseph Winston Programmer at Bluware (http://www.bluware.com/) Ice Projects -- Just evaluation |
|
||||||
|
Hi Joseph,
Let me explain the issue for other forum readers: in C++, Freeze uses Berkeley DB internally. The Freeze API does not expose any DB API in its headers, and the Freeze library is linked with the C++ DB library. On a number of platforms, when creating an executable, the linker insists to see all shared libraries dependencies, even indirect dependencies. So when you link with "libFreeze", the linker wants to find "libdb_cxx". As of Ice 3.0.1, the recommended way to make the linker happy when Berkeley DB is not installed in /usr/lib is to put the Berkeley DB lib directory in LD_LIBRARY_PATH (or another variable depending on your platform/linker). For example: export LD_LIBRARY_PATH=/opt/db/lib:$LD_LIBRARY_PATH Adding DB_LIBS in the various Makefiles (this patch) is another solution, but it's more complicated. Ice 3.1 will provide a nicer solution. All Makefiles have been updated to provide third-party directories using -rpath-link (Linux) or -L (Solaris, HP-UX). Also Joseph, please update your signature as desbribed here. Best regards, Bernard |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Question about install ICE on Linux | oraclexiao | Help Center | 3 | 11-03-2005 03:18 AM |
| Install Ice2.12 on Tru64 | myer | Patches | 1 | 08-16-2005 12:32 PM |
| make install | uphill | Bug Reports | 0 | 05-06-2005 09:55 AM |
| static linking of standard libs | galbe | Help Center | 4 | 03-08-2004 11:24 AM |
| INSTALL.LINUX typo | Ivan | Bug Reports | 1 | 05-30-2003 12:27 PM |