I get this error when compiling opensp 1.5release with
g++ 3.3:
/usr/bin/make SUBDIRS=lib CXXFLAGS="-O2 --pipe
-D_REENTRANT"
make[1]: Entering directory
`/home/neil/debian/opensp/1.5release/opensp-1.5release'
make all-recursive
make[2]: Entering directory
`/home/neil/debian/opensp/1.5release/opensp-1.5release'
Making all in lib
make[3]: Entering directory
`/home/neil/debian/opensp/1.5release/opensp-1.5release/lib'
/bin/sh ../libtool --mode=compile g++ -DHAVE_CONFIG_H
-I. -I. -I.. -I../include -I../generic -O2 --pipe
-D_REENTRANT -c Allocator.cxx
mkdir .libs
g++ -DHAVE_CONFIG_H -I. -I. -I.. -I../include
-I../generic -O2 --pipe -D_REENTRANT
-Wp,-MD,.deps/Allocator.pp -c Allocator.cxx -fPIC
-DPIC -o .libs/Allocator.lo
g++ -DHAVE_CONFIG_H -I. -I. -I.. -I../include
-I../generic -O2 --pipe -D_REENTRANT
-Wp,-MD,.deps/Allocator.pp -c Allocator.cxx -o
Allocator.o >/dev/null 2>&1
mv -f .libs/Allocator.lo Allocator.lo
/bin/sh ../libtool --mode=compile g++ -DHAVE_CONFIG_H
-I. -I. -I.. -I../includ -I../generic -O2 --pipe
-D_REENTRANT -c ArcEngine.cxx
rm -f .libs/ArcEngine.lo
g++ -DHAVE_CONFIG_H -I. -I. -I.. -I../include
-I../generic -O2 --pipe -D_REENTRANT
-Wp,-MD,.deps/ArcEngine.pp -c ArcEngine.cxx -fPIC
-DPIC -o .libs/ArcEngine.lo
In file included from ../include/Attributed.h:8,
from ../include/Notation.h:17,
from ../include/Event.h:19,
from ../include/ArcEngine.h:11,
from ArcEngine.cxx:10:
../include/Ptr.cxx: In destructor
`OpenSP::Ptr<T>::~Ptr() [with T =
OpenSP::AttributeValue]':
../include/Ptr.h:55: instantiated from
`OpenSP::ConstPtr<T>::ConstPtr() [with T =
OpenSP::AttributeValue]'
../include/Attribute.h:36: instantiated from here
../include/Ptr.cxx:22: error: `unref' undeclared (first
use this function)
../include/Ptr.cxx:22: error: (Each undeclared
identifier is reported only once
for each function it appears in.)
../include/Ptr.cxx:23: warning: invalid use of
undefined type `struct
OpenSP::AttributeValue'
../include/Attribute.h:28: warning: forward declaration
of `struct
OpenSP::AttributeValue'
In file included from Recognizer.h:15,
from ParserState.h:34,
from Parser.h:23,
from ArcEngine.cxx:21:
../include/Owner.cxx: In destructor
`OpenSP::Owner<T>::~Owner() [with T =
OpenSP::BlankTrie]':
../include/CopyOwner.h:16: instantiated from
`OpenSP::CopyOwner<T>::CopyOwner() [with T =
OpenSP::BlankTrie]'
Trie.h:22: instantiated from here
../include/Owner.cxx:15: warning: invalid use of
undefined type `struct
OpenSP::BlankTrie'
Trie.h:18: warning: forward declaration of `struct
OpenSP::BlankTrie'
make[3]: *** [ArcEngine.lo] Error 1
A comment in the code for the Ptr template says that
the class used for the template parameter "must have
Resource as a public base class". That class has
unref() defined in it. AttributeValue does have
Resource as a public base class, so Ptr<AttributeValue>
is legit, but g++ 3.3 apparently needs to be told more
explicitly that unref() is defined in Resource.
I recently took over maintaining opensp1.5/openjade1.4
for Debian, and this is holding up my latest upload
into unstable on several architectures (actually, it is
some variants of 3.2 that cause the problem, but it
worked fine for me with 3.2 on i386; I was able to
reproduce it in 3.3 on i386).
Thanks.
Logged In: YES
user_id=785744
I figured this out. The definition of the class
AttributeValue needs to be moved to the top of Attribute.h.
After doing that, it compiled and worked properly.
Logged In: YES
user_id=406806
This reminds me of:
irq 18: nobody cared!
Call Trace: ...
Logged In: YES
user_id=188003
Neil, could you check the opensp_1_5_branch branch on
sf.net and tell whether this issue is still present? Also,
do you agree that
http://sourceforge.net/tracker/index.php?
func=detail&aid=810850&group_id=2115&atid=102115 is a
duplicate of this one?
Logged In: YES
user_id=785744
The issue is still present, and 810850 is a duplicate. My
fixed version actually compiles under g++ 4.0, too.
Logged In: YES
user_id=188003
Okay. Could you make a patch and attach it to the patch
tracker? I'm not sure how the fix would look like, it seems
AttributeValue is already the first thing in Attribute.h
only preceded by some pre-processor instructions, includes
and forward declarations.
Logged In: YES
user_id=785744
Sorry, I was looking at HEAD instead of the
opensp_1_5_branch. In that branch, the issue is not present.
Logged In: YES
user_id=188003
Okay, seems we can close it then.
Logged In: YES
user_id=1312539
This Tracker item was closed automatically by the system. It was
previously set to a Pending status, and the original submitter
did not respond within 14 days (the time period specified by
the administrator of this Tracker).