Compiling enigma2 for the sh4 arch

By | July 21, 2008

[Update: A new post that follows-up this one clarifies why compiling enigma2 for this arch may not be sufficient for running it properly]

During the last days I’ve been asked to run enigma2 on the STb7109 cut 3.0 board, also called cocoref MB442, that is part of the sh4 arch family.

Enigma2 is a DVR application that runs on top of Linux and several of the standard Linux subsystems such as the Frame-buffer,  Linux DVB and V4L. It’s similar to applications such as MythTV, but it was designed and developed for running on embedded systems that have  limited resources compared to a Desktop PC.

I discovered that there are two different ways for doing this. The first one is through the use of a Makefile that downloads and compiles everything for you. This seems, of course, the easiest and fastest way for doing it, the only thing is that since it uses OpenEmbedded that takes a lot of time the first time for building the whole project since it downloads several GB of packages; then it compiles everything starting by generating the cross-toolchain; then it compiles all the requirements for enigma2; then it compiles enigma2 and generates a rootfs image ready for download to the target. This is a great procedure that eases your life after the first time, the big issue I had was that the enigma2 source didn’t compile, they gave me several errors.

After waiting several hours for download everything, several GB less on my hard disk and compiling errors, I decided to do it manually: the configure, make, make install way.

——————————————————————————————————-

License

The first issue that I found was that enigma2 has a weird proprietary license that forbids you to modify, compile or do anything with the source code that you can download from here.

The only thing you can do is to take the version you download and derive a version  that will be licensed under the GPLv2.

That said, everything I describe in this procedure was done with a  derived version of the official enigma2 source tree.

——————————————————————————————————-

Download the sources

The official enigma2 source code is obtained through the CVS tree. You can download a snapshot

cvs -z3 -d:pserver:anonymous@dreamboxupdate.com:/cvs co -P enigma2

or a certain release version:

cvs -z3 -d:pserver:anonymous@dreamboxupdate.com:/cvs co -r enigma2_rel24  enigma2

You will end up with a directory called enigma2.

According to the license, you need to derive a version of this directory in order to do whatever you want. I derived a version and start the following procedure.

——————————————————————————————————-

Requirements

Enigma2 needs several packages in order to compile, I describe the installation of the packages I needed. Notice that enigma2 needs some other packages that I already had in my rootfs like libpng. I described the installation of some of those packages here.

  • fribidi-0.10.9
  • id3lib-3.8.3
  • libsigc++-1.2.7
  • libdvbsi++-0.3.3
  • libxslt-1.1.16
  • libxmlccwrap-0.0.12

——————————————————————————————————-

Environment configuration

Suppose that the libraries will be installed in /opt/STM/STLinux-2.2/devkit/sh4/target and that the cross-toolchain (compiler, linker…) is in your path.

Set the following environment variables that will make our life easier:

$ export BUILD=i386-linux
$ export HOST=sh4-linux
$ export PREFIX=/opt/STM/STLinux-2.2/devkit/sh4/target

——————————————————————————————————-
Building enigma2 and its requirements

——————

fribidi

Configure, compile and install:

$ ./configure --build=$BUILD --host=$HOST --prefix=$PREFIX/usr/local
$ make
$ make install

——————

id3tag

Configure, compile and install:

./configure --build=$BUILD --host=$HOST --prefix=$PREFIX/usr/local 
--enable-debug=no
$ make
$ make install

——————

libsigc++

Configure, compile and install:

$ ./configure --build=$BUILD --host=$HOST --prefix=$PREFIX/usr/local
$ make
$ make install

——————

libdvbsi++

Configure, compile and install:

$ ./configure --build=$BUILD --host=$HOST --prefix=$PREFIX/usr/local
$ make
$ make install

——————

libxslt

Edit the configure file:

Before the if() around line 21190:

if ${XML_CONFIG} --libs print > /dev/null 2>&1

set the following variables:

XML_CONFIG=/opt/STM/STLinux-2.2/devkit/sh4/target/usr/bin/xml2-config
LIBXML_CONFIG_PREFIX="/opt/STM/STLinux-2.2/devkit/sh4/target/usr"
LIBXML_src="/opt/enigma/3rd_party/libxml2-2.6.30"

Configure, compile and install:

$ ./configure --build=$BUILD --host=$HOST --prefix=$PREFIX/usr/local 
  --without-debug 
  --without-debugger 
  --without-crypto
$ make
$ make install

——————

libxmlccwrap

Configure:

$ ./configure --build=$BUILD --host=$HOST --prefix=$PREFIX/usr/local

Edit the file xmlccwrap/Makefile

Set the var INCLUDES to the following value:

INCLUDES = -I$(top_srcdir) 
  -I/opt/STM/STLinux-2.2/devkit/sh4/target/usr/include/libxml2 
  -I/opt/STM/STLinux-2.2/devkit/sh4/target/usr/local/include

Set the var LIBS to the following value:

LIBS = /opt/STM/STLinux-2.2/devkit/sh4/target/usr/lib/libxml2.so 
/opt/STM/STLinux-2.2/devkit/sh4/target/usr/local/lib/libxslt.so

Edit the file testlib/Makefile

Set the var INCLUDES to the following value:

INCLUDES = -I$(top_srcdir) -I/opt/STM/STLinux-2.2/devkit/sh4/target/usr/include/libxml2

Set the var LIBS to the following value:

LIBS = /opt/STM/STLinux-2.2/devkit/sh4/target/usr/lib/libxml2.so 
/opt/STM/STLinux-2.2/devkit/sh4/target/usr/local/lib/libxslt.so

Compile and install:

$ make
$ make install

——————

enigma 2

Edit the configure file:

Around line 5339, before the comment

# should allow for checking of python version here...

set the following values:

PYTHON_FLAGS="-I/opt/STM/STLinux-2.2/devkit/sh4/target/usr/include"

and substitute the var name PYTHON_CPPFLAGS by PYTHON_FLAGS inside the for() block.

Around line 5372, before the comment

# Check for Python library path

set the following values:

PYTHON_FLAGS="-L/opt/STM/STLinux-2.2/devkit/sh4/target/usr/lib/python2.4"

and substitute the var name PYTHON_LDFLAGS by PYTHON_FLAGS inside the for() block.

Around line 7710, after the if() block

if test "$HAVE_XMLCCWRAP" = "yes"; then

set the following variable:

HAVE_XMLCCWRAP="yes"

Configure:

