Hi all,
I'm building a static link version of QT by add -static to qtbase configure. The qtbase compile is fine. The I switch to qtxmlpatterns which compile fail with:
| 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'
| 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'
To copy to clipboard, switch view to plain text mode
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
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
To copy to clipboard, switch view to plain text mode
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
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
To copy to clipboard, switch view to plain text mode
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
Bookmarks