[Clfs-dev] Help cross coimpiling libvorbis to ARM

Luís Vitório Cargnini lvcargnini at gmail.com
Wed Feb 6 20:47:46 PST 2008


no no this was my only change, trying to make it work, i almost forget it.
Thanks I'm trying now this modification:


On Feb 7, 2008 2:44 AM, Ivan Kabaivanov <chepati at yahoo.com> wrote:
>
> On Wednesday 06 February 2008, Luís Vitório Cargnini wrote:
> > On Feb 7, 2008 1:59 AM, Ivan Kabaivanov <chepati at yahoo.com> wrote:
> > > On Wednesday 06 February 2008, Luís Vitório Cargnini wrote:
> > > > Dear fellows,
> > > > Please I need some help cross compiling libvorbis for ARM.
> > > > The libogg is ok, the problem is in libvorbis after some compile lines
> > > > correct is produced the following error:
> > > > make[3]: Entering directory
> > > > `/home/lvcargnini/puc/instramed/toolchain/sources/ogg_vorbis/libvorbis-
> > > >1.2. 0/lib' /bin/sh ../libtool  --mode=link arm-linux-gnueabi-gcc  -O20
> > > > -ffast-math -D_REENTRANT -fsigned-char  -DUSE_MEMORY_H
> > > > -L/opt/arm-linux/arm-linux-gnueabi/usr/lib   -o libvorbis.la -rpath
> > > > /usr/lib -no-undefined -version-info 4:0:4 mdct.lo smallft.lo block.lo
> > > > envelope.lo window.lo lsp.lo lpc.lo analysis.lo synthesis.lo psy.lo
> > > > info.lo floor1.lo floor0.lo res0.lo mapping0.lo registry.lo
> > > > codebook.lo sharedbook.lo lookup.lo bitrate.lo -logg   -lm
> > > > rm -fr  .libs/libvorbis.so.0.4.0
> > > > arm-linux-gnueabi-gcc -shared  .libs/mdct.o .libs/smallft.o
> > > > .libs/block.o .libs/envelope.o .libs/window.o .libs/lsp.o .libs/lpc.o
> > > > .libs/analysis.o .libs/synthesis.o .libs/psy.o .libs/info.o
> > > > .libs/floor1.o .libs/floor0.o .libs/res0.o .libs/mapping0.o
> > >
> > > Concentrate on the lines below.  It appears your arm chroot is
> > > in /opt/arm-linux/arm-linux-gnueabi, but the linker tries to link
> > > libvorbis to the host libogg, which is a different architecture.  Unless
> > > you want to fiddle with LDFLAGS, which doesn't always work (at least for
> > > me), my experience is that sometime brute force works better -- modify
> > > the correct Makefile (basically any Makefile in the libvorbis-1.2.0
> > > directory and its subdirectories) that contains /usr/lib/libogg.so and
> > > replace that with -logg, making sure that somewhere in that line there's
> > > a -L/directory/to/libogg.
> > >
> > > Furthermore, there must be an argument to libvorbis configure script,
> > > something like --with-ogg=dir that will be the correct solution.
> > > Do ./configure --help.
> > >
> > > IvanK.
> > >
> > > > .libs/registry.o .libs/codebook.o .libs/sharedbook.o .libs/lookup.o
> > > > .libs/bitrate.o  -L/opt/arm-linux/arm-linux-gnueabi/usr/lib
> > > > /usr/lib/libogg.so -lm  -Wl,-soname -Wl,libvorbis.so.0 -o
> > > > .libs/libvorbis.so.0.4.0
> > > > /usr/lib/libogg.so: could not read symbols: File in wrong format
> > > >
> > > > This is not a problem in the source code but in the conf, autoconf
> > > > tools.
> > > >
> > > > The problem as you all can see is the /usr/lib/libogg.so near the end
> > > > in compilation command. How to avoid this and obligate it to use only
> > > > -logg nothing else.
> > > > Someone have already figure out this problem.
> > >
> > > _______________________________________________
> > > Clfs-dev mailing list
> > > Clfs-dev at lists.cross-lfs.org
> > > http://lists.cross-lfs.org/listinfo.cgi/clfs-dev-cross-lfs.org
> >
> > I did it before  anyway, my configure was in the afternoon:
> >  ./configure --enable-maintainer-mode --target=arm-linux-gnueabi
> > --host=arm-linux-gnueabi --prefix=/usr
> > --with-ogg=/opt/arm-linux/arm-linux-gnueabi/usr/ -
> > -with-ogg-libraries=/opt/arm-linux/arm-linux-gnueabi/usr/lib
> > --with-ogg-includes=/opt/arm-linux/arm-linux-gnueabi/usr/include
> > --disable-oggtest
> >
> > the problem in the malkefile is:
> > the LINK command is set this way:
>
>
>
>
> Just the two lines below.  Change -L${CLFS}/usr/lib to -L$(CLFS)/usr/lib
> (curly braces to regular braces).  But I'm baffled -- how did $CLFS make its
> way into Makefile???  Did you manually add it?
>
> It might help to remove the source dir if you have modified stuff too much and
> start anew.
>
> IvanK.
>
>
>
> > LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
> >         $(AM_LDFLAGS) $(OGG_CFLAGS) -L${CLFS}/usr/lib  $(LDFLAGS) -o $@
>
>
>
>
>
>
>
>
>
> >
> > and usage:
> > libvorbis.la: $(libvorbis_la_OBJECTS) $(libvorbis_la_DEPENDENCIES)
> >         $(LINK) -rpath $(libdir) $(libvorbis_la_LDFLAGS)
> > $(libvorbis_la_OBJECTS) $(libvorbis_la_LIBADD) $(LIBS)
> > libvorbisenc.la: $(libvorbisenc_la_OBJECTS) $(libvorbisenc_la_DEPENDENCIES)
> >         $(LINK) -rpath $(libdir) $(libvorbisenc_la_LDFLAGS)
> > $(libvorbisenc_la_OBJECTS) $(libvorbisenc_la_LIBADD) $(LIBS)
> > libvorbisfile.la: $(libvorbisfile_la_OBJECTS)
> > $(libvorbisfile_la_DEPENDENCIES) $(LINK) -rpath $(libdir)
> > $(libvorbisfile_la_LDFLAGS)
> > $(libvorbisfile_la_OBJECTS) $(libvorbisfile_la_LIBADD) $(LIBS)
> > barkmel$(EXEEXT): $(barkmel_OBJECTS) $(barkmel_DEPENDENCIES)
> >         @rm -f barkmel$(EXEEXT)
> >         $(LINK) $(barkmel_LDFLAGS) $(barkmel_OBJECTS) $(barkmel_LDADD)
> > $(LIBS) psytune$(EXEEXT): $(psytune_OBJECTS) $(psytune_DEPENDENCIES)
> >         @rm -f psytune$(EXEEXT)
> >         $(LINK) $(psytune_LDFLAGS) $(psytune_OBJECTS) $(psytune_LDADD)
> > $(LIBS) tone$(EXEEXT): $(tone_OBJECTS) $(tone_DEPENDENCIES)
> >         @rm -f tone$(EXEEXT)
> >         $(LINK) $(tone_LDFLAGS) $(tone_OBJECTS) $(tone_LDADD) $(LIBS)
> > any help about how to fix this little, but not so little problem ?
>
>
>
> _______________________________________________
> Clfs-dev mailing list
> Clfs-dev at lists.cross-lfs.org
> http://lists.cross-lfs.org/listinfo.cgi/clfs-dev-cross-lfs.org
>



-- 
------------------------------------------------------------------------------
Thanks && Regards
M.Sc. B.Sc. Luís Vitório Cargnini
IEEE Member
Electrical Engineer Faculty @ PUCRS
Ipiranga Avenue, 6681 – Building 30
P.O. Box: 90619-900 – Porto Alegre/RS
Phone: +55 51 3320 3500  extension: 7696
---------------------------------------------------------------------------------


More information about the Clfs-dev mailing list