Hi Leonard, I’m not sure I completely follow, however it is essential that all the .la files are removed from the binary rpm file.
The reason is that the binary gets installed in the local project area on the host under rootfs/… any .la files under there will get picked up by later packages when cross compiling and will cause the compiler to try to link to libraries under /usr/lib /lib on the host, which is clearly not what you want. Regards, Stuart On 15 Jan 2015, at 18:22, Leonard Pimentel <[email protected]> wrote: > Stuart Hughes, > > Thank you. Several times the cross-compilation would interrupt with errors > and I could not understand why the *.la file was important to the compilation. > > It was unforeseen that an innocuous statement would create cross-compilation > build and install problems. > > find $RPM_BUILD_ROOT%{pfx}%{_prefix}/lib/ -name “*.la” | xargs rm -f > > After removing the above statement, warnings such “file moved” and the error > “no such file or directory found” were commonplace. > > http://lists.gnu.org/archive/html/ltib/2010-04/msg00127.html > > > > From: Leonard Pimentel > Sent: Wednesday, January 14, 2015 11:08 AM > To: '[email protected]' > Subject: Cross-compilation errors preventing build > > General cross-compiling question > > Are there two solutions (at minimum) to solve the following warning [file > moved] and error [no such file]? I am running into build errors. Help is > appreciated. > > Error log snippet: > > libtool: link: warning: library > `/home/leo/logic/Logic_BSPs/Linux_3.0/1026167_LogicPD_Linux_BSP_2.4-3/rootfs/usr/lib/libgstvideo-0.10.la' > was moved. > /bin/sed: can't read /usr/lib/libgstinterfaces-0.10.la: No such file or > directory > libtool: link: `/usr/lib/libgstinterfaces-0.10.la' is not a valid libtool > archive > make[3]: *** [libgstaudiofx.la] Error 1 > make[3]: Leaving directory > `/home/leo/logic/Logic_BSPs/Linux_3.0/1026167_LogicPD_Linux_BSP_2.4-3/rpm/BUILD/gst-plugins-good-0.10.25/gst/audiofx' > make[2]: *** [audiofx] Error 2 > make[3]: Leaving directory > `/home/leo/logic/Logic_BSPs/Linux_3.0/1026167_LogicPD_Linux_BSP_2.4-3/rpm/BUILD/gst-plugins-good-0.10.25/gst/debugutils' > make[2]: Leaving directory > `/home/leo/logic/Logic_BSPs/Linux_3.0/1026167_LogicPD_Linux_BSP_2.4-3/rpm/BUILD/gst-plugins-good-0.10.25/gst' > make[1]: *** [all-recursive] Error 1 > > > > Snippets from spec file > > %define pfx /opt/freescale/rootfs/%{_target_cpu} > %define LOGICPD_DIR > /home/leo/logic/Logic_BSPs/Linux_3.0/1026167_LogicPD_Linux_BSP_2.4-3 > > %Build > export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:%LOGICPD_FS/usr/lib/pkconfig > > lt_cv_path_NM=nm \ > ./configure --prefix=%{_prefix} --host=$CFGHOST --build=%{_build} \ > --with-pkg-config-path=$PKG_CONFIG_PATH \ > CPPFLAGS=-I%LOGICPD_DIR/rootfs/usr/include/gstreamer-0.10/gst > \ > LDFLAGS=-L%LOGICPD_DIR/rootfs/usr/lib \ > > %install > rm –rf $RPM_BUILD_ROOT > make install DESTDIR=${RPM_BUILD_ROOT}%{pfx} > > > > The following comment from StackOverflow suggests setting the dependency_libs > section. > > Have you looked inside the libfreetype.la file? Libtool .la files are just > text files describing libraries. By default, they are commented. Search for > the libdir and dependency_libs settings and check if they point to the right > places. > > How can this be accomplished either in the configuration statement or via a > libtool –finish command? > > Contents of two .la files. Note the libdir is referenced the file system > directory path under the cross-compilied target. > > # libgstinterfaces-0.10.la - a libtool library file > # Generated by ltmain.sh (GNU libtool) 2.2.6b Debian-2.2.6b-2 > # > # Please DO NOT delete this file! > # It is necessary for linking the library. > > # The name that we can dlopen(3). > dlname='libgstinterfaces-0.10.so.0' > > # Names of this library. > library_names='libgstinterfaces-0.10.so.0.21.0 libgstinterfaces-0.10.so.0 > libgstinterfaces-0.10.so' > > # The name of the static archive. > old_library='libgstinterfaces-0.10.a' > > # Linker flags that can not go in dependency_libs. > inherited_linker_flags=' -pthread' > > # Libraries that this one depends upon. > dependency_libs=' > -L/home/leo/logic/Logic_BSPs/Linux_3.0/1026167_LogicPD_Linux_BSP_2.4-3/rootfs/usr/lib > -lgstreamer-0.10 -lgobject-2.0 -lgmodule-2.0 -lgthread-2.0 -lrt -lxml2 > -lglib-2.0 -lm' > > # Names of additional weak libraries provided by this library > weak_library_names='' > > # Version information for libgstinterfaces-0.10. > current=21 > age=21 > revision=0 > > # Is this an already installed library? > installed=yes > > # Should we warn about portability when linking against -modules? > shouldnotlink=no > > # Files to dlopen/dlpreopen > dlopen='' > dlpreopen='' > > # Directory that this library needs to be installed in: > libdir='/usr/lib' > > > > > libgstaudio-0.10.la - a libtool library file > # Generated by ltmain.sh (GNU libtool) 2.2.6b Debian-2.2.6b-2 > # > # Please DO NOT delete this file! > # It is necessary for linking the library. > > # The name that we can dlopen(3). > dlname='libgstaudio-0.10.so.0' > > # Names of this library. > library_names='libgstaudio-0.10.so.0.21.0 libgstaudio-0.10.so.0 > libgstaudio-0.10.so' > > # The name of the static archive. > old_library='libgstaudio-0.10.a' > > # Linker flags that can not go in dependency_libs. > inherited_linker_flags=' -pthread' > > # Libraries that this one depends upon. > dependency_libs=' > -L/home/leo/logic/Logic_BSPs/Linux_3.0/1026167_LogicPD_Linux_BSP_2.4-3/rootfs/usr/lib > -lgstbase-0.10 /usr/lib/libgstinterfaces-0.10.la -lgstreamer-0.10 > -lgobject-2.0 -lgmodule-2.0 -lgthread-2.0 -lrt -lxml2 -lglib-2.0 -lm' > > # Names of additional weak libraries provided by this library > weak_library_names='' > > # Version information for libgstaudio-0.10. > current=21 > age=21 > revision=0 > > # Is this an already installed library? > installed=yes > > # Should we warn about portability when linking against -modules? > shouldnotlink=no > > # Files to dlopen/dlpreopen > dlopen='' > dlpreopen='' > > # Directory that this library needs to be installed in: > libdir='/usr/lib' > > > > Leonard Pimentel > CEO & CTO > Lotus Research, LLC. > Cell: (917) 834-7533 > <image001.png>
_______________________________________________ LTIB home page: http://ltib.org Ltib mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/ltib
