★ wanayoo — archive 1999 http://cplusplus.sourceforge.net/Nouvelle recherche | Portail wanayoo

Common C++ - A GNU Portable Application Framework

An openly developed GNU C++ package offering portable support for threading, sockets, file access, persistent object management, and system services, maintained by David Sugar <dyfet@ostel.com> and Daniel Silverstone.

 [image of the head of a GNU]


Introduction


Common C++ is a C++ framework offering portable support for threading, sockets, file access, deamons, persistance, and system services, initially started by David Sugar and Daniel Silverstone. Common C++ is a GNU package and is licensed to the terms of the GNU GPL with specific privileges similar to Guile.

Common C++ offers support and portable classes for threading and sockets for both UNIX (Posix systems with "pthread" support) and the Windows "Win32" API. Common C++ uses extensive autoconf macro sets for automatic detection of various levels of "pthread compliance" in your target platform and attempts to adjust itself appropriately. Common C++ has been tested to date with GNU/Linux, FreeBSD, Solaris, and DEC Tru64 Unix. HP/UX has also been tried and found not to be successfully supported at this time.

While Common C++ is not directly related to GNU portable threading (GNU Pth), it should work with the Pth "pthread emulation" library at present. Common C++ will become usable as a class framework for GNU Pth directly in future releases.

The primary goal of Common C++ is to promote a very low overhead abstract C++ interface to common system services. Consistent with this goal, and the desire for broad portability with wide compiler support, specific aspects and practices in C++ programming were selected when writing code in this package, and other practices were discarded that seemed to detract from this goal.


Latest News

As of late April, 2000, Common C++ was adopted by and has become an official package in the GNU project. The first formal distribution of Common C++ as a GNU package has occured with the 1.0.0 release of Common C++ on April 29th. This release is available for immediate download from ftp.gnu.org and related mirrors under "/gnu/commonc++".

In addition to becoming a GNU package, a new overview document has been written to better document Common C++. Many other changes have been made for the 1.0 release of Common C++ and it's use as a package in the GNU project. Common C++ is currently available for anonymous cvs access through GNU "subversions" under the module name "commoncpp".

As of March 14th, 2000, the APE project was merged with the Common C++ project to form the newly introduced Common C++ portable application framework. The first merged release will be Common C++ 0.9. Within this new merged distribution, the following application class frameworks will be introduced:

Library Name

Header

Origin

Function

libccxx.so

cc++/thread.h

APE

Portable threading

libccxx.so

cc++/socket.h

APE

Portable & realtime sockets

libccio.so

cc++/file.h

APE

Lightweight file access classes

libccstd.so

cc++/persist.h

Common C++

Object class persistence engine

libccstd.so

cc++/math.h

Common C++

Math library

libccstd.so

cc++/misc.h

ACS

Useful misc. classes

libccstd.so

cc++/html.h

Common C++ (post 0.9)

C++ HTML document processing.

libccio.so

cc++/serial.h

APE (post 0.9)

APE stream/serial device classes

libccstd.so

cc++/script.h

ACS derived (Bayonne)

ACS Bayonne scripting language

The first new 1.2 APE, APE 1.2.0, was released March 7th, followed shortly thereafter by 1.2.1. APE 1.2 splits the core library as planned into three seperate components. APE 1.2.0 now includes the new "platform neutral" common source tree for class libraries that are not platform specific. The first of these is a "misc" class library for useful supporting classes. APE 1.2.0 also adds support for dynamic loading of shared object class files on ELF binary systems. The APE 1.2.1 release became necessary do to some obscure linking issues related entirely to semaphore support under Linux between glibc2.1.1 and glibc2.1.2, and libpthread that I found when building and moving APE files between slightly different Linux distributions. In particular, APE historically "pre-linked" libape.so with -lpthread, and this would often alter the sem_xx symbols. Different distributions and slightly different builds of glibc did this in slightly different ways.

For example, a binary linked with -lpthread on RedHat 6.x would get all it's "sem_xxx" references replaced with "sem_xxx@glib2.0" entries, while one on say a Mandrake expected "sem_xxx@@glib2.0" and of course the symbols would mismatch. Furthermore, linking libs and images that were built on RedHat 6.0 with semaphore code would lock up when cross linked with an APE pre-linked with pthread on a Mandrake or similar distribution prelinked against libpthread under the target platform, and this seems related to a conflict between the new_sem_xxx and old_sem_xxx function selection. Only by inking with pthread LAST when producing a final runtime image was no conflict produced. This also does not replace symbol names in libape.so even mixing images compiled on different distributions or moving APE binaries to different releases no longer produced conflicts or lockups. This was very weird and very frustrating.

The last 1.1 series, APE 1.1.4, was released as of February 24th, 2000. This release fixed a number of recently introduced bugs related to compiling under Solaris from when all of the socket classes had been rewritten in the APE 2.0 project. The win32 tree is still lagging behind somewhere between 1.0 and 1.1. In particular, the win32 tree does not yet have the new port and realtime service thread pool socket classes.

Downloading

Common C++ may be downloaded from GNU.org and any valid gnu software mirror, Voxilla, from SourceForge, and from any other mirrors noted here. Each release is packaged as a tarball and with RPM's for quick use under GNU/Linux. We may from time to time release Solaris "pkg" files, win32 "zips", and perhaps soon have Common C++ prepared for FreeBSD "ports". I generally encourage Common C++ to be made available in any packaging format that is convenient for installation, so long as the source is also made available. If you wish to have or know of a mirror for Common C++ that should be listed here, please leave e-mail for dyfet@ostel.com.

As of this time, the latest release of Common C++ may be found at:

  1. ftp://ftp.gnu.org/gnu/commonc++

  2. http://sourceforge.net/project/filelist.php?group_id=1523

  3. ftp://www.voxilla.org/pub/ape

Contributing

Common C++ is an open project, and we would welcome outside contributors. In particular, I would like to find someone who would wish to maintain the Win32 source tree current with the work being done under UNIX with Common C++. Common C++ historically has had several public cvs repositories. With Common C++ becoming a GNU project, cvs access for Common C++ is available from subversions.gnu.org. CVS access is also maintained from SourceForge.

  1. :pserver:anonymous@cvs.cplusplus.sourceforge.net

  2. :pserver:anonymous@subversions.gnu.org.

In addition, a mailing list will be maintained for Common C++. If you wish to join, please send an e-mail request to cplusplus-devel-request@lists.sourceforge.net.

Thanks

Thanks to Caros Vidal for the suggestion of hiding names rather than using namespace, and for things related to other changes made between 0.1.1 and 0.2.0.

Thanks to John Conners for a lot of stuff to fix in the pre-1.0 win32 tree.

Thanks to Albert Hui for a lot of Solaris specific fixes early on.

Thanks to Yurii Rashkovskii and the iCommunity team for convincing me to add streams to TCP sockets and for getting me to start the APE 2.0 project.