Bug#317488: FTBFS: Accesses members of non-class type and has undefined references

2005-07-11 Thread Thomas Girard

Matt Kraai a écrit :

Package: ace
Version: 5.4.2.1.0-4
Severity: serious

ace fails to build from source:

[ ... ]


Hi Matt,

this is a known problem. ACE+TAO could not be compiled with g++ 4 until
ACE+TAO 5.4.5 was released [1].

I think it would be easier to switch to 5.4.6 than to backport all
changes needed to make 5.4.2 compile with g++ 4.

I have started packaging 5.4.5 some time ago, but I won't be able to
continue work on this issue before next week, because I'm moving this
week.

HTH,

Thomas


[1] http://groups.yahoo.com/group/ace-users/message/41642




Bug#317488: FTBFS: Accesses members of non-class type and has undefined references

2005-07-11 Thread Matt Kraai
On Mon, Jul 11, 2005 at 09:06:50PM +0200, Thomas Girard wrote:
 Matt Kraai a écrit :
 Package: ace
 Version: 5.4.2.1.0-4
 Severity: serious
 
 ace fails to build from source:
 
 [ ... ]
 
 Hi Matt,
 
 this is a known problem. ACE+TAO could not be compiled with g++ 4 until
 ACE+TAO 5.4.5 was released [1].
 
 I think it would be easier to switch to 5.4.6 than to backport all
 changes needed to make 5.4.2 compile with g++ 4.
 
 I have started packaging 5.4.5 some time ago, but I won't be able to
 continue work on this issue before next week, because I'm moving this
 week.

No problem.  I hope your move goes well.

-- 
Matt


signature.asc
Description: Digital signature


Bug#317488: FTBFS: Accesses members of non-class type and has undefined references

2005-07-08 Thread Matt Kraai
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_ExACE_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_ExACE_TIMEPROBE_MUTEX, 
 ACE_TIMEPROBE_ALLOCATOR*)this)-ACE_Timeprobe_ExACE_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_ExACE_TIMEPROBE_MUTEX, 
 ACE_TIMEPROBE_ALLOCATOR*)this)-ACE_Timeprobe_ExACE_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_ExACE_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_ExACE_Thread_Mutex, 
 ACE_New_Allocator*)this)-ACE_Timeprobe_ExACE_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_ExACE_Thread_Mutex, 
 ACE_New_Allocator*)this)-ACE_Timeprobe_ExACE_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_SingletonACE_New_Allocator, ACE_Thread_Mutex::instance()'
 /tmp/buildd/ace-5.4.2.1.0/ACE_wrappers/ace/libACE.so: undefined reference to 
 `ACE_SingletonACE_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.cpp2004-10-28 09:13:32.0 -0700
+++ ACE_wrappers/ace/Timeprobe_T.cpp2005-07-08 08:41:08.0 -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 () * 100
-   + this-timeprobes_[i].time_.usec