diff options
author | Jose <jose@zeroc.com> | 2014-11-24 18:37:34 +0100 |
---|---|---|
committer | Jose <jose@zeroc.com> | 2014-11-24 18:37:34 +0100 |
commit | ad7fbc43e88f66b8dfe37e8d0c70e95351570bc7 (patch) | |
tree | 26372de098725f6b65efe56c38f5831dd2f5b974 /cpp | |
parent | Fixed ICE-5969: IceGrid/allocation test failure (diff) | |
download | ice-ad7fbc43e88f66b8dfe37e8d0c70e95351570bc7.tar.bz2 ice-ad7fbc43e88f66b8dfe37e8d0c70e95351570bc7.tar.xz ice-ad7fbc43e88f66b8dfe37e8d0c70e95351570bc7.zip |
Build & test fixes:
* ICE-5929 - Consider using $ORIGIN on Linux
* ICE-5949 - IceBox issues on Linux bi-arch
* ICE-5954 - Ubuntu make install issue / ORIGIN bug
* ICE-5961 - OSX: test/IceGrid/session fails
* ICE-5971 - allTests.py incorrect reporting under Windows?
Diffstat (limited to 'cpp')
44 files changed, 233 insertions, 144 deletions
diff --git a/cpp/allDemos.py b/cpp/allDemos.py index ef5d576842c..b7d54ead583 100755 --- a/cpp/allDemos.py +++ b/cpp/allDemos.py @@ -47,8 +47,8 @@ demos = [ "IceDiscovery/hello", "IceDiscovery/replication", "IceStorm/clock", + "IceBox/hello", "IceStorm/counter", - "IceStorm/replicated", "IceStorm/replicated2", "IceGrid/allocate", "IceGrid/customLoadBalancing", @@ -62,7 +62,6 @@ demos = [ "Freeze/customEvictor", "Freeze/phonebook", "Freeze/library", - "Freeze/backup", "Freeze/transform", "Freeze/casino", "Manual/map_filesystem", @@ -71,8 +70,20 @@ demos = [ "Manual/printer", "Manual/lifecycle"] -if not Util.isNoServices(): - demos += ["IceBox/hello", "IceGrid/icebox"] +# +# For this demos the descriptor hardcode the icebox name and will +# not work with configurations that use different icebox names. +# +if Util.getIceBox().endswith("icebox"): + demos += ["IceStorm/replicated", "IceGrid/icebox"] + +# +# Freeze backup doesn't work on x86 multiarch because it require to +# use x86 db tools that are currently not available for x64 +# distributions. +# +if not Util.isX86(): + demos += ["Freeze/backup"] if __name__ == "__main__": Util.run(demos) diff --git a/cpp/allTests.py b/cpp/allTests.py index 23ac33761d5..622b3dfe7a5 100755 --- a/cpp/allTests.py +++ b/cpp/allTests.py @@ -100,7 +100,7 @@ tests = [ ("IceGrid/update", ["service", "novc100", "nomingw"]), ("IceGrid/noRestartUpdate", ["service", "novc100", "nomingw"]), ("IceGrid/activation", ["service", "novc100", "nomingw"]), - ("IceGrid/replicaGroup", ["service", "novc100", "nomingw"]), + ("IceGrid/replicaGroup", ["service", "novc100", "nomingw", "noc++11", "nomultiarch"]), ("IceGrid/replication", ["service", "novc100", "nomingw", "nomx"]), ("IceGrid/allocation", ["service", "novc100", "nomingw"]), ("IceGrid/distribution", ["service", "novc100", "nomingw"]), diff --git a/cpp/config/Make.rules b/cpp/config/Make.rules index 915d28b729c..1520824a51e 100644 --- a/cpp/config/Make.rules +++ b/cpp/config/Make.rules @@ -34,6 +34,19 @@ prefix ?= /opt/Ice-$(VERSION) create_runpath_symlink ?= no # +# Define embedded_runpath as no if you don't want any RPATH added to +# the executables. +# +embedded_runpath ?= yes + +# +# Define new_dtags as yes if you want the linker to enable the new style +# dtags, this will cause the linker to add a runpath entry instead of +# a rpath entry. This only aplly to gcc builds on linux +# +new_dtags ?= no + +# # Define LP64 as yes or no if you want force a 32 or 64 bit. The # default is platform-dependent. This property has no effect on # OS X. On OS X, use CXXARCHFLAGS bellow to establish the build @@ -167,7 +180,7 @@ else endif bindir = $(top_srcdir)/bin -libdir = $(top_srcdir)/lib +libdir = $(top_srcdir)/$(libsubdir) headerdir = $(top_srcdir)/include # @@ -316,6 +329,10 @@ ifdef ice_src_dist SLICE2CPP = $(bindir)/slice2cpp SLICE2FREEZE = $(bindir)/slice2freeze else + SLICEPARSERLIB = $(ice_dir)/$(libsubdir)/$(subst $(cpp11libsuffix),,$(call mklibfilename,Slice,$(VERSION))) + ifeq ($(wildcard $(SLICEPARSERLIB)),) + SLICEPARSERLIB = $(ice_dir)/$(lib64subdir)/$(subst $(cpp11libsuffix),,$(call mklibfilename,Slice,$(VERSION))) + endif SLICEPARSERLIB = $(ice_dir)/$(libsubdir)/$(subst $(cpp11libsuffix),,$(call mklibfilename,Slice,$(VERSION))) SLICE2CPP = $(ice_dir)/$(binsubdir)/slice2cpp SLICE2FREEZE = $(ice_dir)/$(binsubdir)/slice2freeze @@ -424,9 +441,4 @@ clean:: rm -f $(addprefix $(HDIR)/, $(addsuffix .h, $(basename $(SLICE_OBJS)))) endif -ifneq ($(TEMPLATE_REPOSITORY),) -clean:: - rm -fr $(TEMPLATE_REPOSITORY) -endif - install:: diff --git a/cpp/config/Make.rules.Darwin b/cpp/config/Make.rules.Darwin index 802a78d7dcc..b76d01b6fea 100644 --- a/cpp/config/Make.rules.Darwin +++ b/cpp/config/Make.rules.Darwin @@ -43,32 +43,38 @@ endif # CXXLIBS = -LOADER_PATH = @loader_path - # -# If embedded_runpath_prefix is set it has preference +# If embedded_runpath is not set to yes we do not add +# an rpath dir. # -ifneq ($(embedded_runpath_prefix),) -RPATH_DIR = $(embedded_runpath_prefix) -endif +ifeq ($(embedded_runpath),yes) + LOADER_PATH = @loader_path + + # + # If embedded_runpath_prefix is set it has preference + # + ifneq ($(embedded_runpath_prefix),) + RPATH_DIR = $(embedded_runpath_prefix) + endif -ifeq ($(RPATH_DIR),) -ifdef ice_src_dist -RPATH_DIR = @loader_path/$(libdir) -else -RPATH_DIR = $(ice_dir)/$(libsubdir) -endif -endif + ifeq ($(RPATH_DIR),) + ifdef ice_src_dist + RPATH_DIR = @loader_path/$(libdir) + else + RPATH_DIR = $(ice_dir)/$(libsubdir) + endif + endif -# -# Clear rpath setting when doing a system install -# -ifeq ($(ice_dir),/usr) -RPATH_DIR = -endif + # + # Clear rpath setting when doing a system install + # + ifeq ($(ice_dir),/usr) + RPATH_DIR = + endif -ifneq ($(RPATH_DIR),) -LDEXEFLAGS = -Wl,-rpath,$(RPATH_DIR) + ifneq ($(RPATH_DIR),) + LDEXEFLAGS = -Wl,-rpath,$(RPATH_DIR) + endif endif ifdef ice_src_dist diff --git a/cpp/config/Make.rules.Linux b/cpp/config/Make.rules.Linux index ef24cff950a..657679a3310 100644 --- a/cpp/config/Make.rules.Linux +++ b/cpp/config/Make.rules.Linux @@ -41,93 +41,109 @@ ifeq ($(CXX),g++) CPPFLAGS += -std=c++0x endif - ifeq ($(MACHINE),sparc64) - # - # We are an ultra, at least, and so have the atomic instructions - # - $(warning ===================================================================) - $(warning Linux on SPARC is currently unsupported. The Ice team does not) - $(warning maintain SPARC specific portions of the source code or build) - $(warning system. Contact sales@zeroc.com if you wish to sponsor official) - $(warning support.) - $(warning ===================================================================) - USE_SPARC_ASM = yes - CXXARCHFLAGS += -mcpu=ultrasparc -pipe -Wno-deprecated -DUSE_SPARC_ASM - endif - - ifeq ($(MACHINE),sparc) - # - # We are a sun4m or sun4c - # On sun4m, there is a bug in some CPU/kernel/gcc configurations which - # prevent us from using '-mcpu=v8' - # - $(warning ===================================================================) - $(warning Linux on SPARC is currently unsupported. The Ice team does not) - $(warning maintain SPARC specific portions of the source code or build) - $(warning system. Contact sales@zeroc.com if you wish to sponsor official) - $(warning support.) - $(warning ===================================================================) - USE_SPARC_ASM = no - CXXARCHFLAGS += -mtune=v8 -pipe -Wno-deprecated -DICE_USE_MUTEX_SHARED - endif + ifeq ($(MACHINE),sparc64) + # + # We are an ultra, at least, and so have the atomic instructions + # + $(warning ===================================================================) + $(warning Linux on SPARC is currently unsupported. The Ice team does not) + $(warning maintain SPARC specific portions of the source code or build) + $(warning system. Contact sales@zeroc.com if you wish to sponsor official) + $(warning support.) + $(warning ===================================================================) + USE_SPARC_ASM = yes + CXXARCHFLAGS += -mcpu=ultrasparc -pipe -Wno-deprecated -DUSE_SPARC_ASM + endif - ifeq ($(MACHINE),x86_64) - ifeq ($(LP64),yes) - CXXARCHFLAGS += -m64 - else - CXXARCHFLAGS += -m32 - endif - endif + ifeq ($(MACHINE),sparc) + # + # We are a sun4m or sun4c + # On sun4m, there is a bug in some CPU/kernel/gcc configurations which + # prevent us from using '-mcpu=v8' + # + $(warning ===================================================================) + $(warning Linux on SPARC is currently unsupported. The Ice team does not) + $(warning maintain SPARC specific portions of the source code or build) + $(warning system. Contact sales@zeroc.com if you wish to sponsor official) + $(warning support.) + $(warning ===================================================================) + USE_SPARC_ASM = no + CXXARCHFLAGS += -mtune=v8 -pipe -Wno-deprecated -DICE_USE_MUTEX_SHARED + endif - CXXFLAGS = $(CXXARCHFLAGS) -fvisibility=hidden -Wall -Werror -pthread + ifeq ($(MACHINE),x86_64) + ifeq ($(LP64),yes) + CXXARCHFLAGS += -m64 + else + CXXARCHFLAGS += -m32 + endif + endif - ifneq ($(GENPIC),no) - CXXFLAGS += -fPIC - endif + CXXFLAGS = $(CXXARCHFLAGS) -fvisibility=hidden -Wall -Werror -pthread - ifeq ($(OPTIMIZE),yes) - CXXFLAGS += -O2 -DNDEBUG - else - CXXFLAGS += -g - endif - - LOADER_PATH = \$$ORIGIN - - ifneq ($(embedded_runpath_prefix),) - RPATH_DIR = $(embedded_runpath_prefix) - endif - - ifeq ($(RPATH_DIR),) - ifdef ice_src_dist - RPATH_DIR = \$$ORIGIN/$(libdir) - else - RPATH_DIR = $(ice_dir)/$(libsubdir) - endif - endif + ifneq ($(GENPIC),no) + CXXFLAGS += -fPIC + endif - # - # Clear the rpath dir when doing a system install. - # - ifeq ($(ice_dir), /usr) - RPATH_DIR = - endif + ifeq ($(OPTIMIZE),yes) + CXXFLAGS += -O2 -DNDEBUG + else + CXXFLAGS += -g + endif - ifneq ($(RPATH_DIR),) - LDEXEFLAGS = -Wl,-rpath,$(RPATH_DIR) - endif + # + # If embedded_runpath is not set to yes we do not add + # an rpath dir. + # + ifeq ($(embedded_runpath),yes) + LOADER_PATH = \$$ORIGIN + ifneq ($(embedded_runpath_prefix),) + RPATH_DIR = $(embedded_runpath_prefix) + endif + + ifeq ($(RPATH_DIR),) + ifdef ice_src_dist + RPATH_DIR = \$$ORIGIN/$(libdir) + else + RPATH_DIR = $(ice_dir)/$(libsubdir) + endif + endif + + # + # Clear the rpath dir when doing a system install. + # + ifeq ($(ice_dir), /usr) + RPATH_DIR = + endif + + # + # Unless new_dtags is set to yes we use old style dtags, to add a RPATH + # entry instead of RUNPATH entry, this allow the plug-ins to load without + # need to set LD_LIBRARY_PATH + # + ifeq ($(new_dtags),yes) + DTAGS = -Wl,--enable-new-dtags + else + DTAGS = -Wl,--disable-new-dtags + endif + + ifneq ($(RPATH_DIR),) + LDEXEFLAGS = $(DTAGS) -Wl,-rpath,$(RPATH_DIR) + endif + endif - # - # C++ run-time libraries, necessary for linking some shared libraries. - # - CXXLIBS = + # + # C++ run-time libraries, necessary for linking some shared libraries. + # + CXXLIBS = - mkshlib = $(CXX) -shared $(LDFLAGS) -o $(1) -Wl,-h,$(2) $(3) $(4) + mkshlib = $(CXX) -shared $(LDFLAGS) -o $(1) -Wl,-h,$(2) $(3) $(4) - mklib = ar cr $(1) $(2) + mklib = ar cr $(1) $(2) - rpathlink = -Wl,-rpath-link,$(1) + rpathlink = -Wl,-rpath-link,$(1) - LDPLATFORMFLAGS += -rdynamic + LDPLATFORMFLAGS += -rdynamic endif diff --git a/cpp/demo/Freeze/backup/Makefile b/cpp/demo/Freeze/backup/Makefile index 1e71b7e638f..46c1dfb2076 100644 --- a/cpp/demo/Freeze/backup/Makefile +++ b/cpp/demo/Freeze/backup/Makefile @@ -23,7 +23,7 @@ CPPFLAGS := -I. $(CPPFLAGS) $(CLIENT): $(OBJS) rm -f $@ - $(CXX) $(LDFLAGS) $(LDEXEFLAGS) -o $@ $(OBJS) $(DB_RPATH_LINK) -lFreeze $(LIBS) + $(CXX) $(LDFLAGS) $(LDEXEFLAGS) $(LDEXEFLAGS) -o $@ $(OBJS) $(DB_RPATH_LINK) -lFreeze $(LIBS) # The slice2freeze rules are structured like this to avoid issues with # parallel make. diff --git a/cpp/demo/Freeze/library/Makefile b/cpp/demo/Freeze/library/Makefile index 7e2e5faed69..358f84c0572 100644 --- a/cpp/demo/Freeze/library/Makefile +++ b/cpp/demo/Freeze/library/Makefile @@ -61,7 +61,7 @@ $(SERVER): $(SOBJS) $(COLLOCATED): $(COLOBJS) rm -f $@ - $(CXX) $(LDFLAGS) -o $@ $(COLOBJS) $(DB_RPATH_LINK) -lFreeze $(LIBS) $(READLINE_LIBS) + $(CXX) $(LDFLAGS) $(LDEXEFLAGS) -o $@ $(COLOBJS) $(DB_RPATH_LINK) -lFreeze $(LIBS) $(READLINE_LIBS) # The slice2freeze rules are structured like this to avoid issues with # parallel make. diff --git a/cpp/demo/Freeze/phonebook/Makefile b/cpp/demo/Freeze/phonebook/Makefile index d26f316be0d..3e58e60780b 100644 --- a/cpp/demo/Freeze/phonebook/Makefile +++ b/cpp/demo/Freeze/phonebook/Makefile @@ -57,7 +57,7 @@ $(CLIENT): $(COBJS) $(SERVER): $(SOBJS) rm -f $@ - $(CXX) $(LDFLAGS) -o $@ $(SOBJS) $(DB_RPATH_LINK) -lFreeze $(LIBS) + $(CXX) $(LDFLAGS) $(LDEXEFLAGS) -o $@ $(SOBJS) $(DB_RPATH_LINK) -lFreeze $(LIBS) $(COLLOCATED): $(COLOBJS) rm -f $@ diff --git a/cpp/lib/c++11/.gitignore b/cpp/lib/c++11/.gitignore deleted file mode 100644 index 39af5887579..00000000000 --- a/cpp/lib/c++11/.gitignore +++ /dev/null @@ -1 +0,0 @@ -# Dummy file, so that git retains this otherwise empty directory. diff --git a/cpp/src/Freeze/Makefile b/cpp/src/Freeze/Makefile index 558d92553f7..33be9920e99 100644 --- a/cpp/src/Freeze/Makefile +++ b/cpp/src/Freeze/Makefile @@ -79,6 +79,7 @@ clean:: -rm -f $(HDIR)/CatalogIndexList.h CatalogIndexList.cpp $(libdir)/$(LIBFILENAME): $(OBJS) + @mkdir -p $(dir $@) rm -f $@ $(call mkshlib,$@,$(SONAME),$(OBJS),$(LINKWITH)) @@ -87,6 +88,7 @@ $(libdir)/$(SONAME): $(libdir)/$(LIBFILENAME) ln -s $(LIBFILENAME) $@ $(libdir)$(cpp11libdirsuffix)/$(LIBNAME): $(libdir)/$(SONAME) + @mkdir -p $(libdir)$(cpp11libdirsuffix) rm -f $@ ln -s $(cpp11sonamedir)$(SONAME) $@ diff --git a/cpp/src/FreezeScript/Makefile b/cpp/src/FreezeScript/Makefile index 04d83e89767..2d11448977d 100644 --- a/cpp/src/FreezeScript/Makefile +++ b/cpp/src/FreezeScript/Makefile @@ -37,7 +37,7 @@ OBJS = $(COMMON_OBJS) $(TRANSFORM_OBJS) $(DUMP_OBJS) HDIR = $(headerdir)/FreezeScript -RPATH_DIR = $(LOADER_PATH)/../lib +RPATH_DIR = $(LOADER_PATH)/../$(libsubdir) include $(top_srcdir)/config/Make.rules diff --git a/cpp/src/Glacier2/Makefile b/cpp/src/Glacier2/Makefile index 1f0de439f88..25f6596236d 100644 --- a/cpp/src/Glacier2/Makefile +++ b/cpp/src/Glacier2/Makefile @@ -29,7 +29,7 @@ OBJS = Blobject.o \ SessionRouterI.o \ $(SLICE_OBJS) -RPATH_DIR = $(LOADER_PATH)/../lib +RPATH_DIR = $(LOADER_PATH)/../$(libsubdir) include $(top_srcdir)/config/Make.rules diff --git a/cpp/src/Glacier2CryptPermissionsVerifier/Makefile b/cpp/src/Glacier2CryptPermissionsVerifier/Makefile index 93b235065de..891d79f5072 100644 --- a/cpp/src/Glacier2CryptPermissionsVerifier/Makefile +++ b/cpp/src/Glacier2CryptPermissionsVerifier/Makefile @@ -27,6 +27,7 @@ CPPFLAGS := -I.. $(CPPFLAGS) LINKWITH := $(BZIP2_RPATH_LINK) -lIce -lIceUtil -lGlacier2 $(ICEUTIL_OS_LIBS) $(CXXLIBS) $(libdir)/$(LIBFILENAME): $(OBJS) + @mkdir -p $(dir $@) rm -f $@ $(call mkshlib,$@,$(SONAME),$(OBJS),$(LINKWITH)) @@ -35,6 +36,7 @@ $(libdir)/$(SONAME): $(libdir)/$(LIBFILENAME) ln -s $(LIBFILENAME) $@ $(libdir)$(cpp11libdirsuffix)/$(LIBNAME): $(libdir)/$(SONAME) + @mkdir -p $(libdir)$(cpp11libdirsuffix) rm -f $@ ln -s $(cpp11sonamedir)$(SONAME) $@ diff --git a/cpp/src/Glacier2Lib/Makefile b/cpp/src/Glacier2Lib/Makefile index 23f081a7895..78b574ba92b 100644 --- a/cpp/src/Glacier2Lib/Makefile +++ b/cpp/src/Glacier2Lib/Makefile @@ -38,6 +38,7 @@ SLICE2CPPFLAGS := --ice --include-dir Glacier2 --dll-export GLACIER2_API $(SLICE LINKWITH := $(BZIP2_RPATH_LINK) -lIce -lIceUtil $(libdir)/$(LIBFILENAME): $(OBJS) $(HDIR)/PermissionsVerifierF.h $(HDIR)/RouterF.h + @mkdir -p $(dir $@) rm -f $@ $(call mkshlib,$@,$(SONAME),$(OBJS),$(LINKWITH)) @@ -46,6 +47,7 @@ $(libdir)/$(SONAME): $(libdir)/$(LIBFILENAME) ln -s $(LIBFILENAME) $@ $(libdir)$(cpp11libdirsuffix)/$(LIBNAME): $(libdir)/$(SONAME) + @mkdir -p $(libdir)$(cpp11libdirsuffix) rm -f $@ ln -s $(cpp11sonamedir)$(SONAME) $@ diff --git a/cpp/src/Ice/Makefile b/cpp/src/Ice/Makefile index 2d8066de082..ec649e429ed 100644 --- a/cpp/src/Ice/Makefile +++ b/cpp/src/Ice/Makefile @@ -167,10 +167,12 @@ LINKWITH := -lIceUtil $(BZIP2_LIBS) $(ICE_OS_LIBS) $(ICONV_LIBS) ifeq ($(STATICLIBS),yes) $(libdir)/$(LIBNAME): $(OBJS) + @mkdir -p $(dir $@) rm -f $@ $(call mklib,$@,$(OBJS)) else $(libdir)/$(LIBFILENAME): $(OBJS) + @mkdir -p $(dir $@) rm -f $@ $(call mkshlib,$@,$(SONAME),$(OBJS),$(LINKWITH)) @@ -179,6 +181,7 @@ $(libdir)/$(SONAME): $(libdir)/$(LIBFILENAME) ln -s $(LIBFILENAME) $@ $(libdir)$(cpp11libdirsuffix)/$(LIBNAME): $(libdir)/$(SONAME) + @mkdir -p $(libdir)$(cpp11libdirsuffix) rm -f $@ ln -s $(cpp11sonamedir)$(SONAME) $@ endif diff --git a/cpp/src/IceBox/Makefile b/cpp/src/IceBox/Makefile index 7eab34ce886..15385b77972 100644 --- a/cpp/src/IceBox/Makefile +++ b/cpp/src/IceBox/Makefile @@ -13,7 +13,7 @@ LIBFILENAME = $(call mklibfilename,IceBox,$(VERSION)) SONAME = $(call mksoname,IceBox,$(SOVERSION)) LIBNAME = $(call mklibname,IceBox) -SERVER = $(bindir)/icebox +SERVER = $(bindir)/icebox$(binsuffix) ADMIN = $(bindir)/iceboxadmin LIBTARGETS = $(call mklibtargets,$(libdir)/$(LIBFILENAME),$(libdir)/$(SONAME),$(libdir)$(cpp11libdirsuffix)/$(LIBNAME)) @@ -36,7 +36,7 @@ OBJS = $(LIB_OBJS) \ HDIR = $(headerdir)/IceBox SDIR = $(slicedir)/IceBox -RPATH_DIR = $(LOADER_PATH)/../lib +RPATH_DIR = $(LOADER_PATH)/../$(libsubdir) include $(top_srcdir)/config/Make.rules @@ -45,6 +45,7 @@ SLICE2CPPFLAGS := --checksum --ice --dll-export ICE_BOX_API --include-dir IceBox LINKWITH := $(BZIP2_RPATH_LINK) -lIce -lIceUtil $(libdir)/$(LIBFILENAME): $(LIB_OBJS) + @mkdir -p $(dir $@) rm -f $@ $(call mkshlib,$@,$(SONAME),$(LIB_OBJS),$(LINKWITH)) @@ -53,6 +54,7 @@ $(libdir)/$(SONAME): $(libdir)/$(LIBFILENAME) ln -s $(LIBFILENAME) $@ $(libdir)$(cpp11libdirsuffix)/$(LIBNAME): $(libdir)/$(SONAME) + @mkdir -p $(libdir)$(cpp11libdirsuffix) rm -f $@ ln -s $(cpp11sonamedir)$(SONAME) $@ @@ -66,7 +68,7 @@ $(ADMIN): $(AOBJS) $(LIBTARGETS) install:: all $(call installlib,$(DESTDIR)$(install_libdir),$(libdir),$(LIBFILENAME),$(SONAME),$(LIBNAME)) - $(call installprogram,$(SERVER),$(DESTDIR)$(install_bindir)/icebox$(binsuffix)) + $(call installprogram,$(SERVER),$(DESTDIR)$(install_bindir)) $(call installdata,$(top_srcdir)/../man/man1/icebox.1,$(DESTDIR)$(install_mandir)) $(call installprogram,$(ADMIN),$(DESTDIR)$(install_bindir)) $(call installdata,$(top_srcdir)/../man/man1/iceboxadmin.1,$(DESTDIR)$(install_mandir)) diff --git a/cpp/src/IceDiscovery/Makefile b/cpp/src/IceDiscovery/Makefile index db632cfa43b..e1a2651c114 100644 --- a/cpp/src/IceDiscovery/Makefile +++ b/cpp/src/IceDiscovery/Makefile @@ -34,10 +34,12 @@ LINKWITH := -lIce -lIceUtil $(CXXLIBS) ifeq ($(STATICLIBS),yes) $(libdir)/$(LIBNAME): $(OBJS) + @mkdir -p $(dir $@) rm -f $@ $(call mklib,$@,$(OBJS)) else $(libdir)/$(LIBFILENAME): $(OBJS) + @mkdir -p $(dir $@) rm -f $@ $(call mkshlib,$@,$(SONAME),$(OBJS),$(LINKWITH)) @@ -46,6 +48,7 @@ $(libdir)/$(SONAME): $(libdir)/$(LIBFILENAME) ln -s $(LIBFILENAME) $@ $(libdir)$(cpp11libdirsuffix)/$(LIBNAME): $(libdir)/$(SONAME) + @mkdir -p $(libdir)$(cpp11libdirsuffix) rm -f $@ ln -s $(cpp11sonamedir)$(SONAME) $@ endif diff --git a/cpp/src/IceGrid/Makefile b/cpp/src/IceGrid/Makefile index 7ff86f06937..1078db19f7a 100644 --- a/cpp/src/IceGrid/Makefile +++ b/cpp/src/IceGrid/Makefile @@ -96,7 +96,7 @@ OBJS = $(ADMIN_OBJS) \ SDIR = $(slicedir)/IceGrid -RPATH_DIR = $(LOADER_PATH)/../lib +RPATH_DIR = $(LOADER_PATH)/../$(libsubdir) include $(top_srcdir)/config/Make.rules diff --git a/cpp/src/IceGridLib/Makefile b/cpp/src/IceGridLib/Makefile index 00fba8870c8..bd5c1c34b37 100644 --- a/cpp/src/IceGridLib/Makefile +++ b/cpp/src/IceGridLib/Makefile @@ -45,6 +45,7 @@ SLICE2CPPFLAGS := --checksum --ice --include-dir IceGrid --dll-export ICE_GRID_ LINKWITH := -lGlacier2 $(BZIP2_RPATH_LINK) -lIce -lIceUtil $(libdir)/$(LIBFILENAME): $(OBJS) + @mkdir -p $(dir $@) rm -f $@ $(call mkshlib,$@,$(SONAME),$(OBJS),$(LINKWITH)) @@ -53,6 +54,7 @@ $(libdir)/$(SONAME): $(libdir)/$(LIBFILENAME) ln -s $(LIBFILENAME) $@ $(libdir)$(cpp11libdirsuffix)/$(LIBNAME): $(libdir)/$(SONAME) + @mkdir -p $(libdir)$(cpp11libdirsuffix) rm -f $@ ln -s $(cpp11sonamedir)$(SONAME) $@ diff --git a/cpp/src/IcePatch2/Makefile b/cpp/src/IcePatch2/Makefile index 0f98285f0a2..561db91da8e 100644 --- a/cpp/src/IcePatch2/Makefile +++ b/cpp/src/IcePatch2/Makefile @@ -26,7 +26,7 @@ OBJS = $(SOBJS) \ $(COBJS) \ $(CALCOBJS) -RPATH_DIR = $(LOADER_PATH)/../lib +RPATH_DIR = $(LOADER_PATH)/../$(libsubdir) include $(top_srcdir)/config/Make.rules diff --git a/cpp/src/IcePatch2Lib/Makefile b/cpp/src/IcePatch2Lib/Makefile index 4a7b2c0d91b..fa6e700ec04 100644 --- a/cpp/src/IcePatch2Lib/Makefile +++ b/cpp/src/IcePatch2Lib/Makefile @@ -32,6 +32,7 @@ SLICE2CPPFLAGS := --ice --include-dir IcePatch2 --dll-export ICE_PATCH2_API $(SL LINKWITH := $(BZIP2_RPATH_LINK) -lIce -lIceUtil $(OPENSSL_LIBS) $(BZIP2_LIBS) $(libdir)/$(LIBFILENAME): $(OBJS) + @mkdir -p $(dir $@) rm -f $@ $(call mkshlib,$@,$(SONAME),$(OBJS),$(LINKWITH)) diff --git a/cpp/src/IceSSL/Makefile b/cpp/src/IceSSL/Makefile index 8f4a27549c2..c06d4dfb6a0 100644 --- a/cpp/src/IceSSL/Makefile +++ b/cpp/src/IceSSL/Makefile @@ -59,10 +59,12 @@ LINKWITH := $(BZIP2_RPATH_LINK) -lIce -lIceUtil $(SSL_OS_LIBS) $(CXXLIBS) ifeq ($(STATICLIBS),yes) $(libdir)/$(LIBNAME): $(OBJS) + @mkdir -p $(dir $@) rm -f $@ $(call mklib,$@,$(OBJS)) else $(libdir)/$(LIBFILENAME): $(OBJS) + @mkdir -p $(dir $@) rm -f $@ $(call mkshlib,$@,$(SONAME),$(OBJS),$(LINKWITH)) @@ -71,6 +73,7 @@ $(libdir)/$(SONAME): $(libdir)/$(LIBFILENAME) ln -s $(LIBFILENAME) $@ $(libdir)$(cpp11libdirsuffix)/$(LIBNAME): $(libdir)/$(SONAME) + @mkdir -p $(libdir)$(cpp11libdirsuffix) rm -f $@ ln -s $(cpp11sonamedir)$(SONAME) $@ endif diff --git a/cpp/src/IceStorm/Makefile b/cpp/src/IceStorm/Makefile index 03f056c7f18..da76317f5ed 100644 --- a/cpp/src/IceStorm/Makefile +++ b/cpp/src/IceStorm/Makefile @@ -62,7 +62,7 @@ OBJS = $(LIB_OBJS) \ $(AOBJS) \ $(MOBJS) -RPATH_DIR = $(LOADER_PATH)/../lib +RPATH_DIR = $(LOADER_PATH)/../$(libsubdir) SLICE2FREEZECMD = $(SLICE2FREEZE) -I../.. --ice --include-dir IceStorm $(ICECPPFLAGS) @@ -74,6 +74,7 @@ SLICE2CPPFLAGS := --ice --include-dir IceStorm $(SLICE2CPPFLAGS) LINKWITH := $(BZIP2_RPATH_LINK) -lIceStorm -lIceGrid -lGlacier2 -lFreeze -lIceBox -lIce -lIceUtil $(libdir)/$(LIBFILENAME): $(LIB_OBJS) + @mkdir -p $(dir $@) rm -f $@ $(call mkshlib,$@,$(SONAME),$(LIB_OBJS),$(LINKWITH)) @@ -82,6 +83,7 @@ $(libdir)/$(SONAME): $(libdir)/$(LIBFILENAME) ln -s $(LIBFILENAME) $@ $(libdir)$(cpp11libdirsuffix)/$(LIBNAME): $(libdir)/$(SONAME) + @mkdir -p $(libdir)$(cpp11libdirsuffix) rm -f $@ ln -s $(cpp11sonamedir)$(SONAME) $@ diff --git a/cpp/src/IceStormLib/Makefile b/cpp/src/IceStormLib/Makefile index 042e317556e..687050759d2 100644 --- a/cpp/src/IceStormLib/Makefile +++ b/cpp/src/IceStormLib/Makefile @@ -31,6 +31,7 @@ SLICE2CPPFLAGS := --ice --include-dir IceStorm --checksum --dll-export ICE_STORM LINKWITH := $(BZIP2_RPATH_LINK) -lIce -lIceUtil $(libdir)/$(LIBFILENAME): $(OBJS) + @mkdir -p $(dir $@) rm -f $@ $(call mkshlib,$@,$(SONAME),$(OBJS),$(LINKWITH)) @@ -39,6 +40,7 @@ $(libdir)/$(SONAME): $(libdir)/$(LIBFILENAME) ln -s $(LIBFILENAME) $@ $(libdir)$(cpp11libdirsuffix)/$(LIBNAME): $(libdir)/$(SONAME) + @mkdir -p $(libdir)$(cpp11libdirsuffix) rm -f $@ ln -s $(cpp11sonamedir)$(SONAME) $@ diff --git a/cpp/src/IceUtil/Makefile b/cpp/src/IceUtil/Makefile index 05656b1d7bd..69a91347364 100644 --- a/cpp/src/IceUtil/Makefile +++ b/cpp/src/IceUtil/Makefile @@ -45,10 +45,12 @@ LINKWITH := $(ICEUTIL_OS_LIBS) ifeq ($(STATICLIBS),yes) $(libdir)/$(LIBNAME): $(OBJS) + @mkdir -p $(dir $@) rm -f $@ $(call mklib,$@,$(OBJS)) else $(libdir)/$(LIBFILENAME): $(OBJS) + @mkdir -p $(dir $@) rm -f $@ $(call mkshlib,$@,$(SONAME),$(OBJS),$(LINKWITH)) @@ -57,6 +59,7 @@ $(libdir)/$(SONAME): $(libdir)/$(LIBFILENAME) ln -s $(LIBFILENAME) $@ $(libdir)$(cpp11libdirsuffix)/$(LIBNAME): $(libdir)/$(SONAME) + @mkdir -p $(libdir)$(cpp11libdirsuffix) rm -f $@ ln -s $(cpp11sonamedir)$(SONAME) $@ endif diff --git a/cpp/src/IceXML/Makefile b/cpp/src/IceXML/Makefile index d0cbef06a1d..86d6f6a599e 100644 --- a/cpp/src/IceXML/Makefile +++ b/cpp/src/IceXML/Makefile @@ -24,6 +24,7 @@ CPPFLAGS := -I.. $(CPPFLAGS) -DICE_XML_API_EXPORTS $(EXPAT_FLAGS) LINKWITH := -lIceUtil $(EXPAT_LIBS) $(libdir)/$(LIBFILENAME): $(OBJS) + @mkdir -p $(dir $@) rm -f $@ $(call mkshlib,$@,$(SONAME),$(OBJS),$(LINKWITH)) @@ -32,6 +33,7 @@ $(libdir)/$(SONAME): $(libdir)/$(LIBFILENAME) ln -s $(LIBFILENAME) $@ $(libdir)$(cpp11libdirsuffix)/$(LIBNAME): $(libdir)/$(SONAME) + @mkdir -p $(libdir)$(cpp11libdirsuffix) rm -f $@ ln -s $(cpp11sonamedir)$(SONAME) $@ diff --git a/cpp/src/Slice/Makefile b/cpp/src/Slice/Makefile index bc9537cca4d..7984f5ee64b 100644 --- a/cpp/src/Slice/Makefile +++ b/cpp/src/Slice/Makefile @@ -40,10 +40,12 @@ BISONFLAGS := --name-prefix "slice_" $(BISONFLAGS) LINKWITH := $(BASELIBS) $(MCPP_LIBS) ifeq ($(STATICLIBS),yes) $(libdir)/$(LIBNAME): $(OBJS) + @mkdir -p $(dir $@) rm -f $@ $(call mklib,$@,$(OBJS)) else $(libdir)/$(LIBFILENAME): $(OBJS) + @mkdir -p $(dir $@) rm -f $@ $(call mkshlib,$@,$(SONAME),$(OBJS),$(LINKWITH)) @@ -52,6 +54,7 @@ $(libdir)/$(SONAME): $(libdir)/$(LIBFILENAME) ln -s $(LIBFILENAME) $@ $(libdir)$(cpp11libdirsuffix)/$(LIBNAME): $(libdir)/$(SONAME) + @mkdir -p $(libdir)$(cpp11libdirsuffix) rm -f $@ ln -s $(cpp11sonamedir)$(SONAME) $@ diff --git a/cpp/src/slice2confluence/Makefile b/cpp/src/slice2confluence/Makefile index 5ad81d6a5e3..577af8ca124 100644 --- a/cpp/src/slice2confluence/Makefile +++ b/cpp/src/slice2confluence/Makefile @@ -17,7 +17,7 @@ OBJS = ConfluenceOutput.o \ Gen.o \ Main.o -RPATH_DIR = $(LOADER_PATH)/../lib +RPATH_DIR = $(LOADER_PATH)/../$(libsubdir) include $(top_srcdir)/config/Make.rules diff --git a/cpp/src/slice2cpp/Makefile b/cpp/src/slice2cpp/Makefile index fbc5f7430df..fa5112ed87f 100644 --- a/cpp/src/slice2cpp/Makefile +++ b/cpp/src/slice2cpp/Makefile @@ -16,7 +16,7 @@ TARGETS = $(NAME) OBJS = Gen.o \ Main.o -RPATH_DIR = $(LOADER_PATH)/../lib +RPATH_DIR = $(LOADER_PATH)/../$(libsubdir) include $(top_srcdir)/config/Make.rules diff --git a/cpp/src/slice2cs/Makefile b/cpp/src/slice2cs/Makefile index 38ff24ad63f..0c8f1067c7c 100644 --- a/cpp/src/slice2cs/Makefile +++ b/cpp/src/slice2cs/Makefile @@ -16,7 +16,7 @@ TARGETS = $(NAME) OBJS = Gen.o \ Main.o -RPATH_DIR = $(LOADER_PATH)/../lib +RPATH_DIR = $(LOADER_PATH)/../$(libsubdir) include $(top_srcdir)/config/Make.rules diff --git a/cpp/src/slice2freeze/Makefile b/cpp/src/slice2freeze/Makefile index 437127d8768..e5c304aa616 100644 --- a/cpp/src/slice2freeze/Makefile +++ b/cpp/src/slice2freeze/Makefile @@ -15,7 +15,7 @@ TARGETS = $(NAME) OBJS = Main.o -RPATH_DIR = $(LOADER_PATH)/../lib +RPATH_DIR = $(LOADER_PATH)/../$(libsubdir) include $(top_srcdir)/config/Make.rules diff --git a/cpp/src/slice2freezej/Makefile b/cpp/src/slice2freezej/Makefile index a15b090fc22..706c41d6971 100644 --- a/cpp/src/slice2freezej/Makefile +++ b/cpp/src/slice2freezej/Makefile @@ -15,7 +15,7 @@ TARGETS = $(NAME) OBJS = Main.o -RPATH_DIR = $(LOADER_PATH)/../lib +RPATH_DIR = $(LOADER_PATH)/../$(libsubdir) include $(top_srcdir)/config/Make.rules diff --git a/cpp/src/slice2html/Makefile b/cpp/src/slice2html/Makefile index 9e6fa3afe31..003a6a082fb 100644 --- a/cpp/src/slice2html/Makefile +++ b/cpp/src/slice2html/Makefile @@ -16,7 +16,7 @@ TARGETS = $(NAME) OBJS = Gen.o \ Main.o -RPATH_DIR = $(LOADER_PATH)/../lib +RPATH_DIR = $(LOADER_PATH)/../$(libsubdir) include $(top_srcdir)/config/Make.rules diff --git a/cpp/src/slice2java/Makefile b/cpp/src/slice2java/Makefile index 80aef0db207..28412cc394d 100644 --- a/cpp/src/slice2java/Makefile +++ b/cpp/src/slice2java/Makefile @@ -16,7 +16,7 @@ TARGETS = $(NAME) OBJS = Gen.o \ Main.o -RPATH_DIR = $(LOADER_PATH)/../lib +RPATH_DIR = $(LOADER_PATH)/../$(libsubdir) include $(top_srcdir)/config/Make.rules diff --git a/cpp/src/slice2js/Makefile b/cpp/src/slice2js/Makefile index 7bbac96602b..7705e3faf0d 100644 --- a/cpp/src/slice2js/Makefile +++ b/cpp/src/slice2js/Makefile @@ -17,7 +17,7 @@ OBJS = Gen.o \ JsUtil.o \ Main.o -RPATH_DIR = $(LOADER_PATH)/../lib +RPATH_DIR = $(LOADER_PATH)/../$(libsubdir) include $(top_srcdir)/config/Make.rules diff --git a/cpp/src/slice2php/Makefile b/cpp/src/slice2php/Makefile index fb119c74be1..c3cb3cad72d 100644 --- a/cpp/src/slice2php/Makefile +++ b/cpp/src/slice2php/Makefile @@ -15,7 +15,7 @@ TARGETS = $(NAME) OBJS = Main.o -RPATH_DIR = $(LOADER_PATH)/../lib +RPATH_DIR = $(LOADER_PATH)/../$(libsubdir) include $(top_srcdir)/config/Make.rules diff --git a/cpp/src/slice2py/Makefile b/cpp/src/slice2py/Makefile index 75f8d6ebbbe..bf7e2e83d9b 100644 --- a/cpp/src/slice2py/Makefile +++ b/cpp/src/slice2py/Makefile @@ -15,7 +15,7 @@ TARGETS = $(NAME) OBJS = Main.o -RPATH_DIR = $(LOADER_PATH)/../lib +RPATH_DIR = $(LOADER_PATH)/../$(libsubdir) include $(top_srcdir)/config/Make.rules diff --git a/cpp/src/slice2rb/Makefile b/cpp/src/slice2rb/Makefile index 37f39017927..080e386a6ca 100644 --- a/cpp/src/slice2rb/Makefile +++ b/cpp/src/slice2rb/Makefile @@ -15,7 +15,7 @@ TARGETS = $(NAME) OBJS = Main.o -RPATH_DIR = $(LOADER_PATH)/../lib +RPATH_DIR = $(LOADER_PATH)/../$(libsubdir) include $(top_srcdir)/config/Make.rules diff --git a/cpp/test/IceGrid/admin/Makefile b/cpp/test/IceGrid/admin/Makefile index c396c52a61d..fffc48c6e26 100644 --- a/cpp/test/IceGrid/admin/Makefile +++ b/cpp/test/IceGrid/admin/Makefile @@ -19,7 +19,7 @@ include $(top_srcdir)/config/Make.rules $(SERVER): $(OBJS) rm -f $@ - $(CXX) $(LDFLAGS) -o $@ $(OBJS) $(LIBS) + $(CXX) $(LDFLAGS) $(LDEXEFLAGS) -o $@ $(OBJS) $(LIBS) clean:: -rm -rf db/node db/registry db/replica-* diff --git a/cpp/test/IceGrid/allocation/Makefile b/cpp/test/IceGrid/allocation/Makefile index bb081093097..6eb735ec10b 100644 --- a/cpp/test/IceGrid/allocation/Makefile +++ b/cpp/test/IceGrid/allocation/Makefile @@ -38,15 +38,15 @@ LINKWITH := $(BZIP2_RPATH_LINK) -lIce -lIceUtil $(CLIENT): $(COBJS) rm -f $@ - $(CXX) $(LDFLAGS) -o $@ $(COBJS) -lIceGrid -lGlacier2 $(LIBS) + $(CXX) $(LDFLAGS) $(LDEXEFLAGS) -o $@ $(COBJS) -lIceGrid -lGlacier2 $(LIBS) $(SERVER): $(SOBJS) rm -f $@ - $(CXX) $(LDFLAGS) -o $@ $(SOBJS) $(LIBS) + $(CXX) $(LDFLAGS) $(LDEXEFLAGS) -o $@ $(SOBJS) $(LIBS) $(VERIFIER): $(VOBJS) rm -f $@ - $(CXX) $(LDFLAGS) -o $@ $(VOBJS) -lGlacier2 $(LIBS) + $(CXX) $(LDFLAGS) $(LDEXEFLAGS) -o $@ $(VOBJS) -lGlacier2 $(LIBS) clean:: -rm -rf db/node db/registry db/node-1 db/node-2 db/replica-* diff --git a/cpp/test/IceGrid/noRestartUpdate/AllTests.cpp b/cpp/test/IceGrid/noRestartUpdate/AllTests.cpp index b8b0248563a..683bc6954d9 100644 --- a/cpp/test/IceGrid/noRestartUpdate/AllTests.cpp +++ b/cpp/test/IceGrid/noRestartUpdate/AllTests.cpp @@ -527,7 +527,7 @@ allTests(const Ice::CommunicatorPtr& communicator) addProperty(service, "Ice.Warn.UnknownProperties", "0"); //addProperty(service, "Ice.Trace.Admin.Properties", "1"); service->name = "Service1"; - service->entry = "TestService:create"; + service->entry = "./TestService:create"; adapter = AdapterDescriptor(); adapter.name = "${service}"; adapter.id = "${server}.${service}"; @@ -539,17 +539,29 @@ allTests(const Ice::CommunicatorPtr& communicator) adapter.objects.push_back(object); service->adapters.push_back(adapter); + string iceboxExe = "/icebox"; +#if defined(__linux) +# if defined(__i386) + iceboxExe += "32"; +# endif +# if defined(ICE_CPP11) + iceboxExe += "++11"; +# endif +#endif + +#if defined(_WIN32) && !defined(NDEBUG) + iceboxExe += "d"; +#endif + IceBoxDescriptorPtr icebox = new IceBoxDescriptor(); icebox->id = "IceBox"; #if defined(__APPLE__) && defined(__i386) icebox->exe = "arch"; icebox->options.push_back("-i386"); - icebox->options.push_back(properties->getProperty("IceBinDir") + "/icebox"); -#elif defined(NDEBUG) || !defined(_WIN32) - icebox->exe = properties->getProperty("IceBinDir") + "/icebox"; + icebox->options.push_back(properties->getProperty("IceBinDir") + iceboxExe;); #else - icebox->exe = properties->getProperty("IceBinDir") + "/iceboxd"; -#endif + icebox->exe = properties->getProperty("IceBinDir") + iceboxExe; +#endif icebox->activation = "on-demand"; icebox->applicationDistrib = false; icebox->allocatable = false; diff --git a/cpp/test/IceGrid/replicaGroup/AllTests.cpp b/cpp/test/IceGrid/replicaGroup/AllTests.cpp index 51162ac6839..97d85e946d7 100644 --- a/cpp/test/IceGrid/replicaGroup/AllTests.cpp +++ b/cpp/test/IceGrid/replicaGroup/AllTests.cpp @@ -55,8 +55,9 @@ instantiateServer(const AdminPrx& admin, const string& templ, const string& node catch(const NodeUnreachableException&) { } - catch(const Ice::Exception&) + catch(const Ice::Exception& ex) { + cerr << ex << endl; test(false); } } diff --git a/cpp/test/IceGrid/session/Makefile b/cpp/test/IceGrid/session/Makefile index 33c3648b8db..92cbb969e72 100644 --- a/cpp/test/IceGrid/session/Makefile +++ b/cpp/test/IceGrid/session/Makefile @@ -47,7 +47,7 @@ $(VERIFIER): $(VOBJS) $(SERVER): $(SOBJS) rm -f $@ - $(CXX) $(LDFLAGS) -o $@ $(SOBJS) -lGlacier2 $(ICESSL_LIBS) $(LIBS) + $(CXX) $(LDFLAGS) $(LDEXEFLAGS) -o $@ $(SOBJS) -lGlacier2 $(ICESSL_LIBS) $(LIBS) clean:: -rm -rf db/node db/registry db/node-1 db/replica-* diff --git a/cpp/test/IceGrid/update/Makefile b/cpp/test/IceGrid/update/Makefile index 9e6bd9ea385..d900161ad44 100644 --- a/cpp/test/IceGrid/update/Makefile +++ b/cpp/test/IceGrid/update/Makefile @@ -40,7 +40,7 @@ $(CLIENT): $(COBJS) $(SERVER): $(SOBJS) rm -f $@ - $(CXX) $(LDFLAGS) -o $@ $(SOBJS) $(LIBS) + $(CXX) $(LDFLAGS) $(LDEXEFLAGS) -o $@ $(SOBJS) $(LIBS) clean:: -rm -rf db/node db/registry db/node-1 db/node-2 db/replica-* |