$ PYTHON=/usr/bin/python 
  FREETYPE_CFLAGS=-I$PREFIX/usr/include/freetype2 
  FREETYPE_LIBS="-L$PREFIX/usr/lib -lfreetype" 
  MAD_CFLAGS=-I$PREFIX/usr/include 
  MAD_LIBS="-L$PREFIX/usr/lib -lmad" 
  PNG_CFLAGS=-I$PREFIX/usr/include 
  PNG_LIBS="-L$PREFIX/usr/lib -lpng12" 
  XML2_CFLAGS=-I$PREFIX/usr/include/libxml2 
  XML2_LIBS="-L$PREFIX/usr/lib -lxml2" 
  FRIBIDI_CFLAGS=-I$PREFIX/usr/local/include 
  FRIBIDI_LIBS="-L$PREFIX/usr/local/lib -lfribidi" 
  ID3TAG_CFLAGS=-I$PREFIX/usr/local/include 
  ID3TAG_LIBS="-L$PREFIX/usr/local/lib -lid3" 
  SIGC_CFLAGS="-I$PREFIX/usr/local/include/sigc++-1.2 
  -I$PREFIX/usr/local/lib/sigc++-1.2/include" 
  SIGC_LIBS="-L$PREFIX/usr/local/lib -lsigc-1.2" 
  DVBSI_CFLAGS=-I$PREFIX/usr/local/include 
  DVBSI_LIBS="-L$PREFIX/usr/local/lib -ldvbsi++" 
  XMLCCWRAP_LIBS="-L$PREFIX/usr/local/lib -lxmlccwrap" 
  ./configure 
  --build=$BUILD 
  --host=$HOST 
  --prefix=$PREFIX/usr/local 
  --exec_prefix=$PREFIX/usr/local  
  --bindir=$PREFIX/usr/local/bin  
  --sbindir=$PREFIX/usr/local/sbin 
  --libexecdir=$PREFIX/usr/local/libexec  
  --datadir=$PREFIX/usr/local/share  
  --sysconfdir=$PREFIX/local/etc 
  --sharedstatedir=$PREFIX/usr/local/com  
  --localstatedir=$PREFIX/var  
  --libdir=$PREFIX/usr/local/lib 
  --includedir=$PREFIX/usr/local/include  
  --oldincludedir=$PREFIX/usr/local/include 
  --infodir=$PREFIX/usr/local/share/info  
  --mandir=$PREFIX/usr/local/share/man 
  --with-target=native 
  --with-libsdl=no

If you don’t have the same LCD, you will have to edit the file lib/gdi/lcd.cpp
You can comment must of the code using the NO_LCD define and adding it at the
end of the var DEFS in lib/gdi/Makefile

Edit the main/Makefile:

Add at the end of the var enigma2_LDADD the following values:

-lxslt -lutil -lpython2.4

Compile and install:

$ make
$ make install

Now you can connect to your target and happily execute it:

$ enigma2

That’s it.

