[Pkg-ace-devel] Bug#317488: FTBFS: Accesses members of non-class type and has undefined references

Matt Kraai Matt Kraai <kraai@ftbfs.org>, 317488@bugs.debian.org
Fri, 8 Jul 2005 08:48:09 -0700


--dDnEQgWzhgf+8aPe
Content-Type: multipart/mixed; boundary="bFsKbPszpzYNtEU6"
Content-Disposition: inline


--bFsKbPszpzYNtEU6
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

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_REENTR=
ANT -DACE_HAS_AIO_CALLS -D_GNU_SOURCE -DACE_HAS_EXPLICIT_TEMPLATE_INSTANTIA=
TION -DACE_HAS_SYS_SIGLIST=3D1 -DACE_GPERF=3D\"gperf-ace\"   -I/tmp/buildd/=
ace-5.4.2.1.0/ACE_wrappers -DACE_NDEBUG -DACE_USE_RCSID=3D0 -DACE_HAS_EXCEP=
TIONS -DACE_COMPILE_TIMEPROBES -I.. -DACE_HAS_ACE_TOKEN -DACE_HAS_ACE_SVCCO=
NF -DACE_BUILD_DLL -DACE_AS_STATIC_LIBS  -c -o .obj/Timeprobe.o Timeprobe.c=
pp
> /tmp/buildd/ace-5.4.2.1.0/ACE_wrappers/ace/Timeprobe_T.cpp: In member fun=
ction 'void ACE_Timeprobe_Ex<ACE_LOCK, ALLOCATOR>::print_absolute_times() [=
with ACE_LOCK =3D ACE_TIMEPROBE_MUTEX, ALLOCATOR =3D ACE_TIMEPROBE_ALLOCATO=
R]':
> Timeprobe.cpp:18:   instantiated from here
> /tmp/buildd/ace-5.4.2.1.0/ACE_wrappers/ace/Timeprobe_T.cpp:334: error: re=
quest for member 'usec' in '(((ACE_Timeprobe_Ex<ACE_TIMEPROBE_MUTEX, ACE_TI=
MEPROBE_ALLOCATOR>*)this)->ACE_Timeprobe_Ex<ACE_TIMEPROBE_MUTEX, ACE_TIMEPR=
OBE_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: re=
quest for member 'sec' in '(((ACE_Timeprobe_Ex<ACE_TIMEPROBE_MUTEX, ACE_TIM=
EPROBE_ALLOCATOR>*)this)->ACE_Timeprobe_Ex<ACE_TIMEPROBE_MUTEX, ACE_TIMEPRO=
BE_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 fun=
ction 'void ACE_Timeprobe_Ex<ACE_LOCK, ALLOCATOR>::print_absolute_times() [=
with ACE_LOCK =3D ACE_Thread_Mutex, ALLOCATOR =3D 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: re=
quest for member 'usec' in '(((ACE_Timeprobe_Ex<ACE_Thread_Mutex, ACE_New_A=
llocator>*)this)->ACE_Timeprobe_Ex<ACE_Thread_Mutex, ACE_New_Allocator>::ti=
meprobes_ + (+(i * 20u)))->ACE_timeprobe_t::time_', which is of non-class t=
ype 'ACE_hrtime_t'
> /tmp/buildd/ace-5.4.2.1.0/ACE_wrappers/ace/Timeprobe_T.cpp:334: error: re=
quest for member 'sec' in '(((ACE_Timeprobe_Ex<ACE_Thread_Mutex, ACE_New_Al=
locator>*)this)->ACE_Timeprobe_Ex<ACE_Thread_Mutex, ACE_New_Allocator>::tim=
eprobes_ + (+(i * 20u)))->ACE_timeprobe_t::time_', which is of non-class ty=
pe '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_REENTR=
ANT -DACE_HAS_AIO_CALLS -D_GNU_SOURCE -DACE_HAS_EXPLICIT_TEMPLATE_INSTANTIA=
TION -DACE_HAS_SYS_SIGLIST=3D1 -DACE_GPERF=3D\"gperf-ace\"   -I/tmp/buildd/=
ace-5.4.2.1.0/ACE_wrappers -DACE_NDEBUG -DACE_USE_RCSID=3D0 -DACE_HAS_EXCEP=
TIONS -DACE_COMPILE_TIMEPROBES -I../../.. -DACE_AS_STATIC_LIBS  -Wl,-E -L/t=
mp/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/Versio=
n.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/g=
perf/src'
> make[1]: *** [gperf] Error 2
> make[1]: Leaving directory `/tmp/buildd/ace-5.4.2.1.0/ACE_wrappers/apps/g=
perf/src'
> make: *** [build-stamp] Error 2

--=20
Matt

--bFsKbPszpzYNtEU6
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="01-fix-hrtime-usage.dpatch"
Content-Transfer-Encoding: quoted-printable

#! /bin/sh /usr/share/dpatch/dpatch-run
## 01-fix-hrtime-usage.dpatch by  <kraai@qnx18.beckman.com>
##
## 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 =3D this->current_size_;
   }
=20
+  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 =3D (i + 1) % this ->max_size_; // Modulus increment: loops around=
 at the end.
=20
     } while (i !=3D this->current_size_);

--bFsKbPszpzYNtEU6--

--dDnEQgWzhgf+8aPe
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: Digital signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)

iD8DBQFCzqA4fNdgYxVXvBARAukEAJ4y0V3JdMNBtKqagqdLRQowGjh2DQCfWoIv
lU8iq75WK1/r6bwg/xjj4jk=
=FLzM
-----END PGP SIGNATURE-----

--dDnEQgWzhgf+8aPe--