I'm writing a kernel module that lists the network namespaces using the for_each_net and have written the following snippet which compiles fine:
rtnl_lock();
for_each_net(net)
printk("network ns: %p\n", net);
rtnl_unlock();
However when I try to insert the kernel module i get the following error:
insmod: ERROR: could not insert module kerNotification.ko: Unknown symbol in module
The dmesg gives the additional error information:
[3561461.418499] kerNotification: Unknown symbol net_namespace_list (err 0)
The kallsyms shows that it has the symbol of this kernel function:
[josh#dev kernel_prog(keystone_admin)]# cat /proc/kallsyms | grep net_namespace_list
ffffffff81a203e0 R __ksymtab_net_namespace_list
ffffffff81a32bc0 r __kcrctab_net_namespace_list
ffffffff81a55452 r __kstrtab_net_namespace_list
ffffffff81b6b000 D net_namespace_lis
The Module.symvers is included in the makefile as KBUILD_EXTRA_SYMBOLS. Here is the Makefile:
obj-m += kerNotification.o
SYMBOLA=/usr/src/kernels/4.4.57-1.el7.elrepo.x86_64/Module.symvers
KBUILD_EXTRA_SYMBOLS= $(SYMBOLA)
all:
make -C /lib/modules/$(shell uname -r)/build $(KBUILD_EXTRA_SYMBOLS) M=$(PWD) modules
clean:
make -C /lib/modules/$(shell uname -r)/build M=$(PWD) clean
Here is the complete logs when the make file is built with V=1:
make -C /lib/modules/4.4.57-1.el7.elrepo.x86_64/build /usr/src/kernels/4.4.57-1.el7.elrepo.x86_64/Module.symvers M=/home/cmmdocker/kernel_prog modules
make[1]: Entering directory `/usr/src/kernels/4.4.57-1.el7.elrepo.x86_64'
test -e include/generated/autoconf.h -a -e include/config/auto.conf || ( \
echo >&2; \
echo >&2 " ERROR: Kernel configuration is invalid."; \
echo >&2 " include/generated/autoconf.h or include/config/auto.conf are missing.";\
echo >&2 " Run 'make oldconfig && make prepare' on kernel src to fix it."; \
echo >&2 ; \
/bin/false)
make[1]: Nothing to be done for `/usr/src/kernels/4.4.57-1.el7.elrepo.x86_64/Module.symvers'.
mkdir -p /home/cmmdocker/kernel_prog/.tmp_versions ; rm -f /home/cmmdocker/kernel_prog/.tmp_versions/*
make -f ./scripts/Makefile.build obj=/home/cmmdocker/kernel_prog
rm -f /home/cmmdocker/kernel_prog/built-in.o; ar rcsD /home/cmmdocker/kernel_prog/built-in.o
gcc -Wp,-MD,/home/cmmdocker/kernel_prog/.kerNotification.o.d -nostdinc -isystem /usr/lib/gcc/x86_64-redhat-linux/4.8.5/include -I./arch/x86/include -Iarch/x86/include/generated/uapi -Iarch/x86/include/generated -Iinclude -I./arch/x86/include/uapi -Iarch/x86/include/generated/uapi -I./include/uapi -Iinclude/generated/uapi -include ./include/linux/kconfig.h -D__KERNEL__ -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Werror-implicit-function-declaration -Wno-format-security -std=gnu89 -fno-PIE -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -mno-avx -m64 -falign-jumps=1 -falign-loops=1 -mno-80387 -mno-fp-ret-in-387 -mpreferred-stack-boundary=3 -mtune=generic -mno-red-zone -mcmodel=kernel -funit-at-a-time -maccumulate-outgoing-args -DCONFIG_AS_CFI=1 -DCONFIG_AS_CFI_SIGNAL_FRAME=1 -DCONFIG_AS_CFI_SECTIONS=1 -DCONFIG_AS_FXSAVEQ=1 -DCONFIG_AS_SSSE3=1 -DCONFIG_AS_CRC32=1 -DCONFIG_AS_AVX=1 -DCONFIG_AS_AVX2=1 -DCONFIG_AS_SHA1_NI=1 -DCONFIG_AS_SHA256_NI=1 -pipe -Wno-sign-compare -fno-asynchronous-unwind-tables -fno-delete-null-pointer-checks -Wno-maybe-uninitialized -O2 --param=allow-store-data-races=0 -Wframe-larger-than=2048 -fstack-protector-strong -Wno-unused-but-set-variable -fno-omit-frame-pointer -fno-optimize-sibling-calls -fno-var-tracking-assignments -g -pg -mfentry -DCC_USING_FENTRY -fno-inline-functions-called-once -Wdeclaration-after-statement -Wno-pointer-sign -fno-strict-overflow -fconserve-stack -Werror=implicit-int -Werror=strict-prototypes -DCC_HAVE_ASM_GOTO -DMODULE -D"KBUILD_STR(s)=#s" -D"KBUILD_BASENAME=KBUILD_STR(kerNotification)" -D"KBUILD_MODNAME=KBUILD_STR(kerNotification)" -c -o /home/cmmdocker/kernel_prog/.tmp_kerNotification.o /home/cmmdocker/kernel_prog/kerNotification.c
/home/cmmdocker/kernel_prog/kerNotification.c: In function ‘kerNotification_init’:
/home/cmmdocker/kernel_prog/kerNotification.c:37:5: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
struct net *net;
^
if [ "-pg" = "-pg" ]; then if [ /home/cmmdocker/kernel_prog/kerNotification.o != "scripts/mod/empty.o" ]; then ./scripts/recordmcount "/home/cmmdocker/kernel_prog/kerNotification.o"; fi; fi;
(cat /dev/null; echo kernel//home/cmmdocker/kernel_prog/kerNotification.ko;) > /home/cmmdocker/kernel_prog/modules.order
make -f ./scripts/Makefile.modpost
find /home/cmmdocker/kernel_prog/.tmp_versions -name '*.mod' | xargs -r grep -h '\.ko$' | sort -u | sed 's/\.ko$/.o/' | scripts/mod/modpost -m -a -i ./Module.symvers -I /home/cmmdocker/kernel_prog/Module.symvers -e /usr/src/kernels/4.4.57-1.el7.elrepo.x86_64/Module.symvers -o /home/cmmdocker/kernel_prog/Module.symvers -w -s -T -
gcc -Wp,-MD,/home/cmmdocker/kernel_prog/.kerNotification.mod.o.d -nostdinc -isystem /usr/lib/gcc/x86_64-redhat-linux/4.8.5/include -I./arch/x86/include -Iarch/x86/include/generated/uapi -Iarch/x86/include/generated -Iinclude -I./arch/x86/include/uapi -Iarch/x86/include/generated/uapi -I./include/uapi -Iinclude/generated/uapi -include ./include/linux/kconfig.h -D__KERNEL__ -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Werror-implicit-function-declaration -Wno-format-security -std=gnu89 -fno-PIE -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -mno-avx -m64 -falign-jumps=1 -falign-loops=1 -mno-80387 -mno-fp-ret-in-387 -mpreferred-stack-boundary=3 -mtune=generic -mno-red-zone -mcmodel=kernel -funit-at-a-time -maccumulate-outgoing-args -DCONFIG_AS_CFI=1 -DCONFIG_AS_CFI_SIGNAL_FRAME=1 -DCONFIG_AS_CFI_SECTIONS=1 -DCONFIG_AS_FXSAVEQ=1 -DCONFIG_AS_SSSE3=1 -DCONFIG_AS_CRC32=1 -DCONFIG_AS_AVX=1 -DCONFIG_AS_AVX2=1 -DCONFIG_AS_SHA1_NI=1 -DCONFIG_AS_SHA256_NI=1 -pipe -Wno-sign-compare -fno-asynchronous-unwind-tables -fno-delete-null-pointer-checks -Wno-maybe-uninitialized -O2 --param=allow-store-data-races=0 -Wframe-larger-than=2048 -fstack-protector-strong -Wno-unused-but-set-variable -fno-omit-frame-pointer -fno-optimize-sibling-calls -fno-var-tracking-assignments -g -pg -mfentry -DCC_USING_FENTRY -fno-inline-functions-called-once -Wdeclaration-after-statement -Wno-pointer-sign -fno-strict-overflow -fconserve-stack -Werror=implicit-int -Werror=strict-prototypes -DCC_HAVE_ASM_GOTO -D"KBUILD_STR(s)=#s" -D"KBUILD_BASENAME=KBUILD_STR(kerNotification.mod)" -D"KBUILD_MODNAME=KBUILD_STR(kerNotification)" -DMODULE -c -o /home/cmmdocker/kernel_prog/kerNotification.mod.o /home/cmmdocker/kernel_prog/kerNotification.mod.c
ld -r -m elf_x86_64 -T ./scripts/module-common.lds --build-id -o /home/cmmdocker/kernel_prog/kerNotification.ko /home/cmmdocker/kernel_prog/kerNotification.o /home/cmmdocker/kernel_prog/kerNotification.mod.o
make[1]: Leaving directory `/usr/src/kernels/4.4.57-1.el7.elrepo.x86_64'
Any idea how to fix this?
Issue was missing license. Below was added to get the expected result:
MODULE_LICENSE("GPL");
Referred the following answer from another query on stackoverflow for this: unknown-symbol-class-create-err-0
insmod: ERROR: could not insert module kerNotification.ko: Unknown
symbol in module
You get the above error because the net_namespace_list is missing in the kernel. So you need to make sure to insert the module which it is defined. looking at the source code its declared in net_namespace.c and looking at the Makefile it will when CONFIG_NET is enabled. Also when you have built your kernel image the System.map file should tell you if its declared in the kernel image which you have built, something like below:
cat System.map | grep net_namespace_list
8041a888 r __ksymtab_net_namespace_list
8042b80c r __kstrtab_net_namespace_list
80464c08 D net_namespace_list
So I installed openssl in one of the 3 aix servers but it just wouldn't work in the other 2 servers.
I'm trying to install openssl-1.0.1h on AIX.
Step 1: I ran the config file -
./config -–prefix=/appl/peoplesoft/apache/openssl
Output: a Makefile is generated.
Step 2: run the make command.
Output of command make:
$ make
making all in crypto...
( echo "#ifndef MK1MF_BUILD"; echo ' /* auto-generated by crypto/Makefile for crypto/cversion.c */'; echo ' #define CFLAGS "cc -DOPENSSL_THREADS -qthreaded -D_THREAD_SAFE -DDSO_DLFCN -DHAVE_DLFCN_H -q32 -O -DB_ENDIAN -qmaxmem=16384 -qro -qroconst -DOPENSSL_BN_ASM_MONT -DSHA1_ASM -DSHA256_ASM -DAES_ASM"'; echo ' #define PLATFORM "aix-cc"'; echo " #define DATE \"`LC_ALL=C LC_TIME=C date`\""; echo '#endif' ) >buildinf.h
cc -I. -I.. -I../include -DOPENSSL_THREADS -qthreaded -D_THREAD_SAFE -DDSO_DLFCN -DHAVE_DLFCN_H -q32 -O -DB_ENDIAN -qmaxmem=16384 -qro -qroconst -DOPENSSL_BN_ASM_MONT -DSHA1_ASM -DSHA256_ASM -DAES_ASM -c cryptlib.c
cc: unrecognized option '-qthreaded'
cc: unrecognized option '-q32'
cc: unrecognized option '-qmaxmem=16384'
cc: unrecognized option '-qro'
cc: unrecognized option '-qroconst'
I don't know what's wrong.
I'm using gcc version 4.2.0 and cc has a softlink to gcc.
Should I try copying the Makefile file from the server where it works?
I'll try the previous comments: gcc doesn't really understands xlc's options, use either this:
./Configure -–prefix=/appl/peoplesoft/apache/openssl -maix32 \
... aix-gcc
or
./Configure -–prefix=/appl/peoplesoft/apache/openssl -maix64 \
... aix64-gcc
Where ... is the set of compiler/linker options you can think of, eg:
-mtune=native -pthread -lpthreads -Wl,-brtl
Open config file , for AIX and locate the "favor vendor cc over gcc"
Change this: (replace cc with gcc for AIX)
if [ "${SYSTEM}" = "AIX" ]; then # favor vendor cc over gcc
(cc) 2>&1 | grep -iv "not found" > /dev/null && CC=cc
fi
to this :
if [ "${SYSTEM}" = "AIX" ]; then # favor vendor cc over gcc
(cc) 2>&1 | grep -iv "not found" > /dev/null && CC=gcc
fi
And rerun your configuration ...
I've an OpenSUSE OS and want to compile GCC from scratch. I want to compile 4.9.1 version because of the c++11 support. I am following this guide here. I am using gcc version 4.8.3 for compilation. After executing make, I get following errors;
libtool: compile: /mnt/disk2/gccWork-Ozgur/4.9.1-objdir/./gcc/xgcc -shared-libgcc -B/mnt/disk2/gccWork-Ozgur/4.9.1-objdir/./gcc -nostdinc++ -L/mnt/disk2/gccWork-Ozgur/4.9.1-objdir/x86_64-unknown-linux-gnu/libstdc++-v3/src -L/mnt/disk2/gccWork-Ozgur/4.9.1-objdir/x86_64-unknown-linux-gnu/libstdc++-v3/src/.libs -L/mnt/disk2/gccWork-Ozgur/4.9.1-objdir/x86_64-unknown-linux-gnu/libstdc++-v3/libsupc++/.libs -B/mnt/disk2/gccWork-Ozgur/4.9.1-install/x86_64-unknown-linux-gnu/bin/ -B/mnt/disk2/gccWork-Ozgur/4.9.1-install/x86_64-unknown-linux-gnu/lib/ -isystem /mnt/disk2/gccWork-Ozgur/4.9.1-install/x86_64-unknown-linux-gnu/include -isystem /mnt/disk2/gccWork-Ozgur/4.9.1-install/x86_64-unknown-linux-gnu/sys-include -D_GNU_SOURCE -D_DEBUG -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I. -I../../../../gcc-4.9.1/libsanitizer/sanitizer_common -I.. -I ../../../../gcc-4.9.1/libsanitizer/include -isystem ../../../../gcc-4.9.1/libsanitizer/include/system -Wall -W -Wno-unused-parameter -Wwrite-strings -pedantic -Wno-long-long -fPIC -fno-builtin -fno-exceptions -fno-rtti -fomit-frame-pointer -funwind-tables -fvisibility=hidden -Wno-variadic-macros -I../../libstdc++-v3/include -I../../libstdc++-v3/include/x86_64-unknown-linux-gnu -I../../../../gcc-4.9.1/libsanitizer/../libstdc++-v3/libsupc++ -DSANITIZER_LIBBACKTRACE -DSANITIZER_CP_DEMANGLE -I ../../../../gcc-4.9.1/libsanitizer/../libbacktrace -I ../libbacktrace -I ../../../../gcc-4.9.1/libsanitizer/../include -include ../../../../gcc-4.9.1/libsanitizer/libbacktrace/backtrace-rename.h -g -O2 -D_GNU_SOURCE -MT sanitizer_platform_limits_posix.lo -MD -MP -MF .deps/sanitizer_platform_limits_posix.Tpo -c ../../../../gcc-4.9.1/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc -fPIC -DPIC -o .libs/sanitizer_platform_limits_posix.o
../../../../gcc-4.9.1/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc:232:27: error: ‘PTRACE_GETSIGINFO’ was not declared in this scope
int ptrace_getsiginfo = PTRACE_GETSIGINFO;
^
../../../../gcc-4.9.1/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc:233:27: error: ‘PTRACE_SETSIGINFO’ was not declared in this scope
int ptrace_setsiginfo = PTRACE_SETSIGINFO;
^
../../../../gcc-4.9.1/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc:390:30: error: ‘EVIOCGREP’ was not declared in this scope
unsigned IOCTL_EVIOCGREP = EVIOCGREP;
^
../../../../gcc-4.9.1/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc:399:30: error: ‘EVIOCSREP’ was not declared in this scope
unsigned IOCTL_EVIOCSREP = EVIOCSREP;
^
../../../../gcc-4.9.1/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc:682:36: error: ‘FS_IOC_GETFLAGS’ was not declared in this scope
unsigned IOCTL_FS_IOC_GETFLAGS = FS_IOC_GETFLAGS;
^
../../../../gcc-4.9.1/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc:683:38: error: ‘FS_IOC_GETVERSION’ was not declared in this scope
unsigned IOCTL_FS_IOC_GETVERSION = FS_IOC_GETVERSION;
^
../../../../gcc-4.9.1/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc:684:36: error: ‘FS_IOC_SETFLAGS’ was not declared in this scope
unsigned IOCTL_FS_IOC_SETFLAGS = FS_IOC_SETFLAGS;
^
../../../../gcc-4.9.1/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc:685:38: error: ‘FS_IOC_SETVERSION’ was not declared in this scope
unsigned IOCTL_FS_IOC_SETVERSION = FS_IOC_SETVERSION;
^
make[4]: *** [sanitizer_platform_limits_posix.lo] Error 1
make[4]: Leaving directory `/mnt/disk2/gccWork-Ozgur/4.9.1-objdir/x86_64-unknown-linux-gnu/libsanitizer/sanitizer_common'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/mnt/disk2/gccWork-Ozgur/4.9.1-objdir/x86_64-unknown-linux-gnu/libsanitizer'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/mnt/disk2/gccWork-Ozgur/4.9.1-objdir/x86_64-unknown-linux-gnu/libsanitizer'
make[1]: *** [all-target-libsanitizer] Error 2
make[1]: Leaving directory `/mnt/disk2/gccWork-Ozgur/4.9.1-objdir'
make: *** [all] Error 2
Any help is appreciated. Thank you
I have problems with install capybara-webkit
my qmake is
QMake version 2.01a
Using Qt version 4.8.4 in /usr/lib/x86_64-linux-gnu
qtchooser -list-versions returns
default
qt4
qt5-x86_64-linux-gnu
5
qt5
I don't know how to left only qt4, maybe this is reason of those errors:
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
/home/adam/.rvm/rubies/ruby-2.1.0/bin/ruby extconf.rb
cd src/ && /usr/bin/qmake /home/adam/.rvm/gems/ruby-2.1.0/gems/capybara-webkit-1.2.0/src/webkit_server.pro -spec /usr/share/qt4/mkspecs/linux-g++ -o Makefile.webkit_server
cd src/ && make -f Makefile.webkit_server
make[1]: Wejście do katalogu `/home/adam/.rvm/gems/ruby-2.1.0/gems/capybara-webkit-1.2.0/src'
g++ -pipe -O2 -Wall -W -D_REENTRANT -DQT_NO_DEBUG -DQT_WEBKIT_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/linux-g++ -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtNetwork -I/usr/include/qt4/QtGui -I/usr/include/qt4/QtWebKit -I/usr/include/qt4 -Ibuild -x c++-header -c stable.h -o build/webkit_server.gch/c++
stable.h:23:23: fatal error: QWebElement: Nie ma takiego pliku ani katalogu
#include <QWebElement>
^
compilation terminated.
make[1]: *** [build/webkit_server.gch/c++] Błąd 1
make[1]: Opuszczenie katalogu `/home/adam/.rvm/gems/ruby-2.1.0/gems/capybara-webkit-1.2.0/src'
make: *** [sub-src-webkit_server-pro-make_default-ordered] Błąd 2
Command 'make' failed
make "DESTDIR=" clean
cd src/ && make -f Makefile.webkit_server clean
make[1]: Wejście do katalogu `/home/adam/.rvm/gems/ruby-2.1.0/gems/capybara-webkit-1.2.0/src'
rm -f build/moc_GoForward.cpp build/moc_GoBack.cpp build/moc_WindowMaximize.cpp build/moc_WindowSize.cpp build/moc_WindowCommand.cpp build/moc_WindowOpen.cpp build/moc_WindowClose.cpp build/moc_Version.cpp build/moc_EnableLogging.cpp build/moc_Authenticate.cpp build/moc_SetConfirmAction.cpp build/moc_SetPromptAction.cpp build/moc_SetPromptText.cpp build/moc_ClearPromptText.cpp build/moc_JavascriptAlertMessages.cpp build/moc_JavascriptConfirmMessages.cpp build/moc_JavascriptPromptMessages.cpp build/moc_IgnoreSslErrors.cpp build/moc_WindowResize.cpp build/moc_CurrentUrl.cpp build/moc_ConsoleMessages.cpp build/moc_WebPage.cpp build/moc_Server.cpp build/moc_Connection.cpp build/moc_Command.cpp build/moc_SocketCommand.cpp build/moc_Visit.cpp build/moc_Reset.cpp build/moc_Node.cpp build/moc_JavascriptInvocation.cpp build/moc_Evaluate.cpp build/moc_Execute.cpp build/moc_FrameFocus.cpp build/moc_Response.cpp build/moc_NetworkAccessManager.cpp build/moc_NetworkCookieJar.cpp build/moc_Header.cpp build/moc_Render.cpp build/moc_Body.cpp build/moc_Status.cpp build/moc_Headers.cpp build/moc_UnsupportedContentHandler.cpp build/moc_SetCookie.cpp build/moc_ClearCookies.cpp build/moc_GetCookies.cpp build/moc_CommandParser.cpp build/moc_CommandFactory.cpp build/moc_SetProxy.cpp build/moc_NullCommand.cpp build/moc_PageLoadingCommand.cpp build/moc_SetSkipImageLoading.cpp build/moc_WebPageManager.cpp build/moc_WindowFocus.cpp build/moc_GetWindowHandles.cpp build/moc_GetWindowHandle.cpp build/moc_GetTimeout.cpp build/moc_SetTimeout.cpp build/moc_TimeoutCommand.cpp build/moc_SetUrlBlacklist.cpp build/moc_NoOpReply.cpp build/moc_JsonSerializer.cpp build/moc_ErrorMessage.cpp build/moc_Title.cpp build/moc_FindCss.cpp build/moc_JavascriptCommand.cpp build/moc_FindXpath.cpp build/moc_NetworkReplyProxy.cpp build/moc_StdinNotifier.cpp
rm -f qrc_webkit_server.cpp
rm -f build/GoForward.o build/GoBack.o build/WindowMaximize.o build/WindowSize.o build/WindowCommand.o build/WindowOpen.o build/WindowClose.o build/Version.o build/EnableLogging.o build/Authenticate.o build/SetConfirmAction.o build/SetPromptAction.o build/SetPromptText.o build/ClearPromptText.o build/JavascriptAlertMessages.o build/JavascriptConfirmMessages.o build/JavascriptPromptMessages.o build/IgnoreSslErrors.o build/WindowResize.o build/CurrentUrl.o build/ConsoleMessages.o build/main.o build/WebPage.o build/Server.o build/Connection.o build/Command.o build/SocketCommand.o build/Visit.o build/Reset.o build/Node.o build/JavascriptInvocation.o build/Evaluate.o build/Execute.o build/FrameFocus.o build/Response.o build/NetworkAccessManager.o build/NetworkCookieJar.o build/Header.o build/Render.o build/body.o build/Status.o build/Headers.o build/UnsupportedContentHandler.o build/SetCookie.o build/ClearCookies.o build/GetCookies.o build/CommandParser.o build/CommandFactory.o build/SetProxy.o build/NullCommand.o build/PageLoadingCommand.o build/SetTimeout.o build/GetTimeout.o build/SetSkipImageLoading.o build/WebPageManager.o build/WindowFocus.o build/GetWindowHandles.o build/GetWindowHandle.o build/TimeoutCommand.o build/SetUrlBlacklist.o build/NoOpReply.o build/JsonSerializer.o build/InvocationResult.o build/ErrorMessage.o build/Title.o build/FindCss.o build/JavascriptCommand.o build/FindXpath.o build/NetworkReplyProxy.o build/IgnoreDebugOutput.o build/StdinNotifier.o build/moc_GoForward.o build/moc_GoBack.o build/moc_WindowMaximize.o build/moc_WindowSize.o build/moc_WindowCommand.o build/moc_WindowOpen.o build/moc_WindowClose.o build/moc_Version.o build/moc_EnableLogging.o build/moc_Authenticate.o build/moc_SetConfirmAction.o build/moc_SetPromptAction.o build/moc_SetPromptText.o build/moc_ClearPromptText.o build/moc_JavascriptAlertMessages.o build/moc_JavascriptConfirmMessages.o build/moc_JavascriptPromptMessages.o build/moc_IgnoreSslErrors.o build/moc_WindowResize.o build/moc_CurrentUrl.o build/moc_ConsoleMessages.o build/moc_WebPage.o build/moc_Server.o build/moc_Connection.o build/moc_Command.o build/moc_SocketCommand.o build/moc_Visit.o build/moc_Reset.o build/moc_Node.o build/moc_JavascriptInvocation.o build/moc_Evaluate.o build/moc_Execute.o build/moc_FrameFocus.o build/moc_Response.o build/moc_NetworkAccessManager.o build/moc_NetworkCookieJar.o build/moc_Header.o build/moc_Render.o build/moc_Body.o build/moc_Status.o build/moc_Headers.o build/moc_UnsupportedContentHandler.o build/moc_SetCookie.o build/moc_ClearCookies.o build/moc_GetCookies.o build/moc_CommandParser.o build/moc_CommandFactory.o build/moc_SetProxy.o build/moc_NullCommand.o build/moc_PageLoadingCommand.o build/moc_SetSkipImageLoading.o build/moc_WebPageManager.o build/moc_WindowFocus.o build/moc_GetWindowHandles.o build/moc_GetWindowHandle.o build/moc_GetTimeout.o build/moc_SetTimeout.o build/moc_TimeoutCommand.o build/moc_SetUrlBlacklist.o build/moc_NoOpReply.o build/moc_JsonSerializer.o build/moc_ErrorMessage.o build/moc_Title.o build/moc_FindCss.o build/moc_JavascriptCommand.o build/moc_FindXpath.o build/moc_NetworkReplyProxy.o build/moc_StdinNotifier.o build/qrc_webkit_server.o
rm -f build/webkit_server.gch/c build/webkit_server.gch/c++
rm -f *~ core *.core
make[1]: Opuszczenie katalogu `/home/adam/.rvm/gems/ruby-2.1.0/gems/capybara-webkit-1.2.0/src'
make "DESTDIR="
cd src/ && make -f Makefile.webkit_server
make[1]: Wejście do katalogu `/home/adam/.rvm/gems/ruby-2.1.0/gems/capybara-webkit-1.2.0/src'
g++ -pipe -O2 -Wall -W -D_REENTRANT -DQT_NO_DEBUG -DQT_WEBKIT_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/linux-g++ -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtNetwork -I/usr/include/qt4/QtGui -I/usr/include/qt4/QtWebKit -I/usr/include/qt4 -Ibuild -x c++-header -c stable.h -o build/webkit_server.gch/c++
stable.h:23:23: fatal error: QWebElement: Nie ma takiego pliku ani katalogu
#include <QWebElement>
^
compilation terminated.
make[1]: *** [build/webkit_server.gch/c++] Błąd 1
make[1]: Opuszczenie katalogu `/home/adam/.rvm/gems/ruby-2.1.0/gems/capybara-webkit-1.2.0/src'
make: *** [sub-src-webkit_server-pro-make_default-ordered] Błąd 2
make failed, exit code 2
Gem files will remain installed in /home/adam/.rvm/gems/ruby-2.1.0/gems/capybara-webkit-1.2.0 for inspection.
Results logged to /home/adam/.rvm/gems/ruby-2.1.0/extensions/x86_64-linux/2.1.0/capybara-webkit-1.2.0/gem_make.out
How can I reapair it?
On CentOS 7
sudo yum -y install epel-release
sudo yum -y install qtwebkit-devel
I couldn't build opencv with cuda support on Mavericks:
When using cmake -G "Unix Makefiles" -DWITH_CUDA=ON ..
i got error:
-- Configuring incomplete, errors occurred!
Any workaround on this?
(Similar error when using macport too)
CMakeError.log
Determining size of off64_t failed with the following output:
Change Dir: /Users/caominhvu/Downloads/opencv-2.4.7/build/CMakeFiles/CMakeTmp
Run Build Command:/opt/local/bin/gmake "cmTryCompileExec3929617441/fast"
/opt/local/bin/gmake -f CMakeFiles/cmTryCompileExec3929617441.dir/build.make CMakeFiles/cmTryCompileExec3929617441.dir/build
gmake[1]: Entering directory `/Users/caominhvu/Downloads/opencv-2.4.7/build/CMakeFiles/CMakeTmp'
/opt/local/bin/cmake -E cmake_progress_report /Users/caominhvu/Downloads/opencv-2.4.7/build/CMakeFiles/CMakeTmp/CMakeFiles 1
Building C object CMakeFiles/cmTryCompileExec3929617441.dir/OFF64_T.c.o
/usr/bin/cc -fsigned-char -W -Werror=return-type -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wno-narrowing -Wno-delete-non-virtual-dtor -Wno-unnamed-type-template-args -fdiagnostics-show-option -fno-omit-frame-pointer -msse -msse2 -msse3 -O3 -DNDEBUG -o CMakeFiles/cmTryCompileExec3929617441.dir/OFF64_T.c.o -c /Users/caominhvu/Downloads/opencv-2.4.7/build/CMakeFiles/CheckTypeSize/OFF64_T.c
/Users/caominhvu/Downloads/opencv-2.4.7/build/CMakeFiles/CheckTypeSize/OFF64_T.c:19:12: error: use of undeclared identifier 'off64_t'; did you mean 'off_t'?
('0' + ((SIZE / 10000)%10)),
^
/Users/caominhvu/Downloads/opencv-2.4.7/build/CMakeFiles/CheckTypeSize/OFF64_T.c:17:22: note: expanded from macro 'SIZE'
#define SIZE (sizeof(off64_t))
^
/Users/caominhvu/Downloads/opencv-2.4.7/build/CMakeFiles/CheckTypeSize/OFF64_T.c:20:12: error: use of undeclared identifier 'off64_t'; did you mean 'off_t'?
('0' + ((SIZE / 1000)%10)),
^
/Users/caominhvu/Downloads/opencv-2.4.7/build/CMakeFiles/CheckTypeSize/OFF64_T.c:17:22: note: expanded from macro 'SIZE'
#define SIZE (sizeof(off64_t))
^
/Users/caominhvu/Downloads/opencv-2.4.7/build/CMakeFiles/CheckTypeSize/OFF64_T.c:21:12: error: use of undeclared identifier 'off64_t'; did you mean 'off_t'?
('0' + ((SIZE / 100)%10)),
^
/Users/caominhvu/Downloads/opencv-2.4.7/build/CMakeFiles/CheckTypeSize/OFF64_T.c:17:22: note: expanded from macro 'SIZE'
#define SIZE (sizeof(off64_t))
^
/Users/caominhvu/Downloads/opencv-2.4.7/build/CMakeFiles/CheckTypeSize/OFF64_T.c:22:12: error: use of undeclared identifier 'off64_t'; did you mean 'off_t'?
('0' + ((SIZE / 10)%10)),
^
/Users/caominhvu/Downloads/opencv-2.4.7/build/CMakeFiles/CheckTypeSize/OFF64_T.c:17:22: note: expanded from macro 'SIZE'
#define SIZE (sizeof(off64_t))
^
/Users/caominhvu/Downloads/opencv-2.4.7/build/CMakeFiles/CheckTypeSize/OFF64_T.c:23:12: error: use of undeclared identifier 'off64_t'; did you mean 'off_t'?
('0' + (SIZE % 10)),
^
/Users/caominhvu/Downloads/opencv-2.4.7/build/CMakeFiles/CheckTypeSize/OFF64_T.c:17:22: note: expanded from macro 'SIZE'
#define SIZE (sizeof(off64_t))
^
5 errors generated.
gmake[1]: *** [CMakeFiles/cmTryCompileExec3929617441.dir/OFF64_T.c.o] Error 1
gmake[1]: Leaving directory `/Users/caominhvu/Downloads/opencv-2.4.7/build/CMakeFiles/CMakeTmp'
gmake: *** [cmTryCompileExec3929617441/fast] Error 2
/Users/caominhvu/Downloads/opencv-2.4.7/build/CMakeFiles/CheckTypeSize/OFF64_T.c:
#include <sys/types.h>
#include <stdint.h>
#include <stddef.h>
#undef KEY
#if defined(__i386)
# define KEY '_','_','i','3','8','6'
#elif defined(__x86_64)
# define KEY '_','_','x','8','6','_','6','4'
#elif defined(__ppc__)
# define KEY '_','_','p','p','c','_','_'
#elif defined(__ppc64__)
# define KEY '_','_','p','p','c','6','4','_','_'
#endif
#define SIZE (sizeof(off64_t))
char info_size[] = {'I', 'N', 'F', 'O', ':', 's','i','z','e','[',
('0' + ((SIZE / 10000)%10)),
('0' + ((SIZE / 1000)%10)),
('0' + ((SIZE / 100)%10)),
('0' + ((SIZE / 10)%10)),
('0' + (SIZE % 10)),
']',
#ifdef KEY
' ','k','e','y','[', KEY, ']',
#endif
'\0'};
#ifdef __CLASSIC_C__
int main(argc, argv) int argc; char *argv[];
#else
int main(int argc, char *argv[])
#endif
{
int require = 0;
require += info_size[argc];
(void)argv;
return require;
}
Determining if the include file io.h exists failed with the following output:
Change Dir: /Users/caominhvu/Downloads/opencv-2.4.7/build/CMakeFiles/CMakeTmp
Run Build Command:/opt/local/bin/gmake "cmTryCompileExec647810530/fast"
/opt/local/bin/gmake -f CMakeFiles/cmTryCompileExec647810530.dir/build.make CMakeFiles/cmTryCompileExec647810530.dir/build
gmake[1]: Entering directory `/Users/caominhvu/Downloads/opencv-2.4.7/build/CMakeFiles/CMakeTmp'
/opt/local/bin/cmake -E cmake_progress_report /Users/caominhvu/Downloads/opencv-2.4.7/build/CMakeFiles/CMakeTmp/CMakeFiles 1
Building C object CMakeFiles/cmTryCompileExec647810530.dir/CheckIncludeFile.c.o
/usr/bin/cc -fsigned-char -W -Werror=return-type -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wno-narrowing -Wno-delete-non-virtual-dtor -Wno-unnamed-type-template-args -fdiagnostics-show-option -fno-omit-frame-pointer -msse -msse2 -msse3 -O3 -DNDEBUG -o CMakeFiles/cmTryCompileExec647810530.dir/CheckIncludeFile.c.o -c /Users/caominhvu/Downloads/opencv-2.4.7/build/CMakeFiles/CMakeTmp/CheckIncludeFile.c
/Users/caominhvu/Downloads/opencv-2.4.7/build/CMakeFiles/CMakeTmp/CheckIncludeFile.c:1:10: fatal error: 'io.h' file not found
#include <io.h>
^
1 error generated.
gmake[1]: *** [CMakeFiles/cmTryCompileExec647810530.dir/CheckIncludeFile.c.o] Error 1
gmake[1]: Leaving directory `/Users/caominhvu/Downloads/opencv-2.4.7/build/CMakeFiles/CMakeTmp'
gmake: *** [cmTryCompileExec647810530/fast] Error 2
Determining if the function jbg_newlen exists failed with the following output:
Change Dir: /Users/caominhvu/Downloads/opencv-2.4.7/build/CMakeFiles/CMakeTmp
Run Build Command:/opt/local/bin/gmake "cmTryCompileExec4172827471/fast"
/opt/local/bin/gmake -f CMakeFiles/cmTryCompileExec4172827471.dir/build.make CMakeFiles/cmTryCompileExec4172827471.dir/build
gmake[1]: Entering directory `/Users/caominhvu/Downloads/opencv-2.4.7/build/CMakeFiles/CMakeTmp'
/opt/local/bin/cmake -E cmake_progress_report /Users/caominhvu/Downloads/opencv-2.4.7/build/CMakeFiles/CMakeTmp/CMakeFiles 1
Building C object CMakeFiles/cmTryCompileExec4172827471.dir/CheckFunctionExists.c.o
/usr/bin/cc -fsigned-char -W -Werror=return-type -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wno-narrowing -Wno-delete-non-virtual-dtor -Wno-unnamed-type-template-args -fdiagnostics-show-option -fno-omit-frame-pointer -msse -msse2 -msse3 -DCHECK_FUNCTION_EXISTS=jbg_newlen -O3 -DNDEBUG -o CMakeFiles/cmTryCompileExec4172827471.dir/CheckFunctionExists.c.o -c /opt/local/share/cmake-2.8/Modules/CheckFunctionExists.c
Linking C executable cmTryCompileExec4172827471
/opt/local/bin/cmake -E cmake_link_script CMakeFiles/cmTryCompileExec4172827471.dir/link.txt --verbose=1
/usr/bin/cc -fsigned-char -W -Werror=return-type -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wno-narrowing -Wno-delete-non-virtual-dtor -Wno-unnamed-type-template-args -fdiagnostics-show-option -fno-omit-frame-pointer -msse -msse2 -msse3 -DCHECK_FUNCTION_EXISTS=jbg_newlen -O3 -DNDEBUG -Wl,-search_paths_first -Wl,-headerpad_max_install_names CMakeFiles/cmTryCompileExec4172827471.dir/CheckFunctionExists.c.o -o cmTryCompileExec4172827471
Undefined symbols for architecture x86_64:
"_jbg_newlen", referenced from:
_main in CheckFunctionExists.c.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
gmake[1]: *** [cmTryCompileExec4172827471] Error 1
gmake[1]: Leaving directory `/Users/caominhvu/Downloads/opencv-2.4.7/build/CMakeFiles/CMakeTmp'
gmake: *** [cmTryCompileExec4172827471/fast] Error 2
Determining if the include file linux/videodev.h exists failed with the following output:
Change Dir: /Users/caominhvu/Downloads/opencv-2.4.7/build/CMakeFiles/CMakeTmp
Run Build Command:/opt/local/bin/gmake "cmTryCompileExec70111243/fast"
/opt/local/bin/gmake -f CMakeFiles/cmTryCompileExec70111243.dir/build.make CMakeFiles/cmTryCompileExec70111243.dir/build
gmake[1]: Entering directory `/Users/caominhvu/Downloads/opencv-2.4.7/build/CMakeFiles/CMakeTmp'
/opt/local/bin/cmake -E cmake_progress_report /Users/caominhvu/Downloads/opencv-2.4.7/build/CMakeFiles/CMakeTmp/CMakeFiles 1
Building C object CMakeFiles/cmTryCompileExec70111243.dir/CheckIncludeFile.c.o
/usr/bin/cc -fsigned-char -W -Werror=return-type -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wno-narrowing -Wno-delete-non-virtual-dtor -Wno-unnamed-type-template-args -fdiagnostics-show-option -fno-omit-frame-pointer -msse -msse2 -msse3 -O3 -DNDEBUG -o CMakeFiles/cmTryCompileExec70111243.dir/CheckIncludeFile.c.o -c /Users/caominhvu/Downloads/opencv-2.4.7/build/CMakeFiles/CMakeTmp/CheckIncludeFile.c
/Users/caominhvu/Downloads/opencv-2.4.7/build/CMakeFiles/CMakeTmp/CheckIncludeFile.c:1:10: fatal error: 'linux/videodev.h' file not found
#include <linux/videodev.h>
^
1 error generated.
gmake[1]: *** [CMakeFiles/cmTryCompileExec70111243.dir/CheckIncludeFile.c.o] Error 1
gmake[1]: Leaving directory `/Users/caominhvu/Downloads/opencv-2.4.7/build/CMakeFiles/CMakeTmp'
gmake: *** [cmTryCompileExec70111243/fast] Error 2
Determining if the include file linux/videodev2.h exists failed with the following output:
Change Dir: /Users/caominhvu/Downloads/opencv-2.4.7/build/CMakeFiles/CMakeTmp
Run Build Command:/opt/local/bin/gmake "cmTryCompileExec661389614/fast"
/opt/local/bin/gmake -f CMakeFiles/cmTryCompileExec661389614.dir/build.make CMakeFiles/cmTryCompileExec661389614.dir/build
gmake[1]: Entering directory `/Users/caominhvu/Downloads/opencv-2.4.7/build/CMakeFiles/CMakeTmp'
/opt/local/bin/cmake -E cmake_progress_report /Users/caominhvu/Downloads/opencv-2.4.7/build/CMakeFiles/CMakeTmp/CMakeFiles 1
Building C object CMakeFiles/cmTryCompileExec661389614.dir/CheckIncludeFile.c.o
/usr/bin/cc -fsigned-char -W -Werror=return-type -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wno-narrowing -Wno-delete-non-virtual-dtor -Wno-unnamed-type-template-args -fdiagnostics-show-option -fno-omit-frame-pointer -msse -msse2 -msse3 -O3 -DNDEBUG -o CMakeFiles/cmTryCompileExec661389614.dir/CheckIncludeFile.c.o -c /Users/caominhvu/Downloads/opencv-2.4.7/build/CMakeFiles/CMakeTmp/CheckIncludeFile.c
/Users/caominhvu/Downloads/opencv-2.4.7/build/CMakeFiles/CMakeTmp/CheckIncludeFile.c:1:10: fatal error: 'linux/videodev2.h' file not found
#include <linux/videodev2.h>
^
1 error generated.
gmake[1]: *** [CMakeFiles/cmTryCompileExec661389614.dir/CheckIncludeFile.c.o] Error 1
gmake[1]: Leaving directory `/Users/caominhvu/Downloads/opencv-2.4.7/build/CMakeFiles/CMakeTmp'
gmake: *** [cmTryCompileExec661389614/fast] Error 2
Determining if the include file sys/videoio.h exists failed with the following output:
Change Dir: /Users/caominhvu/Downloads/opencv-2.4.7/build/CMakeFiles/CMakeTmp
Run Build Command:/opt/local/bin/gmake "cmTryCompileExec741892054/fast"
/opt/local/bin/gmake -f CMakeFiles/cmTryCompileExec741892054.dir/build.make CMakeFiles/cmTryCompileExec741892054.dir/build
gmake[1]: Entering directory `/Users/caominhvu/Downloads/opencv-2.4.7/build/CMakeFiles/CMakeTmp'
/opt/local/bin/cmake -E cmake_progress_report /Users/caominhvu/Downloads/opencv-2.4.7/build/CMakeFiles/CMakeTmp/CMakeFiles 1
Building C object CMakeFiles/cmTryCompileExec741892054.dir/CheckIncludeFile.c.o
/usr/bin/cc -fsigned-char -W -Werror=return-type -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wno-narrowing -Wno-delete-non-virtual-dtor -Wno-unnamed-type-template-args -fdiagnostics-show-option -fno-omit-frame-pointer -msse -msse2 -msse3 -O3 -DNDEBUG -o CMakeFiles/cmTryCompileExec741892054.dir/CheckIncludeFile.c.o -c /Users/caominhvu/Downloads/opencv-2.4.7/build/CMakeFiles/CMakeTmp/CheckIncludeFile.c
/Users/caominhvu/Downloads/opencv-2.4.7/build/CMakeFiles/CMakeTmp/CheckIncludeFile.c:1:10: fatal error: 'sys/videoio.h' file not found
#include <sys/videoio.h>
^
1 error generated.
gmake[1]: *** [CMakeFiles/cmTryCompileExec741892054.dir/CheckIncludeFile.c.o] Error 1
gmake[1]: Leaving directory `/Users/caominhvu/Downloads/opencv-2.4.7/build/CMakeFiles/CMakeTmp'
gmake: *** [cmTryCompileExec741892054/fast] Error 2
Determining if the include file libavformat/avformat.h exists failed with the following output:
Change Dir: /Users/caominhvu/Downloads/opencv-2.4.7/build/CMakeFiles/CMakeTmp
Run Build Command:/opt/local/bin/gmake "cmTryCompileExec2161613468/fast"
/opt/local/bin/gmake -f CMakeFiles/cmTryCompileExec2161613468.dir/build.make CMakeFiles/cmTryCompileExec2161613468.dir/build
gmake[1]: Entering directory `/Users/caominhvu/Downloads/opencv-2.4.7/build/CMakeFiles/CMakeTmp'
/opt/local/bin/cmake -E cmake_progress_report /Users/caominhvu/Downloads/opencv-2.4.7/build/CMakeFiles/CMakeTmp/CMakeFiles 1
Building C object CMakeFiles/cmTryCompileExec2161613468.dir/CheckIncludeFile.c.o
/usr/bin/cc -fsigned-char -W -Werror=return-type -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wno-narrowing -Wno-delete-non-virtual-dtor -Wno-unnamed-type-template-args -fdiagnostics-show-option -fno-omit-frame-pointer -msse -msse2 -msse3 -O3 -DNDEBUG -o CMakeFiles/cmTryCompileExec2161613468.dir/CheckIncludeFile.c.o -c /Users/caominhvu/Downloads/opencv-2.4.7/build/CMakeFiles/CMakeTmp/CheckIncludeFile.c
/Users/caominhvu/Downloads/opencv-2.4.7/build/CMakeFiles/CMakeTmp/CheckIncludeFile.c:1:10: fatal error: 'libavformat/avformat.h' file not found
#include <libavformat/avformat.h>
^
1 error generated.
gmake[1]: *** [CMakeFiles/cmTryCompileExec2161613468.dir/CheckIncludeFile.c.o] Error 1
gmake[1]: Leaving directory `/Users/caominhvu/Downloads/opencv-2.4.7/build/CMakeFiles/CMakeTmp'
gmake: *** [cmTryCompileExec2161613468/fast] Error 2
Determining if the include file ffmpeg/avformat.h exists failed with the following output:
Change Dir: /Users/caominhvu/Downloads/opencv-2.4.7/build/CMakeFiles/CMakeTmp
Run Build Command:/opt/local/bin/gmake "cmTryCompileExec188285781/fast"
/opt/local/bin/gmake -f CMakeFiles/cmTryCompileExec188285781.dir/build.make CMakeFiles/cmTryCompileExec188285781.dir/build
gmake[1]: Entering directory `/Users/caominhvu/Downloads/opencv-2.4.7/build/CMakeFiles/CMakeTmp'
/opt/local/bin/cmake -E cmake_progress_report /Users/caominhvu/Downloads/opencv-2.4.7/build/CMakeFiles/CMakeTmp/CMakeFiles 1
Building C object CMakeFiles/cmTryCompileExec188285781.dir/CheckIncludeFile.c.o
/usr/bin/cc -fsigned-char -W -Werror=return-type -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wno-narrowing -Wno-delete-non-virtual-dtor -Wno-unnamed-type-template-args -fdiagnostics-show-option -fno-omit-frame-pointer -msse -msse2 -msse3 -O3 -DNDEBUG -o CMakeFiles/cmTryCompileExec188285781.dir/CheckIncludeFile.c.o -c /Users/caominhvu/Downloads/opencv-2.4.7/build/CMakeFiles/CMakeTmp/CheckIncludeFile.c
/Users/caominhvu/Downloads/opencv-2.4.7/build/CMakeFiles/CMakeTmp/CheckIncludeFile.c:1:10: fatal error: 'ffmpeg/avformat.h' file not found
#include <ffmpeg/avformat.h>
^
1 error generated.
gmake[1]: *** [CMakeFiles/cmTryCompileExec188285781.dir/CheckIncludeFile.c.o] Error 1
gmake[1]: Leaving directory `/Users/caominhvu/Downloads/opencv-2.4.7/build/CMakeFiles/CMakeTmp'
gmake: *** [cmTryCompileExec188285781/fast] Error 2
Here's how I compiled OpenCV 2.4.8 on OSX Mavericks 10.9.1 using Xcode 5.0.2 and CUDA 5.5:
open CMake to set the project, and to the basic configuration
in latest Xcode (I think >= 5) there's no more the gcc compiler, deprecated in favor of clang, so go to the CUDA options of the CMAKE project and change CUDA_HOST_COMPILER to use "/usr/bin/clang". Luckily CUDA 5.5 supports clang and not only gcc
Apparently CUDA 5.5 supports only the older libstdc++ library and not the more modern libc++, so update CUDA_NVCC_FLAGS to tell mvcc to pass tell the nativa compilar to use this older library. Add "-Xcompiler -stdlib=libstdc++; -Xlinker -stdlib=libstdc++"
Tell also the C++ compiler that compiles the rest of the library to use libstdc++: show the advanced options of CMAKE and go to CMAKE to add "-stdlib=libstdc++" to both CMAKE_CXX_FLAGS and CMAKE_EXE_LINKER_FLAGS
For anyone coming here later who may be trying to install from this tutorial. I ran into this problem because my OPENCV_EXTRA_MODULES_PATH was pointing to the wrong directory. I had mine in ~/src/, and not just ~/