Recent Posts

Pages: [1] 2 3 ... 10
1
VOMP for Raspberry Pi / Re: Static build possible?
« Last post by noone on Today at 10:50 »
sounds also interessting 8) ...
2
VOMP for Raspberry Pi / Re: Static build possible?
« Last post by Chris on October 21, 2019, 15:52:11 »
An idea I had... It's no static build but it might be of use. How about compiling a dynamic vompclient then getting the list of so files with "ldd vompclient", copying every single one and the vompclient binary to the target empty O/S and using LD_LIBRARY_PATH to direct it to all the so files? It sounds too simple to work...

Good luck with the Broadcom stuff.
3
VOMP for Raspberry Pi / Re: Static build possible?
« Last post by noone on October 21, 2019, 06:56:23 »
Thanks for the big explanation!
I always thought creating a static build ld just takes every so-file and "appends" it to the final binary but that sounds very complicated now.

I also experimented with a static busybox using the script-wrapper option instead of symlinks for the applets.
This is cool so you can use a single vfat partition on the sdcard and make it also the rootfs.
So the final approach would be, take a new sdcard, extra all the files from zip to it, done!

Will try to compile the Broadcom libraries and play around, maybe I'll get some where.
Best regards
NoOne
4
VOMP for Raspberry Pi / Re: Static build possible?
« Last post by Chris on October 19, 2019, 16:35:33 »
Hi,

For obvious reasons I share your desire to build it statically - I would be able to distribute a much smaller image file and it would boot on a Pi much faster with some kind of Busybox build rather than a whole systemd O/S.

I remember trying it about a month back and got to exactly the same situation you showed. At the time I shelved the idea thinking it would be very difficult / impossible. But, given your post I've had another look... I still think it's going to be very difficult, but maybe not impossible if a mostly static binary is acceptable.

Firstly the warnings - Well they're only warnings - it does imply that it should be possible to have a statically linked vompclient binary with some number of .so files alongside somehow. It depends how many library files "the shared libraries from the glibc version used" means. If it's a few then I would say this is feasible. If it's hundreds - basically a standard /lib & /usr/lib collection, then clearly it's not feasible. I haven't got as far trying this yet.

Secondly - all the libraries used except the Broadcom ones in /opt/vc. I have been working through some of these and it is possible to build some in statically - see the linking script below. The next major set of libraries to tackle is the ImageMagick ones - no small task. I tried making pthread and avcodec static but they eventually depend on one of the Broadcom libs, so they may be possible once the Broadcom problem is solved.

Thirdly - the Broadcom libraries. Broadcom appear to permit redistribution of the libs found in /opt/vc, so including that whole set in an image and dynamically linking to them for me would be acceptable. However, because the .a file versions of those libs aren't available it means any other library you try to make static for vompclient that depends on something in the Broadcom libraries won't link. A second however however, is that it looks like the source code for those libraries in /opt/vc/lib is available (to my surprise) at https://github.com/raspberrypi/userland. If this really is the case then it should be possible to compile the missing .a files, allowing other libraries to then be linked statically.

At best it may be possible to statically link everything except the glibc libraries the warnings are about.

The script below is a work-in-progress. To try it, compile vompclient normally first - this is only the last step linker command. It links what it can statically, and then dynamically links the rest. In theory libs can be moved one by one from dynamic to static. In practice it's quite messy. I think the next bit to work on is the Broadcom libraries, since other libraries end up depending on some low level Pi memory code and they can't be made static until the the Broadcom libraries are.

If you feel like continuing this work please do!

Also if anyone knows a better way of doing any of this, please chip in.

Code: [Select]
#!/bin/bash

set -x

BLOBS="-Wl,--format=binary -Wl,other/vdrhires.png -Wl,other/wallpaper720p.jpg -Wl,other/properties.png -Wl,other/radio.png -Wl,other/timers.png -Wl,other/tv.png -Wl,other/recordings.png -Wl,other/restart.png -Wl,other/hd1080i.png -Wl,other/hd720p.png -Wl,other/sd576i.png -Wl,other/txtoff.png -Wl,other/txton.png -Wl,other/dolbyoff.png -Wl,other/dolbyon.png -Wl,other/recording.png -Wl,other/recfolder.png -Wl,other/defposter.png -Wl,--format=default"
OBJECTS="command.o tcp.o dsock.o thread.o timers.o i18n.o vdp6.o message.o messagequeue.o udp.o wol.o audio.o video.o log.o mutex.o vdr.o recman.o recording.o recinfo.o channel.o rectimer.o event.o directory.o mark.o option.o player.o playerradio.o vfeed.o afeed.o demuxer.o demuxervdr.o demuxerts.o stream.o region.o colour.o boxstack.o boxx.o tbboxx.o vrecording.o vinfo.o vquestion.o vrecordinglist.o vrecordinglistclassic.o vrecordinglistadvanced.o vepgsummary.o vepglistadvanced.o vmute.o vvolume.o vtimerlist.o vtimeredit.o vrecordingmenu.o vchannellist.o vwelcome.o vvideorec.o vepgsettimer.o vchannelselect.o vserverselect.o vconnect.o vepg.o vrecmove.o vradiorec.o vaudioselector.o vscreensaver.o vopts.o wselectlist.o wjpeg.o wsymbol.o wbutton.o wtextbox.o woptionpane.o woptionbox.o wremoteconfig.o wtabbar.o led.o remote.o mtd.o osd.o surface.o vpicturebanner.o abstractoption.o eventdispatcher.o vdrrequestpacket.o vdrresponsepacket.o vvideolivetv.o vsleeptimer.o playerlivetv.o playerliveradio.o wprogressbar.o bitmap.o dvbsubtitles.o tfeed.o vteletextview.o teletextdecodervbiebu.o teletxt/txtfont.o movieinfo.o seriesinfo.o wmovieview.o wseriesview.o tvmedia.o wtvmedia.o wpictureview.o main.o threadp.o  osdvector.o surfacevector.o osdopenvg.o ledraspberry.o mtdraspberry.o videoomx.o audioomx.o imageomx.o wjpegsimple.o remotelinux.o signal.o"

# All dynamic
# LIBSSTATIC=""
# LIBSDYNAMIC="-Wl,-Bdynamic -lpthread -lrt -lbrcmEGL -lbrcmOpenVG -lopenmaxil -lbcm_host -lavformat -lavcodec -lavutil -lavresample -ldl -lfontconfig -lfreetype -lMagick++-6.Q16"

# WIP
LIBSSTATIC="-Wl,-Bstatic -lfontconfig -lexpat -luuid -lfreetype -lpng -lavformat -lavresample -lavutil -lswresample -lz -lrt"
LIBSDYNAMIC="-Wl,-Bdynamic -lbrcmEGL -lbrcmOpenVG -lopenmaxil -lbcm_host -lpthread -lavcodec -lMagick++-6.Q16 -ldl"

g++ -Wall -o vompclient -L/opt/vc/lib -L/usr/lib/arm-linux-gnueabihf $BLOBS $OBJECTS $LIBSSTATIC $LIBSDYNAMIC
5
VOMP for Raspberry Pi / Static build possible?
« Last post by noone on October 16, 2019, 21:36:29 »
Hi, I'm trying to build a static binary of vompclient for raspberry pi.

I added -static in the GNUmakefile in the LDFLAGS variable:
Code: [Select]
....
ifeq ($(vomp_platform),raspberry)
$(info Raspberry pi flags)
LDFLAGS = -Wall -static $(PICTURES)
LIBS = -L/opt/vc/lib  -lpthread -lrt -lbrcmEGL -lbrcmOpenVG -lopenmaxil -lbcm_host   -lavformat -lavcodec -lavutil -lavresample
....

But now I'm getting the following compile error:
Code: [Select]
....
g++ -Wall -static -Wl,--format=binary  -Wl,other/vdrhires.png  -Wl,other/wallpaper720p.jpg  -Wl,other/properties.png  -Wl,other/radio.png  -Wl,other/timers.png  -Wl,other/tv.png  -Wl,other/recordings.png -Wl,other/restart.png  -Wl,other/hd1080i.png   -Wl,other/hd720p.png    -Wl,other/sd576i.png   -Wl,other/txtoff.png   -Wl,other/txton.png  -Wl,other/dolbyoff.png -Wl,other/dolbyon.png   -Wl,other/recording.png -Wl,other/recfolder.png   -Wl,other/defposter.png   -Wl,--format=default    -DIPV6 -o vompclient  command.o tcp.o dsock.o thread.o timers.o i18n.o vdp6.o message.o messagequeue.o udp.o wol.o audio.o video.o log.o mutex.o vdr.o recman.o recording.o recinfo.o channel.o rectimer.o event.o directory.o mark.o option.o player.o playerradio.o vfeed.o afeed.o demuxer.o demuxervdr.o demuxerts.o stream.o region.o colour.o boxstack.o boxx.o tbboxx.o vrecording.o vinfo.o vquestion.o vrecordinglist.o vrecordinglistclassic.o vrecordinglistadvanced.o vepgsummary.o vepglistadvanced.o vmute.o vvolume.o vtimerlist.o vtimeredit.o vrecordingmenu.o vchannellist.o vwelcome.o vvideorec.o vepgsettimer.o vchannelselect.o vserverselect.o vconnect.o vepg.o vrecmove.o vradiorec.o vaudioselector.o vscreensaver.o vopts.o wselectlist.o wjpeg.o wsymbol.o wbutton.o wtextbox.o woptionpane.o woptionbox.o wremoteconfig.o wtabbar.o led.o remote.o mtd.o osd.o surface.o vpicturebanner.o abstractoption.o eventdispatcher.o vdrrequestpacket.o vdrresponsepacket.o vvideolivetv.o vsleeptimer.o playerlivetv.o playerliveradio.o wprogressbar.o bitmap.o dvbsubtitles.o tfeed.o vteletextview.o teletextdecodervbiebu.o teletxt/txtfont.o movieinfo.o seriesinfo.o wmovieview.o wseriesview.o tvmedia.o wtvmedia.o wpictureview.o  main.o threadp.o  osdvector.o surfacevector.o osdopenvg.o ledraspberry.o mtdraspberry.o videoomx.o audioomx.o imageomx.o wjpegsimple.o remotelinux.o signal.o   -L/opt/vc/lib  -lpthread -lrt -lbrcmEGL -lbrcmOpenVG -lopenmaxil -lbcm_host   -lavformat -lavcodec -lavutil -lavresample -ldl -lfontconfig -lfreetype -L/usr/lib/arm-linux-gnueabihf -lMagick++-6.Q16
/usr/bin/ld: cannot find -lbrcmEGL
/usr/bin/ld: cannot find -lbrcmOpenVG
/usr/bin/ld: cannot find -lopenmaxil
/usr/bin/ld: cannot find -lbcm_host
/usr/bin/ld: remotelinux.o: in function `__gnu_cxx::__normal_iterator<Option**, std::vector<Option*, std::allocator<Option*> > >::difference_type __gnu_cxx::operator-<Option**, std::vector<Option*, std::allocator<Option*> > >(__gnu_cxx::__normal_iterator<Option**, std::vector<Option*, std::allocator<Option*> > > const&, __gnu_cxx::__normal_iterator<Option**, std::vector<Option*, std::allocator<Option*> > > const&)':
/usr/include/libcec/cecloader.h:124: warning: Using 'dlopen' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/usr/bin/ld: tcp.o: in function `TCP::connectTo(char*, unsigned short)':
/home/pi/vompclient/tcp.cc:151: warning: Using 'getaddrinfo' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
collect2: error: ld returned 1 exit status
make: *** [GNUmakefile:123: vompclient] Error 1
pi@raspberrypi:~/vompclient $

Is building a static binary even possible at all?
It would be nice to run a minimal busybox and just the vompclient, nothing else.
And with the newly added IPv6 support there isn't even a need for a dhcp client any more. 8)

Best regards
NoOne
6
VOMP for Raspberry Pi / Re: Latest version of vomp fails to compile
« Last post by Chris on August 17, 2019, 15:50:11 »
Hi,

I've fixed the errors for compiling on buster and it's in git. There are still several warnings that need looking into but at least it works now.
7
VOMP for Raspberry Pi / Re: Latest version of vomp fails to compile
« Last post by MartenR on August 01, 2019, 07:05:25 »
May be just follow the suggestion of the compiler. Seems to be a change in libAv.

Marten
8
VOMP for Raspberry Pi / Latest version of vomp fails to compile
« Last post by TEDDYXXL on July 31, 2019, 09:31:24 »
Hi !


After installing latest rasppi image with Debian10 (2019-07-10-raspbian-buster-full.img) compile of latest vomp version from git fails:


audioomx.cc: In member function ‘virtual int AudioOMX::init(UCHAR)’:
audioomx.cc:103:18: warning: ‘void av_register_all()’ is deprecated [-Wdeprecated-declarations]
  av_register_all();
                  ^
In file included from audioomx.h:36,
                 from audioomx.cc:21:
