Build ICE 3.7 cpp from source on Linux errors

Hi,
I am trying to build Ice from source on a Suse OSL 42.3. I changed into the config directory, set the path for the mcpp library. I compiled a static mcpp library myself. I uncommented "#MCPP_HOME ?= /opt/mcpp" and filled in the path. I ran "make" it starts to compile but unfortunately got this error message:
../config/Make.rules:173: *** Recursive variable 'mcpp_installdir' references itself (eventually). Stop.
The lines in queston of Make.rules are:
163 #
164 # Support for 3rd party libraries
165 #
166 thirdparties := mcpp iconv expat bz2 lmdb
167 mcpp_home := $(MCPP_HOME)
168 iconv_home := $(ICONV_HOME)
169 expat_home := $(EXPAT_HOME)
170 bz2_home := $(BZ2_HOME)
171 lmdb_home := $(LMDB_HOME)
172
173 $(foreach l,$(thirdparties),$(eval $(call make-lib,$l)))
What am I doing wrong? Can you help me?
Thanks in advance!
Answers
Hi,
Which gmake version do you have installed on this platform? We don't get this problem with SLES12. As a workaround, instead of setting MCPP_HOME, you could try calling make as follow:
Cheers,
Benoit.
Hey Benoit,
thanks for your reply! The current version is:
GNU Make 4.0 Built for x86_64-unknown-linux-gnu
This time I try to compile ice on Ubuntu 16.04 LTS for comparison in order to find my misunderstanding. Again I cloned the ice and the mcpp zeroc fork. I compiled mcpp and installed it with 'make install'.
I updated the config/Make.rules as follows:
In /opt/mcpp-2.7.2/lib/x86_64-linux-gnu there's definitely a libmcpp.a present.
When I change in the ice/cpp subfolder and run make the script complains like that:
Second issue: if I run make clean, the script confirms that it performed a clean on the subfolders. But there are still object files present in the src/source tree.
I clearly misunderstood something here - probably something basic...
Maybe I didn't say it too directly. Obviously the script does not accept an archive. Is this intended to do so? I am a little bit puzzled because the mcpp zeroc fork outputs a static library by default and the install script copies this archive without headers to /opt/mcpp-2.7.2/lib/x86_64-linux-gnu.
If you compile the mcpp library as shared object and point the script to a folder containing the shared object the script runs with Ubuntu. Fortunately it's very easy to compile the mcpp as shared object. I wrote a CMakeList.txt that compiles both static and shared:
To use that install cmake, copy that script into the sources of mcpp. Then
The result is a shared and a static library
For some reason the accepted answer has disappeared...
Hi Michael,
You should set
MCPP_HOME
to the path of the mcpp installation directory, not the path of thelib
sub-directory. So if you installed mcpp in/opt/mcpp-2.7.2
, you should setMCPP_HOME
to/opt/mcpp-2.7.2
.If it still doesn't work with this change, please run
make V=1
, this will print the detail of the build commands.You can use
make distclean
to fully clean the build tree.make clean
cleans the build tree for the default platform/configuration (amd64/shared on Ubuntu), Slice translators are built with the static configuration so they aren't cleaned unless you runmake CONFIGS=static clean
.Cheers,
Benoit.