rvm install 1.9.3 failing - ruby-on-rails

I tried reinstalling ruby, xcode, and a bunch of other things because I kept getting these strange C compiler errors. At some point all my rubies were uninstalled so I started back at the beginning...
rvm get head && rvm reload
rvm install 1.9.3
I get the following error:
No binary rubies available for: downloads/ruby-1.9.3-p327.
Continuing with compilation. Please read 'rvm mount' to get more information on binary rubies.
Installing Ruby from source to: /Users/mgriffel/.rvm/rubies/ruby-1.9.3-p327, this may take a while depending on your cpu(s)...
ruby-1.9.3-p327 - #downloading ruby-1.9.3-p327, this may take a while depending on your connection...
ruby-1.9.3-p327 - #extracted to /Users/mgriffel/.rvm/src/ruby-1.9.3-p327 (already extracted)
ruby-1.9.3-p327 - #configuring
Error running 'env LDFLAGS=-L/opt/sm/pkg/active/lib CFLAGS=-I/opt/sm/pkg/active/include CPATH=/opt/sm/pkg/active/include ./configure --enable-shared --disable-install-doc --prefix=/Users/mgriffel/.rvm/rubies/ruby-1.9.3-p327 --with-opt-dir=/Users/mgriffel/.rvm/usr', please read /Users/mgriffel/.rvm/log/ruby-1.9.3-p327/configure.log
There has been an error while running configure. Halting the installation.
In configure.log I see:
[2012-11-14 13:21:54] env LDFLAGS=-L/opt/sm/pkg/active/lib CFLAGS=-I/opt/sm/pkg/active/include CPATH=/opt/sm/pkg/active/include ./configure --enable-shared --disable-install-doc --prefix=/Users/mgriffel/.rvm/rubies/ruby-1.9.3-p327 --with-opt-dir=/Users/mgriffel/.rvm/usr
checking build system type... x86_64-apple-darwin12.2.0
checking host system type... x86_64-apple-darwin12.2.0
checking target system type... x86_64-apple-darwin12.2.0
checking whether the C compiler works... no
configure: error: in `/Users/mgriffel/.rvm/src/ruby-1.9.3-p327':
configure: error: C compiler cannot create executables
See `config.log' for more details
And in config.log I see:
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by configure, which was
generated by GNU Autoconf 2.68. Invocation command line was
$ ./configure --enable-shared --disable-install-doc --prefix=/Users/mgriffel/.rvm/rubies/ruby-1.9.3-p327 --with-opt-dir=/Users/mgriffel/.rvm/usr
## --------- ##
## Platform. ##
## --------- ##
hostname = Mattans-MacBook-Air.local
uname -m = x86_64
uname -r = 12.2.0
uname -s = Darwin
uname -v = Darwin Kernel Version 12.2.0: Sat Aug 25 00:48:52 PDT 2012; root:xnu-2050.18.24~1/RELEASE_X86_64
/usr/bin/uname -p = i386
/bin/uname -X = unknown
/bin/arch = unknown
/usr/bin/arch -k = unknown
/usr/convex/getsysinfo = unknown
/usr/bin/hostinfo = Mach kernel version:
Darwin Kernel Version 12.2.0: Sat Aug 25 00:48:52 PDT 2012; root:xnu-2050.18.24~1/RELEASE_X86_64
Kernel configured for up to 4 processors.
2 processors are physically available.
4 processors are logically available.
Processor type: i486 (Intel 80486)
Processors active: 0 1 2 3
Primary memory available: 4.00 gigabytes
Default processor set: 144 tasks, 704 threads, 4 processors
Load average: 2.79, Mach factor: 1.19
/bin/machine = unknown
/usr/bin/oslevel = unknown
/bin/universe = unknown
PATH: /Users/mgriffel/.rvm/usr/bin
PATH: /Users/mgriffel/.rvm/gems/ruby-1.9.3-p194#rails328/bin
PATH: /Users/mgriffel/.rvm/gems/ruby-1.9.3-p194#global/bin
PATH: /Users/mgriffel/.rvm/rubies/ruby-1.9.3-p194/bin
PATH: /Users/mgriffel/.rvm/bin
PATH: /opt/local/bin
PATH: /opt/local/sbin
PATH: /usr/local/bin
PATH: /usr/local/sbin
PATH: /usr/local/mysql/bin
PATH: /usr/bin
PATH: /bin
PATH: /usr/sbin
PATH: /sbin
PATH: /opt/sm/bin
PATH: /opt/sm/pkg/active/bin
PATH: /opt/sm/pkg/active/sbin
## ----------- ##
## Core tests. ##
## ----------- ##
configure:2769: checking build system type
configure:2783: result: x86_64-apple-darwin12.2.0
configure:2851: checking host system type
configure:2864: result: x86_64-apple-darwin12.2.0
configure:2884: checking target system type
configure:2897: result: x86_64-apple-darwin12.2.0
configure:3378: checking for C compiler version
configure:3387: /opt/local/bin/gcc-apple-4.2 --version >&5
i686-apple-darwin12-gcc-apple-4.2.1 (GCC) 4.2.1 (Apple Inc. build 5666) (dot 3) (MacPorts apple-gcc42 5666.3_9)
Copyright (C) 2007 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
configure:3398: $? = 0
configure:3387: /opt/local/bin/gcc-apple-4.2 -v >&5
Using built-in specs.
Target: i686-apple-darwin12
Configured with: /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_apple-gcc42/apple-gcc42/work/objroot/src/configure --disable-checking --prefix=/opt/local --mandir=/opt/local/share/man --enable-languages=c,c++,objc,obj-c++ --libexecdir=/opt/local/libexec/apple-gcc42 --libdir=/opt/local/lib/apple-gcc42 --includedir=/opt/local/include/apple-gcc42 --program-suffix=-apple-4.2 --with-system-zlib --disable-nls --with-slibdir=/usr/lib --build=x86_64-apple-darwin12 --enable-werror-always --program-prefix=i686-apple-darwin12- --host=x86_64-apple-darwin12 --target=i686-apple-darwin12 --with-gxx-include-dir=/usr/include/c++/4.2.1
Thread model: posix
gcc version 4.2.1 (Apple Inc. build 5666) (dot 3) (MacPorts apple-gcc42 5666.3_9)
configure:3398: $? = 0
configure:3387: /opt/local/bin/gcc-apple-4.2 -V >&5
gcc-apple-4.2: argument to `-V' is missing
configure:3398: $? = 1
configure:3387: /opt/local/bin/gcc-apple-4.2 -qversion >&5
i686-apple-darwin12-gcc-apple-4.2.1: no input files
configure:3398: $? = 1
configure:3418: checking whether the C compiler works
configure:3440: /opt/local/bin/gcc-apple-4.2 -L/opt/sm/pkg/active/lib CFLAGS=-I/opt/sm/pkg/active/include CPATH=/opt/sm/pkg/active/include conftest.c >&5
i686-apple-darwin12-gcc-apple-4.2.1: CFLAGS=-I/opt/sm/pkg/active/include: No such file or directory
i686-apple-darwin12-gcc-apple-4.2.1: CPATH=/opt/sm/pkg/active/include: No such file or directory
configure:3444: $? = 1
configure:3482: result: no
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE_URL ""
| #define CANONICALIZATION_FOR_MATHN 1
| /* end confdefs.h. */
|
| int
| main ()
| {
|
| ;
| return 0;
| }
configure:3487: error: in `/Users/mgriffel/.rvm/src/ruby-1.9.3-p327':
configure:3489: error: C compiler cannot create executables
See `config.log' for more details
## ---------------- ##
## Cache variables. ##
## ---------------- ##
ac_cv_build=x86_64-apple-darwin12.2.0
ac_cv_env_CCC_set=
ac_cv_env_CCC_value=
ac_cv_env_CC_set=set
ac_cv_env_CC_value=/opt/local/bin/gcc-apple-4.2
ac_cv_env_CFLAGS_set=
ac_cv_env_CFLAGS_value=
ac_cv_env_CPPFLAGS_set=
ac_cv_env_CPPFLAGS_value=
ac_cv_env_CPP_set=
ac_cv_env_CPP_value=
ac_cv_env_CXXFLAGS_set=
ac_cv_env_CXXFLAGS_value=
ac_cv_env_CXX_set=
ac_cv_env_CXX_value=
ac_cv_env_LDFLAGS_set=set
ac_cv_env_LDFLAGS_value='-L/opt/sm/pkg/active/lib CFLAGS=-I/opt/sm/pkg/active/include CPATH=/opt/sm/pkg/active/include'
ac_cv_env_LIBS_set=
ac_cv_env_LIBS_value=
ac_cv_env_build_alias_set=
ac_cv_env_build_alias_value=
ac_cv_env_host_alias_set=
ac_cv_env_host_alias_value=
ac_cv_env_target_alias_set=
ac_cv_env_target_alias_value=
ac_cv_host=x86_64-apple-darwin12.2.0
ac_cv_prog_CC=/opt/local/bin/gcc-apple-4.2
ac_cv_target=x86_64-apple-darwin12.2.0
## ----------------- ##
## Output variables. ##
## ----------------- ##
ALLOCA=''
AR=''
ARCHFILE=''
ARCH_FLAG=''
AS=''
ASFLAGS=''
BASERUBY='echo executable host ruby is required. use --with-baseruby option.; false'
BUILTIN_ENCOBJS=''
BUILTIN_TRANSOBJS=''
BUILTIN_TRANSSRCS=''
CAPITARGET=''
CC='/opt/local/bin/gcc-apple-4.2'
CCDLFLAGS=''
CFLAGS=''
CHDIR=''
COMMON_HEADERS=''
COMMON_LIBS=''
COMMON_MACROS=''
COUTFLAG=''
CP=''
CPP=''
CPPFLAGS=''
CPPOUTFILE=''
CXX=''
CXXFLAGS=''
DEFS=''
DLDFLAGS=''
DLDLIBS=''
DLEXT2=''
DLEXT=''
DLLWRAP=''
DOT=''
DOXYGEN=''
ECHO_C='\c'
ECHO_N=''
ECHO_T=''
EGREP=''
ENABLE_SHARED=''
EXECUTABLE_EXTS=''
EXEEXT=''
EXPORT_PREFIX=''
EXTOUT=''
EXTSTATIC=''
GCC=''
GNU_LD=''
GREP=''
INSTALLDOC=''
INSTALL_DATA=''
INSTALL_PROGRAM=''
INSTALL_SCRIPT=''
LDFLAGS='-L/opt/sm/pkg/active/lib CFLAGS=-I/opt/sm/pkg/active/include CPATH=/opt/sm/pkg/active/include'
LDSHARED=''
LDSHAREDXX=''
LIBEXT=''
LIBOBJS=''
LIBPATHENV=''
LIBPATHFLAG=''
LIBRUBY=''
LIBRUBYARG=''
LIBRUBYARG_SHARED=''
LIBRUBYARG_STATIC=''
LIBRUBY_A=''
LIBRUBY_ALIASES=''
LIBRUBY_DLDFLAGS=''
LIBRUBY_LDSHARED=''
LIBRUBY_RELATIVE=''
LIBRUBY_SO=''
LIBS=''
LINK_SO=''
LN_S=''
LTLIBOBJS=''
MAINLIBS=''
MAJOR='1'
MAKEDIRS=''
MAKEFILES=''
MANTYPE=''
MINIOBJS=''
MINIRUBY=''
MINOR='9'
MKDIR_P=''
NM=''
NROFF=''
NULLCMD=''
OBJCOPY=''
OBJDUMP=''
OBJEXT=''
OUTFLAG=''
PACKAGE=''
PACKAGE_BUGREPORT=''
PACKAGE_NAME=''
PACKAGE_STRING=''
PACKAGE_TARNAME=''
PACKAGE_URL=''
PACKAGE_VERSION=''
PATH_SEPARATOR=':'
PKG_CONFIG=''
PLATFORM_DIR=''
PREP=''
RANLIB=''
RDOCTARGET=''
RI_BASE_NAME=''
RM=''
RMALL=''
RMDIR=''
RMDIRS=''
RPATHFLAG=''
RUBYW_BASE_NAME='rubyw'
RUBYW_INSTALL_NAME=''
RUBY_BASE_NAME='ruby'
RUBY_INSTALL_NAME=''
RUBY_PROGRAM_VERSION='1.9.3'
RUBY_RELEASE_DATE='2012-11-10'
RUBY_SO_NAME=''
RUNRUBY=''
SET_MAKE=''
SHELL='/bin/sh'
SOLIBS=''
STATIC=''
STRIP=''
SYMBOL_PREFIX=''
TEENY='1'
TEST_RUNNABLE=''
THREAD_MODEL=''
TRY_LINK=''
UNIVERSAL_ARCHNAMES=''
UNIVERSAL_INTS=''
USE_RUBYGEMS=''
WERRORFLAG=''
WINDRES=''
XCFLAGS=''
XLDFLAGS=''
XRUBY=''
XRUBY_LIBDIR=''
XRUBY_RUBYHDRDIR=''
XRUBY_RUBYLIBDIR=''
ac_ct_CC=''
ac_ct_CXX=''
ac_ct_OBJCOPY=''
ac_ct_OBJDUMP=''
arch=''
bindir='${exec_prefix}/bin'
build='x86_64-apple-darwin12.2.0'
build_alias=''
build_cpu='x86_64'
build_os='darwin12.2.0'
build_vendor='apple'
cflags=' ${optflags} ${debugflags} ${warnflags}'
configure_args=''
cppflags=''
cxxflags=' ${optflags} ${debugflags} ${warnflags}'
datadir='${datarootdir}'
datarootdir='${prefix}/share'
debugflags=''
docdir='${datarootdir}/doc/${PACKAGE}'
dvidir='${docdir}'
exec=''
exec_prefix='NONE'
host='x86_64-apple-darwin12.2.0'
host_alias=''
host_cpu='x86_64'
host_os='darwin12.2.0'
host_vendor='apple'
htmldir='${docdir}'
includedir='${prefix}/include'
infodir='${datarootdir}/info'
libdir='${exec_prefix}/lib'
libexecdir='${exec_prefix}/libexec'
localedir='${datarootdir}/locale'
localstatedir='${prefix}/var'
mandir='${datarootdir}/man'
oldincludedir='/usr/include'
optflags=''
pdfdir='${docdir}'
prefix='/Users/mgriffel/.rvm/rubies/ruby-1.9.3-p327'
program_transform_name='s&^&&'
psdir='${docdir}'
ridir=''
ruby_pc=''
ruby_version=''
rubyhdrdir=''
rubylibprefix=''
rubyw_install_name=''
sbindir='${exec_prefix}/sbin'
setup=''
sharedstatedir='${prefix}/com'
sitearch=''
sitedir=''
sitehdrdir=''
sysconfdir='${prefix}/etc'
target='x86_64-apple-darwin12.2.0'
target_alias=''
target_cpu='x86_64'
target_os='darwin12.2.0'
target_vendor='apple'
try_header=''
vendordir=''
vendorhdrdir=''
warnflags=''
## ----------- ##
## confdefs.h. ##
## ----------- ##
/* confdefs.h */
#define PACKAGE_NAME ""
#define PACKAGE_TARNAME ""
#define PACKAGE_VERSION ""
#define PACKAGE_STRING ""
#define PACKAGE_BUGREPORT ""
#define PACKAGE_URL ""
#define CANONICALIZATION_FOR_MATHN 1
configure: exit 77
I can't for the life of me figure out what's wrong and I've been stuck here for days. Any help here would be greatly appreciated.
Note: I have the latest version of Xcode and CLT installed.

It turns out this is a bug in RailsInstaller OSX 1.0.3 - (Found that out while reading Problems installing Ruby on Mountain Lion - ruby 1.9.3 wont' compile)
I needed to change /etc/rvmrc to contain this:
umask g+w
export -a rvm_configure_env
rvm_configure_env=('LDFLAGS=-L/opt/sm/pkg/active/lib' 'CFLAGS=-I/opt/sm/pkg/active/include' 'CPATH=/opt/sm/pkg/active/include')
For more info see: https://github.com/railsinstaller/railsinstaller-nix/issues/10

To get ruby to compile on my mac which is using Mountain Lion and xcode 4.5.2, I have to create a soft link from gcc-4.2 to gcc somewhere on my path. I originally found the suggestion on this page: https://gist.github.com/1860902
Perhaps it will help you:
sudo ln -s /usr/bin/gcc /usr/bin/gcc-4.2
If it doesn't help, you can remove it:
sudo rm /usr/bin/gcc-4.2
Good luck!

mattangriffel's solution did it for me. In my case, my third line was nearly identical but where he had
rvm_configure_env=('LDFLAGS=-L/opt/sm/pkg/active/lib' 'CFLAGS=-I/opt/sm/pkg/active/include' 'CPATH=/opt/sm/pkg/active/include')
I had
rvm_configure_env=('LDFLAGS=-L/opt/sm/pkg/active/lib CFLAGS=-I/opt/sm/pkg/active/include CPATH=/opt/sm/pkg/active/include')
Fixing mine to look like his did the trick.

Related

installing DCAP on sgx linux server

I am going to install DCAP On my linux server with Kernel : Intel(R) Xeon(R) Platinum 8370C CPU # 2.80GHz
when I run sudo ./sgx_linux_x64_driver_1.36.2.bin I get error :
'make' KDIR=/lib/modules/5.15.0-1023-azure/build....(bad exit status: 2)
ERROR (dkms apport): binary package for sgx: 1.36.2 not found
Error! Bad return status for module build on kernel: 5.15.0-1023-azure (x86_64)
Consult /var/lib/dkms/sgx/1.36.2/build/make.log for more information.
Does any one knows the reason?
cat /var/lib/dkms/sgx/1.36.2/build/make.log
DKMS make.log for sgx-1.36.2 for kernel 5.15.0-1023-azure (x86_64)
Wed 14 Dec 2022 11:57:05 AM UTC
make -C /lib/modules/5.15.0-1023-azure/build M=/var/lib/dkms/sgx/1.36.2/build CFLAGS_MODULE="-I/var/lib/dkms/sgx/1.36.2/build -I/var/lib/dkms/sgx/1.36.2/build/include" modules
make[1]: Entering directory '/usr/src/linux-headers-5.15.0-1023-azure'
CC [M] /var/lib/dkms/sgx/1.36.2/build/encl.o
CC [M] /var/lib/dkms/sgx/1.36.2/build/main.o
/var/lib/dkms/sgx/1.36.2/build/main.c: In function ‘sgx_init’:
/var/lib/dkms/sgx/1.36.2/build/main.c:792:9: note: #pragma message: kernel version may not be supported
792 | #pragma message "kernel version may not be supported"
| ^~~~~~~
CC [M] /var/lib/dkms/sgx/1.36.2/build/driver.o
CC [M] /var/lib/dkms/sgx/1.36.2/build/ioctl.o
LD [M] /var/lib/dkms/sgx/1.36.2/build/intel_sgx.o
MODPOST /var/lib/dkms/sgx/1.36.2/build/Module.symvers
ERROR: modpost: "kallsyms_lookup_name" [/var/lib/dkms/sgx/1.36.2/build/intel_sgx.ko] undefined!
make[2]: *** [scripts/Makefile.modpost:134: /var/lib/dkms/sgx/1.36.2/build/Module.symvers] Error 1
make[2]: *** Deleting file '/var/lib/dkms/sgx/1.36.2/build/Module.symvers'
make[1]: *** [Makefile:1818: modules] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-5.15.0-1023-azure'
make: *** [Makefile:22: default] Error 2

No video output by WebChimera and wcjs-prebuilt on Ubuntu 16.04

WebChimera is not supported Linux officially, But I have used that on a Ubuntu 16.04 by upgrading VLC to 2.2.4 and using a pre-built package fount at WebChimera.js v0.2.7 Releases (WebChimera.js_electron_1.4.13_x64_linux.zip)
I have built WebChimera myself on Ubuntu 16.04 and VLC 2.2.2 (official version of VLC on 16.04). Every thing is OK for some videos but for some of videos, I just can hear the audio when playing and there is a black screen (no video output but audio is OK). I don't want to upgrade my VLC to 2.2.4. How can I fix this problem?
On electron v1.6.8, console writes this error:
[h264 # 0x2e3c62ba0880] No start code is found.
[h264 # 0x2e3c62ba0880] Error splitting the input into NAL units.
on older electron versions like v1.4.0 or v1.1.0, this error is written:
[h264 # 0x1262f42c8480] no frame!
or
[h264 # 0x3f08b31d5000] The maximum value for lowres supported by the decoder is 0
sample output of vlc is:
majid#majid-K55VD:~$ vlc --version
VLC media player 2.2.2 Weatherwax (revision 2.2.2-0-g6259d80)
VLC version 2.2.2 Weatherwax (2.2.2-0-g6259d80)
Compiled by buildd on lgw01-18.buildd (Mar 28 2017 11:23:57)
Compiler: gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.4)
This program comes with NO WARRANTY, to the extent permitted by law.
You may redistribute it under the terms of the GNU General Public License;
see the file named COPYING for details.
Written by the VideoLAN team; see the AUTHORS file.
sample output of ffmpeg is:
majid#majid-K55VD:~$ ffmpeg -version
ffmpeg version 2.8.11-0ubuntu0.16.04.1 Copyright (c) 2000-2017 the FFmpeg developers
built with gcc 5.4.0 (Ubuntu 5.4.0-6ubuntu1~16.04.4) 20160609
configuration: --prefix=/usr --extra-version=0ubuntu0.16.04.1 --build- suffix=-ffmpeg --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --cc=cc --cxx=g++ --enable-gpl --enable-shared --disable-stripping --disable-decoder=libopenjpeg --disable-decoder=libschroedinger --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-librtmp --enable-libschroedinger --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxvid --enable-libzvbi --enable-openal --enable-opengl --enable-x11grab --enable-libdc1394 --enable-libiec61883 --enable-libzmq --enable-frei0r --enable-libx264 --enable-libopencv
libavutil 54. 31.100 / 54. 31.100
libavcodec 56. 60.100 / 56. 60.100
libavformat 56. 40.101 / 56. 40.101
libavdevice 56. 4.100 / 56. 4.100
libavfilter 5. 40.101 / 5. 40.101
libavresample 2. 1. 0 / 2. 1. 0
libswscale 3. 1.101 / 3. 1.101
libswresample 1. 2.101 / 1. 2.101
libpostproc 53. 3.100 / 53. 3.100
Updating VLC to 2.2.4 and upper resolved my problem.

configure: error: C compiler cannot create executables (running on Windows)

Hi I working on Windows 7 and am trying to install special RUby Binary to make the full use of ruby-prof on rails 3.2. I am following the steps outlined here https://github.com/rails/rails-perftest/tree/v0.0.4.
When I get to step where I run
./configure --prefix=/C:/rubygc
I get the following error:
$ ./configure --prefix=/C:/rubygc
checking build system type... i686-pc-mingw32
checking host system type... i686-pc-mingw32
checking target system type... i686-pc-mingw32
checking for gcc... gcc
checking whether the C compiler works... no
configure: error: in `/c/ruby-1.9.3-p545':
configure: error: C compiler cannot create executables
See `config.log' for more details
By the way and just installed gcc using MinGW installation manager.
The content of the config.log that is mentioned is:
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by configure, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ ./configure --prefix=/C:/rubygc
## --------- ##
## Platform. ##
## --------- ##
hostname = XXX-1KCXTZ1-001
uname -m = i686
uname -r = 1.0.12(0.46/3/2)
uname -s = MINGW32_NT-6.1
uname -v = 2012-07-05 14:56
/usr/bin/uname -p = unknown
/bin/uname -X = unknown
/bin/arch = unknown
/usr/bin/arch -k = unknown
/usr/convex/getsysinfo = unknown
/usr/bin/hostinfo = unknown
/bin/machine = unknown
/usr/bin/oslevel = unknown
/bin/universe = unknown
PATH: /c/Users/issadmin/bin
PATH: .
PATH: /usr/local/bin
PATH: /mingw/bin
PATH: /bin
PATH: /c/Program Files/PHP/v5.3
PATH: /c/Program Files (x86)/Mozilla Firefox
PATH: /c/Program Files/ImageMagick-6.8.9-Q16
PATH: /c/Ruby193/bin
PATH: /c/Windows/system32
PATH: /c/Windows
PATH: /c/Windows/System32/Wbem
PATH: /c/Windows/System32/WindowsPowerShell/v1.0/
PATH: /c/Program Files (x86)/ZipGenius 6/
PATH: /c/Program Files (x86)/Google/Google Apps Sync/
PATH: /c/Program Files (x86)/QuickTime/QTSystem/
PATH: /c/Program Files (x86)/Novell/ZENworks/bin
PATH: /c/Program Files (x86)/Windows Kits/8.1/Windows Performance Toolkit/
PATH: /c/Program Files/Microsoft SQL Server/110/Tools/Binn/
PATH: /c/Program Files/Microsoft/Web Platform Installer/
PATH: /c/Program Files (x86)/Microsoft ASP.NET/ASP.NET Web Pages/v1.0/
PATH: /c/Program Files (x86)/Heroku/bin
PATH: /usr/cmd
PATH: /usr/cmd
PATH: /c/Program Files (x86)/Google/google_appengine/
PATH: /c/Python27/
PATH: /c/Program Files/PostgreSQL/9.3/bin
PATH: /c/MinGW/bin
PATH: /c/Program Files (x86)/Google/google_appengine/
PATH: /c/Python27/
PATH:
## ----------- ##
## Core tests. ##
## ----------- ##
configure:2800: checking build system type
configure:2814: result: i686-pc-mingw32
configure:2882: checking host system type
configure:2895: result: i686-pc-mingw32
configure:2915: checking target system type
configure:2928: result: i686-pc-mingw32
configure:3153: checking for gcc
configure:3169: found /c/MinGW/bin/gcc
configure:3180: result: gcc
configure:3409: checking for C compiler version
configure:3418: gcc --version >&5
gcc.exe (GCC) 4.8.1
Copyright (C) 2013 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
configure:3429: $? = 0
configure:3418: gcc -v >&5
Using built-in specs.
COLLECT_GCC=c:\MinGW\bin\gcc.exe
COLLECT_LTO_WRAPPER=c:/mingw/bin/../libexec/gcc/mingw32/4.8.1/lto-wrapper.exe
Target: mingw32
Configured with: ../gcc-4.8.1/configure --prefix=/mingw --host=mingw32 --build=mingw32 --without-pic --enable-shared --enable-static --with-gnu-ld --enable-lto --enable-libssp --disable-multilib --enable-languages=c,c++,fortran,objc,obj-c++,ada --disable-sjlj-exceptions --with-dwarf2 --disable-win32-registry --enable-libstdcxx-debug --enable-version-specific-runtime-libs --with-gmp=/usr/src/pkg/gmp-5.1.2-1-mingw32-src/bld --with-mpc=/usr/src/pkg/mpc-1.0.1-1-mingw32-src/bld --with-mpfr= --with-system-zlib --with-gnu-as --enable-decimal-float=yes --enable-libgomp --enable-threads --with-libiconv-prefix=/mingw32 --with-libintl-prefix=/mingw --disable-bootstrap LDFLAGS=-s CFLAGS=-D_USE_32BIT_TIME_T
Thread model: win32
gcc version 4.8.1 (GCC)
configure:3429: $? = 0
configure:3418: gcc -V >&5
gcc.exe: error: unrecognized command line option '-V'
gcc.exe: fatal error: no input files
compilation terminated.
configure:3429: $? = 1
configure:3418: gcc -qversion >&5
gcc.exe: error: unrecognized command line option '-qversion'
gcc.exe: fatal error: no input files
compilation terminated.
configure:3429: $? = 1
configure:3449: checking whether the C compiler works
configure:3471: gcc conftest.c >&5
configure:3475: $? = 0
configure:3513: result: no
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE_URL ""
| #define CANONICALIZATION_FOR_MATHN 1
| /* end confdefs.h. */
|
| int
| main ()
| {
|
| ;
| return 0;
| }
configure:3518: error: in `/c/ruby-1.9.3-p545':
configure:3520: error: C compiler cannot create executables
See `config.log' for more details
## ---------------- ##
## Cache variables. ##
## ---------------- ##
ac_cv_build=i686-pc-mingw32
ac_cv_env_CCC_set=
ac_cv_env_CCC_value=
ac_cv_env_CC_set=
ac_cv_env_CC_value=
ac_cv_env_CFLAGS_set=
ac_cv_env_CFLAGS_value=
ac_cv_env_CPPFLAGS_set=
ac_cv_env_CPPFLAGS_value=
ac_cv_env_CPP_set=
ac_cv_env_CPP_value=
ac_cv_env_CXXFLAGS_set=
ac_cv_env_CXXFLAGS_value=
ac_cv_env_CXX_set=
ac_cv_env_CXX_value=
ac_cv_env_LDFLAGS_set=
ac_cv_env_LDFLAGS_value=
ac_cv_env_LIBS_set=
ac_cv_env_LIBS_value=
ac_cv_env_build_alias_set=
ac_cv_env_build_alias_value=
ac_cv_env_host_alias_set=
ac_cv_env_host_alias_value=
ac_cv_env_target_alias_set=
ac_cv_env_target_alias_value=
ac_cv_host=i686-pc-mingw32
ac_cv_prog_ac_ct_CC=gcc
ac_cv_target=i686-pc-mingw32
## ----------------- ##
## Output variables. ##
## ----------------- ##
ALLOCA=''
AR=''
ARCHFILE=''
ARCH_FLAG=''
AS=''
ASFLAGS=''
BASERUBY='ruby'
BUILTIN_ENCOBJS=''
BUILTIN_TRANSOBJS=''
BUILTIN_TRANSSRCS=''
CAPITARGET=''
CC='gcc'
CCDLFLAGS=''
CFLAGS=''
CHDIR=''
COMMON_HEADERS=''
COMMON_LIBS=''
COMMON_MACROS=''
COUTFLAG=''
CP=''
CPP=''
CPPFLAGS=''
CPPOUTFILE=''
CXX=''
CXXFLAGS=''
DEFS=''
DLDFLAGS=''
DLDLIBS=''
DLEXT2=''
DLEXT=''
DLLWRAP=''
DOT=''
DOXYGEN=''
ECHO_C=''
ECHO_N='-n'
ECHO_T=''
EGREP=''
ENABLE_SHARED=''
EXECUTABLE_EXTS=''
EXEEXT=''
EXPORT_PREFIX=''
EXTDLDFLAGS=''
EXTOUT=''
EXTSTATIC=''
GCC=''
GNU_LD=''
GREP=''
INSTALLDOC=''
INSTALL_DATA=''
INSTALL_PROGRAM=''
INSTALL_SCRIPT=''
LDFLAGS=''
LDSHARED=''
LDSHAREDXX=''
LIBEXT=''
LIBOBJS=''
LIBPATHENV=''
LIBPATHFLAG=''
LIBRUBY=''
LIBRUBYARG=''
LIBRUBYARG_SHARED=''
LIBRUBYARG_STATIC=''
LIBRUBY_A=''
LIBRUBY_ALIASES=''
LIBRUBY_DLDFLAGS=''
LIBRUBY_LDSHARED=''
LIBRUBY_RELATIVE=''
LIBRUBY_SO=''
LIBS=''
LINK_SO=''
LN_S=''
LTLIBOBJS=''
MAINLIBS=''
MAJOR='1'
MAKEDIRS=''
MAKEFILES=''
MANTYPE=''
MINIOBJS=''
MINIRUBY=''
MINOR='9'
MKDIR_P=''
NM=''
NROFF=''
NULLCMD=''
OBJCOPY=''
OBJDUMP=''
OBJEXT=''
OUTFLAG=''
PACKAGE=''
PACKAGE_BUGREPORT=''
PACKAGE_NAME=''
PACKAGE_STRING=''
PACKAGE_TARNAME=''
PACKAGE_URL=''
PACKAGE_VERSION=''
PATH_SEPARATOR=':'
PKG_CONFIG=''
PLATFORM_DIR=''
POSTLINK=''
PREP=''
RANLIB=''
RDOCTARGET=''
RI_BASE_NAME=''
RM=''
RMALL=''
RMDIR=''
RMDIRS=''
RPATHFLAG=''
RUBYW_BASE_NAME='rubyw'
RUBYW_INSTALL_NAME=''
RUBY_BASE_NAME='ruby'
RUBY_INSTALL_NAME=''
RUBY_PROGRAM_VERSION='1.9.3'
RUBY_RELEASE_DATE='2014-02-24'
RUBY_SO_NAME=''
RUNRUBY=''
SET_MAKE=''
SHELL='/bin/sh'
SOLIBS=''
STATIC=''
STRIP=''
SYMBOL_PREFIX=''
TEENY='1'
TEST_RUNNABLE=''
THREAD_MODEL=''
TRY_LINK=''
UNIVERSAL_ARCHNAMES=''
UNIVERSAL_INTS=''
USE_RUBYGEMS=''
WERRORFLAG=''
WINDRES=''
XCFLAGS=''
XLDFLAGS=''
XRUBY=''
XRUBY_LIBDIR=''
XRUBY_RUBYHDRDIR=''
XRUBY_RUBYLIBDIR=''
ac_ct_CC='gcc'
ac_ct_CXX=''
ac_ct_OBJCOPY=''
ac_ct_OBJDUMP=''
arch=''
bindir='${exec_prefix}/bin'
build='i686-pc-mingw32'
build_alias=''
build_cpu='i686'
build_os='mingw32'
build_vendor='pc'
cflags=' ${optflags} ${debugflags} ${warnflags}'
codesign=''
configure_args=''
cppflags=''
cxxflags=' ${optflags} ${debugflags} ${warnflags}'
datadir='${datarootdir}'
datarootdir='${prefix}/share'
debugflags=''
docdir='${datarootdir}/doc/${PACKAGE}'
dvidir='${docdir}'
exec=''
exec_prefix='NONE'
host='i686-pc-mingw32'
host_alias=''
host_cpu='i686'
host_os='mingw32'
host_vendor='pc'
htmldir='${docdir}'
includedir='${prefix}/include'
infodir='${datarootdir}/info'
libdir='${exec_prefix}/lib'
libexecdir='${exec_prefix}/libexec'
localedir='${datarootdir}/locale'
localstatedir='${prefix}/var'
mandir='${datarootdir}/man'
oldincludedir='/usr/include'
optflags=''
pdfdir='${docdir}'
prefix='/C:/rubygc'
program_transform_name='s&^&&'
psdir='${docdir}'
ridir=''
ruby_pc=''
ruby_version=''
rubyhdrdir=''
rubylibprefix=''
rubyw_install_name=''
sbindir='${exec_prefix}/sbin'
setup=''
sharedstatedir='${prefix}/com'
sitearch=''
sitedir=''
sitehdrdir=''
sysconfdir='${prefix}/etc'
target='i686-pc-mingw32'
target_alias=''
target_cpu='i686'
target_os='mingw32'
target_vendor='pc'
try_header=''
vendordir=''
vendorhdrdir=''
warnflags=''
## ----------- ##
## confdefs.h. ##
## ----------- ##
/* confdefs.h */
#define PACKAGE_NAME ""
#define PACKAGE_TARNAME ""
#define PACKAGE_VERSION ""
#define PACKAGE_STRING ""
#define PACKAGE_BUGREPORT ""
#define PACKAGE_URL ""
#define CANONICALIZATION_FOR_MATHN 1
configure: exit 77

OpenCV VideoWriter using ffmpeg with "Could not open codec 'libx264'" Error

I am new to OpenCV, and I want write Mat images into video using VideoWriter on Ubuntu 12.04. But when constructing VideoWriter, errors came out.
It seems that OpenCV invoke ffmpeg API using default parameters and ffmpeg invoke x264 using its default parameters. Then these setting is broken for libx264. Thus the "Could not open codec 'libx264'" error.
Anyone has ideas to solve this problem?
More specifically:
anyone knows where and how OpenCV invoke ffmpeg API?
how to change ffmpeg default settings using code, hopefull, can be easily embeded into OpenCV?
will changes of default in ffmpeg be carried to libx264?
Errors:
1. Uising CV_FOURCC('H', '2', '6', '4')
[libx264 # 0x255de40] broken ffmpeg default settings detected
[libx264 # 0x255de40] use an encoding preset (e.g. -vpre medium)
[libx264 # 0x255de40] preset usage: -vpre <speed> -vpre <profile>
[libx264 # 0x255de40] speed presets are listed in x264 --help
[libx264 # 0x255de40] profile is optional; x264 defaults to high
Could not open codec 'libx264': Unspecified error
2. Using FOURCC = -1 to invoke user customized codec
OpenCV Error: Unsupported format or combination of formats (Gstreamer Opencv
backend doesn't support this codec acutally.) in CvVideoWriter_GStreamer::open,
file /home/XXX/Downloads/opencv-2.4.8/modules/highgui/src/cap_gstreamer.cpp,
line 505 terminate called after throwing an instance of 'cv::Exception'
what(): /home/XXX/Downloads/opencv-2.4.8/modules/highgui/src/cap_gstreamer.cpp:
505: error: (-210) Gstreamer Opencv backend doesn't support this codec acutally.
in function CvVideoWriter_GStreamer::open
Codes:
int main(int argc, char *argv[])
{
VideoWriter outputVideo;
bool fourcc_on = true; //switch on / off different error
if (fourcc_on)
outputVideo.open("outVideo.avi", CV_FOURCC('H', '2', '6', '4'), 25, Size(100, 100), true);
else
outputVideo.open("outVideo.avi", -1, 25, Size(100, 100), true);
if (!outputVideo.isOpened())
{
cout << "Could not open the output video for write" << endl;
return -1;
}
return 0;
}
OpenCV Configuration:
-- Detected version of GNU GCC: 46 (406)
-- Found OpenEXR: /usr/lib/libIlmImf.so
-- Looking for linux/videodev.h
-- Looking for linux/videodev.h - not found
-- Looking for linux/videodev2.h
-- Looking for linux/videodev2.h - found
-- Looking for sys/videoio.h
-- Looking for sys/videoio.h - not found
-- Looking for libavformat/avformat.h
-- Looking for libavformat/avformat.h - found
-- Looking for ffmpeg/avformat.h
-- Looking for ffmpeg/avformat.h - not found
-- Could NOT find JNI (missing: JAVA_INCLUDE_PATH JAVA_INCLUDE_PATH2 JAVA_AWT_INCLUDE_PATH)
--
-- General configuration for OpenCV 2.4.8 =====================================
-- Version control: unknown
--
-- Platform:
-- Host: Linux 3.8.0-38-generic x86_64
-- CMake: 2.8.7
-- CMake generator: Unix Makefiles
-- CMake build tool: /usr/bin/make
-- Configuration: RELEASE
--
-- C/C++:
-- Built as dynamic libs?: YES
-- C++ Compiler: /usr/bin/c++ (ver 4.6)
-- C++ flags (Release): -fsigned-char -W -Wall -Werror=return-type -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -msse -msse2 -msse3 -ffunction-sections -O3 -DNDEBUG -DNDEBUG
-- C++ flags (Debug): -fsigned-char -W -Wall -Werror=return-type -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -msse -msse2 -msse3 -ffunction-sections -g -O0 -DDEBUG -D_DEBUG
-- C Compiler: /usr/bin/gcc
-- C flags (Release): -fsigned-char -W -Wall -Werror=return-type -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -msse -msse2 -msse3 -ffunction-sections -O3 -DNDEBUG -DNDEBUG
-- C flags (Debug): -fsigned-char -W -Wall -Werror=return-type -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -msse -msse2 -msse3 -ffunction-sections -g -O0 -DDEBUG -D_DEBUG
-- Linker flags (Release):
-- Linker flags (Debug):
-- Precompiled headers: YES
--
-- OpenCV modules:
-- To be built: core flann imgproc highgui features2d calib3d ml video legacy objdetect photo gpu ocl nonfree contrib python stitching superres ts videostab
-- Disabled: world
-- Disabled by dependency: -
-- Unavailable: androidcamera dynamicuda java
--
-- GUI:
-- QT: NO
-- GTK+ 2.x: YES (ver 2.24.10)
-- GThread : YES (ver 2.32.4)
-- GtkGlExt: NO
-- OpenGL support: NO
--
-- Media I/O:
-- ZLib: /usr/lib/x86_64-linux-gnu/libz.so (ver 1.2.3.4)
-- JPEG: /usr/lib/x86_64-linux-gnu/libjpeg.so (ver )
-- PNG: /usr/lib/x86_64-linux-gnu/libpng.so (ver 1.2.46)
-- TIFF: /usr/lib/x86_64-linux-gnu/libtiff.so (ver 42 - 3.9.5)
-- JPEG 2000: /usr/lib/x86_64-linux-gnu/libjasper.so (ver 1.900.1)
-- OpenEXR: /usr/lib/libImath.so /usr/lib/libIlmImf.so /usr/lib/libIex.so /usr/lib/libHalf.so /usr/lib/libIlmThread.so (ver 1.6.1)
--
-- Video I/O:
-- DC1394 1.x: NO
-- DC1394 2.x: YES (ver 2.2.0)
-- FFMPEG: YES
-- codec: YES (ver 55.58.105)
-- format: YES (ver 55.37.101)
-- util: YES (ver 52.78.100)
-- swscale: YES (ver 2.6.100)
-- gentoo-style: YES
-- GStreamer:
-- base: YES (ver 0.10.36)
-- app: YES (ver 0.10.36)
-- video: YES (ver 0.10.36)
-- OpenNI: NO
-- OpenNI PrimeSensor Modules: NO
-- PvAPI: NO
-- GigEVisionSDK: NO
-- UniCap: NO
-- UniCap ucil: NO
-- V4L/V4L2: Using libv4l (ver 1.0.1)
-- XIMEA: NO
-- Xine: NO
--
-- Other third-party libraries:
-- Use IPP: NO
-- Use Eigen: NO
-- Use TBB: NO
-- Use OpenMP: NO
-- Use GCD NO
-- Use Concurrency NO
-- Use C=: NO
-- Use Cuda: NO
-- Use OpenCL: YES
--
-- OpenCL:
-- Version: dynamic
-- Include path: /home/shixudongleo/Downloads/opencv-2.4.8/3rdparty/include/opencl/1.2
-- Use AMD FFT: NO
-- Use AMD BLAS: NO
--
-- Python:
-- Interpreter: /usr/bin/python (ver 2.7.3)
-- Libraries: /usr/lib/libpython2.7.so
-- numpy: /usr/lib/python2.7/dist-packages/numpy/core/include (ver 1.6.1)
-- packages path: lib/python2.7/dist-packages
--
-- Java:
-- ant: NO
-- JNI: NO
-- Java tests: NO
--
-- Documentation:
-- Build Documentation: NO
-- Sphinx: NO
-- PdfLaTeX compiler: /usr/bin/pdflatex
--
-- Tests and samples:
-- Tests: YES
-- Performance tests: YES
-- C/C++ Examples: NO
--
-- Install path: /usr/local
--
-- cvconfig.h is in: /home/shixudongleo/Downloads/opencv-2.4.8/build
-- -----------------------------------------------------------------
--
-- Configuring done
-- Generating done
-- Build files have been written to: /home/XXX/Downloads/opencv-2.4.8/build
FFMPEG
ffmpeg is enable to support OpenCV and libx264 is enabled when compiling ffmpeg.
By using ffmpeg command line, libx264 is running normally.
$ ffmpeg -i test.avi -vcodec libx264 test.mp4
ffmpeg -i test.avi -vcodec libx264 test.mp4 > ~/Downloads/ffmpeg_log.txt
ffmpeg version 2.2.git Copyright (c) 2000-2014 the FFmpeg developers
built on Apr 24 2014 16:39:51 with gcc 4.6 (Ubuntu/Linaro 4.6.3-1ubuntu5)
configuration: --enable-gpl --enable-libfaac --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libtheora --enable-libvorbis --enable-libx264 --enable-libxvid --enable-nonfree --enable-postproc --enable-version3 --enable-x11grab --enable-shared --enable-pic
libavutil 52. 78.100 / 52. 78.100
libavcodec 55. 58.105 / 55. 58.105
libavformat 55. 37.101 / 55. 37.101
libavdevice 55. 13.100 / 55. 13.100
libavfilter 4. 4.100 / 4. 4.100
libswscale 2. 6.100 / 2. 6.100
libswresample 0. 18.100 / 0. 18.100
libpostproc 52. 3.100 / 52. 3.100
Input #0, avi, from 'test.avi':
Duration: 00:00:03.73, start: 0.000000, bitrate: 1757 kb/s
Stream #0:0: Video: msvideo1 (CRAM / 0x4D415243), rgb555le, 320x240, 1781 kb/s, 15 tbr, 15 tbn, 15 tbc
Metadata:
title : julius.avi Video #1
File 'test.mp4' already exists. Overwrite ? [y/N] y
No pixel format specified, yuv444p for H.264 encoding chosen.
Use -pix_fmt yuv420p for compatibility with outdated media players.
[libx264 # 0x25d08e0] using cpu capabilities: none!
[libx264 # 0x25d08e0] profile High 4:4:4 Predictive, level 1.2, 4:4:4 8-bit
[libx264 # 0x25d08e0] 264 - core 142 - H.264/MPEG-4 AVC codec - Copyleft 2003-2014 - http://www.videolan.org/x264.html - options: cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=4 threads=12 lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=15 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=crf mbtree=1 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
Output #0, mp4, to 'test.mp4':
Metadata:
encoder : Lavf55.37.101
Stream #0:0: Video: h264 (libx264) ([33][0][0][0] / 0x0021), yuv444p, 320x240, q=-1--1, 15360 tbn, 15 tbc
Metadata:
title : julius.avi Video #1
Stream mapping:
Stream #0:0 -> #0:0 (msvideo1 -> libx264)
Press [q] to stop, [?] for help
frame= 56 fps=0.0 q=-1.0 Lsize= 321kB time=00:00:03.60 bitrate= 731.0kbits/s
video:320kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.409949%
[libx264 # 0x25d08e0] frame I:3 Avg QP:15.36 size: 7975
[libx264 # 0x25d08e0] frame P:38 Avg QP:26.05 size: 6230
[libx264 # 0x25d08e0] frame B:15 Avg QP:28.25 size: 4418
[libx264 # 0x25d08e0] consecutive B-frames: 46.4% 53.6% 0.0% 0.0%
[libx264 # 0x25d08e0] mb I I16..4: 1.4% 72.8% 25.8%
[libx264 # 0x25d08e0] mb P I16..4: 1.6% 5.7% 15.1% P16..4: 7.6% 6.3% 7.4% 0.0% 0.0% skip:56.3%
[libx264 # 0x25d08e0] mb B I16..4: 0.2% 1.0% 2.0% B16..8: 13.3% 7.8% 8.7% direct: 8.3% skip:58.8% L0:34.9% L1:36.6% BI:28.5%
[libx264 # 0x25d08e0] 8x8 transform intra:37.7% inter:2.3%
[libx264 # 0x25d08e0] coded y,u,v intra: 52.1% 42.1% 30.1% inter: 19.6% 9.2% 5.2%
[libx264 # 0x25d08e0] i16 v,h,dc,p: 56% 17% 24% 2%
[libx264 # 0x25d08e0] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 10% 16% 68% 1% 1% 1% 1% 1% 1%
[libx264 # 0x25d08e0] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 19% 18% 28% 5% 6% 5% 7% 5% 6%
[libx264 # 0x25d08e0] Weighted P-Frames: Y:31.6% UV:21.1%
[libx264 # 0x25d08e0] ref P L0: 70.5% 9.0% 12.1% 6.5% 2.0%
[libx264 # 0x25d08e0] ref B L0: 91.3% 8.7%
[libx264 # 0x25d08e0] kb/s:700.56
Have you tried changing the fourcc parameters ?
VideoWriter outp;
outp.open("aboutput.wmv",CV_FOURCC('M','P','4','2'),10,Size(160,160),false);
this works on my Ubuntu 14.04

Installation of ruby 1.9.3 in Mac OS Mavericks

I have tried the following with macports but give up and uninstalled (http://guide.macports.org/chunked/installing.macports.uninstalling.html) it as I was being unsuccessful with the gcc42 library and gave a try to Homebrew.
Everything went (almost) smooth, i had to manually delete some library files that i have installed with macports, Homebrew was gentle and told me exactly what to do. I already had the xcode installed but i reinstalled it, just in case.
Then I tried to install ruby 1.9.3 using:
\curl -L https://get.rvm.io | bash -s stable --ruby=1.9.3
and I'm getting this error:
ruby-1.9.3-p448 - #configuring........
Error running './configure --prefix=/Users/pedro/.rvm/rubies/ruby-1.9.3-p448 --with-opt-dir=/usr/local/opt/libyaml:/usr/local/opt/readline:/usr/local/opt/libksba:/usr/local/opt/openssl --without-tcl --without-tk --enable-shared',
please read /Users/pedro/.rvm/log/1383305143_ruby-1.9.3-p448/configure.log
There has been an error while running configure. Halting the installation.
configure.log tail:
$ tail /Users/pedro/.rvm/log/1383305143_ruby-1.9.3-p448/configure.log
current path: /Users/pedro/.rvm/src/ruby-1.9.3-p448
command(6): ./configure --prefix=/Users/pedro/.rvm/rubies/ruby-1.9.3-p448 --with-opt-dir=/usr/local/opt/libyaml:/usr/local/opt/readline:/usr/local/opt/libksba:/usr/local/opt/openssl --without-tcl --without-tk --enable-shared
configure: WARNING: unrecognized options: --without-tcl, --without-tk
checking build system type... i386-apple-darwin13.0.0
checking host system type... i386-apple-darwin13.0.0
checking target system type... i386-apple-darwin13.0.0
checking whether the C compiler works... no
configure: error: in `/Users/pedro/.rvm/src/ruby-1.9.3-p448':
configure: error: C compiler cannot create executables
See `config.log' for more details
config.log content:
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by configure, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ ./configure --prefix=/Users/pedro/.rvm/rubies/ruby-1.9.3-p448 --with-opt-dir=/usr/local/opt/libyaml:/usr/local/opt/readline:/usr/local/opt/libksba:/usr/local/opt/openssl --without-tcl --without-tk --enable-shared
## --------- ##
## Platform. ##
## --------- ##
hostname = pedros-mbp.home
uname -m = x86_64
uname -r = 13.0.0
uname -s = Darwin
uname -v = Darwin Kernel Version 13.0.0: Thu Sep 19 22:22:27 PDT 2013; root:xnu-2422.1.72~6/RELEASE_X86_64
/usr/bin/uname -p = i386
/bin/uname -X = unknown
/bin/arch = unknown
/usr/bin/arch -k = unknown
/usr/convex/getsysinfo = unknown
/usr/bin/hostinfo = Mach kernel version:
Darwin Kernel Version 13.0.0: Thu Sep 19 22:22:27 PDT 2013; root:xnu-2422.1.72~6/RELEASE_X86_64
Kernel configured for up to 8 processors.
4 processors are physically available.
8 processors are logically available.
Processor type: i486 (Intel 80486)
Processors active: 0 1 2 3 4 5 6 7
Primary memory available: 4.00 gigabytes
Default processor set: 170 tasks, 969 threads, 8 processors
Load average: 2.68, Mach factor: 5.31
/bin/machine = unknown
/usr/bin/oslevel = unknown
/bin/universe = unknown
PATH: /usr/local/opt/gcc46/bin
PATH: /usr/local/opt/pkg-config/bin
PATH: /usr/local/opt/libtool/bin
PATH: /usr/local/opt/automake/bin
PATH: /usr/local/opt/autoconf/bin
PATH: /opt/local/bin
PATH: /opt/local/sbin
PATH: /usr/bin
PATH: /bin
PATH: /usr/sbin
PATH: /sbin
PATH: /usr/local/bin
PATH: /Users/pedro/.rvm/bin
## ----------- ##
## Core tests. ##
## ----------- ##
configure:2799: checking build system type
configure:2813: result: i386-apple-darwin13.0.0
configure:2881: checking host system type
configure:2894: result: i386-apple-darwin13.0.0
configure:2914: checking target system type
configure:2927: result: i386-apple-darwin13.0.0
configure:3408: checking for C compiler version
configure:3417: /bin/gcc-4.6 --version >&5
./configure: line 3419: /bin/gcc-4.6: No such file or directory
configure:3428: $? = 127
configure:3417: /bin/gcc-4.6 -v >&5
./configure: line 3419: /bin/gcc-4.6: No such file or directory
configure:3428: $? = 127
configure:3417: /bin/gcc-4.6 -V >&5
./configure: line 3419: /bin/gcc-4.6: No such file or directory
configure:3428: $? = 127
configure:3417: /bin/gcc-4.6 -qversion >&5
./configure: line 3419: /bin/gcc-4.6: No such file or directory
configure:3428: $? = 127
configure:3448: checking whether the C compiler works
configure:3470: /bin/gcc-4.6 conftest.c >&5
./configure: line 3472: /bin/gcc-4.6: No such file or directory
configure:3474: $? = 127
configure:3512: result: no
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE_URL ""
| #define CANONICALIZATION_FOR_MATHN 1
| /* end confdefs.h. */
|
| int
| main ()
| {
|
| ;
| return 0;
| }
configure:3517: error: in `/Users/pedro/.rvm/src/ruby-1.9.3-p448':
configure:3519: error: C compiler cannot create executables
See `config.log' for more details
## ---------------- ##
## Cache variables. ##
## ---------------- ##
ac_cv_build=i386-apple-darwin13.0.0
ac_cv_env_CCC_set=
ac_cv_env_CCC_value=
ac_cv_env_CC_set=set
ac_cv_env_CC_value=/bin/gcc-4.6
ac_cv_env_CFLAGS_set=
ac_cv_env_CFLAGS_value=
ac_cv_env_CPPFLAGS_set=
ac_cv_env_CPPFLAGS_value=
ac_cv_env_CPP_set=
ac_cv_env_CPP_value=
ac_cv_env_CXXFLAGS_set=
ac_cv_env_CXXFLAGS_value=
ac_cv_env_CXX_set=
ac_cv_env_CXX_value=
ac_cv_env_LDFLAGS_set=
ac_cv_env_LDFLAGS_value=
ac_cv_env_LIBS_set=
ac_cv_env_LIBS_value=
ac_cv_env_build_alias_set=
ac_cv_env_build_alias_value=
ac_cv_env_host_alias_set=
ac_cv_env_host_alias_value=
ac_cv_env_target_alias_set=
ac_cv_env_target_alias_value=
ac_cv_host=i386-apple-darwin13.0.0
ac_cv_prog_CC=/bin/gcc-4.6
ac_cv_target=i386-apple-darwin13.0.0
## ----------------- ##
## Output variables. ##
## ----------------- ##
ALLOCA=''
AR=''
ARCHFILE=''
ARCH_FLAG=''
AS=''
ASFLAGS=''
BASERUBY='ruby'
BUILTIN_ENCOBJS=''
BUILTIN_TRANSOBJS=''
BUILTIN_TRANSSRCS=''
CAPITARGET=''
CC='/bin/gcc-4.6'
CCDLFLAGS=''
CFLAGS=''
CHDIR=''
COMMON_HEADERS=''
COMMON_LIBS=''
COMMON_MACROS=''
COUTFLAG=''
CP=''
CPP=''
CPPFLAGS=''
CPPOUTFILE=''
CXX=''
CXXFLAGS=''
DEFS=''
DLDFLAGS=''
DLDLIBS=''
DLEXT2=''
DLEXT=''
DLLWRAP=''
DOT=''
DOXYGEN=''
ECHO_C='\c'
ECHO_N=''
ECHO_T=''
EGREP=''
ENABLE_SHARED=''
EXECUTABLE_EXTS=''
EXEEXT=''
EXPORT_PREFIX=''
EXTDLDFLAGS=''
EXTOUT=''
EXTSTATIC=''
GCC=''
GNU_LD=''
GREP=''
INSTALLDOC=''
INSTALL_DATA=''
INSTALL_PROGRAM=''
INSTALL_SCRIPT=''
LDFLAGS=''
LDSHARED=''
LDSHAREDXX=''
LIBEXT=''
LIBOBJS=''
LIBPATHENV=''
LIBPATHFLAG=''
LIBRUBY=''
LIBRUBYARG=''
LIBRUBYARG_SHARED=''
LIBRUBYARG_STATIC=''
LIBRUBY_A=''
LIBRUBY_ALIASES=''
LIBRUBY_DLDFLAGS=''
LIBRUBY_LDSHARED=''
LIBRUBY_RELATIVE=''
LIBRUBY_SO=''
LIBS=''
LINK_SO=''
LN_S=''
LTLIBOBJS=''
MAINLIBS=''
MAJOR='1'
MAKEDIRS=''
MAKEFILES=''
MANTYPE=''
MINIOBJS=''
MINIRUBY=''
MINOR='9'
MKDIR_P=''
NM=''
NROFF=''
NULLCMD=''
OBJCOPY=''
OBJDUMP=''
OBJEXT=''
OUTFLAG=''
PACKAGE=''
PACKAGE_BUGREPORT=''
PACKAGE_NAME=''
PACKAGE_STRING=''
PACKAGE_TARNAME=''
PACKAGE_URL=''
PACKAGE_VERSION=''
PATH_SEPARATOR=':'
PKG_CONFIG=''
PLATFORM_DIR=''
POSTLINK=''
PREP=''
RANLIB=''
RDOCTARGET=''
RI_BASE_NAME=''
RM=''
RMALL=''
RMDIR=''
RMDIRS=''
RPATHFLAG=''
RUBYW_BASE_NAME='rubyw'
RUBYW_INSTALL_NAME=''
RUBY_BASE_NAME='ruby'
RUBY_INSTALL_NAME=''
RUBY_PROGRAM_VERSION='1.9.3'
RUBY_RELEASE_DATE='2013-06-27'
RUBY_SO_NAME=''
RUNRUBY=''
SET_MAKE=''
SHELL='/bin/sh'
SOLIBS=''
STATIC=''
STRIP=''
SYMBOL_PREFIX=''
TEENY='1'
TEST_RUNNABLE=''
THREAD_MODEL=''
TRY_LINK=''
UNIVERSAL_ARCHNAMES=''
UNIVERSAL_INTS=''
USE_RUBYGEMS=''
WERRORFLAG=''
WINDRES=''
XCFLAGS=''
XLDFLAGS=''
XRUBY=''
XRUBY_LIBDIR=''
XRUBY_RUBYHDRDIR=''
XRUBY_RUBYLIBDIR=''
ac_ct_CC=''
ac_ct_CXX=''
ac_ct_OBJCOPY=''
ac_ct_OBJDUMP=''
arch=''
bindir='${exec_prefix}/bin'
build='i386-apple-darwin13.0.0'
build_alias=''
build_cpu='i386'
build_os='darwin13.0.0'
build_vendor='apple'
cflags=' ${optflags} ${debugflags} ${warnflags}'
configure_args=''
cppflags=''
cxxflags=' ${optflags} ${debugflags} ${warnflags}'
datadir='${datarootdir}'
datarootdir='${prefix}/share'
debugflags=''
docdir='${datarootdir}/doc/${PACKAGE}'
dvidir='${docdir}'
exec=''
exec_prefix='NONE'
host='i386-apple-darwin13.0.0'
host_alias=''
host_cpu='i386'
host_os='darwin13.0.0'
host_vendor='apple'
htmldir='${docdir}'
includedir='${prefix}/include'
infodir='${datarootdir}/info'
libdir='${exec_prefix}/lib'
libexecdir='${exec_prefix}/libexec'
localedir='${datarootdir}/locale'
localstatedir='${prefix}/var'
mandir='${datarootdir}/man'
oldincludedir='/usr/include'
optflags=''
pdfdir='${docdir}'
prefix='/Users/pedro/.rvm/rubies/ruby-1.9.3-p448'
program_transform_name='s&^&&'
psdir='${docdir}'
ridir=''
ruby_pc=''
ruby_version=''
rubyhdrdir=''
rubylibprefix=''
rubyw_install_name=''
sbindir='${exec_prefix}/sbin'
setup=''
sharedstatedir='${prefix}/com'
sitearch=''
sitedir=''
sitehdrdir=''
sysconfdir='${prefix}/etc'
target='i386-apple-darwin13.0.0'
target_alias=''
target_cpu='i386'
target_os='darwin13.0.0'
target_vendor='apple'
try_header=''
vendordir=''
vendorhdrdir=''
warnflags=''
## ----------- ##
## confdefs.h. ##
## ----------- ##
/* confdefs.h */
#define PACKAGE_NAME ""
#define PACKAGE_TARNAME ""
#define PACKAGE_VERSION ""
#define PACKAGE_STRING ""
#define PACKAGE_BUGREPORT ""
#define PACKAGE_URL ""
#define CANONICALIZATION_FOR_MATHN 1
configure: exit 77
I used #UnholySheep advice and resolved my problem.
First I found that gcc46 were installed:
$ gcc-4.6 -v
Using built-in specs.
COLLECT_GCC=gcc-4.6
COLLECT_LTO_WRAPPER=/usr/local/Cellar/gcc46/4.6.4/libexec/gcc/x86_64-apple-darwin13.0.0/4.6.4/lto-wrapper
Target: x86_64-apple-darwin13.0.0
Configured with: ../configure --build=x86_64-apple-darwin13.0.0 --prefix=/usr/local/Cellar/gcc46/4.6.4 --enable-languages=c --program-suffix=-4.6 --with-gmp=/usr/local/opt/gmp4 --with-mpfr=/usr/local/opt/mpfr2 --with-mpc=/usr/local/opt/libmpc08 --with-ppl=/usr/local/opt/ppl011 --with-cloog=/usr/local/opt/cloog-ppl015 --with-system-zlib --enable-version-specific-runtime-libs --enable-libstdcxx-time=yes --enable-stage1-checking --enable-checking=release --enable-lto --disable-werror --enable-plugin --disable-nls --disable-multilib
Thread model: posix
gcc version 4.6.4 (GCC)
I used locate gcc-4.6 and found that homebrew installed it under /usr/local/bin. Then created a symlink as suggested by #UnholySheep:
sudo ln -s /usr/local/bin/gcc-4.6 /bin/gcc-4.6
This has been resolved. Run unset CC, then rvm remove 1.9.3, then rvm install 1.9.3.
#mpapis graciously provided the link to the bug report here: https://github.com/wayneeseguin/rvm/issues/2331
there is a reported bug for your problem https://github.com/wayneeseguin/rvm/issues/2331
I will type my answer since I've just looked for the same solution and foun it at another place:
The Xcode compiler is clang (llvm), but Ruby MRI 1.9 only supports gcc (another older but widely used compiler).
While it’s true that MRI 1.9.3 is unofficially compatible with clang, there are some known issues and some modules do not compile correctly (Fibers).
Full clang support has been added with MRI 2.0.0.
So, if you really want to install MRI 1.9.3, you need to install gcc first:
brew update
brew install gcc
rvm install 1.9.3 --with-gcc=/usr/local/bin/gcc-6
This really helped me.
Original answer

Resources