Trouble building samples

in Help Center
Under Windows XP prof SP3 and Visual Studio 2008, I downloaded and installed Ice-3.4.1.msi and IceVisualStudioAddin-3.4.1.2.msi. Now trying to build samples and getting this:
Moreover, I used my Ubuntu machine and tried same thing there:
C:\soft\Ice-3.4.1.junction\demo\Glacier2>set ic ICE_HOME=C:\soft\Ice-3.4.1.junction C:\soft\Ice-3.4.1.junction\demo\Glacier2>nmake Microsoft (R) Program Maintenance Utility Version 9.00.30729.01 Copyright (C) Microsoft Corporation. All rights reserved. makefile(12) : fatal error U1052: file '$(top_srcdir)/config/Make.rules' not found Stop.Note that ICE_HOME is set. Samples installed into ICE_HOME. Same thing was when samples was in separate folder.
Moreover, I used my Ubuntu machine and tried same thing there:
[email protected]:~/workspace/Samples/Ice-3.4.1-demos/demo/Glacier2$ make making all in callback make[1]: Вход в каталог `/home/ilukhin/workspace/Samples/Ice-3.4.1-demos/demo/Glacier2/callback' make[1]: *** Нет правила для сборки цели `/usr/include/Ice/EndpointF.h', требуемой для `Callback.o'. Останов. make[1]: Выход из каталога `/home/ilukhin/workspace/Samples/Ice-3.4.1-demos/demo/Glacier2/callback' make: *** [all] Ошибка 1(translated from my locale)
[email protected]:~/workspace/Samples/Ice-3.4.1-demos/demo/Glacier2$ make making all in callback make[1]: Entering `/home/ilukhin/workspace/Samples/Ice-3.4.1-demos/demo/Glacier2/callback' make[1]: *** No rule to build target `/usr/include/Ice/EndpointF.h', required for `Callback.o'. Stop. make[1]: Exiting `/home/ilukhin/workspace/Samples/Ice-3.4.1-demos/demo/Glacier2/callback' make: *** [all] Error 1Please help me to build and run samples (i need chat app or something). Thanks!
0
Comments
Seems that you have copy demo directory to other location? you need the Ice-3.4.1-demo directory, the parent directory contains config/Make.rules, which isn't found in your case.
You can also build the demos with the add-in using the Visual Studio solution, for that you should use the demos.zip package that is installed with Ice binary distribution. If you have installed it in the standard location C:\Program Files\ZeroC\Ice-3.4.1\demos.zip
Seems that you have not installed the Ice C++ headers, is easy to get started on a supported platform using binary packages provided in our Download page.
Thanks!
UPD: In Windows, i tried to copy Ice-3.4.1.junction/config folder into parent of where i build, i.e. Ice-3.4.1.junction\demo\ and Ice-3.4.1.junction\demo\Glacier2\ with no effect
And finally, i've created folder it wants:
Seems my nmake cannot understand Make.rules syntax. Is it's version ok?
Not
This try to use Makefile that is for NIX platforms, Makefile.mak is for Windows platforms.
Note, that you don't need to copy or create any directory.
If you use Ice-3.4.1-demos.tar.gz, uncompress the archive, change to demo sub directory and use nmake /f Makefile.mak to build.
We don't provide Ubuntu packages, if you want to use Ubuntu you need to install it from sources, should be easy to build from sources following instructions included in INSTALL.LINUX
Also, in Linux case, i need sources themselves, C++ headers in my case. Where can i find them? It could be a package for some Linux platform. Is it Red Hat Enterprise Linux 5.4 x86_64 RPMs or SuSE Linux Enterprise Server 11 i586 RPMs? Maybe, i should try yum repository package?
INSTALL.LINUX is part of source distributions Ice-3.4.1.tar.gz and contains instructions to install Ice on linux from sources. Look in cpp subdirectory
Ice-3.4.1/cpp/INSTALL.LINUX
Jose
The headers are part of the source distribution, if you install Ice from sources headers are always installed, for RPM installs is part of ice-c++-devel package.
Using nmake, demos still cannot be built. By the way, demo.sln found there can be opened and built in Visual Studio.
Its strange to find these troubles in a mature project... Anyway, thanks for support! Tomorrow i will try to build Ice from sources on Linux machine
The Makefiles are for compilers that aren't supported by the add-in, VS express editions, and BCC.
In any case you can build with Visual Studio 2008 an nmake setting CPP_COMPILER to VC90, that is commented in the source distribution cpp/INSTALL.WINDOWS.
Sorry for the troubles but the fact that you were using the RPM demos under windows has confused me.
Once you unzip the demos.zip then you need to read the README that accompanies the demos.
I'm afraid that if you don't read the documentation that accompanies the Linux distribution then you won't have much better luck building those demos either.
Building Ice from sources, i've unpacked and built these libraries:
bzip2-1.0.5.tar.gz
db-4.8.30.NC.tar.gz
expat-2.0.1.tar.gz
openssl-0.9.8n.tar.gz
mcpp-2.7.2.tar.gz (built and patched)
running ./configure;make;make install in each lib's folder. Then i've set up these lines in config/Make.rules:
BZIP2_HOME ?= /opt/bzip2-1.0.5
DB_HOME ?= /opt/db-4.8.30.NC
EXPAT_HOME ?= /opt/expat-2.0.1
OPENSSL_HOME ?= /opt/openssl-0.9.8n
MCPP_HOME ?= /opt/mcpp-2.7.2
and when i try to build Ice, i get this:
c++ -shared -Wl,--enable-new-dtags -Wl,-rpath,/opt/Ice-3.4/lib -rdynamic -Wall -D_REENTRANT -fPIC -g -L../../lib -o ../../lib/libIceSSL.so.3.4.1 -Wl,-h,libIceSSL.so.34 AcceptorI.o Certificate.o ConnectorI.o EndpointInfo.o ConnectionInfo.o EndpointI.o Instance.o PluginI.o TransceiverI.o Util.o RFC2253.o TrustManager.o -Wl,-rpath-link,/opt/bzip2-1.0.5/lib -lIce -lIceUtil -L/opt/openssl-0.9.8n/lib -lssl -lcrypto -lpthread -lrt
/usr/bin/ld: cannot find -lssl
It seems that "make" tool use value of OPENSSL_HOME variable and add "/lib" to it, so linker cannot find library libssl.a (actually, it located in /opt/openssl-0.9.8n, not in /opt/openssl-0.9.8n/lib). Obvious action is to move it to lib folder and continue. But, as noted XDM, i don't need to copy or create any directory - that means i've missed something in building process. I think same thing will occur with all these libs.
Please help.
Not sure how you manage to get libss.a in /opt/openssl, i just do a quick test, and in goes to the lib subdirectory.
That being said you are probably fine using the openssl-dev package that comes with ubuntu.
--prefix option helped me out, thanks! Now lib/ and lib*.a all in place and Ice compilation continue.
Next trouble is when building Ice:
[email protected]:~/workspace/Ice-3.4.1/cpp$ make
making all in config
....(successful log skipped)......
c++ -c -I.. -I../../include -DFREEZE_API_EXPORTS -I/usr/local/BerkeleyDB.4.8/include -Wall -D_REENTRANT -fPIC -g BackgroundSaveEvictorI.cpp
In file included from ../Freeze/TransactionI.h:15,
from ../Freeze/ObjectStore.h:18,
from ../Freeze/EvictorI.h:16,
from ../Freeze/BackgroundSaveEvictorI.h:13,
from BackgroundSaveEvictorI.cpp:10:
/usr/local/BerkeleyDB.4.8/include/db_cxx.h:59:22: error: iostream.h: No such file or directory
/usr/local/BerkeleyDB.4.8/include/db_cxx.h:60:23: error: exception.h: No such file or directory
Looking into Freeze/TransactionI.h:15, then in BerkeleyDB.4.8/include/db_cxx.h,
it seems that BerkeleyDB uses #include <iostream.h> and <exception.h> instead of <iostream> and <exception> by default, and needs HAVE_CXX_STDHEADERS to be defined to use correct notation.
Any ideas?
matthew what package would you recommend to download and install for my x86 Ubuntu 10.04 LTS (Lucid Lynx) ?
If you use a supported Linux distribution and you follow the directions then everything will work out of the box and you'll get solving your problems faster instead of messing around with building all sorts of packages.
Later, once you have more experience with Ice and Linux, you could also try Ice on a different Linux distribution.
If you want to build Ice from sources on this distribution, I would highly recommend NOT to blindly build all third-party dependencies. It's likely that you could (and should) use a number of packages provided with this distribution, such as bzip2, expat and openssl. You may need to build yourself:
- mcpp, because you need a recent version that incorporates a number of bug-fixes that we contributed
- Berkeley DB 4.8, because your distribution may include an older version of DB (and if so, be very careful to use the correct DB installation when building Ice)
Another option is to find a binary distribution for your distribution, contributed by a third-party. For example, Ubuntu is based on Debian, and there is a binary distribution for Debian maintained by Francisco Moya and Cleto Martin Angelina: see zeroc-ice - Debian NEW package overview
Unfortunately I don't know much about this distribution, in particular whether or not it's compatible with your Ubuntu version. The simplest / safest is definitely to use a distribution provided and supported by ZeroC.
Best regards,
Bernard