diff options
author | levine <levine@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1996-10-23 16:18:10 +0000 |
---|---|---|
committer | levine <levine@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1996-10-23 16:18:10 +0000 |
commit | 730cf9578352920167b8bdc816d90a3e5b242f0a (patch) | |
tree | da7e3b20667b4bf6af6a912305a82166d925abc0 /ACE-INSTALL.html | |
parent | cd755938747721a508099129566e90c38a51b870 (diff) | |
download | ATCD-730cf9578352920167b8bdc816d90a3e5b242f0a.tar.gz |
added file
Diffstat (limited to 'ACE-INSTALL.html')
-rw-r--r-- | ACE-INSTALL.html | 512 |
1 files changed, 512 insertions, 0 deletions
diff --git a/ACE-INSTALL.html b/ACE-INSTALL.html new file mode 100644 index 00000000000..c9f2ceae027 --- /dev/null +++ b/ACE-INSTALL.html @@ -0,0 +1,512 @@ +<HTML> +<!-- $Id$ --> + +<HEAD> +<TITLE>Installing ACE</TITLE> + +<BODY text = "#000000" +link="#000fff" +vlink="#ff0f0f" +bgcolor="#ffffff"> + +<HR> +<H3>Installation Notes for the ADAPTIVE Communication Environment (ACE)</H3> + +<H4>Synopsis</H4> + +The file explains how to build ACE on the various UNIX and Win32 +platforms that it has been ported to. Please make sure you read the +ACE <A HREF="ACE.FAQ.html">FAQ</A> before installing ACE. In +addition, please consult the <A HREF="ChangeLog">ChangeLog</A> file to +see whether any recent changes to the release will affect your code. + +<H4>Document Index</H4> + +<UL> +<LI><A HREF="#platforms">Supported Platforms and Compilers</A> +<LI><A HREF="#unix">Installation Process for UNIX</A> +<LI><A HREF="#win32">Installation Process for Win32</A> +<LI><A HREF="#advanced">Advanced Topics</A> +</UL> + +<P><HR><P> +<A NAME="platforms"> +<H3>Supported Platforms and Compilers</H3> + +The ADAPTIVE Communication Environment has been ported and tested +extensively on a wide range of C++ compilers and OS platforms. If you +have a problem compiling the ACE wrappers on the platforms shown below +please let me know and I'll try to fix it for you. + +<DL> +<DT> <B>Win32 (Windows NT and Windows '95) </B><P> + +<DD> All of ACE has been ported to the Win32 API (which includes + Windows NT and Windows '95). The entire release now + compiles using the Microsoft Visual C++ 4.0 compiler (the + 2.0 compiler should also work, but I haven't tested it + recently). ACE can be built as both a static and dynamic + library, using the Win32 installation process described + below. <P> + +<DT> <B> Sun OS 5.x/4.x (a.k.a. Solaris 2.x/1.x) using Sun CC 3.0.1, Sun + C++ 4.0.x, Centerline C++ 2.x, and GNU gcc 2.7.x. </B> <P> + +<DD> All the source code and tests should build and run without + any problems on the Solaris and SunOS platforms using the + Sun C++ compilers. <P> + +<DT> <B> Sun OS 4.1.x using Centerline C++ 2.x, Sun CC 3.x, and Lucid + Energize 3.2. </B> <P> + +<DD> Note that shared libraries do not interact very well with + Centerline C++ or Sun C++ on SunOS 4.1.x. This is due to + odd behavior of the SunOS 4.1.x linker, which (1) does not + properly call constructors of global objects within shared + libraries and (2) does not call the init() and fini() + functions in shared libraries, even though the manual claims + that these functions are called! In particular, this means + that the tests in the directory + $(WRAPPER_ROOT)/tests/Service_Configurator/IPC-tests/server/ + will not work for statically linked services... <P> + + Some versions of SunOS 4.1.x do not contain the + /usr/lib/libnsl.a library. This library seems to be + optional since System V Transport Layer Interface (TLI) + support is optional on SunOS 4.1.x (in contrast, it's the + "preferred" transport interface on Solaris). <P> + + The best work-around for now is probably to either add a + dummy libnsl.a in /lib (which may not be feasible) or simply + comment out the line: <P> + + LIBS += -lnsl <P> + + in the $WRAPPER_ROOT/include/makeinclude/wrapper_macros.GNU + file. Naturally, any programs (e.g., the TLI_SAP tests) + that use the TLI wrappers aren't going to work! <P> + + Note that on SunOS 4.x you may get warnings from the linker + that "archive has no table of contents; add one using + ranlib(1)" for certain libraries (e.g., libASX.a, + libThreads.a, and libSPIPE.a). This occurs since SunOS 4.x + does not support these features. <P> + +<DT> <B> AIX </B> <P> + +<DD> The ACE port to AIX assumes that the user has installed the + AIX patch containing the dl*() APIs. To use these APIs, IBM + has created a separate product (free to AIX licensees) + called shared library hookable symbols (or slhs/6000). If + you don't have this patch, the sv* commands for compiling + and linking will not be present on the system. <P> + +<DT> <B> Linux and SCO 4.2 </B> <P> + +<DD> ACE has been ported to <A +HREF="http://www.deltanet.com/users/slg/ACE">Linux</A> and SCO UNIX +using the GNU G++ + 2.7.2 compiler. <P> + +<DT> <B> SGI IRIX 5.x </B> <P> + +<DD> ACE builds fine using the SGI C++ and GNU GCC compilers for + IRIX 5.x. I haven't tried this on IRIX 6.x, but I assume + that will work too. If anyone can get ACE working with + IRIX 6.x pthreads please let me know.<P> + +<DT> <B> HP-UX 9.x and 10.x </B> <P> + +<DD> The current HP/UX C++ compiler is incredibly lame and has + problems compiling ACE templates and achieving template + closure. I've heard that the next release is better... + In the meantime, you might try using GNU GCC or SunC++ + on HP/UX. <P> + +<DT> <B> OSF/1 3.2 </B> <P> + +<DD> The current OSF/1 C++ 5.1 compiler is also rather poor and there + seems to be no way to build shared libraries with templates + on OSF/1. I've also heard that the new version of this + compiler (5.3) is better. Again, you might try GNU GCC. <P> + +<DT><B> UnixWare 2.01 </B> <P> +<DD> + Steve Huston <<A HREF="mailto:shuston@ultranet.com">shuston@ultranet.com</A>> + has ported ACE to work with UnixWare 2.01 and + its standard C++ compiler. +</DL> + +<DT><B>VxWorks</B> <P> +<DD> + <A HREF="http://www.cs.wustl.edu/~levine/">David Levine</A> <<A HREF="mailto:levine@cs.wustl.edu">levine@cs.wustl.edu</A>> has ported ACE to VxWorks 5.2 using the GreenHills 1.8.7 compiler. +</DL> + +<DT><B>MVS</B> <P> +<DD> + Chuck Gehr <<A HREF="mailto:gehr@sweng.stortek.com">gehr@sweng.stortek.com</A>> + has ported ACE to IBM MVS. +</DL> + +<HR> +<H4>Compiling ACE with GNU C++</H4> + +If you use the GNU GCC C++ compiler please note the following: <P> + +<UL> + <LI> Earlier versions of G++ may not compile certain + parts of ACE correctly due to compiler bugs. Please + upgrade to G++ 2.7.2 or greater. <P> + + <LI> Make sure to update your gcc "config.status" file - + this specifies whether your gcc install uses, for + example, Solaris's "/usr/ccs/bin" binary utils or + GNU binary utils. <P> +</UL> + +<P><HR><P> +<A NAME="unix"> +<H3>Installation Process for UNIX</H3> + +The installation process for installing ACE on UNIX is relatively +simple (the Windows NT installation process is different). Here's +what you need to do: <P> + +<OL> +<LI> Install GNU make 3.7 or greater on your system (available via + anonymous ftp from prep.ai.mit.edu in the pub/gnu directory). <P> + +<LI> Add an environment variable called WRAPPER_ROOT that contains the + name of the root of the directory where you keep the ACE wrapper + source tree. For example, in my .login file I have the following + entry: <P> + +<pre><code> +% setenv WRAPPER_ROOT /home/cs/faculty/schmidt/ACE_wrappers <P> +</pre></code> + + The ACE recursive Makefile system needs this information. <P> + +<LI> Edit the $WRAPPER_ROOT/ace/OS.h file to update things like default + hostname and port numbers you'd like the programs in the + $WRAPPER_ROOT/{apps,tests} directories to use by default. <P> + +<LI> Set the $WRAPPER_ROOT/ace/config.h file to point to the appropriate + platform/compiler-specific header configurations (such as + config-sunos5-sunc++-4.x.h). This file contains the #defines that + are used throughout ACE to indicate which features your system + supports (see the $WRAPPER_ROOT/ace/OS.h file for many + examples of how the ACE build configuration is affected by these + macro settings). <P> + + There are config files for most versions of UNIX. If there isn't a + version of this file that matches your platform/compiler, you'll + need to make one. Please send me email if you get it working so I + can add it to the master ACE release. <P> + +<LI> Set the $WRAPPER_ROOT/include/makeinclude/platform_macros.GNU file + to point to the appropriate platform/compiler-specific Makefile + configurations (e.g., platform_sunos5_sunc++.GNU). This file + contains the compiler and Makefile directives that are + platform/compiler-specific <P> + +<LI> Note that since ACE builds shared libraries, you'll need to set + LD_LIBRARY_PATH to whereever you put the binary version of the + libraries. For example, you probably want to do somethink like the + following <P> + +<pre><code> +% setenv LD_LIBRARY_PATH $WRAPPER_ROOT/ace:$LD_LIBRARY_PATH <P> +</pre></code> + +<LI> When all this is done, hopefully all you'll need to do is type:<P> + +<pre><code> +% make <P> +</pre></code> + + at the root of the ACE source tree. This will build the static and + shared object libraries and build the tests and the sample + applications. <P> +</OL> + +<P><HR><P> +<A NAME="win32"> +<H3>Installation Process for Windows NT and Windows '95 Static and Dynamic Libraries</H3> + +The installation process for NT is a bit different than UNIX. First, +I assume you're using MSVC++ 4.0(things are a little different for the +2.0 version...). <P> + +<UL> +<LI> <B>SET UP THE ACE FILES</B>. <P> + + Create a directory accessible via Windows NT (e.g., C:\ACE) and + copy all of ACE into it. This directory will be $WRAPPER_ROOT in + the following discussion. Then copy either config-win32-msvc4.0.h + or config-win32-msvc2.0.h (depending on your compiler of course) to + config.h. Note that files like ChangeLog may do strange things on + NT since they are symbolic links (which aren't supported under NT). <P> + + The easiest thing to do is just use the default ace.mpd and ace.mak + files distributed with the release. Open workspace ace.mpd to + build ACE as a DLL. This included project assumes that you have + set the "global" include path to include $WRAPPER_ROOT. This can + be done via the following MSDEV menu item: <P> + + Tools/Options/Directories/Show_Directories_For:Include_Files. <P> + + If you choose not to use the given project, then the following + bullets explain how to build ACE with MSDEV. <P> + +<OL> +<LI> CREATE A PROJECT WORKSPACE. <P> + + Start by making a new project. It should be rooted at + $WRAPPER_ROOT. We normally browse to $WRAPPER_ROOT, and select + "ace" as the project name. This will cause MSDEV to use the + $WRAPPER_ROOT/ace directory to store the project files. The actual + directory and project name are unimportant, but we'll assume you + named the project "ace." Select the dynamic link library option + and say "ok." By default, the config-win32*.h files are set up to + build DLLs. If you choose to build ACE as a static library you'll + need to unset ACE_HAS_DLL in the config-win32*.h file and select + the static link library option when creating a project workspace.<P> + +<LI> INSERT FILES INTO PROJECT. <P> + + Go into the Insert menu and select "Files into project". If you're + building a static library, select all the *.cpp files in + $WRAPPER_ROOT/ace into the project. If you're building a dll, you + need to omit the files in ACE which contain template class + definitions. You can find out which files this is by looking at + the TEMPLATE_FILES target in the $WRAPPER_ROOT/ace/Makefile.<P> + + Once you've selected the files and pressed "ok" it should take a + few seconds or so to for MSDEV to create the project. (Note that + in MSVC2.0 there isn't an Insert menu, so go into the Project Menu + and then "Files" and from there insert all the *.cpp files.) When + including the files on windows 95, it may ask you to select fewer + files than *.cpp. Just do A-M and N-Z or something similar. <P> + +<LI> SET THE INCLUDE PATH. <P> + + Go into Options section of the Tools menu. Add the $WRAPPER_ROOT + directory to the default directory search path. This is necessary + since all ACE #include files refer to themselves via ace/Foo.h. + Then add $WRAPPER_ROOT\ace to the default library search path. + This means that you can now use relative paths for linking apps + with ace.lib. You may skip this step if you have set + Tools/Options/Directories/Include_Files to include $WRAPPER_ROOT. <P> + +<LI> SET UP THE LINKER. <P> + + You might want to link with the wsock32.lib into the ACE project, + as well, so that you don't have to include it with every + applications link setup. Do this by including wsock32.lib in the + project through Insert/Files_into_project. <P> + + When building a DLL: In order to allow standard C library functions + to share common variables (particular <TT>errno</TT>) across dll + and exe boundaries, we must ensure that both dll and exe are using + the same libraries. Go to + Build/Settings/C++/Category:Code_Generation. Set Use run-time + library to "Multithreaded DLL" or "Debug Multithreaded DLL" + depending on whether you're building a release or a debug version + respectively.<P> + + When building a static lib: Go to + Build/Settings/C++/Category:Code_Generation and set run-time + library to "Debug Multithreaded" (or just "Multithreaded"). <P> + +<LI> BUILD. <P> + + Go to the Build menu and select "Build ace.{lib,dll}". The first + time this happens it will rebuild all the dependencies. This may + take a while (i.e., 3 to 15 minutes, depending on whether you use + Samba, PC-NFS, native NTFS, etc.). The whole process will seem to + generate lots of errors and warning about not finding many UNIX + header files, etc. Just ignore these errors/warnings. They are + due to the lame MSVC++ compiler that doesn't pay attention to the + #ifdefs when computing the dependencies. Eventually, this process + will stop and from you won't have to rebuild the dependencies then + on (thank God...).<P> + + At this point, the compiler should be happily chugging away on your + files. <P> + +<LI> USING ace.lib. <P> + +When it's done, you should have a static or dynamic library + called ace.lib. You can use this to link with test applications + (such as those in the $WRAPPER_ROOT/examples directory). This + process is described below. <P><P> +</OL> + +<LI> <B>MAKING TEST APPLICATIONS FOR WIN32</B> <P> + +<OL> +<LI> CREATE THE PROJECT. <P> + + As before, make a new project for each application. We've been + using Console Applications. Insert the appropriate .cpp files into + the project. <P> + +<LI> SET THE INCLUDE PATH.<P> + + In Build/Settings/C++/Category:Preprocessor, add $WRAPPER_ROOT to + "Additional include directories". If you've set the + Tools/Options/Directories/Include_Files to include $WRAPPER_ROOT, + then you don't need to do this.<P> + +<LI> MODIFY SETTINGS. <P> + + To enable MSVC++ to handle both SEH and destructors together in the + same code, we need to remove the /GX flag. Go to + Build/Settings/C++/Category:C++ Language. By default, the flag + "Enable Exception Handling" should be checked. Click on it to mark + it unchecked. The flag /GX will disappear from Project_Options. + +<LI> SET UP THE LINKER. <P> + + You'll also need to tell MSVC++ what libraries to link with. In + Build/Settings/Link, add "$WRAPPER_ROOT/ace/Debug/ace.lib" to the + Object/library modules. If you've set + Tools/Options/Directories/Library_Files to include + $WRAPPER_ROOT/ace, you can just add "ace.lib" to the Object/library + modules instead of the complete path. <P> + + When using ACE as a DLL: Go to + Build/Settings/C++/Category:Code_Generation. Set Use run-time + library to "Multithreaded DLL" or "Debug Multithreaded DLL" + depending on whether you're building a release or a debug version + respectively.<P> + + When using ACE as a static lib: Go to + Build/Settings/C++/Category:Code_Generation and set the run-time + library to "Debug Multithreaded" (or just "Multithreaded"). <P> + + If you're using WinSock, you will also need to add wsock32.lib to + this line if you haven't inserted into the ACE project already.<P> + +<LI> BUILD. + + You should now be able to build the .exe. <P> +</OL> + +<LI> <B> BUILDING ACE ON A WIN32 MACHINE THAT LACKS A NETWORK CARD </B><P> + +You may want to run ACE on a non-networked machine. To do so, you must +install TCP/IP and configure it to ignore the absence of a network +card. This is one method: <P> + +<OL> + <LI> Run Control Panel + <LI> Choose Network from Control Panel + <LI> Add Adapter: MS Loopback Adapter + <LI> Configure MS Loopback Adapter with 802.3 (default) + <LI> Add Software: TCP/IP Protocol + <LI> Configure TCP/IP Protocol with a valid IP address and subnet mask. + Leave everything else at the default settings. + <LI> Add Software: Workstation + <LI> Exit and Restart System + <LI> Run Control Panel again + <LI> Choose Services from Control Panel + <LI> The following services are not necessary and may + be set to Disabled Startup: <BR> + Alerter<BR> + Computer Browser<BR> + Net logon<BR> + Messanger<BR> + <LI> Choose Network from Control Panel + <LI> Confirm the following setup. This is all you need to run ACE:<BR> + Installed Software:<BR> + Computer Browser<BR> + MS Loopback Adapter Driver<BR> + TCP/IP Protocol<BR> + Workstation<BR> + Installed Adapter Cards:<BR> + MS Loopback Adapter<P> +</OL> + +</UL> + +<P><HR><P> +<A NAME="advanced"> +<H3>Advanced Topics</H3> + +<UL> +<LI><A HREF="#cloning">Cloning the Source Tree</A> +<LI><A HREF="#corba">Building CORBA Versions of ACE</A> +</UL> + +<H4>Cloning the Source Tree</H4> + +On UNIX platforms, I typically like to support multiple platform +builds using the same ACE source tree. This idiom is supported by ACE +using the $(WRAPPER_ROOT)/bin/clone.c program. To build clone, +perform the following steps: <P> + +<pre> +% cd $WRAPPER_ROOT/bin +% make +% mv clone ~/bin +% rehash +</pre><P> + +Then create a ./build subdirectory someplace (e.g., under +$WRAPPER_ROOT), and then invoke the top-level Makefile with the +"clone" target, e.g.: <P> + +<pre> +% cd $WRAPPER_ROOT +% mkdir build-SunOS5 +% cd build-SunOS5 +% make -f ../Makefile clone +% setenv WRAPPER_ROOT $cwd +% make +</pre><P> + +This will establish a complete tree of links. When you do a make in +this directory you will be producing object code that is not stored in +the same place as the original source tree. This way, you can easily +build another platform in a parallel tree structure. <P> + +<B> VERY IMPORTANT! </B> <P> + +If you use the "clone trick" discussed above, make sure that the +symbolic links are correctly in place before starting the build. In +particular, if you plan to clone the tree, it is preferable to do so +before you start a build procedure on the original tree. This is +because the build procedure create object directories (.obj and +.shobj) and the cloning procedure will clone these directories also. +You would end up with links pointing to object files of another +platform. If you clone the tree after you've done a build on the +original tree, make sure to remove all ".obj", ".shobj" and (any other +files or directories) in all subdirectories before starting the build +on your cloned tree. <P> + +<P><HR><P> +<A NAME="corba"> +<H4>Building CORBA Versions of ACE</H4> + +Note that if you are compiling with IONA's Orbix implementation of +CORBA or Visigenix's implementation of CORBA, you'll also need to set +ORBIX_ROOT to point to the root of the Orbix source tree and +ORBELINE_ROOT to point to the root of the ORBeline source tree. Since +many platforms don't have these CORBA tools the default for ACE does +*not* incorporate them. Thus, if you are compiling with Orbix or +ORBeline, make sure that you set the symbolic links for +$WRAPPER_ROOT/include/makeinclude/platform_macros.GNU and +$WRAPPER_ROOT/ace/config.h to point to the the config* and platform* +files that have "-orbix" in them! + +<P><HR><P> +Back to the <A HREF="http://www.cs.wustl.edu/~schmidt/ACE.html"> +ACE</A> home page. + + + + + + |