[Buildroot] mpg123 linking against glibc

Erik L. Smith eeman at bluegrass.net
Tue Sep 13 17:10:17 UTC 2005


I have noticed the bundled mpg123 package in buildroot is improperly
building against glibc. It compiles fine but when trying to run on the
image it gives a no such file/directory error. On the building system I
can exec the binary and a ldd indicates it was linked against glibc.  I
traced the problem to the mpg123.mk file.

$(MPG123_WORKDIR)/mpg123:	$(MPG123_DIR)/.unpacked
	rm -f $@
	$(MAKE) CC=$(TARGET_CC) -C $(MPG123_WORKDIR) linux


notice that CC is defined but looking through the Makefile of this
source CC is redefined again in the makefile along with other parameters
before make is re-invoked on 'mpg123-make'. I modified the mpg123.mk
file to cut out the middleman and just define everything that 'linux'
was defining and invoke mpg123-make directly.

$(MPG123_WORKDIR)/mpg123:       $(MPG123_DIR)/.unpacked
        rm -f $@
        OBJECTS='decode_i386.o dct64_i386.o decode_i586.o \
                audio_oss.o term.o' \
        CFLAGS='-DI386_ASSEM -DPENTIUM_OPT -DREAL_IS_FLOAT -DLINUX \
                -DREAD_MMAP -DOSS -DTERM_CONTROL\
                -Wall -O2 -m486 \
                -fomit-frame-pointer -funroll-all-loops \
                -finline-functions -ffast-math' \
        CC=$(TARGET_CC) $(MAKE) -C $(MPG123_WORKDIR) mpg123-make

This created a working binary. 

Erik Smith
Network Engineer
Senior Systems Engineer
Bluegrass.Net






More information about the uClibc mailing list