[Pkg-ace-devel] Bug#242881: libace5.4: Configuration of ACE Logging Severity (Debian build)

Raphael Bossek Raphael Bossek <raphael.bossek@gmx.de>, 242881@bugs.debian.org
Fri, 09 Apr 2004 14:13:19 +0200


This is a multi-part MIME message sent by reportbug.

--===============1646793053==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

Package: libace5.4
Version: 5.4.0.1-1
Severity: normal

I've tried some of the APG examples of the Logging Severities and
identified that ACE_DEBUG() messages are not working independend
of the value (0 or 1). Some investigations in ace/Log_Msg.h shows
that ACE_NDEBUG have to be defined to disable the ACE_DEBUG() macros
within an application. The value of ACE_NDEBUG does not matter.

The ace/config.h files defined the ACE_NDEBUG macro so any user's
application can't use ACE_DEBUG until #undef ACE_NDEBUG. This is
not a common way. It's also not described anywhere!

The comments in ace/config.h also intent to disable ACE_DEBUG()
messages for the library itself but not for a future application
using ACE.

I've created a patch with my modification all described in
debian/changes. I hope they will considered for 5.4.1 packages.

-- System Information:
Debian Release: 3.0
Architecture: powerpc (ppc)
Kernel: Linux 2.4.18-newpmac
Locale: LANG=C, LC_CTYPE=C

Versions of packages libace5.4 depends on:
ii  libc6           2.2.5-11.5               GNU C Library: Shared libraries an
ii  libstdc++2.10-g 1:2.95.4-11woody1        The GNU stdc++ library
ii  xlibs           4.2.1-15.backports.org.1 X Window System client libraries

-- no debconf information

--===============1646793053==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename="ace-5.4.0.1-1.1.patch"

diff -Nru ace-5.4.0.1/debian/changelog ace-5.4.0.1_/debian/changelog
--- ace-5.4.0.1/debian/changelog	Fri Apr  9 13:53:53 2004
+++ ace-5.4.0.1_/debian/changelog	Fri Apr  9 11:01:50 2004
@@ -1,3 +1,13 @@
+ace (5.4.0.1-1.1) unstable; urgency=low
+
+  * Fixed ACE_NDEBUG configuration of ACE.
+  * Build-depends on libqt3-headers removed qt_reactor not set.
+  * System capabilities will be determined by including <unistd.h> in
+    <ace/config.h>.
+  * Created symlink bin/gperf-ace -> bin/gperf for tao_idl.
+
+ -- Raphael Bossek <bossekr@debian.org>  Thu,  8 Apr 2004 15:37:24 +0200
+
 ace (5.4.0.1-1) unstable; urgency=low
 
   * KM: release to fix the timestamp errors in the upstream source.
diff -Nru ace-5.4.0.1/debian/config/config.h ace-5.4.0.1_/debian/config/config.h
--- ace-5.4.0.1/debian/config/config.h	Fri Apr  9 13:53:53 2004
+++ ace-5.4.0.1_/debian/config/config.h	Thu Apr  8 21:47:22 2004
@@ -7,27 +7,14 @@
 // Force exception support to be enabled.
 #define ACE_HAS_EXCEPTIONS 1
 
-// No need for the ACE_ASSERTions and RCSIDs since this is a "release"
-// (i.e. non-debug) build.
-#define ACE_NDEBUG 1
-#define ACE_USE_RCSID 0
-
 // Force support for timeprobes to be compiled.
 #define ACE_COMPILE_TIMEPROBES 1
 
 // Force support for POSIX Asynchronous IO (AIO) to be compiled.
 #define ACE_HAS_AIO_CALLS 1
 
-// BN: hmm, not sure if these are needed?
-#ifndef POSIX_THREADS
-#  define POSIX_THREADS
-#endif
-#ifndef _POSIX_THREAD_SAFE_FUNCTIONS
-#  define _POSIX_THREAD_SAFE_FUNCTIONS
-#endif
-#ifndef  _REENTRANT
-#  define _REENTRANT
-#endif
+// bossekr@debian.org: Get the system capabilities.
+#include <unistd.h>
 
 // -------------------------------
 
diff -Nru ace-5.4.0.1/debian/config/platform_macros.GNU ace-5.4.0.1_/debian/config/platform_macros.GNU
--- ace-5.4.0.1/debian/config/platform_macros.GNU	Fri Apr  9 13:53:53 2004
+++ ace-5.4.0.1_/debian/config/platform_macros.GNU	Thu Apr  8 19:39:25 2004
@@ -13,13 +13,6 @@
 # Enable thread support.
 threads=1
 
