Archived
This forum has been archived. Please start a new discussion on GitHub.
Trouble building samples
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:
ilukhin@ilukhin-vm:~/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)
ilukhin@ilukhin-vm:~/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
-
Hi Dmitry,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.
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.zipilukhin@ilukhin-vm:~/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 10 -
In Windows case, the parent directory contains config/Make.rules as i downloaded and unpacked samples as whole. In Linux case, what packet could you suggest for me? I am using x86 Ubuntu 10.04 LTS (Lucid Lynx) + Gnome 2.30.2 build 25.06.2010
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:C:\soft\Ice-3.4.1.junction\demo\Glacier2>mkdir $(top_srcdir) C:\soft\Ice-3.4.1.junction\demo\Glacier2>mkdir $(top_srcdir)\config C:\soft\Ice-3.4.1.junction\demo\Glacier2>xcopy ..\..\config $(top_srcdir)\config /E ..\..\config\build.properties ..\..\config\common.xml ..\..\config\convertssl.py ..\..\config\glacier2router.cfg ..\..\config\icegrid-slice.3.1.ice.gz ..\..\config\icegrid-slice.3.2.ice.gz ..\..\config\icegrid-slice.3.3.ice.gz ..\..\config\icegridnode.cfg ..\..\config\icegridregistry.cfg ..\..\config\Make.common.rules ..\..\config\Make.rules ..\..\config\Make.rules.AIX ..\..\config\Make.rules.cs ..\..\config\Make.rules.Darwin ..\..\config\Make.rules.FreeBSD ..\..\config\Make.rules.HP-UX ..\..\config\Make.rules.Linux ..\..\config\Make.rules.OSF1 ..\..\config\Make.rules.php ..\..\config\Make.rules.SunOS ..\..\config\templates.xml ..\..\config\upgradeicegrid.py Скопировано файлов: 22. 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. $(top_srcdir)/config/Make.rules(13) : fatal error U1036: syntax error : too many names to left of '=' Stop.
Seems my nmake cannot understand Make.rules syntax. Is it's version ok?C:\soft\Ice-3.4.1.junction\demo\Glacier2\$(top_srcdir)\config>nmake /? Microsoft (R) Program Maintenance Utility Version 9.00.30729.01 Copyright (C) Microsoft Corporation. All rights reserved. Usage: ...
0 -
Sorry, i have missed that your command line is wrong. you should use
nmake /f Makefile.mak
Notnmake
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.LINUX0 -
It is no Makefile.mak or INSTALL.LINUX in Ice-3.4.1-demos.tar.gz
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?0 -
You are right Ice-3.4.1-demos.tar.gz is only for RPM installations, for windows use demos.zip that is installed in Ice installation directory, or if you are using a source distribution demos are include with the sources. Ice-3.4.1/cpp/demo
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
Jose0 -
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?
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.0 -
Ok i've found demos.zip (before read yor reply:) ) and tried demos from there.
C:\Projects\Samples\Ice-3.4.1-demos\demo>nmake -f Makefile.mak Microsoft (R) Program Maintenance Utility Version 9.00.30729.01 Copyright (C) Microsoft Corporation. All rights reserved. ../config/Make.rules.mak(53) : fatal error U1050: Please set CPP_COMPILER to VC90, VC90_EXPRESS, VC100, VC100_EXPRESS, or BCC2010 Stop.
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 machine0 -
Glad you build the demos with the add-in, that is recommended way to build demos with Visual Studio 2008.
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.0 -
From what you wrote I suspect you did not read the directions that accompany the Ice Windows distribution. In the main distribution check out README.txt:
======================================================================
8. Demos
======================================================================
This distribution includes an archive named demos.zip that contains
sample programs for the supported languages. To build and run the
demos, you must extract this archive in the location of your choice
and follow the instructions in the README.txt file contained in the
archive.
Note that we do not recommend extracting the demos.zip archive into
the "\Program Files" or "\Program Files (x86)" directories on Windows
Vista or later. Such operating systems use "virtualization" to
protect the integrity of files in these directories, which makes it
cumbersome to experiment with the sample programs (for example, to
edit Ice configuration files).
Once you unzip the demos.zip then you need to read the README that accompanies the demos.
======================================================================
3. Building and running the C++ demos (Visual C++ 2008SP1 or 2010
Express)
======================================================================
The C++ demos are in the demo directory.
Visual C++ Express does not support the Ice Visual Studio extension,
therefore you must use NMAKE to build the demos.
To build the C++ demos, open a "Visual Studio Command Prompt" window.
If you installed Ice in a non-default location, set ICE_HOME as shown
below:
> set ICE_HOME=<Ice installation root directory>
Change to the demo directory and run the following commands to build
the demos:
> set CPP_COMPILER=VC90_EXPRESS # (For Visual C++ 2008SP1)
> set CPP_COMPILER=VC100_EXPRESS # (For Visual C++ 2010)
> nmake /f Makefile.mak
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.0 -
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.0 -
Hi,
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.openssl-0.9.8n # ./config --prefix=/opt/openssl && make && make install
openssl-0.9.8n # ls /opt/openssl
bin include lib ssl
sirius openssl-0.9.8n # ls /opt/openssl/lib/
engines libcrypto.a libssl.a pkgconfig
That being said you are probably fine using the openssl-dev package that comes with ubuntu.0 -
Hi again,
--prefix option helped me out, thanks! Now lib/ and lib*.a all in place and Ice compilation continue.
Next trouble is when building Ice:
ilukhin@ilukhin-vm:~/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?0 -
Wouldn't it be easier for you to use a supported Linux version RHEL or SLES? See ZeroC - Download for details. Then you don't have to build anything since we provide all of the necessary RPMs for you.0
-
Wouldn't it be easier for you to use a supported Linux version RHEL or SLES? See ZeroC - Download for details. Then you don't have to build anything since we provide all of the necessary RPMs for you.
matthew what package would you recommend to download and install for my x86 Ubuntu 10.04 LTS (Lucid Lynx) ?0 -
Our recommendation would be to use one of our supported Linux platforms, until you have more experience with both Linux and Ice. As for the Berkeley DB build error that you are experiencing, I'm afraid this is not the right forum. Instead, I would suggest to post this on the appropriate Ubuntu and Berkeley DB mailing lists or forums.0
-
Note that if you were using a supported linux platform you wouldn't need to build Berkeley DB at all (nor any of the other third party libraries). They are either part of the operating system and installed either by default, or via the operating system installation utilities such as yum under RHEL, or we supply RPMs for them.
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.0 -
Like Matthew and Marc suggested, the simplest is to start with a supported platform. You could for example use CentOS 5.x (a well-known rebuild of Red Hat Enterprise Linux 5.x), together with the Ice RPMs for RHEL 5.
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,
Bernard0 -
Guys thanks for support, everything is ok now. I've found ICE 3.3 distribution in apt-get repository. Also, there was libdb-dev that was making troubles.0