You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Petri Savolainen <pe...@iki.fi> on 2003/11/08 00:32:57 UTC

build pysvn 0.1.1 on linux? attempt -> compile err

Anyone taken a stab?

I tried; attached are the modified makefiles, quick & dirty. It looks as if
all dependencies are found, but compiler (gcc-c++-3.2.2-5) throws an error,
tailed here:

----------------------------------------------------------
pysvn.hpp: At global scope:
pysvn.hpp:289: type/value mismatch at argument 1 in template parameter list
for
   `template<class T> class Py::PythonExtension'
pysvn.hpp:289:   expected a type, got `pysvn_enum'
make: *** [pysvn_callbacks.o] Error 1
----------------------------------------------------------

I wonder what is wrong... this was the first time ever for me trying to
compile a python c++ extension using cxx, and I haven't got a lot of
experience in building c/++ code either. More used to newbie-level magic
spells such as 'configure' & 'rpmbuild' ;-)

Regards,

 Petri

Re: build pysvn 0.1.1 (+0.2.0) on linux? attempt -> compile err

Posted by Petri Savolainen <pe...@iki.fi>.
Barry Scott wrote:

 > Which Linux are you attempting this on? I have Redhat 7.2 and 9.0 that
 > I can build on.
 > You must use the gcc version that your python was built with. Was it
 > built with gcc 3.2? Usually python is build with a gcc 2.9x compiler.

RH9, and it appears I've got everything compiled with 3.2.2-5 (see 
below). I've got std python.org rpms for both python2.2 and 2.3. I 
presume RH9.0 stock 2.1.3 was compiled with 2.9x...?

 > The problem is the use of the  keyword "class" instead of "typename"
 > if I remember correctly. Which is a pain as msvc6 and gcc 2.9x need
 > class. I will have to add a macro to switch the keyword used but
 > have not coded the logic yet.

Ok. Would this be anywhere near top on your to-do? As python2.2 and 2.3 
rpms need it, if I got it right...? I would help but c/c++/makefiles are 
outside my skill set; I will try to contribute to pysvn on the "snake 
side" instead.

BTW, here's more documentation about my gcc, rpms, gcc python was 
compiled with, and extension compile (0.2.0) result:

-----------

I assume the following means python was compiled with 3.2.2-5:

Python 2.2.3 (#1, Jun 16 2003, 13:21:11)
[GCC 3.2.2 20030222 (Red Hat Linux 3.2.2-5)] on linux2

(I've tried with 2.3.2 too - same gcc)


Here's all gcc-related stuff from 'rpm -qa | grep gcc'

gcc-3.2.2-5
compat-gcc-7.3-2.96.118
gcc-c++-3.2.2-5
libgcc-3.2.2-5
compat-gcc-c++-7.3-2.96.118


So same version? Ok, here's my stab at 0.2.0:

Make executes:

g++ -c -fPIC -I/usr/include/python2.3 
-I/home/petri/varasto/rapidsvn/src/svncpp 
-I/home/petri/varasto/rapidsvn/src -I/usr/include/subversion-1 
-I/usr/include/apr-0 -I. -o pysvn_callbacks.o pysvn_callbacks.cpp


Here is where it seems to bomb at the end:

pysvn.hpp: At global scope:
pysvn.hpp:341: type/value mismatch at argument 1 in template parameter 
list for
    `template<class T> class Py::PythonExtension'
pysvn.hpp:341:   expected a type, got `pysvn_enum_value'
pysvn.hpp:407: type/value mismatch at argument 1 in template parameter 
list for
    `template<class T> class Py::PythonExtension'
pysvn.hpp:407:   expected a type, got `pysvn_enum'
make: *** [pysvn_callbacks.o] Error 1


To be sure, here is the full result of running make not just the end:

[root@duunari Extension]# make
g++ -c -fPIC -I/usr/include/python2.3 
-I/home/petri/varasto/rapidsvn/src/svncpp 
-I/home/petri/varasto/rapidsvn/src -I/usr/include/subversion-1 
-I/usr/include/apr-0 -I. -o pysvn_callbacks.o pysvn_callbacks.cpp
In file included from /usr/include/c++/3.2.2/backward/strstream:51,
                  from /usr/include/python2.3/CXX/Objects.hxx:15,
                  from pysvn.hpp:11,
                  from pysvn_callbacks.cpp:19:
/usr/include/c++/3.2.2/backward/backward_warning.h:32:2: warning: 
#warning This file includes at least one deprecated or antiquated 
header. Please consider using one of the 32 headers found in section 
17.4.1.2 of the C++ standard. Examples include substituting the <X> 
header for the <X.h> header for C++ includes, or <sstream> instead of 
the deprecated header <strstream.h>. To disable this warning use 
-Wno-deprecated.
In file included from pysvn.hpp:11,
                  from pysvn_callbacks.cpp:19:
/usr/include/python2.3/CXX/Objects.hxx:1129: no class template named `
    random_access_iterator' in `std'
/usr/include/python2.3/CXX/Objects.hxx:1265: no class template named `
    random_access_iterator' in `std'
In file included from pysvn.hpp:12,
                  from pysvn_callbacks.cpp:19:
/usr/include/python2.3/CXX/Extensions.hxx: In member function `void
    Py::ExtensionModule<T>::initialize(const char*)':
/usr/include/python2.3/CXX/Extensions.hxx:200: warning: `typename
    std::map<std::string, Py::MethodDefExt<T>*, std::less<std::string>,
    std::allocator<std::pair<const std::string, Py::MethodDefExt<T>*> >
    >::iterator' is implicitly a typename
/usr/include/python2.3/CXX/Extensions.hxx:200: warning: implicit typename is
    deprecated, please see the documentation for details
/usr/include/python2.3/CXX/Extensions.hxx: In member function `virtual
    Py::Object Py::PythonExtension<T>::getattr_methods(const char*)':
/usr/include/python2.3/CXX/Extensions.hxx:530: warning: `typename
    std::map<std::string, Py::MethodDefExt<T>*, std::less<std::string>,
    std::allocator<std::pair<const std::string, Py::MethodDefExt<T>*> >
    >::iterator' is implicitly a typename
/usr/include/python2.3/CXX/Extensions.hxx:530: warning: implicit typename is
    deprecated, please see the documentation for details
In file included from pysvn_callbacks.cpp:19:
pysvn.hpp: At global scope:
pysvn.hpp:40: syntax error before `;' token
pysvn.hpp:280: warning: `typename std::map<std::string, T,
    std::less<std::string>, std::allocator<std::pair<const std::string, T> >
    >::iterator' is implicitly a typename
pysvn.hpp:280: warning: implicit typename is deprecated, please see the
    documentation for details
pysvn.hpp:285: warning: `typename std::map<std::string, T,
    std::less<std::string>, std::allocator<std::pair<const std::string, T> >
    >::iterator' is implicitly a typename
pysvn.hpp:285: warning: implicit typename is deprecated, please see the
    documentation for details
pysvn.hpp: In member function `const std::string& 
EnumString<T>::toString(T)':
pysvn.hpp:260: warning: `typename std::map<T, std::string, std::less<_Key>,
    std::allocator<std::pair<const T, std::string> > >::iterator' is 
implicitly
    a typename
pysvn.hpp:260: warning: implicit typename is deprecated, please see the
    documentation for details
pysvn.hpp: In member function `bool EnumString<T>::toEnum(const 
std::string&,
    T&)':
pysvn.hpp:269: warning: `typename std::map<std::string, T,
    std::less<std::string>, std::allocator<std::pair<const std::string, T> >
    >::iterator' is implicitly a typename
pysvn.hpp:269: warning: implicit typename is deprecated, please see the
    documentation for details
pysvn.hpp: In function `Py::List memberList(T)':
pysvn.hpp:328: warning: `typename std::map<std::string, T,
    std::less<std::string>, std::allocator<std::pair<const std::string, T> >
    >::iterator' is implicitly a typename
pysvn.hpp:328: warning: implicit typename is deprecated, please see the
    documentation for details
pysvn.hpp: At global scope:
pysvn.hpp:341: type/value mismatch at argument 1 in template parameter 
list for
    `template<class T> class Py::PythonExtension'
pysvn.hpp:341:   expected a type, got `pysvn_enum_value'
pysvn.hpp:407: type/value mismatch at argument 1 in template parameter 
list for
    `template<class T> class Py::PythonExtension'
pysvn.hpp:407:   expected a type, got `pysvn_enum'
make: *** [pysvn_callbacks.o] Error 1



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: build pysvn 0.1.1 on linux? attempt -> compile err

Posted by Barry Scott <ba...@barrys-emacs.org>.
Petri,

Which Linux are you attempting this on? I have Redhat 7.2 and 9.0 that
I can build on.

You must use the gcc version that your python was built with. Was it
built with gcc 3.2? Usually python is build with a gcc 2.9x compiler.

The problem is the use of the  keyword "class" instead of "typename"
if I remember correctly. Which is a pain as msvc6 and gcc 2.9x need
class. I will have to add a macro to switch the keyword used but
have not coded the logic yet.

pycxx does not need the complexity of configure or rpm so I do not
use it.

Barry



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org