/usr/include/arm-linux-gnueabihf/libavformat/avformat.h:2043:6: note: declared here
 void av_register_all(void);
      ^~~~~~~~~~~~~~~
audioomx.cc:103:18: warning: ‘void av_register_all()’ is deprecated [-Wdeprecated-declarations]
  av_register_all();
                  ^
In file included from audioomx.h:36,
                 from audioomx.cc:21:
/usr/include/arm-linux-gnueabihf/libavformat/avformat.h:2043:6: note: declared here
 void av_register_all(void);
      ^~~~~~~~~~~~~~~
audioomx.cc: In member function ‘int AudioOMX::InitDecoderLibAV()’:
audioomx.cc:822:35: error: ‘CODEC_FLAG_TRUNCATED’ was not declared in this scope
  ac3codec_context_libav->flags |= CODEC_FLAG_TRUNCATED;
                                   ^~~~~~~~~~~~~~~~~~~~
audioomx.cc:822:35: note: suggested alternative: ‘AV_CODEC_FLAG_TRUNCATED’
  ac3codec_context_libav->flags |= CODEC_FLAG_TRUNCATED;
                                   ^~~~~~~~~~~~~~~~~~~~
                                   AV_CODEC_FLAG_TRUNCATED
audioomx.cc:879:45: warning: ‘AVAudioResampleContext* avresample_alloc_context()’ is deprecated [-Wdeprecated-declarations]
  resam_con_libav = avresample_alloc_context();
                                             ^
In file included from audioomx.h:37,
                 from audioomx.cc:21:
/usr/include/arm-linux-gnueabihf/libavresample/avresample.h:194:25: note: declared here
 AVAudioResampleContext *avresample_alloc_context(void);
                         ^~~~~~~~~~~~~~~~~~~~~~~~
audioomx.cc:879:45: warning: ‘AVAudioResampleContext* avresample_alloc_context()’ is deprecated [-Wdeprecated-declarations]
  resam_con_libav = avresample_alloc_context();
                                             ^
In file included from audioomx.h:37,
                 from audioomx.cc:21:
/usr/include/arm-linux-gnueabihf/libavresample/avresample.h:194:25: note: declared here
 AVAudioResampleContext *avresample_alloc_context(void);
                         ^~~~~~~~~~~~~~~~~~~~~~~~
audioomx.cc: In member function ‘void AudioOMX::DeinitDecoderLibAV()’:
audioomx.cc:929:35: warning: ‘void avresample_free(AVAudioResampleContext**)’ is deprecated [-Wdeprecated-declarations]
   avresample_free(&resam_con_libav);
                                   ^
In file included from audioomx.h:37,
                 from audioomx.cc:21:
/usr/include/arm-linux-gnueabihf/libavresample/avresample.h:258:6: note: declared here
 void avresample_free(AVAudioResampleContext **avr);
      ^~~~~~~~~~~~~~~
audioomx.cc:929:35: warning: ‘void avresample_free(AVAudioResampleContext**)’ is deprecated [-Wdeprecated-declarations]
   avresample_free(&resam_con_libav);
                                   ^
In file included from audioomx.h:37,
                 from audioomx.cc:21:
/usr/include/arm-linux-gnueabihf/libavresample/avresample.h:258:6: note: declared here
 void avresample_free(AVAudioResampleContext **avr);
      ^~~~~~~~~~~~~~~
audioomx.cc: In member function ‘UINT AudioOMX::DeliverMediaPacket(MediaPacket, const UCHAR*, UINT*)’:
audioomx.cc:2136:36: warning: ‘int avcodec_decode_audio4(AVCodecContext*, AVFrame*, int*, const AVPacket*)’ is deprecated [-Wdeprecated-declarations]
       &gotta, &incoming_paket_libav);
                                    ^
In file included from audioomx.h:35,
                 from audioomx.cc:21:
/usr/include/arm-linux-gnueabihf/libavcodec/avcodec.h:4722:5: note: declared here
 int avcodec_decode_audio4(AVCodecContext *avctx, AVFrame *frame,
     ^~~~~~~~~~~~~~~~~~~~~
audioomx.cc:2136:36: warning: ‘int avcodec_decode_audio4(AVCodecContext*, AVFrame*, int*, const AVPacket*)’ is deprecated [-Wdeprecated-declarations]
       &gotta, &incoming_paket_libav);
                                    ^
In file included from audioomx.h:35,
                 from audioomx.cc:21:
