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 \
 "

cannot allocate an object of abstract type 'QDeclarativePrivate::QDeclarativeElement<MyClass>'

エラーメッセージ
error: cannot allocate an object of abstract type 'QDeclarativePrivate::QDeclarativeElement<MyClass>'
note: because the following virtual functions are pure within 'QDeclarativePrivate::QDeclarativeElement<MyClass>':
note:   virtual void MyClass::myFunction()
エラー: 抽象型 'QDeclarativePrivate::QDeclarativeElement<MyClass>' のオブジェクトをアロケートできない
注記: 理由は右記の仮想関数が純粋仮想関数のため。 'QDeclarativePrivate::QDeclarativeElement<MyClass>':
注記:     virtual void MyClass::myFunction()
原因

MyClass を qmlRegisterType() で登録していたため。

解決方法

純粋仮想関数をあきらめて、空関数を実装した。

Invalid parameter passed to C runtime function

C ランタイム関数へ不正なパラメーターが渡された。

原因1

write 関数に不正なファイルディスクリプタ番号(-1)を渡していたため。

解決方法1

不正なファイルディスクリプタ番号で write 関数を実行しないようにする。

ゲスト OS で ping を実行すると "(DUP!)" が表示される

問題

ゲスト OS から LAN 上の他の機器へ ping を実行すると “(DUP!)” が表示される。

$ ping 192.168.0.1
PING 192.168.0.1 (192.168.0.1) 56(84) bytes of data.
From 192.168.0.2: icmp_seq=1 Redirect Network(New nexthop: 192.168.0.2)
64 bytes from 192.168.0.2: icmp_seq=1 ttl=255 time=1.02 ms
64 bytes from 192.168.0.2: icmp_seq=1 ttl=254 time=1.08 ms (DUP!)
64 bytes from 192.168.0.2: icmp_seq=1 ttl=255 time=1.09 ms (DUP!)
64 bytes from 192.168.0.2: icmp_seq=1 ttl=254 time=1.09 ms (DUP!)

環境

解決方法

暫定解決

一度、"Routing and Remote Access" サービスを開始して停止する。

恒久解決

次のレジストリキーを削除して Windows を再起動する。

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\RemoteAccess\RouterManagers\Ipv6

参考文献

RRAS Service Fails to Start