WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: gcc issues (pymedia installation)  (Read 5005 times)

Offline mb0

  • Jr. Member
  • **
  • Posts: 86
gcc issues (pymedia installation)
« on: April 07, 2012, 03:09:48 PM »
I am trying to install pymedia (python setup.py build), however I get the error 'command 'gcc' failed with exit status 1' when trying to do so. The full output is:
Code: [Select]
running build
running build_py
running build_ext
building 'pymedia.muxer' extension
gcc -pthread -fno-strict-aliasing -march=i486 -mtune=i686 -O3 -pipe -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -DBUILD_NUM=1881 -DPATH_DEV_DSP="/dev/dsp" -DPATH_DEV_MIXER="/dev/mixer" -D_FILE_OFFSET_BITS=64 -DACCEL_DETECT=1 -DHAVE_MMX=1 -DHAVE_LINUX_DVD_STRUCT=1 -DDVD_STRUCT_IN_LINUX_CDROM_H=1 -DCONFIG_VORBIS -DCONFIG_VORBIS -DCONFIG_MP3LAME -DCONFIG_VORBIS -DCONFIG_ALSA -DHAVE_AV_CONFIG_H -DUDF_CACHE=1 -INone -INone -I/usr/local/include/lame -INone -INone -I/opt/db/pymedia-1.3.7.3 -Ivideo/ -I/usr/local/include/python2.7 -c video/muxer/demuxer.c -o build/temp.linux-i686-2.7/video/muxer/demuxer.o
In file included from /usr/local/include/python2.7/Python.h:58:0,
                 from video/muxer/demuxer.c:27:
/usr/local/include/python2.7/pyport.h:146:1: error: unknown type name 'uintptr_t'
In file included from video/libavcodec/avcodec.h:14:0,
                 from video/muxer/muxer.h:5,
                 from video/muxer/demuxer.c:30:
video/libavcodec/common.h: In function 'skip_bits':
video/libavcodec/common.h:747:1: warning: variable 're_cache' set but not used [-Wunused-but-set-variable]
video/muxer/demuxer.c: At top level:
video/libavformat/avformat.h:67:13: warning: 'av_free_packet' defined but not used [-Wunused-function]
error: command 'gcc' failed with exit status 1

Anyone have any ideas, please??

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11043
Re: gcc issues (pymedia installation)
« Reply #1 on: April 07, 2012, 04:34:50 PM »
pyport.h looks like a buggy header file that should include stdint.h but doesn't.
The only barriers that can stop you are the ones you create yourself.

Offline mb0

  • Jr. Member
  • **
  • Posts: 86
Re: gcc issues (pymedia installation)
« Reply #2 on: April 07, 2012, 04:57:08 PM »
stdint.h is referenced in the file though?.. here is the start of it:
Code: [Select]
#ifndef Py_PYPORT_H
#define Py_PYPORT_H

#include "pyconfig.h" /* include for defines */

/* Some versions of HP-UX & Solaris need inttypes.h for int32_t,
   INT32_MAX, etc. */
#ifdef HAVE_INTTYPES_H
#include <inttypes.h>
#endif

#ifdef HAVE_STDINT_H
#include <stdint.h>
#endif

/**
Is there anything to modify here or does the problem lie elsewhere??

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11581
Re: gcc issues (pymedia installation)
« Reply #3 on: April 07, 2012, 05:52:05 PM »
Hi mb0
That include statement won't get executed unless the symbol  HAVE_STDINT_H   is defined somewhere. There might
be someplace in the build script to define it. Or you could try adding   -DHAVE_STDINT_H=1   to the gcc command.

Offline AmatCoder

  • Full Member
  • ***
  • Posts: 179
    • AmatCoder Projects
Re: gcc issues (pymedia installation)
« Reply #4 on: April 07, 2012, 06:22:58 PM »
Here a patch from Arch package:
Code: [Select]
--- video/muxer/demuxer.c.orig 2006-02-22 03:15:44.000000000 +0100
+++ video/muxer/demuxer.c 2011-05-04 22:00:05.000000000 +0200
@@ -24,6 +24,7 @@
  * Dmitry Borisov
 */
 
+#include <stdint.h>
 #include <Python.h>
 
 #include "version.h"
--- video/muxer/muxer.c.orig 2005-11-13 21:20:00.000000000 +0100
+++ video/muxer/muxer.c 2011-05-04 22:02:49.000000000 +0200
@@ -24,6 +24,7 @@
  * Dmitry Borisov
 */
 
+#include <stdint.h>
 #include <Python.h>
 
 #include "muxer.h"
--- video/vcodec/vcodec.c.orig 2006-04-02 02:55:48.000000000 +0200
+++ video/vcodec/vcodec.c 2011-05-04 22:06:01.000000000 +0200
@@ -24,6 +24,7 @@
  * Dmitry Borisov
 */
 
+#include <stdint.h>
 #include <Python.h>
 #include <structmember.h>
 

Just include stdint.h header into
video/muxer/demuxer.c
video/muxer/muxer.c
video/vcodec/vcodec.c

Offline mb0

  • Jr. Member
  • **
  • Posts: 86
Re: gcc issues (pymedia installation)
« Reply #5 on: April 07, 2012, 06:39:03 PM »
Thanks amat, works a treat! (well, I haven't used it yet but no problems apparent with the build)

Offline manyakkedi

  • Newbie
  • *
  • Posts: 1
Re: gcc issues (pymedia installation)
« Reply #6 on: July 03, 2013, 06:57:48 PM »

Just include stdint.h header into

video/muxer/demuxer.c
video/muxer/muxer.c
video/vcodec/vcodec.c


thanks, works great