openCV on FCC †Fujitsu製コンパイラFCCでopenCV-1.1.0をコンパイルしてみる. まだうまくいっていませんw GCC/G++ではうまくいくのだが,FCCでは案の定,いろいろエラーが出るし,解決方法もまったく情報がない.付け焼き刃的対処法とともに述べる. 免責 †当方,Linuxはかじった程度です.本稿に記載の内容によって読者に生じるいかなる障害も,記者は関知しません.自己責任で行ってください. 目次 †環境 †
error †otherlibs/highgui/window-gtk.cpp †
エラー文 †source='../../../otherlibs/highgui/window_gtk.cpp' object='window_gtk.lo' libtool=yes \ DEPDIR=.deps depmode=none /bin/sh ../../../autotools/depcomp \ /bin/sh ../../libtool --tag=CXX --mode=compile FCC -DHAVE_CONFIG_H -I. -I../../../otherlibs/highgui -I../.. -I. -I../../../cxcore/include -I../../../cv/include -pthread -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -DXTHREADS -D_REENTRANT -DXUSE_MTSAFE_API -I/usr/include/gtk-2.0 -I/usr/lib64/gtk-2.0/include -I/usr/X11R6/include -I/usr/include/atk-1.0 -I/usr/include/pango-1.0 -I/usr/include/freetype2 -I/usr/include/freetype2/config -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -DNDEBUG -O3 -g -c -o window_gtk.lo ../../../otherlibs/highgui/window_gtk.cpp FCC -DHAVE_CONFIG_H -I. -I../../../otherlibs/highgui -I../.. -I. -I../../../cxcore/include -I../../../cv/include -pthread -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -DXTHREADS -D_REENTRANT -DXUSE_MTSAFE_API -I/usr/include/gtk-2.0 -I/usr/lib64/gtk-2.0/include -I/usr/X11R6/include -I/usr/include/atk-1.0 -I/usr/include/pango-1.0 -I/usr/include/freetype2 -I/usr/include/freetype2/config -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -DNDEBUG -O3 -g -c ../../../otherlibs/highgui/window_gtk.cpp -DPIC -o .libs/window_gtk.o FCC: warning: -p option is ignored. FCC: warning: -g option is specified, -O option is ignored. "/usr/include/glib-2.0/glib/gmessages.h", line 114: error: expected an identifier #define g_error(...) g_log (G_LOG_DOMAIN, \ ^ "/usr/include/glib-2.0/glib/gmessages.h", line 117: error: expected an identifier #define g_message(...) g_log (G_LOG_DOMAIN, \ ^ "/usr/include/glib-2.0/glib/gmessages.h", line 120: error: expected an identifier #define g_critical(...) g_log (G_LOG_DOMAIN, \ ^ "/usr/include/glib-2.0/glib/gmessages.h", line 123: error: expected an identifier #define g_warning(...) g_log (G_LOG_DOMAIN, \ ^ "../../../otherlibs/highgui/window_gtk.cpp", line 154: warning: variable "image_widget" was set but never used CvImageWidget *image_widget; ^ "../../../otherlibs/highgui/window_gtk.cpp", line 536: warning: statement is unreachable return NULL; ^ 4 errors detected in the compilation of "../../../otherlibs/highgui/window_gtk.cpp". cv/src/_cvkdtree.hpp †
cvaux/include/cvvidsurv.hpp †
virtualなデストラクタを持ったクラスがうまく継承できない †
lib**.soが生成されない †
マニュアルを参照して,有用そうなオプションを開拓. †-KOMP -Kparallel,reduction 以上の処理をへて,最終的なコンフィグコマンドはこちら †setenv CXX FCC setenv CXXFLAGS "-frtti --variadic_macros --alternative_tokens -DUSE_C_ALLOCA -Dalloca=C_alloca '-D_EXTERN_INLINE=static __inline'" ../configure --disable-apps --enable-static --disable-shared --without-python --prefix=/home/t/tXXXXX/opencv-1.1.0.fccFCC.extern.alloca #ここで各makefileをチェックし, -O3 とか -fno-rtti とかのオプションを外す... make make install とりあえずこれでOK うちの研究室で使っているライブラリ用のコンフィグ †メモリのアロケーション †opencv-1.1.0.fccFCC.extern.C_alloca/include/opencv/cxmisc.h インストールしたopencvのヘッダを書き換え. @122行目 +#include <alloca.h> @134行目 -#elif @134行目 +#elif 0 これでopencvpatchedのコンパイルも通るはず. for GTK user †
memo †
気になるサイト †
comment †#comment_kcaptcha |