technic / enigma2_example

enigma2 plugin project example with Docker and VS Code configuration
MIT License
14 stars 9 forks source link

Problem setting up the development environment #10

Open starapo7348 opened 3 weeks ago

starapo7348 commented 3 weeks ago

I want to use the published docker container to run enigma on my PC. I want to try it for building and debugging enigma2 python 3 plugins.

I am using Openpli 9.x. (Python3)

But now I have some problems building and running the docker container.

I can't find the libdvbsi++ library. The url is not working anymore. git://git.opendreambox.org/git/obi/libdvbsi++.git

Where can I find a working copy of this library?

When I start the enigma container and enigma2 I see: eInit reached rl -1.

[gRC] Thread has finished.
[eInit] - (9) Font Render Class
[eInit] - (9) gLCD
[eInit] - (9) gSDLDC
[eInit] - (8) graphics acceleration manager
[eInit] - (5) Tuxtxt
[eInit] - (1) Background File Eraser
[eInit] reached rl -1

Also when I connect to the server/enigma2 with vnc I only see a black screen. I think enigma2 is not started correctly.

It would be nice if someone could help me setting up a working development environment with the enigma2 docker image with updated instructions to sort out this issues.

Thank you.

technic commented 3 weeks ago

Hi, I am no longer maintaining this, sorry. For libdvbsi++ there must exist a new copy of the code somewhere.

When I start the enigma container and enigma2 I see: eInit reached rl -1.

This means enigma stopped. You need to debug why it stopped or try enabling verbose logging with ENIGMA_DEBUG_LVL environment variable

starapo7348 commented 2 weeks ago

Hi, thank you for your reply. That is a pity that you no longer maintain it. Unfortunately, I have just found your project lately. This is great for developing and debugging e2 plugins. Great work! I have found the missing libdvbsi++ lib here: https://github.com/jack2015/libdvbsi.git

The code from https://github.com/rabinovic/enigma2.git compiles but enigma2 terminates with "[Enigma] Exit code 5!"

I found this for old openatv code.


if (exit_code == 5) /* python crash */
    {
        eDebug("[Enigma] Exit code 5!");
        bsodFatal(0);
    }

Your openatv 7 code also compiles but enigma2 stops with rl -1. -> https://github.com/technic/enigma2.git Is debug level 5 ok for verbose logging? -> ENIGMA_DEBUG_LVL=5

I think I will try to switch to the actual OpenPLI code. -> https://github.com/OpenPLi/enigma2 They switched to python 3 with OpenPli 9.x meanwhile. Also the other code is old now > 4+ years. I use OpenPLI 9 on my real VU+ Duo4k SE hardware box.

I have some compile issues but maybe could solve them. The ./configure option --with-gstversion=1.0 isn't present anymore. I don't know if I need it to run enigma.

Another compile error in enigma2 /openpli


 CXX      gdi/libenigma_gdi_a-lcd.o
  CXX      gdi/libenigma_gdi_a-picexif.o
In file included from gdi/grc.cpp:4:
../lib/gdi/font.h:191:2: warning: type qualifiers ignored on function return type [-Wignored-qualifiers]
  191 |  const int size() const
      |  ^~~~~
gdi/grc.cpp: In member function 'void gRC::recv_notify(const int&)':
gdi/grc.cpp:236:34: warning: unused parameter 'i' [-Wunused-parameter]
  236 | void gRC::recv_notify(const int &i)
      |                       ~~~~~~~~~~~^
gdi/grc.cpp: In constructor 'gPainter::gPainter(gDC*, eRect)':
gdi/grc.cpp:287:35: warning: unused parameter 'rect' [-Wunused-parameter]
  287 | gPainter::gPainter(gDC *dc, eRect rect) : m_dc(dc), m_rc(gRC::getInstance())
      |                             ~~~~~~^~~~
gdi/grc.cpp: In member function 'void gPainter::renderText(const eRect&, const string&, int, gRGB, int, int, int*)':
gdi/grc.cpp:407:117: warning: unused parameter 'markedpos' [-Wunused-parameter]
  407 | void gPainter::renderText(const eRect &pos, const std::string &string, int flags, gRGB bordercolor, int border, int markedpos, int *offset)
      |                                                                                                                 ~~~~^~~~~~~~~
