pudwerkin / pyffmpeg

Automatically exported from code.google.com/p/pyffmpeg
0 stars 0 forks source link

pyffmpeg 2.0 & 2.1 beta under Fedoara 16 with python 2.7.2 - error compiling #46

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. use python setup.py install ( under Fedora 16 )
2.
3.

What is the expected output? What do you see instead?
pyffmpeg-2.1beta]$ python setup.py build
running build
running build_ext
cythoning pyffmpeg.pyx to pyffmpeg.c
warning: pyffmpeg.pyx:1905:49: Unreachable code

Error compiling Cython file:
------------------------------------------------------------
...

    cdef AVFormatContext *FormatCtx
 #   self.prepacket=<AVPacket *>None
#   self.packet=&self.packetbufa

    def __new__(self):
   ^
------------------------------------------------------------

pyffmpeg.pyx:808:4: __new__ method of extension type will change semantics in a 
future version of Pyrex and Cython. Use __cinit__ instead.

Error compiling Cython file:
------------------------------------------------------------
...
    cdef object default_audio_track
    cdef object default_video_track
    cdef int with_readahead
    cdef unsigned long long int seek_before_security_interval

    def __new__(self,with_readahead=True,seek_before=4000):
   ^
------------------------------------------------------------

pyffmpeg.pyx:1835:4: __new__ method of extension type will change semantics in 
a future version of Pyrex and Cython. Use __cinit__ instead.

Error compiling Cython file:
------------------------------------------------------------
...
##################################################################

def py_av_register_all():
    if __registered:
                  ^
------------------------------------------------------------

pyffmpeg.pyx:706:19: local variable '__registered' referenced before assignment
building 'pyffmpeg' extension
C compiler: gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall 
-Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector 
--param=ssp-buffer-size=4 -m32 -march=i686 -mtune=atom 
-fasynchronous-unwind-tables -D_GNU_SOURCE -fPIC -fwrapv -DNDEBUG -O2 -g -pipe 
-Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector 
--param=ssp-buffer-size=4 -m32 -march=i686 -mtune=atom 
-fasynchronous-unwind-tables -D_GNU_SOURCE -fPIC -fwrapv -fPIC

compile options: '-I/opt/ffmpeg/include -I/usr/include/ffmpeg -I./include 
-I/usr/lib/python2.7/site-packages/numpy/core/include -I/usr/include/python2.7 
-c'
gcc: pyffmpeg.c
pyffmpeg.c:1:2: error: #error Do not use this file, it is the result of a 
failed Cython compilation.
pyffmpeg.c:1:2: error: #error Do not use this file, it is the result of a 
failed Cython compilation.
error: Command "gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall 
-Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector 
--param=ssp-buffer-size=4 -m32 -march=i686 -mtune=atom 
-fasynchronous-unwind-tables -D_GNU_SOURCE -fPIC -fwrapv -DNDEBUG -O2 -g -pipe 
-Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector 
--param=ssp-buffer-size=4 -m32 -march=i686 -mtune=atom 
-fasynchronous-unwind-tables -D_GNU_SOURCE -fPIC -fwrapv -fPIC 
-I/opt/ffmpeg/include -I/usr/include/ffmpeg -I./include 
-I/usr/lib/python2.7/site-packages/numpy/core/include -I/usr/include/python2.7 
-c pyffmpeg.c -o build/temp.linux-i686-2.7/pyffmpeg.o" failed with exit status 1

What version of the product are you using? On what operating system?
I try both pyffmpeg 2.0 and 2.1beta

Please provide any additional information below.
I have ffmpeg install and python :
$ python 
Python 2.7.2 (default, Oct 27 2011, 01:36:46) 
[GCC 4.6.1 20111003 (Red Hat 4.6.1-10)] on linux2

Original issue reported on code.google.com by catalinf...@gmail.com on 1 Apr 2012 at 8:19

GoogleCodeExporter commented 9 years ago
With Linux Mageia 1 32 bits and pyffmpeg 2.1beta, I got the same problem with 
the "__new__" methods in the file "pyffmpeg.pyx".
To avoid them, you can replace them line 808 and 1835 by "__cinit__".

Original comment by 000JeanM...@gmail.com on 4 May 2012 at 1:55