29 thoughts on “Compiling enigma2 for the sh4 arch

  1. Ali

    Hi,

    If i use enigma then i dont need the gtk and qt right for GUI.As it will handle it.Can i use Enigma for VOD / DVR and all that stuff.

    Regards
    Ali

    Reply
  2. paguilar

    Hi Ali,

    What you say is correct in theory.
    Unfortunately in practice is not that easy because enigma2 was created for a set of drivers that belong to a particular type of decoder.

    If you compile enigma2 for the sh4 it won’t run as you expect because you will have to modify the source code. I’m doing this at the moment, but I’m not sure when I’ll be avaible to make it work exactly as it works on the Dreambox.

    Regards.

    Reply
  3. mirai

    hy,interesting blog
    Do you have tested on ipbox9000?
    we want to make enigma2 for ipbox9000 but it’s difficult.Do you have tryed?
    Bye

    Reply
  4. paguilar

    Hi,

    I haven’t tried it in the ipbox9000. I have heard that someone was able to run enigma1 on it, but I don’t have the details, sorry.

    IIRC, the ipbox9000hd is based on a STb710x that is the one that I’m using for running enigma2. However, after you compile it as I describe here, you will have to modify it for making it work properly since it tries to access char devices, proc files and the like that don’t exist on the stb710x or, if they exists, they expect different ioctl’s.
    You’ll need a bit of time and effort to make it work.

    Regards,

    Reply
  5. Joowood

    Hi Paguilar,

    I am interested in your blog and ideas. Is there any chance to get in contact with you for sharing experience? Let me know …

    regards

    Joowood

    Reply
  6. paguilar

    Hi,

    I haven’t written any contact info in this blog, nor expand the ‘about’ page because of lack of time, but I’ll do it during the following weeks.

    Meanwhile you can contact me at:
    paguilar (‘at’) junkerhq (‘dot’) net

    Regards

    Reply
  7. Ali

    Hi Paguilar,

    For building libxslt.You have mentioned to edit configure file .I think the line number is 21990 . Do we have to add these statements

    XML_CONFIG=/opt/STM/STLinux-2.2/devkit/sh4/target/usr/bin/xml2-config
    LIBXML_CONFIG_PREFIX=”/opt/STM/STLinux-2.2/devkit/sh4/target/usr”
    LIBXML_src=”/opt/enigma/3rd_party/libxml2-2.6.30″

    cas i don’t see XML_CONFIG anywhere.

    Reply
  8. Ali

    Hi,

    I am trying to build libxslt.However i am getting error in make.

     
    [root@localhost libxslt-1.1.16]# make
    make  all-recursive
    make[1]: Entering directory `/Ali/enigma/libxslt-1.1.16'
    Making all in libxslt
    make[2]: Entering directory `/Ali/enigma/libxslt-1.1.16/libxslt'
    if /bin/sh ../libtool --tag=CC --mode=compile sh4-linux-gcc -DHAVE_CONFIG_H -I. -I. -I.. -I.. -I../libxslt -I/usr/include/libxml2    -g -O2 -Wall -MT extensions.lo -MD -MP -MF ".deps/extensions.Tpo" -c -o extensions.lo extensions.c; 
    then mv -f ".deps/extensions.Tpo" ".deps/extensions.Plo"; else rm -f ".deps/extensions.Tpo"; exit 1; fi
     sh4-linux-gcc -DHAVE_CONFIG_H -I. -I. -I.. -I.. -I../libxslt -I/usr/include/libxml2 -g -O2 -Wall -MT extensions.lo -MD -MP -MF .deps/extensions.Tpo -c extensions.c  -fPIC -DPIC -o .libs/extensions.o
    extensions.c:25:30: error: libxml/xmlmodule.h: No such file or directory
    extensions.c: In function 'xsltExtModuleRegisterDynamic':
    extensions.c:320: error: 'xmlModulePtr' undeclared (first use in this function)
    extensions.c:320: error: (Each undeclared identifier is reported only once
    extensions.c:320: error: for each function it appears in.)
    extensions.c:320: error: expected ';' before 'm'
    extensions.c:382: error: 'LIBXML_MODULE_EXTENSION' undeclared (first use in this function)
    extensions.c:402: error: 'm' undeclared (first use in this function)
    extensions.c:402: warning: implicit declaration of function 'xmlModuleOpen'
    extensions.c:418: warning: implicit declaration of function 'xmlModuleSymbol'
    extensions.c:418: warning: dereferencing type-punned pointer will break strict-aliasing rules
    extensions.c:434: warning: implicit declaration of function 'xmlModuleClose'
    make[2]: *** [extensions.lo] Error 1
    make[2]: Leaving directory `/Ali/enigma/libxslt-1.1.16/libxslt'
    make[1]: *** [all-recursive] Error 1
    make[1]: Leaving directory `/Ali/enigma/libxslt-1.1.16'
    make: *** [all] Error 2
    [root@localhost libxslt-1.1.16]#
     

    Compiler not able to locate xmlmodule.h

    Can u please help!!!!!!!!1

    Regards

    Reply
  9. paguilar

    Hi Ali,

    You should have XML_CONFIG because libxslt needs libxml2. You have to change the values of these variables according to your configuration.

    Check that the version you’re using is the one I used in this post and, more important, the value of LIBXML_src must be the path of the source code of libxml2.
    This last thing could be the cause of the problem in comment #9.

    STLinux comes with a precompiled libxml2 that is the one I’m using for this post (I’m using usr/bin not usr/local/bin), but I had anyway to download and decompress libxml2 so I could set LIBXML_src to the path where I decompress it.

    Hope this helps.
    Regards

    Reply
  10. Ali

    Hi,

    I have downloaded the Engima2 source snapshot from provided cvs :

    cvs -z3 -d:pserver:anonymous@dreamboxupdate.com:/cvs co -P enigma2

    But i don’t see a configure file in engima2 folder to make changes suggested in this blog.

    Regards

    Reply
  11. paguilar

    Hi Ali,

    If there is no configure file, there should be an autogen.sh. When you run this script, it generates the configure file described in the post.

    For some reason I didn’t mention this step that is normally needed when you download a snapshop or an unstable release.

    Regards,

    Reply
  12. Ali

    Hi,

    Cannot find these
    1) var name PYTHON_CPPFLAGS to be replaced by PYTHON_FLAGS inside the for() block after line 5339.

    2)var name PYTHON_LDFLAGS to be replaced by PYTHON_FLAGS inside the for() block after line 53372 .

    in enigma2 configure file.

    Regards

    Reply
  13. Ali

    Hi,

    I am getting this error while i am trying configure .Is it because of the variables that i didn’t find and did not set .As menioned in my last comment no :13 .

    Anyways this is the o/p

     
    checking for a BSD-compatible install... /usr/bin/install -c
    checking whether build environment is sane... yes
    checking for gawk... gawk
    checking whether make sets $(MAKE)... yes
    checking for sh4-linux-strip... sh4-linux-strip
    checking for style of include used by make... GNU
    checking for sh4-linux-gcc... sh4-linux-gcc
    checking for C compiler default output file name... a.out
    checking whether the C compiler works... yes
    checking whether we are cross compiling... yes
    checking for suffix of executables...
    checking for suffix of object files... o
    checking whether we are using the GNU C compiler... yes
    checking whether sh4-linux-gcc accepts -g... yes
    checking for sh4-linux-gcc option to accept ANSI C... none needed
    checking dependency style of sh4-linux-gcc... gcc3
    checking for special C compiler options needed for large files... no
    checking for _FILE_OFFSET_BITS value needed for large files... 64
    checking for _LARGE_FILES value needed for large files... no
    checking target... native
    checking build system type... i386-pc-linux-gnu
    checking host system type... sh4-unknown-linux-gnu
    checking for sh4-linux-gcc... (cached) sh4-linux-gcc
    checking whether we are using the GNU C compiler... (cached) yes
    checking whether sh4-linux-gcc accepts -g... (cached) yes
    checking for sh4-linux-gcc option to accept ANSI C... (cached) none needed
    checking dependency style of sh4-linux-gcc... (cached) gcc3
    checking for sh4-linux-g++... sh4-linux-g++
    checking whether we are using the GNU C++ compiler... yes
    checking whether sh4-linux-g++ accepts -g... yes
    checking dependency style of sh4-linux-g++... gcc3
    checking for sh4-linux-ranlib... sh4-linux-ranlib
    checking for python version... 2.3
    checking for python platform... linux2
    checking for python script directory... ${prefix}/lib/python2.3/site-packages
    checking for python extension module directory... ${exec_prefix}/lib/python2.3/site-packages
    checking for Python include path...
    configure: error: cannot find Python include path
    
    

    Regards

    Reply
  14. Ali

    Hi,

    I am using 26 inch LCD Tv .Which one u used for testing.What
    changes do i have to make.

    Regards

    Reply
  15. Ali

    Hi,

    I have sorted out the issues mentioned in 13 and 14.I have not done any changes for lcd . I tried to compile enigma2 by “make” command got whole lot of error .

     
    [root@localhost enigma2]# make
    Making all in lib
    make[1]: Entering directory `/Ali/enigma/enigma2/lib'
    Making all in actions
    make[2]: Entering directory `/Ali/enigma/enigma2/lib/actions'
    python ./parseactions.py include ../gui/*.h > actionids.h
    parsing ../gui/ebutton.h
    parsing ../gui/ecanvas.h
    parsing ../gui/einput.h
    parsing ../gui/einputnumber.h
    parsing ../gui/einputstring.h
    parsing ../gui/elabel.h
    parsing ../gui/elistboxcontent.h
    parsing ../gui/elistbox.h
    parsing ../gui/epixmap.h
    parsing ../gui/epositiongauge.h
    parsing ../gui/eslider.h
    parsing ../gui/esubtitle.h
    parsing ../gui/evideo.h
    parsing ../gui/ewidgetanimation.h
    parsing ../gui/ewidgetdesktop.h
    parsing ../gui/ewidget.h
    parsing ../gui/ewindow.h
    parsing ../gui/ewindowstyle.h
    parsing ../gui/ewindowstyleskinned.h
    python ./parseactions.py parse ../gui/*.h >> actionids.h
    parsing ../gui/ebutton.h
    parsing ../gui/ecanvas.h
    parsing ../gui/einput.h
    parsing ../gui/einputnumber.h
    parsing ../gui/einputstring.h
    parsing ../gui/elabel.h
    parsing ../gui/elistboxcontent.h
    parsing ../gui/elistbox.h
    parsing ../gui/epixmap.h
    parsing ../gui/epositiongauge.h
    parsing ../gui/eslider.h
    parsing ../gui/esubtitle.h
    parsing ../gui/evideo.h
    parsing ../gui/ewidgetanimation.h
    parsing ../gui/ewidgetdesktop.h
    parsing ../gui/ewidget.h
    parsing ../gui/ewindow.h
    parsing ../gui/ewindowstyle.h
    parsing ../gui/ewindowstyleskinned.h
    if sh4-linux-g++ -DPACKAGE_NAME="enigma2" -DPACKAGE_TARNAME="enigma2" -DPACKAGE_VERSION="2.4" -DPACKAGE_STRING="enigma2 2.4" -DPACKAGE_BUGREPORT="" -DPACKAGE="enigma2" -DVERSION="2.4" -D_GNU_SOURCE=1 -D_FILE_OFFSET_BITS=64 -DDEBUG=1 -DCONFIGDIR="/opt/STM/STLinux-2.2/devkit/sh4/target/local/etc" -DDATADIR="/opt/STM/STLinux-2.2/devkit/sh4/target/usr/local/share" -DLOCALEDIR="/opt/STM/STLinux-2.2/devkit/sh4/target/usr/local/share/locale" -DFONTDIR="/opt/STM/STLinux-2.2/devkit/sh4/target/usr/local/share/fonts" -DGAMESDIR="/opt/STM/STLinux-2.2/devkit/sh4/target/var/tuxbox/games" -DLIBDIR="/opt/STM/STLinux-2.2/devkit/sh4/target/usr/local/lib" -DPLUGINDIR="/opt/STM/STLinux-2.2/devkit/sh4/target/usr/local/lib/tuxbox/plugins" -DTUXBOXDATADIR="/opt/STM/STLinux-2.2/devkit/sh4/target/usr/local/share" -DZONEINFODIR="/opt/STM/STLinux-2.2/devkit/sh4/target/usr/local/share/zoneinfo" -DSTDC_HEADERS=1-DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_LINUX_DVB_VERSION_H=1 -DHAVE_DVB=1 -DHAVE_DVB_API_VERSION=3 -DHAVE_FREETYPE2=1 -DENABLE_NLS=1  -I. -I. -I../../include  -I../.. -D_REENTRANT -I/opt/STM/STLinux-2.2/devkit/sh4/target/usr/include/python2.4  -I/opt/STM/STLinux-2.2/devkit/sh4/target/usr/include/freetype2 -I/opt/STM/STLinux-2.2/devkit/sh4/target/usr/local/include -I/opt/STM/STLinux-2.2/devkit/sh4/target/usr/local/include -I/opt/STM/STLinux-2.2/devkit/sh4/target/usr/include  -I/opt/STM/STLinux-2.2/devkit/sh4/target/usr/local/include  -I/opt/STM/STLinux-2.2/devkit/sh4/target/usr/local/include/sigc++-1.2    -I/opt/STM/STLinux-2.2/devkit/sh4/target/usr/local/lib/sigc++-1.2/include  -I/opt/STM/STLinux-2.2/devkit/sh4/target/usr/local/include    -g -O2 -fno-rtti -fno-exceptions -Wall -MTaction.o -MD -MP -MF ".deps/action.Tpo" -c -o action.o action.cpp; 
    then mv -f ".deps/action.Tpo" ".deps/action.Po"; else rm -f ".deps/action.Tpo"; exit 1; fi
    In file included from ../../lib/base/eerror.h:7,
                     from ../../lib/base/object.h:10,
                     from ../../lib/actions/action.h:4,
                     from action.cpp:1:
    ../../include/libsig_comp.h:4:27: error: sigc++/sigc++.h: No such file or directory
    ../../include/libsig_comp.h:5:25: error: sigc++/bind.h: No such file or directory
    In file included from ../../lib/actions/action.h:4,
                     from action.cpp:1:
    ../../lib/base/object.h:166:4: warning: #warning use non optimized implementation of refcounting.
    ../../lib/base/eerror.h:112: error: expected initializer before ‘<’ token
    ../../lib/python/connections.h:35: error: expected template-name before ‘<’ token
    ../../lib/python/connections.h:35: error: expected `{' before ‘<’ token
    ../../lib/python/connections.h:35: error: expected unqualified-id before ‘<’ token
    ../../lib/python/connections.h:51: error: expected template-name before ‘<’ token
    ../../lib/python/connections.h:51: error: expected `{' before ‘<’ token
    ../../lib/python/connections.h:51: error: expected unqualified-id before ‘<’ token
    ../../lib/python/connections.h:68: error: expected template-name before ‘<’ token
    ../../lib/python/connections.h:68: error: expected `{' before ‘<’ token
    ../../lib/python/connections.h:68: error: expected unqualified-id before ‘<’ token
    ../../lib/base/ebase.h:167: error: field ‘activated’ has incomplete type
    ../../lib/base/ebase.h: In member function ‘void eSocketNotifier::activate(int)’:
    ../../lib/base/ebase.h:155: error: ‘activated’ was not declared in this scope
    ../../lib/base/ebase.h: At global scope:
    ../../lib/base/ebase.h:295: error: field ‘timeout’ has incomplete type
    ../../lib/base/message.h:41: error: expected class-name before ‘{’ token
    ../../lib/base/message.h:50: error: ISO C++ forbids declaration of ‘Signal1’ with no type
    ../../lib/base/message.h:50: error: expected ‘;’ before ‘<’ token
    ../../lib/base/message.h: In constructor ‘eFixedMessagePump::eFixedMessagePump(eMainloop*, int)’:
    ../../lib/base/message.h:58: error: ‘class eSocketNotifier’ has no member named ‘activated’
    ../../lib/base/message.h: At global scope:
    ../../lib/base/message.h:72: error: expected class-name before ‘{’ token
    ../../lib/base/message.h:81: error: field ‘recv_msg’ has incomplete type
    ../../lib/base/message.h: In member function ‘void ePythonMessagePump::do_recv(int)’:
    ../../lib/base/message.h:78: error: ‘recv_msg’ was not declared in this scope
    [root@localhost enigma2]#
    
    

    I am working on this latest snapshot downloaded form CVS .Is it because of unstable release.Which is the stable release of engima2 that can be tried.

    Regards

    Reply
  16. adelide

    Hi,

    I am working on stable source(rel 24.) downloaded from CVS.

    I got error-messages while trying configure.

    what’s a problem?? please help me..

    [root@stlinux-adelide enigma2_rel24]# PYTHON=/usr/bin/python FREETYPE_CFLAGS=-I$PREFIX/usr/include/freetype2 FREETYPE_LIBS=”-L$PREFIX/usr/lib -lfreetype” MAD_CFLAGS=-I$PREFIX/usr/include MAD_LIBS=”-L$PREFIX/usr/lib -lmad” PNG_CFLAGS=-I$PREFIX/usr/include PNG_LIBS=”-L$PREFIX/usr/lib -lpng12″ XML2_CFLAGS=-I$PREFIX/usr/include/libxml2 XML2_LIBS=”-L$PREFIX/usr/lib -lxml2″ FRIBIDI_CFLAGS=-I$PREFIX/usr/local/include FRIBIDI_LIBS=”-L$PREFIX/usr/local/lib -lfribidi” ID3TAG_CFLAGS=-I$PREFIX/usr/local/include ID3TAG_LIBS=”-L$PREFIX/usr/local/lib -lid3″ SIGC_CFLAGS=”-I$PREFIX/usr/local/include/sigc++-1.2
    -I$PREFIX/usr/local/lib/sigc++-1.2/include” SIGC_LIBS=”-L$PREFIX/usr/local/lib -lsigc-1.2″ DVBSI_CFLAGS=-I$PREFIX/usr/local/include DVBSI_LIBS=”-L$PREFIX/usr/local/lib -ldvbsi++” XMLCCWRAP_LIBS=”-L$PREFIX/usr/local/lib -lxmlccwrap” ./configure –build=$BUILD –host=$HOST –prefix=$PREFIX/usr/local –exec_prefix=$PREFIX/usr/local –bindir=$PREFIX/usr/local/bin –sbindir=$PREFIX/usr/local/sbin –libexecdir=$PREFIX/usr/local/libexec –datadir=$PREFIX/usr/local/share –sysconfdir=$PREFIX/local/etc –sharedstatedir=$PREFIX/usr/local/com –localstatedir=$PREFIX/var –libdir=$PREFIX/usr/local/lib –includedir=$PREFIX/usr/local/include –oldincludedir=$PREFIX/usr/local/include –infodir=$PREFIX/usr/local/share/info –mandir=$PREFIX/usr/local/share/man –with-target=native –with-libsdl=no
    checking for a BSD-compatible install… /usr/bin/install -c
    checking whether build environment is sane… yes
    checking for gawk… gawk
    checking whether make sets $(MAKE)… yes
    checking for sh4-linux-strip… sh4-linux-strip
    checking for style of include used by make… GNU
    checking for sh4-linux-gcc… sh4-linux-gcc
    checking for C compiler default output file name… a.out
    checking whether the C compiler works… yes
    checking whether we are cross compiling… yes
    checking for suffix of executables…
    checking for suffix of object files… o
    checking whether we are using the GNU C compiler… yes
    checking whether sh4-linux-gcc accepts -g… yes
    checking for sh4-linux-gcc option to accept ANSI C… none needed
    checking dependency style of sh4-linux-gcc… gcc3
    checking for special C compiler options needed for large files… no
    checking for _FILE_OFFSET_BITS value needed for large files… 64
    checking for _LARGE_FILES value needed for large files… no
    checking target… native
    checking build system type… i386-pc-linux-gnu
    checking host system type… sh4-unknown-linux-gnu
    checking for sh4-linux-gcc… (cached) sh4-linux-gcc
    checking whether we are using the GNU C compiler… (cached) yes
    checking whether sh4-linux-gcc accepts -g… (cached) yes
    checking for sh4-linux-gcc option to accept ANSI C… (cached) none needed
    checking dependency style of sh4-linux-gcc… (cached) gcc3
    checking for sh4-linux-g++… sh4-linux-g++
    checking whether we are using the GNU C++ compiler… yes
    checking whether sh4-linux-g++ accepts -g… yes
    checking dependency style of sh4-linux-g++… gcc3
    checking for sh4-linux-ranlib… sh4-linux-ranlib
    checking for python version… 2.4
    checking for python platform… linux2
    checking for python script directory… ${prefix}/lib/python2.4/site-packages
    checking for python extension module directory… ${exec_prefix}/lib/python2.4/site-packages
    checking for Python include path… /opt/STM/STLinux-2.2/devkit/sh4/target/usr/include/python2.4
    checking for Python library path… /opt/STM/STLinux-2.2/devkit/sh4/target/usr/lib/python2.4/config
    checking how to run the C preprocessor… sh4-linux-gcc -E
    checking for egrep… grep -E
    checking for ANSI C header files… yes
    checking for sys/types.h… yes
    checking for sys/stat.h… yes
    checking for stdlib.h… yes
    checking for string.h… yes
    checking for memory.h… yes
    checking for strings.h… yes
    checking for inttypes.h… yes
    checking for stdint.h… yes
    checking for unistd.h… yes
    checking ost/dmx.h usability… no
    checking ost/dmx.h presence… no
    checking for ost/dmx.h… no
    checking linux/dvb/version.h usability… yes
    checking linux/dvb/version.h presence… yes
    checking for linux/dvb/version.h… yes
    configure: found dvb version 3
    checking for pkg-config… /usr/bin/pkg-config
    checking for freetype2… yes
    checking FREETYPE_CFLAGS… -I/opt/STM/STLinux-2.2/devkit/sh4/target/usr/local/include/freetype2
    checking FREETYPE_LIBS… -L/opt/STM/STLinux-2.2/devkit/sh4/target/usr/local/lib -lfreetype -lz
    checking for fribidi… yes
    checking FRIBIDI_CFLAGS… -I/opt/STM/STLinux-2.2/devkit/sh4/target/usr/local/include/fribidi
    checking FRIBIDI_LIBS… -L/opt/STM/STLinux-2.2/devkit/sh4/target/usr/local/lib -lfribidi
    checking for id3tag… yes
    checking ID3TAG_CFLAGS… -L/usr/include
    checking ID3TAG_LIBS… -lid3tag -lz
    checking for mad… yes
    checking MAD_CFLAGS…
    checking MAD_LIBS… -lmad -lm
    checking for libpng… yes
    checking PNG_CFLAGS… -I/usr/include/libpng12
    checking PNG_LIBS… -lpng12
    checking for sigc++-1.2… yes
    checking SIGC_CFLAGS… -I/opt/STM/STLinux-2.2/devkit/sh4/target/usr/local/include/sigc++-2.0 -I/opt/STM/STLinux-2.2/devkit/sh4/target/usr/local/lib/sigc++-2.0/include
    checking SIGC_LIBS… -L/opt/STM/STLinux-2.2/devkit/sh4/target/usr/local/lib -lsigc-2.0
    checking for libdvbsi++… yes
    checking DVBSI_CFLAGS… -I/opt/STM/STLinux-2.2/devkit/sh4/target/usr/local/include
    checking DVBSI_LIBS… -L/opt/STM/STLinux-2.2/devkit/sh4/target/usr/local/lib -ldvbsi++
    checking for gstreamer… Package gstreamer was not found in the pkg-config search path.
    Perhaps you should add the directory containing `gstreamer.pc’
    to the PKG_CONFIG_PATH environment variable
    No package ‘gstreamer’ found
    checking for jpeg_set_defaults in -ljpeg… yes
    checking for DGifOpenFileName in -lungif… yes
    checking for libxml-2.0… yes
    checking XML2_CFLAGS… -I/usr/include/libxml2
    checking XML2_LIBS… -lxml2 -lz -lm
    checking for exit in -lxmlccwrap… no
    ./configure: line 7665: syntax error near unexpected token `MSGFMT,’
    ./configure: line 7665: `AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,’
    [root@stlinux-adelide enigma2_rel24]#

    Best Regards.

    Reply
  17. paguilar

    Hi adelide,

    You have to comment the lines that contain AM_PATH_PROG_WITH_TEST()
    This func appears 3 times. You should do the same for all of them.

    I’ll add this missing step to the post asap.

    Regards.

    Reply
  18. paguilar

    Hi Ali,

    Do not use version 2.x of libsigc++ as I mention. Try an older one like the 1.2.7.

    I’ll fix these asap in the post. Sorry.

    Regards.

    Reply
  19. Ali

    Hi,

    I have replaced the libsigc++ and installed linbsigc++-1.2.7.and tried to compile enigma2 again .Got this new set of error.

     
    [root@localhost enigma2]# make
    Making all in lib
    make[1]: Entering directory `/Ali/enigma/enigma2/lib'
    Making all in actions
    make[2]: Entering directory `/Ali/enigma/enigma2/lib/actions'
    python ./parseactions.py include ../gui/*.h > actionids.h
    parsing ../gui/ebutton.h
    parsing ../gui/ecanvas.h
    parsing ../gui/einput.h
    parsing ../gui/einputnumber.h
    parsing ../gui/einputstring.h
    parsing ../gui/elabel.h
    parsing ../gui/elistboxcontent.h
    parsing ../gui/elistbox.h
    parsing ../gui/epixmap.h
    parsing ../gui/epositiongauge.h
    parsing ../gui/eslider.h
    parsing ../gui/esubtitle.h
    parsing ../gui/evideo.h
    parsing ../gui/ewidgetanimation.h
    parsing ../gui/ewidgetdesktop.h
    parsing ../gui/ewidget.h
    parsing ../gui/ewindow.h
    parsing ../gui/ewindowstyle.h
    parsing ../gui/ewindowstyleskinned.h
    python ./parseactions.py parse ../gui/*.h >> actionids.h
    parsing ../gui/ebutton.h
    parsing ../gui/ecanvas.h
    parsing ../gui/einput.h
    parsing ../gui/einputnumber.h
    parsing ../gui/einputstring.h
    parsing ../gui/elabel.h
    parsing ../gui/elistboxcontent.h
    parsing ../gui/elistbox.h
    parsing ../gui/epixmap.h
    parsing ../gui/epositiongauge.h
    parsing ../gui/eslider.h
    parsing ../gui/esubtitle.h
    parsing ../gui/evideo.h
    parsing ../gui/ewidgetanimation.h
    parsing ../gui/ewidgetdesktop.h
    parsing ../gui/ewidget.h
    parsing ../gui/ewindow.h
    parsing ../gui/ewindowstyle.h
    parsing ../gui/ewindowstyleskinned.h
    if sh4-linux-g++ -DPACKAGE_NAME="enigma2" -DPACKAGE_TARNAME="enigma2" -DPACKAGE_VERSION="2.4" -DPACKAGE_STRING="enigma2 2.4" -DPACKAGE_BUGREPORT="" -DPACKAGE="enigma2" -DVERSION="2.4" -D_GNU_SOURCE=1 -D_FILE_OFFSET_BITS=64 -DDEBUG=1 -DCONFIGDIR="/opt/STM/STLinux-2.2/devkit/sh4/target/local/etc" -DDATADIR="/opt/STM/STLinux-2.2/devkit/sh4/target/usr/local/share" -DLOCALEDIR="/opt/STM/STLinux-2.2/devkit/sh4/target/usr/local/share/locale" -DFONTDIR="/opt/STM/STLinux-2.2/devkit/sh4/target/usr/local/share/fonts" -DGAMESDIR="/opt/STM/STLinux-2.2/devkit/sh4/target/var/tuxbox/games" -DLIBDIR="/opt/STM/STLinux-2.2/devkit/sh4/target/usr/local/lib" -DPLUGINDIR="/opt/STM/STLinux-2.2/devkit/sh4/target/usr/local/lib/tuxbox/plugins" -DTUXBOXDATADIR="/opt/STM/STLinux-2.2/devkit/sh4/target/usr/local/share" -DZONEINFODIR="/opt/STM/STLinux-2.2/devkit/sh4/target/usr/local/share/zoneinfo" -DSTDC_HEADERS=1-DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_LINUX_DVB_VERSION_H=1 -DHAVE_DVB=1 -DHAVE_DVB_API_VERSION=3 -DHAVE_FREETYPE2=1 -DENABLE_NLS=1  -I. -I. -I../../include  -I../.. -D_REENTRANT -I/opt/STM/STLinux-2.2/devkit/sh4/target/usr/include/python2.4  -I/opt/STM/STLinux-2.2/devkit/sh4/target/usr/local/include/freetype2 -I/opt/STM/STLinux-2.2/devkit/sh4/target/usr/local/include -I/opt/STM/STLinux-2.2/devkit/sh4/target/usr/local/include -I/opt/STM/STLinux-2.2/devkit/sh4/target/usr/include  -I/opt/STM/STLinux-2.2/devkit/sh4/target/usr/local/include  -I/opt/STM/STLinux-2.2/devkit/sh4/target/usr/local/include/sigc++-1.2    -I/opt/STM/STLinux-2.2/devkit/sh4/target/usr/local/lib/sigc++-1.2/include  -I/opt/STM/STLinux-2.2/devkit/sh4/target/usr/local/include    -g -O2 -fno-rtti -fno-exceptions -Wall -MT action.o -MD -MP -MF ".deps/action.Tpo" -c -o action.o action.cpp; 
    then mv -f ".deps/action.Tpo" ".deps/action.Po"; else rm -f ".deps/action.Tpo"; exit 1; fi
    In file included from ../../lib/actions/action.h:4,
                     from action.cpp:1:
    ../../lib/base/object.h:166:4: warning: #warning use non optimized implementation of refcounting.
    rm -f libenigma_actions.a
    ar cru libenigma_actions.a action.o
    sh4-linux-ranlib libenigma_actions.a
    make[2]: Leaving directory `/Ali/enigma/enigma2/lib/actions'
    Making all in base
    make[2]: Entering directory `/Ali/enigma/enigma2/lib/base'
    if sh4-linux-g++ -DPACKAGE_NAME="enigma2" -DPACKAGE_TARNAME="enigma2" -DPACKAGE_VERSION="2.4" -DPACKAGE_STRING="enigma2 2.4" -DPACKAGE_BUGREPORT="" -DPACKAGE="enigma2" -DVERSION="2.4" -D_GNU_SOURCE=1 -D_FILE_OFFSET_BITS=64 -DDEBUG=1 -DCONFIGDIR="/opt/STM/STLinux-2.2/devkit/sh4/target/local/etc" -DDATADIR="/opt/STM/STLinux-2.2/devkit/sh4/target/usr/local/share" -DLOCALEDIR="/opt/STM/STLinux-2.2/devkit/sh4/target/usr/local/share/locale" -DFONTDIR="/opt/STM/STLinux-2.2/devkit/sh4/target/usr/local/share/fonts" -DGAMESDIR="/opt/STM/STLinux-2.2/devkit/sh4/target/var/tuxbox/games" -DLIBDIR="/opt/STM/STLinux-2.2/devkit/sh4/target/usr/local/lib" -DPLUGINDIR="/opt/STM/STLinux-2.2/devkit/sh4/target/usr/local/lib/tuxbox/plugins" -DTUXBOXDATADIR="/opt/STM/STLinux-2.2/devkit/sh4/target/usr/local/share" -DZONEINFODIR="/opt/STM/STLinux-2.2/devkit/sh4/target/usr/local/share/zoneinfo" -DSTDC_HEADERS=1-DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_LINUX_DVB_VERSION_H=1 -DHAVE_DVB=1 -DHAVE_DVB_API_VERSION=3 -DHAVE_FREETYPE2=1 -DENABLE_NLS=1  -I. -I. -I../../include  -I../.. -D_REENTRANT -I/opt/STM/STLinux-2.2/devkit/sh4/target/usr/include/python2.4  -I/opt/STM/STLinux-2.2/devkit/sh4/target/usr/local/include/freetype2 -I/opt/STM/STLinux-2.2/devkit/sh4/target/usr/local/include -I/opt/STM/STLinux-2.2/devkit/sh4/target/usr/local/include -I/opt/STM/STLinux-2.2/devkit/sh4/target/usr/include  -I/opt/STM/STLinux-2.2/devkit/sh4/target/usr/local/include  -I/opt/STM/STLinux-2.2/devkit/sh4/target/usr/local/include/sigc++-1.2    -I/opt/STM/STLinux-2.2/devkit/sh4/target/usr/local/lib/sigc++-1.2/include  -I/opt/STM/STLinux-2.2/devkit/sh4/target/usr/local/include    -g -O2 -fno-rtti -fno-exceptions -Wall -MT buffer.o -MD -MP -MF ".deps/buffer.Tpo" -c -o buffer.o buffer.cpp; 
    then mv -f ".deps/buffer.Tpo" ".deps/buffer.Po"; else rm -f ".deps/buffer.Tpo"; exit 1; fi
    if sh4-linux-g++ -DPACKAGE_NAME="enigma2" -DPACKAGE_TARNAME="enigma2" -DPACKAGE_VERSION="2.4" -DPACKAGE_STRING="enigma2 2.4" -DPACKAGE_BUGREPORT="" -DPACKAGE="enigma2" -DVERSION="2.4" -D_GNU_SOURCE=1 -D_FILE_OFFSET_BITS=64 -DDEBUG=1 -DCONFIGDIR="/opt/STM/STLinux-2.2/devkit/sh4/target/local/etc" -DDATADIR="/opt/STM/STLinux-2.2/devkit/sh4/target/usr/local/share" -DLOCALEDIR="/opt/STM/STLinux-2.2/devkit/sh4/target/usr/local/share/locale" -DFONTDIR="/opt/STM/STLinux-2.2/devkit/sh4/target/usr/local/share/fonts" -DGAMESDIR="/opt/STM/STLinux-2.2/devkit/sh4/target/var/tuxbox/games" -DLIBDIR="/opt/STM/STLinux-2.2/devkit/sh4/target/usr/local/lib" -DPLUGINDIR="/opt/STM/STLinux-2.2/devkit/sh4/target/usr/local/lib/tuxbox/plugins" -DTUXBOXDATADIR="/opt/STM/STLinux-2.2/devkit/sh4/target/usr/local/share" -DZONEINFODIR="/opt/STM/STLinux-2.2/devkit/sh4/target/usr/local/share/zoneinfo" -DSTDC_HEADERS=1-DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_LINUX_DVB_VERSION_H=1 -DHAVE_DVB=1 -DHAVE_DVB_API_VERSION=3 -DHAVE_FREETYPE2=1 -DENABLE_NLS=1  -I. -I. -I../../include  -I../.. -D_REENTRANT -I/opt/STM/STLinux-2.2/devkit/sh4/target/usr/include/python2.4  -I/opt/STM/STLinux-2.2/devkit/sh4/target/usr/local/include/freetype2 -I/opt/STM/STLinux-2.2/devkit/sh4/target/usr/local/include -I/opt/STM/STLinux-2.2/devkit/sh4/target/usr/local/include -I/opt/STM/STLinux-2.2/devkit/sh4/target/usr/include  -I/opt/STM/STLinux-2.2/devkit/sh4/target/usr/local/include  -I/opt/STM/STLinux-2.2/devkit/sh4/target/usr/local/include/sigc++-1.2    -I/opt/STM/STLinux-2.2/devkit/sh4/target/usr/local/lib/sigc++-1.2/include  -I/opt/STM/STLinux-2.2/devkit/sh4/target/usr/local/include    -g -O2 -fno-rtti -fno-exceptions -Wall -MT ebase.o -MD -MP -MF ".deps/ebase.Tpo" -c -o ebase.o ebase.cpp; 
    then mv -f ".deps/ebase.Tpo" ".deps/ebase.Po"; else rm -f ".deps/ebase.Tpo"; exit 1; fi
    In file included from ../../lib/base/smartptr.h:4,
                     from ../../lib/base/eptrlist.h:7,
                     from ../../lib/base/ebase.h:12,
                     from ebase.cpp:1:
    ../../lib/base/object.h:166:4: warning: #warning use non optimized implementation of refcounting.
    ebase.cpp: In member function ‘int eMainloop::processOneEvent(unsigned int, PyObject**, ePyObject)’:
    ebase.cpp:204: error: ‘Py_ssize_t’ was not declared in this scope
    ebase.cpp:204: error: expected `;' before ‘pos’
    ebase.cpp:205: error: ‘pos’ was not declared in this scope
    ebase.cpp: In function ‘PyObject* eTimerPy_is_active(eTimerPy*)’:
    ebase.cpp:452: warning: dereferencing type-punned pointer will break strict-aliasing rules
    ebase.cpp:452: warning: dereferencing type-punned pointer will break strict-aliasing rules
    ebase.cpp: In function ‘PyObject* eTimerPy_start(eTimerPy*, PyObject*)’:
    ebase.cpp:469: warning: dereferencing type-punned pointer will break strict-aliasing rules
    ebase.cpp:471: warning: dereferencing type-punned pointer will break strict-aliasing rules
    ebase.cpp: In function ‘PyObject* eSocketNotifierPy_new(PyTypeObject*, PyObject*, PyObject*)’:
    ebase.cpp:655: warning: dereferencing type-punned pointer will break strict-aliasing rules
    ebase.cpp:657: warning: dereferencing type-punned pointer will break strict-aliasing rules
    ebase.cpp: In function ‘PyObject* eSocketNotifierPy_is_running(eSocketNotifierPy*)’:
    ebase.cpp:671: warning: dereferencing type-punned pointer will break strict-aliasing rules
    ebase.cpp:671: warning: dereferencing type-punned pointer will break strict-aliasing rules
    ebase.cpp: In function ‘void eBaseInit()’:
    ebase.cpp:806: warning: dereferencing type-punned pointer will break strict-aliasing rules
    ebase.cpp:807: warning: dereferencing type-punned pointer will break strict-aliasing rules
    ebase.cpp:811: warning: dereferencing type-punned pointer will break strict-aliasing rules
    ebase.cpp:812: warning: dereferencing type-punned pointer will break strict-aliasing rules
    make[2]: *** [ebase.o] Error 1
    make[2]: Leaving directory `/Ali/enigma/enigma2/lib/base'
    make[1]: *** [all-recursive] Error 1
    make[1]: Leaving directory `/Ali/enigma/enigma2/lib'
    make: *** [all-recursive] Error 1
    
    

    Regards

    Reply
  20. Max

    Hi,
    how we can made plugin for e2 on ipbox9000?
    All plugin are in python but in order to write by myself, how i acan do?
    What i need?

    Best regards,
    Max

    Reply
  21. adelide

    please help me.
    what’s wrong?… T.T

    if sh4-linux-g++ -DPACKAGE_NAME=”enigma2″ -DPACKAGE_TARNAME=”enigma2″ -DPACKAGE_VERSION=”2.4″ -DPACKAGE_STRING=”enigma2 2.4″ -DPACKAGE_BUGREPORT=”” -DPACKAGE=”enigma2″ -DVERSION=”2.4″ -D_GNU_SOURCE=1 -D_FILE_OFFSET_BITS=64 -DDEBUG=1 -DCONFIGDIR=”/opt/STM/STLinux-2.2/devkit/sh4/target_full/local/etc” -DDATADIR=”/opt/STM/STLinux-2.2/devkit/sh4/target_full/usr/local/share” -DLOCALEDIR=”/opt/STM/STLinux-2.2/devkit/sh4/target_full/usr/local/share/locale” -DFONTDIR=”/opt/STM/STLinux-2.2/devkit/sh4/target_full/usr/local/share/fonts” -DGAMESDIR=”/opt/STM/STLinux-2.2/devkit/sh4/target_full/var/tuxbox/games” -DLIBDIR=”/opt/STM/STLinux-2.2/devkit/sh4/target_full/usr/local/lib” -DPLUGINDIR=”/opt/STM/STLinux-2.2/devkit/sh4/target_full/usr/local/lib/tuxbox/plugins” -DTUXBOXDATADIR=”/opt/STM/STLinux-2.2/devkit/sh4/target_full/usr/local/share” -DZONEINFODIR=”/opt/STM/STLinux-2.2/devkit/sh4/target_full/usr/local/share/zoneinfo” -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_LINUX_DVB_VERSION_H=1 -DHAVE_DVB=1 -DHAVE_DVB_API_VERSION=3 -DHAVE_FREETYPE2=1 -DENABLE_NLS=1 -I. -I. -I../../include -I../../src -I../.. -D_REENTRANT -I/opt/STM/STLinux-2.2/devkit/sh4/target_full/usr/include/python2.4 -I/usr/include/freetype2 -I/opt/STM/STLinux-2.2/devkit/sh4/target_full/usr/local/include/fribidi -L/usr/include -I/usr/include/libpng12 -I/opt/STM/STLinux-2.2/devkit/sh4/target_full/usr/local/lib/sigc++-1.2/include -I/opt/STM/STLinux-2.2/devkit/sh4/target_full/usr/local/include/sigc++-1.2 -I/opt/STM/STLinux-2.2/devkit/sh4/target_full/usr/local/include -g -O2 -fno-rtti -fno-exceptions -Wall -MT python.o -MD -MP -MF “.deps/python.Tpo” -c -o python.o python.cpp;
    then mv -f “.deps/python.Tpo” “.deps/python.Po”; else rm -f “.deps/python.Tpo”; exit 1; fi
    In file included from ../../lib/python/python.h:9,
    from python.cpp:11:
    ../../lib/base/object.h:173:4: warning: #warning use non optimized implementation of refcounting.
    swig -I../../ -c++ -python -O -nortti -nothreads enigma_python.i
    swig error : Unrecognized option -O
    swig error : Unrecognized option -nortti
    swig error : Unrecognized option -nothreads
    Use ‘swig -help’ for available options.
    make[3]: *** [enigma_python_wrap.cxx] Error 1
    make[2]: *** [all-recursive] Error 1
    make[1]: *** [all-recursive] Error 1
    make: *** [all-recursive] Error 1

    best regards.

    Reply
  22. paguilar

    Hi,

    I’ve never had this error with swig. I would start looking at the swig doc. IIRC, the file enigma_python.i is used for telling swig which C++ funcs will be available from Python. Did you change the sources or Makefiles?
    When you solve this problem I’d appreciate if you let me know what was causing it.

    Regards,

    Reply
  23. paguilar

    Hi Max,

    You can start by looking at some of the plugins already provided in the source.
    E.g. lib/python/Plugins/DemoPlugins/TestPlugin/plugin.py

    Since it’s an interpreted language, you can test it by simply putting the source in the directory where Python expects it in the rootfs of the target (ipbox).
    E.g. usr/local/lib/enigma2/python/Plugins/DemoPlugins/

    Regards.

    Reply
  24. lyoo

    hi paguilar
    after I run autogen.sh creating configure file, it’s just 4651 lines, there is no 5339 line, 5372 line and 7710 line to modify, and no for() block, I use the code tree from TdT_sh4_enigma2_src_1.00_rev600.zip, could you help me?

    Reply
  25. paguilar

    Hi,
    The configure in the TdT sources are from a different snapshot (different date/time), so the line numbering may not be the same.
    In this case you have to search directly the text string like # should allow for checking of python version here…”

    If you cannot find that string nor the line to be modified, you could configure without any modifications and check if it gives you an error. If this is the case, try to modify the line that gives you an error in the same way that this procedure describes.

    Hope this helps.

    Reply
  26. lyoo

    thanks for you reply
    woo, it’s my careless, my host doesn’t install
    autoconf
    automake
    libtool
    after install them, configure file create correctly, about 8000 lines, then I found the place said above…

    but a litter change:

    >>Around line 5339, before the comment
    >>
    >># should allow for checking of python version here…
    >>set the following values:
    >>
    >>PYTHON_FLAGS=”-I/opt/STM/STLinux->>2.2/devkit/sh4/target/usr/include”
    >>and substitute the var name PYTHON_CPPFLAGS by >>PYTHON_FLAGS inside the for() block.

    here PYTHON_CPPFLAGS maybe CPPFLAGS

    >>
    >>Around line 5372, before the comment
    >>
    >># Check for Python library path
    >>set the following values:
    >>
    >>PYTHON_FLAGS=”-L/opt/STM/STLinux->>2.2/devkit/sh4/target/usr/lib/python2.4″
    >>and substitute the var name PYTHON_LDFLAGS by >>PYTHON_FLAGS inside the for() block.

    here PYTHON_LDFLAGS maybe LDFLAGS

    other place should be modified

    in /enigma2/lib/base/ioprio.cpp

    add

    #elif defined(__sh__)
    #define __NR_ioprio_set 288
    #define __NR_ioprio_get 289

    before

    #else
    #error “Unsupported arch”
    #endif

    in /enigma2/lib/dvb/frontend.cpp

    comment

    //parm_inversion |= (feparm.rolloff << 2); // Hack.. we use bit 2..3 of inversion para
    m for rolloff

    and

    //parm_inversion |= (feparm.pilot << 4); // Hack.. we use bit 4..5 of inversio
    n param for pilot

    but still make failed:

    ……
    swig -I../../ -c++ -python -O -nortti -nothreads enigma_python.i
    /bin/bash: swig: command not found
    make[3]: *** [enigma_python_wrap.cxx] Error 127
    make[3]: Leaving directory `/home/spark/e2/enigma2/lib/python’
    make[2]: *** [all-recursive] Error 1
    make[2]: Leaving directory `/home/spark/e2/enigma2/lib/python’
    make[1]: *** [all-recursive] Error 1
    make[1]: Leaving directory `/home/spark/e2/enigma2/lib’
    make: *** [all-recursive] Error 1

    obviously, swig package isn’t install.
    should I compile a x86 swig or cross comile a sh4 one?

    Reply
  27. paguilar

    Hi,

    You need swig in your host for x86. It acts as the glue between C++ and Python. It generates source code that will be compiled later.

    Regards.

    Reply
  28. adelide

    Finally, I have completed enigma2 for sh4.
    and found the answer of reply(num.22,23)
    It was very simple. just, only I was change the swig. (1.3.21 -> 1.3.39)to latest ver.

    Regards.

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *