Supported Platforms and Compilers
The ADAPTIVE Communication Environment has been ported and tested
extensively on a wide range of C++ compilers and uni-processor and
multi-process OS platforms including Win32 (i.e., WinNT and Win95),
most versions of UNIX (e.g., SunOS 4.x and 5.x, SGI IRIX, HP-UX,
OSF/1, AIX, Linux, and SCO), VxWorks, and MVS OpenEdition. If you
have a problem compiling the ACE wrappers on the platforms shown below
please send email to the ACE
mailing list and we'll try to fix it for you.
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).
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:
LIBS += -lnsl
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!
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.
GNU gcc 2.7.2.1 compiles without problems. All tests run (besides minor problems). Thanks to Thilo Kielmann < kielmann@informatik.uni-siegen.de> and David Trumble <trumble@cvg.enet.dec.com> for help with this port.
collect2
.
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.
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 config-win32.h 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).
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:
Tools/Options/Directories/Show_Directories_For:Include_Files.
If you choose not to use the given project, then the following
bullets explain how to build ACE with MSDEV.
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.
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.
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.
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.
If you are going to compile ACE with UNICODE on, please add UNICODE
to the pre-processor definitions through:
Build -> Settings -> C/C++ -> Preprocessor -> Preprocessor
definitions
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.
When building a DLL we must ensure that both dll and exe are using
the same libraries In order to allow standard C library functions
to share common variables (particular errno) across dll
and exe boundaries. 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.
When building a static lib: Go to
Build/Settings/C++/Category:Code_Generation and set run-time
library to "Debug Multithreaded" (or just "Multithreaded").
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.). Eventually, this process
will stop and from you won't have to rebuild the dependencies then
on (thank God...).
At this point, the compiler should be happily chugging away on the
ACE files.
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.
As before, make a new project for each application. We've been
using Console Applications. Insert the appropriate .cpp files into
the project.
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.
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.
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.
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.
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").
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.
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:
Start by making a new project. It should be rooted at
$WRAPPER_ROOT/netsvcs/lib. We normally browse to
$WRAPPER_ROOT/netsvcs, and select "netsvcs" as the project name.
This will cause MSDEV to use the $WRAPPER_ROOT/netsvcs/lib
directory to store the project files. The actual directory and
project name are unimportant, but we'll assume you
named the project "netsvcs." 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.
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/netsvcs/lib into the project.
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.
Go into Options section of the Tools menu. Add the $WRAPPER_ROOT/netsvcs/lib
directory to the default directory search path.
Then add $WRAPPER_ROOT\netsvcs to the default library search path.
This means that you can now use relative paths for linking apps
with netsvcs.lib. You may skip this step if you have set
Tools/Options/Directories/Include_Files to include
$WRAPPER_ROOT.
If you are going to compile ACE with UNICODE on, please add UNICODE
to the pre-processor definitions through:
Build -> Settings -> C/C++ -> Preprocessor -> Preprocessor
definitions
When building a DLL we must ensure that both dll and exe are using
the same libraries in order to allow standard C library functions
to share common variables (particular errno) across dll
and exe boundaries. 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.
When building a static lib: Go to
Build/Settings/C++/Category:Code_Generation and set run-time
library to "Debug Multithreaded" (or just "Multithreaded").
Go to the Build menu and select "Build netsvcs.{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.). Eventually, this process
will stop and from you won't have to rebuild the dependencies then
on (thank God...).
At this point, the compiler should be happily chugging away on
the netsvcs files.
When it's done, you should have a static or dynamic library
called netsvcs.lib. You can use this to link with test applications,
including the server driver program.
Then create a ./build subdirectory someplace (e.g., under
$WRAPPER_ROOT), and then invoke the top-level Makefile with the
"clone" target, e.g.:
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.
VERY IMPORTANT!
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.
Back to the
ACE home page.
Building and Installing ACE
The following explains how to build the ACE on UNIX and Win32.
Building and Installing ACE on UNIX
Building and installing ACE on UNIX is relatively simple (the process for Win32 is different). Here's what you
need to do:
However, if you're building a number of versions of ACE (e.g., for
different OS platforms or for different releases of ACE) you might use
the following approach:
% setenv WRAPPER_ROOT /home/cs/faculty/schmidt/ACE_wrappers
% setenv WRAPPER_ROOT $cwd
% setenv LD_LIBRARY_PATH $WRAPPER_ROOT/ace:$LD_LIBRARY_PATH
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.
% make
Building and Installing ACE on Win32
The installation process for NT is a bit different than UNIX. We
assume you're using MSVC++ 4.x (things are a little different for the
2.0 version...).
Alerter
Computer Browser
Net logon
Messanger
Installed Software:
Computer Browser
MS Loopback Adapter Driver
TCP/IP Protocol
Workstation
Installed Adapter Cards:
MS Loopback Adapter
Building and Installing ACE Network Services
The following explains how to build the ACE network services on UNIX and Win32.
Building and Installing ACE Network Services on UNIX
Building and installing ACE Network Services on UNIX is relatively
simple (the process for Win32 is different).
Here's what you need to do:
main
) contained in
$WRAPPER_ROOT/netsvcs/servers/main.cpp should also be compiled and ready to run.
% setenv LD_LIBRARY_PATH $WRAPPER_ROOT/ace:$LD_LIBRARY_PATH
main
driver program dynamically.
To specify which services should be linked in and executed, edit the
$WRAPPER_ROOT/netsvcs/servers/svc.conf file. During your editing,
you should update information (such as the default service port
numbers) that affects the initialization of services in this
file. Refer to the Service Configurator
documentation to learn how the configuration file is parsed and
how the services are dynamically linked and executed. In
addition, refer to the Network
Services documentation to learn more about how to configure
each network service. Building and Installing ACE Network Services on Win32
The installation process for ACE network services on Win32 is a bit
different than UNIX. We assume you're using MSVC++ 4.x (things are a
little different for the 2.0 version...).
Advanced Topics
Cloning the Source Tree
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:
% cd $WRAPPER_ROOT/bin
% make
% mv clone ~/bin
% rehash
% cd $WRAPPER_ROOT
% mkdir build-SunOS5
% cd build-SunOS5
% make -f ../Makefile clone
% setenv WRAPPER_ROOT $cwd
% make
Building CORBA Versions of ACE
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!