gdi/grc.cpp:407:133: warning: unused parameter 'offset' [-Wunused-parameter]
  407 | void gPainter::renderText(const eRect &pos, const std::string &string, int flags, gRGB bordercolor, int border, int markedpos, int *offset)
      |                                                                                                                                ~~~~~^~~~~~
In file included from ../lib/gdi/grc.h:21,
                 from gdi/grc.cpp:3:
../lib/base/message.h: In instantiation of 'eFixedMessagePump<T>::eFixedMessagePump(eMainloop*, int) [with T = int]':
gdi/grc.cpp:28:65:   required from here
../lib/base/message.h:108:44: warning: unused parameter 'mt' [-Wunused-parameter]
  108 |  eFixedMessagePump(eMainloop *context, int mt):
      |                                        ~~~~^~
gdi/lcd.cpp: In member function 'virtual void eDBoxLCD::dumpLCD(bool)':
gdi/lcd.cpp:303:29: warning: unused parameter 'png' [-Wunused-parameter]
  303 | void eDBoxLCD::dumpLCD(bool png)
      |                        ~~~~~^~~
gdi/lcd.cpp: In member function 'virtual void eDBoxLCD::update()':
gdi/lcd.cpp:247:8: error: ignoring return value of 'ssize_t write(int, const void*, size_t)', declared with attribute warn_unused_result [-Werror=unused-result]
  247 |   write(lcdfd, raw, 132 * 8);
      |   ~~~~~^~~~~~~~~~~~~~~~~~~~~
gdi/lcd.cpp:268:9: error: ignoring return value of 'ssize_t write(int, const void*, size_t)', declared with attribute warn_unused_result [-Werror=unused-result]
  268 |    write(lcdfd, raw, _stride * height);
      |    ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
gdi/lcd.cpp:271:9: error: ignoring return value of 'ssize_t write(int, const void*, size_t)', declared with attribute warn_unused_result [-Werror=unused-result]
  271 |    write(lcdfd, _buffer, _stride * res.height());
      |    ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
gdi/lcd.cpp:298:8: error: ignoring return value of 'ssize_t write(int, const void*, size_t)', declared with attribute warn_unused_result [-Werror=unused-result]
  298 |   write(lcdfd, raw, 64 * 64);
      |   ~~~~~^~~~~~~~~~~~~~~~~~~~~
cc1plus: all warnings being treated as errors
make[4]: *** [Makefile:2242: gdi/libenigma_gdi_a-lcd.o] Error 1
make[4]: *** Waiting for unfinished jobs....
make[4]: Leaving directory '/work/enigma2/lib'
make[3]: Leaving directory '/work/enigma2/lib'
make[3]: *** [Makefile:2919: all-recursive] Error 1
make[2]: Leaving directory '/work/enigma2/lib'
make[2]: *** [Makefile:1230: all] Error 2
make[1]: *** [Makefile:548: all-recursive] Error 1
make[1]: Leaving directory '/work/enigma2'
make: *** [Makefile:434: all] Error 2

Can I exchange the configure.ac file to change the CXXFLAGS= to -Wno-error so the warnings are not treated as errors? And then continue building the docker container? It's hard to debug building a docker container.

I think it's easier let's say building enigma in an virtual machine (I don't want to mess with my main home linux box :) ). When it all works I can convert it to a docker container later.

It would be nice if you could give me a few more tips on how to fix the errors, if you like.

Later I will publish the reworked and upgraded environment for all.

Thank you.

Side note: MS has archived "ptvsd". The successor is "debugpy" -> https://github.com/microsoft/debugpy

technic commented 1 week ago

Yes doing in virtual machine is also a good option. Disable some warnings as errors is also ok. I also adapted my patches to openatv python3 enigma https://github.com/technic/e2xvfb/tree/atv-py3. It is still old though.

technic commented 1 week ago

This is where I rebased my patches on openatv engima 3 years ago : https://github.com/technic/enigma2-atv/commits/master/