I spent last few days playing with my wl500gp and af9015 based DVB-T tuner. I decided to use getstream for streaming channels over the network.
It just seems to me a little faster than mumudvb. I've got everything working now and it works quite well. My next goal is to write getstream package
makefile which could be used by anyone.
The downside of getstream is its glib dependancy and its size. So i thought it could be linked statically to include just what is needed and save some space
when glib is not required by other apps.
So i changed LIBS in makefile to this
LIBS="-Wl,-Bstatic,-lglib-2.0,-Bdynamic -lpthread -levent"
but linker complains about missing iconv implementation
mipsel-openwrt-linux-uclibc-gcc -Os -pipe -mips32 -mtune=mips32 -funit-at-a-time -fhonour-opts -msoft-float -I/home/pavel/openwrt/backfire/staging_dir/target-mipsel_uClibc-0.9.30.1/sr/include/glib-2.0/ -o getstream getstream.o fe.o crc32.o libhttp.o libconf.o config.o uti.o logging.o stream.o input.o output.o output_http.o output_udp.o output_pipe.o output_rtp. dmx.o dvr.o pat.o pmt.o psi.o simplebuffer.o sap.o socket.o -Wl,-Bstatic,-lglib-2.0,-Bdynaic -lpthread -levent
/home/pavel/openwrt/backfire/staging_dir/target-mipsel_uClibc-0.9.30.1/usr/lib/libglib-2.0.(gconvert.o): In function `g_iconv_close':
gconvert.c:(.text+0x83c): undefined reference to `iconv_close'
...
adding -liconv didn't help either, ld says it cannot find -liconv.
then i did
cd staging_dir/target-mipsel_uClibc-0.9.30.1/usr/lib/
nm -A libglib-2.0.a libglib-2.0.so | grep ' iconv_'
libglib-2.0.a:gconvert.o: U iconv_close
libglib-2.0.a:gconvert.o: U iconv_open
libglib-2.0.so:0009d0a8 t iconv_close
libglib-2.0.so:0009cf60 t iconv_open
so, only shared version of the library contains iconv implementation ?
I finally managed to link it by adding $(STAGING_DIR)/usr/lib/libiconv-stub/lib/libiconv.a to the end of the LIBS.
And it works, but if libiconv.a is only a stub then where is the real library? And what is a proper way to do this if i want others be able to use it?
The whole build section of makefile.
define Build/Compile
$(MAKE) -C $(PKG_BUILD_DIR) \
LIBS="-Wl,-Bstatic,-lglib-2.0,-Bdynamic -lpthread -levent $(STAGING_DIR)/usr/lib/libiconv-stub/lib/libiconv.a" \
LDFLAGS="$(EXTRA_LDFLAGS)" \
CFLAGS="$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include/glib-2.0/" \
$(TARGET_CONFIGURE_OPTS) \
CROSS="$(TARGET_CROSS)" \
ARCH="$(ARCH)" \
$(1);
endef
I'm using last stable branch with backports because trunk with the new kernel was way slower.
This is my first touch to buildroot so i would appriciate any help.
Thanks