/usr/include/arm-linux-gnueabihf/libavcodec/avcodec.h:4722:5: note: declared here
 int avcodec_decode_audio4(AVCodecContext *avctx, AVFrame *frame,
     ^~~~~~~~~~~~~~~~~~~~~
audioomx.cc:2252:44: warning: ‘int avresample_open(AVAudioResampleContext*)’ is deprecated [-Wdeprecated-declarations]
     int ret=avresample_open(resam_con_libav);
                                            ^
In file included from audioomx.h:37,
                 from audioomx.cc:21:
/usr/include/arm-linux-gnueabihf/libavresample/avresample.h:214:5: note: declared here
 int avresample_open(AVAudioResampleContext *avr);
     ^~~~~~~~~~~~~~~
audioomx.cc:2252:44: warning: ‘int avresample_open(AVAudioResampleContext*)’ is deprecated [-Wdeprecated-declarations]
     int ret=avresample_open(resam_con_libav);
                                            ^
In file included from audioomx.h:37,
                 from audioomx.cc:21:
/usr/include/arm-linux-gnueabihf/libavresample/avresample.h:214:5: note: declared here
 int avresample_open(AVAudioResampleContext *avr);
     ^~~~~~~~~~~~~~~
audioomx.cc:2260:108: warning: ‘int avresample_convert(AVAudioResampleContext*, uint8_t**, int, int, uint8_t* const*, int, int)’ is deprecated [-Wdeprecated-declarations]
        decode_frame_libav->extended_data,  decode_frame_libav->linesize[0],  decode_frame_libav->nb_samples);
                                                                                                            ^
In file included from audioomx.h:37,
                 from audioomx.cc:21:
/usr/include/arm-linux-gnueabihf/libavresample/avresample.h:451:5: note: declared here
 int avresample_convert(AVAudioResampleContext *avr, uint8_t **output,
     ^~~~~~~~~~~~~~~~~~
audioomx.cc:2260:108: warning: ‘int avresample_convert(AVAudioResampleContext*, uint8_t**, int, int, uint8_t* const*, int, int)’ is deprecated [-Wdeprecated-declarations]
        decode_frame_libav->extended_data,  decode_frame_libav->linesize[0],  decode_frame_libav->nb_samples);
                                                                                                            ^
In file included from audioomx.h:37,
                 from audioomx.cc:21:
/usr/include/arm-linux-gnueabihf/libavresample/avresample.h:451:5: note: declared here
 int avresample_convert(AVAudioResampleContext *avr, uint8_t **output,
     ^~~~~~~~~~~~~~~~~~
audioomx.cc:2261:38: warning: ‘void avresample_close(AVAudioResampleContext*)’ is deprecated [-Wdeprecated-declarations]
      avresample_close(resam_con_libav);
                                      ^
In file included from audioomx.h:37,
                 from audioomx.cc:21:
/usr/include/arm-linux-gnueabihf/libavresample/avresample.h:245:6: note: declared here
 void avresample_close(AVAudioResampleContext *avr);
      ^~~~~~~~~~~~~~~~
audioomx.cc:2261:38: warning: ‘void avresample_close(AVAudioResampleContext*)’ is deprecated [-Wdeprecated-declarations]
      avresample_close(resam_con_libav);
                                      ^
In file included from audioomx.h:37,
                 from audioomx.cc:21:
/usr/include/arm-linux-gnueabihf/libavresample/avresample.h:245:6: note: declared here
 void avresample_close(AVAudioResampleContext *avr);
      ^~~~~~~~~~~~~~~~
make: *** [<eingebaut>: audioomx.o] Fehler 1


Regards,

Dirk
9
VOMP for Raspberry Pi / Re: Vomp 0.4.0 and HAMA MCE REMOTE
« Last post by t0bit0bsen on May 10, 2019, 21:22:24 »
Thanks a lot for this very helpful posts. They worked well for me.
I had to remove the "REMOTE_" part as well. And one pitfall for irexec is, that it does not like lircrc files edited in Windows. So be sure to remove the "^M" in the file, if you did edit it with a windows editor.
10
VOMP for Raspberry Pi / Re: vomp 0.5 - my test results
« Last post by winschrott on January 12, 2019, 20:20:28 »
In addition to my earlier post:

The TV switches on just at the moment the green LED turns off. In the debug-dump this is at about 21:04:18:035300.

-winschrott
Pages: [1] 2 3 ... 10