Package: ace
Version: 5.4.2.1.0-4
Severity: serious

ace fails to build from source:

> g++ -W -Wall -Wpointer-arith -O3 -pipe -fno-implicit-templates  -D_REENTRANT 
> -DACE_HAS_AIO_CALLS -D_GNU_SOURCE -DACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION 
> -DACE_HAS_SYS_SIGLIST=1 -DACE_GPERF=\"gperf-ace\"   
> -I/tmp/buildd/ace-5.4.2.1.0/ACE_wrappers -DACE_NDEBUG -DACE_USE_RCSID=0 
> -DACE_HAS_EXCEPTIONS -DACE_COMPILE_TIMEPROBES -I.. -DACE_HAS_ACE_TOKEN 
> -DACE_HAS_ACE_SVCCONF -DACE_BUILD_DLL -DACE_AS_STATIC_LIBS  -c -o 
> .obj/Timeprobe.o Timeprobe.cpp
> /tmp/buildd/ace-5.4.2.1.0/ACE_wrappers/ace/Timeprobe_T.cpp: In member 
> function 'void ACE_Timeprobe_Ex<ACE_LOCK, ALLOCATOR>::print_absolute_times() 
> [with ACE_LOCK = ACE_TIMEPROBE_MUTEX, ALLOCATOR = ACE_TIMEPROBE_ALLOCATOR]':
> Timeprobe.cpp:18:   instantiated from here
> /tmp/buildd/ace-5.4.2.1.0/ACE_wrappers/ace/Timeprobe_T.cpp:334: error: 
> request for member 'usec' in '(((ACE_Timeprobe_Ex<ACE_TIMEPROBE_MUTEX, 
> ACE_TIMEPROBE_ALLOCATOR>*)this)->ACE_Timeprobe_Ex<ACE_TIMEPROBE_MUTEX, 
> ACE_TIMEPROBE_ALLOCATOR>::timeprobes_ + (+(i * 
> 20u)))->ACE_timeprobe_t::time_', which is of non-class type 'ACE_hrtime_t'
> /tmp/buildd/ace-5.4.2.1.0/ACE_wrappers/ace/Timeprobe_T.cpp:334: error: 
> request for member 'sec' in '(((ACE_Timeprobe_Ex<ACE_TIMEPROBE_MUTEX, 
> ACE_TIMEPROBE_ALLOCATOR>*)this)->ACE_Timeprobe_Ex<ACE_TIMEPROBE_MUTEX, 
> ACE_TIMEPROBE_ALLOCATOR>::timeprobes_ + (+(i * 
> 20u)))->ACE_timeprobe_t::time_', which is of non-class type 'ACE_hrtime_t'
> /tmp/buildd/ace-5.4.2.1.0/ACE_wrappers/ace/Timeprobe_T.cpp: In member 
> function 'void ACE_Timeprobe_Ex<ACE_LOCK, ALLOCATOR>::print_absolute_times() 
> [with ACE_LOCK = ACE_Thread_Mutex, ALLOCATOR = ACE_New_Allocator]':
> Timeprobe.cpp:23:   instantiated from here
> /tmp/buildd/ace-5.4.2.1.0/ACE_wrappers/ace/Timeprobe_T.cpp:334: error: 
> request for member 'usec' in '(((ACE_Timeprobe_Ex<ACE_Thread_Mutex, 
> ACE_New_Allocator>*)this)->ACE_Timeprobe_Ex<ACE_Thread_Mutex, 
> ACE_New_Allocator>::timeprobes_ + (+(i * 20u)))->ACE_timeprobe_t::time_', 
> which is of non-class type 'ACE_hrtime_t'
> /tmp/buildd/ace-5.4.2.1.0/ACE_wrappers/ace/Timeprobe_T.cpp:334: error: 
> request for member 'sec' in '(((ACE_Timeprobe_Ex<ACE_Thread_Mutex, 
> ACE_New_Allocator>*)this)->ACE_Timeprobe_Ex<ACE_Thread_Mutex, 
> ACE_New_Allocator>::timeprobes_ + (+(i * 20u)))->ACE_timeprobe_t::time_', 
> which is of non-class type 'ACE_hrtime_t'
> make[2]: *** [.obj/Timeprobe.o] Error 1
> make[2]: Leaving directory `/tmp/buildd/ace-5.4.2.1.0/ACE_wrappers/ace'
> make[1]: *** [ACE] Error 2
> make[1]: Leaving directory `/tmp/buildd/ace-5.4.2.1.0/ACE_wrappers/ace'
> make: *** [build-stamp] Error 2

The attached patch, extracted from the latest upstream beta, fixes
this problem.

Unfortunately, fixing this problem only reveals another, which I don't
know how to fix:

> g++ -W -Wall -Wpointer-arith -O3 -pipe -fno-implicit-templates  -D_REENTRANT 
> -DACE_HAS_AIO_CALLS -D_GNU_SOURCE -DACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION 
> -DACE_HAS_SYS_SIGLIST=1 -DACE_GPERF=\"gperf-ace\"   
> -I/tmp/buildd/ace-5.4.2.1.0/ACE_wrappers -DACE_NDEBUG -DACE_USE_RCSID=0 
> -DACE_HAS_EXCEPTIONS -DACE_COMPILE_TIMEPROBES -I../../.. -DACE_AS_STATIC_LIBS 
>  -Wl,-E -L/tmp/buildd/ace-5.4.2.1.0/ACE_wrappers/ace -L./ -L../../../lib -o 
> gperf .obj/gperf.o .obj/Options.o .obj/Iterator.o .obj/Gen_Perf.o 
> .obj/Key_List.o .obj/List_Node.o .obj/Hash_Table.o .obj/Bool_Array.o 
> .obj/Vectors.o .obj/Version.o -lACE  -ldl -lpthread -lrt
> /tmp/buildd/ace-5.4.2.1.0/ACE_wrappers/ace/libACE.so: undefined reference to 
> `ACE_Singleton<ACE_New_Allocator, ACE_Thread_Mutex>::instance()'
> /tmp/buildd/ace-5.4.2.1.0/ACE_wrappers/ace/libACE.so: undefined reference to 
> `ACE_Singleton<ACE_New_Allocator, ACE_Null_Mutex>::instance()'
> collect2: ld returned 1 exit status
> make[2]: *** [gperf] Error 1
> make[2]: Leaving directory 
> `/tmp/buildd/ace-5.4.2.1.0/ACE_wrappers/apps/gperf/src'
> make[1]: *** [gperf] Error 2
> make[1]: Leaving directory 
> `/tmp/buildd/ace-5.4.2.1.0/ACE_wrappers/apps/gperf/src'
> make: *** [build-stamp] Error 2

-- 
Matt
#! /bin/sh /usr/share/dpatch/dpatch-run
## 01-fix-hrtime-usage.dpatch by  <[EMAIL PROTECTED]>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: No description.

@DPATCH@
diff -urNad ace-5.4.2.1.0/ACE_wrappers/ace/Timeprobe_T.cpp 
/tmp/dpep.44zPnQ/ace-5.4.2.1.0/ACE_wrappers/ace/Timeprobe_T.cpp
--- ACE_wrappers/ace/Timeprobe_T.cpp    2004-10-28 09:13:32.000000000 -0700
+++ ACE_wrappers/ace/Timeprobe_T.cpp    2005-07-08 08:41:08.000000000 -0700
@@ -329,14 +329,17 @@
     i = this->current_size_;
   }
 
+  ACE_Time_Value tv; // to convert ACE_hrtime_t
   do
     {
+      ACE_High_Res_Timer::hrtime_to_tv (tv, this->timeprobes_ [i].time_);
+
       ACE_DEBUG ((LM_DEBUG,
                   "%-50.50s %8.8x %12.12u\n",
                   this->find_description_i (i),
                   this->timeprobes_ [i].thread_,
-                  this->timeprobes_ [i].time_.sec () * 1000000
-                   + this->timeprobes_[i].time_.usec ()));
+                  tv.sec () * 100000
+                   + tv.usec ()));
       i = (i + 1) % this ->max_size_; // Modulus increment: loops around at 
the end.
 
     } while (i != this->current_size_);

Attachment: signature.asc
Description: Digital signature

Reply via email to