I find some valuable info from https://github.com/meta-qt5/meta-qt5/wiki/Building-with-OE
Now I use $$[QT_INSTALL_PLUGINS] which qmake will prefix /usr/lib/plugins with SYSROOT. But the Makefile has another problem when upgrade to 5.4: LIBS = $(SUBLIBS) -L/opt/yocto-rel/yocto/0.1/build/linda-a20navi/tmp/work/cortexa7hf-vfp-vfpv4-neon-linda-linux-gnueabi/qtxmlpatterns/5.4.0-r0/build/lib -lQt5XmlPatterns -L/opt/yocto-rel/yocto/0.1/build/linda-a20navi/tmp/sysroots/a20navi/usr/lib/qt5/plugins/bearer -lqgenericbearer -L${libdir} -lQt5Network -lQt5Core -lz -lm -ldl -lrt -lpthread The ${libdir} expend to /usr/lib which is cross-compile unsafe. Another question, from the wiki I saw quit some work on the QT5 build path. Now that QT5 is enhancing its cross-compile support, will meta-qt5 switch to the native, less-patch and clean method? Regards, Qiang On Thu, Feb 5, 2015 at 10:43 PM, Qiang Yu <yuq...@gmail.com> wrote: > I find the problem: > > qt.prf: > plugpath = $$[QT_INSTALL_PLUGINS/get] > > both $$[QT_INSTALL_PLUGINS/get] and $$[QT_INSTALL_PLUGINS/raw] equal > /usr/lib/qt5/plugins > but $$[QT_INSTALL_PLUGINS] equals right path. > > Now my question is > 1. why there are three var of QT_INSTALL_PLUGINS? > 2. where are their values from? > > Thanks, > Qiang > > On Thu, Feb 5, 2015 at 11:04 AM, Qiang Yu <yuq...@gmail.com> wrote: > >> the share link version of the same Makefile's LIBS has no plugin link: >> LIBS = $(SUBLIBS) >> -L/opt/yocto/build/sunxi/linda-a20navi-base/tmp/work/cortexa7hf-vfp-vfpv4-neon-linda-linux-gnueabi/qtxmlpatterns/5.3.2-r0/build/lib >> -lQt5XmlPatterns -lQt5Network -lQt5Core -lpthread >> >> On Thu, Feb 5, 2015 at 10:53 AM, Qiang Yu <yuq...@gmail.com> wrote: >> >>> Hi all, >>> >>> I use meta-qt5 for QT5 support. But I need static link the application >>> so I remove the -share from configure args and add -static. >>> >>> The "bitbake qtbase" is fine, but "bitbake qtxmlpatterns" do_compile >>> fail: >>> | linking ../../bin/xmlpatterns >>> | >>> /opt/yocto-rel/yocto/0.1/build/linda-a20navi/tmp/sysroots/x86_64-linux/usr/libexec/arm-linda-linux-gnueabi/gcc/arm-linda-linux-gnueabi/4.9.1/ld: >>> warning: library search path "/usr/lib/qt5/plugins/bearer" is unsafe for >>> cross-compilation >>> | >>> /opt/yocto-rel/yocto/0.1/build/linda-a20navi/tmp/sysroots/x86_64-linux/usr/libexec/arm-linda-linux-gnueabi/gcc/arm-linda-linux-gnueabi/4.9.1/ld: >>> cannot find -lqgenericbearer >>> | collect2: error: ld returned 1 exit status >>> | make[2]: *** [../../bin/xmlpatterns] Error 1 >>> | make[2]: Leaving directory >>> `/opt/yocto-rel/yocto/0.1/build/linda-a20navi/tmp/work/cortexa7hf-vfp-vfpv4-neon-linda-linux-gnueabi/qtxmlpatterns/5.3.2-r0/build/tools/xmlpatterns' >>> >>> I find the Makefile generated by qmake for tools/xmlpatterns has the >>> wrong LIBS: >>> LIBS = $(SUBLIBS) >>> -L/opt/yocto-rel/yocto/0.1/build/linda-a20navi/tmp/work/cortexa7hf-vfp-vfpv4-neon-linda-linux-gnueabi/qtxmlpatterns/5.3.2-r0/build/lib >>> -lQt5XmlPatterns -lQt5Network -lQt5Core -lz -lm -ldl -lrt >>> -L/usr/lib/qt5/plugins/bearer -lqgenericbearer -lpthread >>> >>> It seems the plugin lib dir doesn't have a cross compile prefix. Any one >>> meet this problem before or know how to fix static link plugin lib path? >>> >>> Thanks, >>> Qiang >>> >> >> >
-- _______________________________________________ yocto mailing list yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/yocto