読者です 読者をやめる 読者になる 読者になる

ld: cannot find -lQtXml -lQtGui -lQtNetwork

問題

nativesdk-qt4-tools のビルド中にエラーが発生する。

メッセージ
./build/tmp/sysroots/x86_64-linux/usr/libexec/x86_64-pokysdk-linux/gcc/x86_64-pokysdk-linux/5.3.0/ld: cannot find -lQtXml
collect2: error: ld returned 1 exit status
make: *** [../../lib/libQtDBus.so.4.8.7] Error 1
WARNING: exit code 1 from a shell command.
ERROR: oe_runmake failed
ERROR: Function failed: do_compile (log file is located at ./build/tmp/work/x86_64-nativesdk-pokysdk-linux/nativesdk-qt4-tools/4.8.7-r0/temp/log.do_compile)
./build/tmp/sysroots/x86_64-linux/usr/libexec/x86_64-pokysdk-linux/gcc/x86_64-pokysdk-linux/5.3.0/ld: cannot find -lQtGui
./build/tmp/sysroots/x86_64-linux/usr/libexec/x86_64-pokysdk-linux/gcc/x86_64-pokysdk-linux/5.3.0/ld: cannot find -lQtNetwork
collect2: error: ld returned 1 exit status
make: *** [../../lib/libQt3Support.so.4.8.7] Error 1
WARNING: exit code 1 from a shell command.
ERROR: oe_runmake failed
ERROR: Function failed: do_compile (log file is located at ./build/tmp/work/x86_64-nativesdk-pokysdk-linux/nativesdk-qt4-tools/4.8.7-r0/temp/log.do_compile)
解決方法

meta-qt4/recipes-qt4/qt4/nativesdk-qt4-tools.inc の TOBUILD の値を並べ替える。

  • “src/xml” を “src/dbus” の前に移動する。
  • “src/network” と “src/gui” を “src/dt3support” の前に移動する。
 TOBUILD = "\
   src/tools/bootstrap \
   src/tools/moc \
   src/corelib \
   src/sql \
+  src/xml \
   src/dbus \
+  src/network \
+  src/gui \
   src/qt3support \
-  src/xml \
   src/tools/uic \
   src/tools/rcc \
-  src/network \
-  src/gui \
   src/tools/uic3 \
   tools/linguist/lrelease \
   tools/linguist/lupdate \
   tools/qdbus \
 "