Home Help Center

Compile Ice-3.3.0 on ubuntu8.04

yihanyihan Member yihan liOrganization: OANDAProject: to communicate with other components
I am compiling Ice-3.3 on ubuntu 8.04, Before that I compiled Ice-thirdParty and installed them in /opt/ directory. I edited the Make.rules in Ice-3.3.0/cpp/config as the following:#
# Select an installation base directory. The directory will be created
# if it does not exist.
#
prefix ?= /opt/Ice-$(VERSION)

#
# The "root directory" for runpath embedded in executables. Can be unset
# to avoid adding a runpath to Ice executables.
#
embedded_runpath_prefix ?= /opt/Ice-$(VERSION_MAJOR).$(VERSION_MINOR)

#
# Define OPTIMIZE as yes if you want to build with
# optimization. Otherwise Ice is build with debug information.
#
#OPTIMIZE = yes

#
# Define LP64 as yes or no if you want force a 32 or 64 bit. The
# default is platform-dependent
#
#LP64 ?= yes


#
# Define USE_READLINE as yes if you want to build parts of Ice using
# readline on platforms where readline is available (see
# PLATFORM_HAS_READLINE in Make.rules.$(UNAME))
#
# readline is used by a number of Ice admin programs to provide
# command history, an optional feature.
#
# readline is licensed by the Free Software Foundation under the GNU
# Public License v2, and cannot be combined with GPL-incompatible
# software in any program. In particular the OpenSSL license is
# GPL-incompatible.
#
# If you combine Ice with more GPL-incompatible software, or have
# licensed Ice under a commercial (non-GPL) license, you should ponder
# the licensing implications of using readline.
#

USE_READLINE ?= yes


#
# If libbzip2 is not installed in a standard location where the
# compiler can find it, set BZIP2_HOME to the bzip2 installation
# directory.
#
BZIP2_HOME ?= /opt/bzip2


#
# If Berkeley DB is not installed in a standard location where the
# compiler can find it, set DB_HOME to the Berkeley DB installation
# directory.
#
DB_HOME ?= /opt/db

#
# If expat is not installed in a standard location where the compiler
# can find it, set EXPAT_HOME to the expat installation directory.
#
EXPAT_HOME ?= /opt/expat

#
# If OpenSSL is not installed in a standard location where the
# compiler can find it, set OPENSSL_HOME to the OpenSSL installation
# directory.
#
#OPENSSL_HOME ?= /opt/openssl

#
# If Mcpp is not installed in a standard location where the compiler
# can find it, set MCPP_HOME to the Mcpp installation directory.
#
MCPP_HOME ?= /opt/mcpp

# MCPP_HOME ?= /opt/mcpp-2.7.1

#
# If readline is not installed in a standard location where the
# compiler can find it, AND you want to use readline, set
# READLINE_HOME to the readline installation directory.
#
#READLINE_HOME ?= /opt/readline

#
# Generate position independent code unless GENPIC is set to no
#
#GENPIC ?= yes

#
# Support for creating static libraries is currently provided only for
# building the Ice-E translators.
#
STATICLIBS = yes

Since my system have the lastest openssl, so I don't need to recompile openssl.

Then when I try to make in Ice-3.3.0 directory, I get the following error message:

....
making all in slice2cpp
make[3]: Entering directory `/home/yihan/Desktop/Ice-3.3.0/cpp/src/slice2cpp'
rm -f ../../bin/slice2cpp
c++ -Wl,--enable-new-dtags -Wl,-rpath,/opt/Ice-3.3/lib -ftemplate-depth-128 -Wall -D_REENTRANT -I/usr/include/nptl -fPIC -g -L../../lib -o ../../bin/slice2cpp Gen.o Main.o -lSlice -lIceUtil -L/usr/lib/nptl -lpthread -lrt -Wl,-rpath-link,/opt/mcpp/lib
../../lib/libSlice.a(Preprocessor.o): In function `Slice::Preprocessor::printMakefileDependencies(Slice::Preprocessor::Language, std::vector<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&)':
/home/yihan/Desktop/Ice-3.3.0/cpp/src/Slice/Preprocessor.cpp:224: undefined reference to `mcpp_use_mem_buffers'
/home/yihan/Desktop/Ice-3.3.0/cpp/src/Slice/Preprocessor.cpp:225: undefined reference to `mcpp_lib_main'
/home/yihan/Desktop/Ice-3.3.0/cpp/src/Slice/Preprocessor.cpp:231: undefined reference to `mcpp_get_mem_buffer'
/home/yihan/Desktop/Ice-3.3.0/cpp/src/Slice/Preprocessor.cpp:242: undefined reference to `mcpp_use_mem_buffers'
/home/yihan/Desktop/Ice-3.3.0/cpp/src/Slice/Preprocessor.cpp:250: undefined reference to `mcpp_get_mem_buffer'
/home/yihan/Desktop/Ice-3.3.0/cpp/src/Slice/Preprocessor.cpp:259: undefined reference to `mcpp_use_mem_buffers'
../../lib/libSlice.a(Preprocessor.o): In function `Slice::Preprocessor::preprocess(bool)':
/home/yihan/Desktop/Ice-3.3.0/cpp/src/Slice/Preprocessor.cpp:158: undefined reference to `mcpp_use_mem_buffers'
/home/yihan/Desktop/Ice-3.3.0/cpp/src/Slice/Preprocessor.cpp:159: undefined reference to `mcpp_lib_main'
/home/yihan/Desktop/Ice-3.3.0/cpp/src/Slice/Preprocessor.cpp:165: undefined reference to `mcpp_get_mem_buffer'
/home/yihan/Desktop/Ice-3.3.0/cpp/src/Slice/Preprocessor.cpp:176: undefined reference to `mcpp_get_mem_buffer'
/home/yihan/Desktop/Ice-3.3.0/cpp/src/Slice/Preprocessor.cpp:195: undefined reference to `mcpp_use_mem_buffers'
collect2: ld returned 1 exit status
make[3]: *** [../../bin/slice2cpp] Error 1
make[3]: Leaving directory `/home/yihan/Desktop/Ice-3.3.0/cpp/src/slice2cpp'


By the way, libIceUtil.a and libSlice.a was generated without any problem.

I really need someone help me out !

Thank you in advance,

yihan

Comments

  • benoitbenoit Rennes, FranceAdministrators, ZeroC Staff Benoit FoucherOrganization: ZeroC, Inc.Project: Ice ZeroC Staff
    Hi,

    Building Ice with static libraries is not supported so you shouldn't set STATICLIBS to "yes". As specified by the comment in config/Make.rules, the STATICLIBS variable is only useful for building Ice-E translators.

    Actually, since it's not useful for building the Ice distribution, it would be best if this setting wasn't there... we'll fix this for the next release!

    Cheers,
    Benoit.
Sign In or Register to comment.