Hi, I'm trying to build a static binary of vompclient for raspberry pi.
I added -static in the GNUmakefile in the LDFLAGS variable:
But now I'm getting the following compile error:
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.
Best regards
NoOne
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.
Best regards
NoOne