-# Enable optimizations.
-optimize=1
-
-# Disable debugging symbol generation and configure for a "release"
-# build.
-debug=0
-
 # Enable ssl support
 ssl=1
 
diff -Nru ace-5.4.0.1/debian/control ace-5.4.0.1_/debian/control
--- ace-5.4.0.1/debian/control	Fri Apr  9 13:53:53 2004
+++ ace-5.4.0.1_/debian/control	Thu Apr  8 21:07:40 2004
@@ -3,7 +3,7 @@
 Priority: optional
 Maintainer: Debian ACE+TAO maintainers <pkg-ace-devel@lists.alioth.debian.org>
 Uploaders: Konstantinos Margaritis <markos@debian.org>, Brian Nelson <pyro@debian.org>
-Build-Depends: debhelper (>= 4.1), libssl-dev, libqt3-headers, xlibs-dev (>= 4.2)
+Build-Depends: debhelper (>= 4.1), libssl-dev, xlibs-dev (>= 4.2)
 Standards-Version: 3.6.1
 
 Package: libace5.4
diff -Nru ace-5.4.0.1/debian/rules ace-5.4.0.1_/debian/rules
--- ace-5.4.0.1/debian/rules	Fri Apr  9 13:53:53 2004
+++ ace-5.4.0.1_/debian/rules	Thu Apr  8 23:04:00 2004
@@ -14,22 +14,33 @@
 TAO_MAJOR_VERSION := $(shell grep TAO_MAJOR_VERSION TAO/tao/Version.h | sed -e 's/\#define TAO_MAJOR_VERSION //')
 TAO_VERSION := $(shell grep TAO_MAJOR_VERSION TAO/tao/Version.h | sed -e 's/\#define TAO_MAJOR_VERSION //')
 
-ACE_OPTS = "probe=1 exceptions=1 threads=1 optimize=1 debug=0 ssl=1"
+# This settings are only active while building ACE & Co. but never active while
+# user's applications are developed with ACE & Co.
+MAKEENV := CPPFLAGS="-DACE_NDEBUG -DACE_USE_RCSID"
 
 build: build-stamp
 build-stamp:
 	dh_testdir
 
 	cp debian/config/config.h ace
-	cp debian/config/platform_macros.GNU include/makeinclude
-
-	$(MAKE) -C ace shared_libs=1 static_libs=1
-	$(MAKE) -C ACEXML shared_libs=1 static_libs=1
-
-	$(MAKE) -C apps/gperf/src
-	$(MAKE) -C Kokyu shared_libs=1 static_libs=1
+ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS)))
+	echo "debug=1" > include/makeinclude/platform_macros.GNU
+	echo "optimize=0" >> include/makeinclude/platform_macros.GNU
+else
+	echo "debug=0" > include/makeinclude/platform_macros.GNU
+	echo "optimize=1" >> include/makeinclude/platform_macros.GNU
+endif
+	cat debian/config/platform_macros.GNU >> include/makeinclude/platform_macros.GNU
+
+	$(MAKEENV) $(MAKE) -C ace shared_libs=1 static_libs=1
+	$(MAKEENV) $(MAKE) -C ACEXML shared_libs=1 static_libs=1
+
+	$(MAKEENV) $(MAKE) -C apps/gperf/src
+#	We need to create a additional symlink bin/gperf-ace -> bin/gperf to get tao_idl working.
+	ln -sf gperf bin/gperf-ace
+	$(MAKEENV) $(MAKE) -C Kokyu shared_libs=1 static_libs=1
 
-	cd $(TAO_ROOT) && LD_LIBRARY_PATH=$(ACE_ROOT)/ace make shared_libs=1 corba_messaging=1 rtcorba=1
+	cd $(TAO_ROOT) && LD_LIBRARY_PATH=$(ACE_ROOT)/ace $(MAKEENV) make shared_libs=1 corba_messaging=1 rtcorba=1
 
 	touch build-stamp
 
@@ -46,7 +57,7 @@
 	-$(MAKE) -C TAO realclean shared_libs=1
 	-$(MAKE) -C TAO realclean static_libs=1
 
-	rm -f ace/*.{a,so*} ace/RMCast/*.{a,so*} apps/gperf/src/gperf-ace \
+	rm -f ace/*.{a,so*} ace/RMCast/*.{a,so*} bin/gperf-ace apps/gperf/src/gperf-ace \
 	      apps/gperf/gperf-ace.1 apps/gperf/gperf-ace.info ace/config.h \
 	      include/makeinclude/platform_macros.GNU
 

--===============1646793053==--