Recording or CG shader support in OS X?

Is it possible to get recording or cg shaders features to compile/work within OS X? I noticed that they are not listed on the wiki compilation page as optional dependencies. I’m guessing that cg shaders needs the nvidia-cg-toolkit which doesn’t seem to be available on OS X?

Thanks!

If nVidia doesn’t provide Cg toolkit on OSX that’d be very strange. For recording you need FFmpeg libraries installed (libavcodec and friends). I don’t list every single optional dependency as there’s quite a lot of them. Check retroarch --features for a list of thing you might want.

I was able to get the FFmpeg libraries installed and RetroArch to compile with those options.

It looks like Nvidia does provide the Nvidia CD Toolkit for OS X on their site. I installed it, however RetroArch doesn’t recognize that it is installed/available. Here is a log of the installation of the toolkit on OS X showing the location of the installed files.

http://pastebin.com/ffqDAd4K

Ok, so … It’s an OSX framework. Pushed up something that should detect Cg and compile against it properly.

Didn’t work, here is the output of the configure script, config.mk, and config.h:

configure config.mk .config.h

Thanks!

Derp. Now then?

Nope, here is the output:


/configure --prefix=/opt/local
Checking operating system ... Darwin
Checking for suitable working C compiler ... /usr/bin/gcc
Checking for suitable working C++ compiler ... /usr/bin/g++
Checking for availability of switch -std=gnu99 in /usr/bin/gcc ... yes
Checking for availability of switch -Wno-unused-result in /usr/bin/gcc ... no
Checking function bcm_host_init in -lbcm_host ... no
Checking for pkg-config ... /opt/local/bin/pkg-config
Checking presence of package egl ... no
Checking function pthread_create in -lpthread ... yes
Checking function dlopen in -ldl ... yes
Checking function socket in -lc ... yes
Checking function getaddrinfo in -lc ... yes
Checking function fcntl in -lc ... yes
Checking function getopt_long in -lc ... yes
Checking presence of package alsa ... no
Checking presence of header file sys/soundcard.h ... no
Checking presence of header file soundcard.h ... no
Checking existence of -lossaudio ... no
Checking function alcOpenDevice in -framework OpenAL ... yes
Checking function glFramebufferTexture2D in -framework OpenGL ... yes
Checking presence of package rsound with minimum version 1.1 ... no
Checking presence of package libroar ... no
Checking presence of package jack with minimum version 0.120.1 ... no
Checking presence of package libpulse ... no
Checking function AudioUnitInitialize in -framework AudioUnit ... yes
Checking presence of package sdl with minimum version 1.2.10 ... yes
Checking function cgCreateContext in -framework Cg ... yes
Checking presence of package SDL_image ... yes
Checking presence of package libpng with minimum version 1.5 ... yes
Checking presence of package libavcodec ... yes
Checking presence of package libavformat ... yes
Checking presence of package libavutil ... yes
Checking function avcodec_alloc_context3 in -L/opt/local/lib -lavcodec ... yes
Checking function avcodec_open2 in -L/opt/local/lib -lavcodec ... yes
Checking function avcodec_encode_audio2 in -L/opt/local/lib -lavcodec ... yes
Checking function avio_open in -L/opt/local/lib -lavformat  -L/opt/local/lib -lavcodec  -L/opt/local/lib -lavutil ... yes
Checking function avformat_write_header in -L/opt/local/lib -lavformat  -L/opt/local/lib -lavcodec  -L/opt/local/lib -lavutil ... yes
Checking function avformat_new_stream in -L/opt/local/lib -lavformat  -L/opt/local/lib -lavcodec  -L/opt/local/lib -lavutil ... yes
Checking function avcodec_encode_video2 in -L/opt/local/lib -lavcodec ... yes
Checking function dlopen in -ldl ... yes
Checking presence of package gbm with minimum version 9.0 ... no
Checking presence of package libdrm ... no
Checking presence of package libxml-2.0 ... yes
Checking presence of package freetype2 ... yes
X11, Xext or xf86vm not present. Skipping X11 code paths.
Checking function strlcpy in -lc ... yes
Checking presence of package python3 ... no
Creating make config: config.mk
Creating config header: config.h
+ make -j9
CC message.c
CC gfx/gfx_common.c
CC rewind.c
CC hash.c
CC fifo_buffer.c
CC file_path.c
CC file.c
CC input/input_common.c
CC driver.c
CC patch.c
CC compat/compat.c
CC audio/null.c
CC gfx/null.c
CC input/null.c
CC autosave.c
CC settings.c
CC dynamic.c
CC screenshot.c
CC movie.c
CC conf/config_file.c
CC audio/openal.c
CC gfx/scaler/scaler.c
CC gfx/scaler/scaler_int.c
CC gfx/scaler/pixconv.c
CC command.c
CC thread.c
CC gfx/scaler/filter.c
CC input/sdl_joypad.c
CC input/sdl_input.c
CC gfx/sdl_gfx.c
CC audio/sdl_audio.c
CC gfx/context/sdl_ctx.c
CC gfx/gfx_context.c
CC gfx/math/matrix.c
CC gfx/fonts/freetype.c
CC netplay.c
CC retroarch.c
CC gfx/state_tracker.c
CC gfx/gl.c
CC gfx/ext_gfx.c
CC gfx/image.c
CC audio/ext_audio.c
CC audio/utils.c
CC audio/sinc.c
CC tools/retroarch-joyconfig.c
CC gfx/shader_cg.c
CC gfx/fonts/fonts.c
CC cheats.c
CC gfx/shader_glsl.c
LD tools/retroarch-joyconfig
CC record/ffemu.c
audio/coreaudio.c: In function ‘coreaudio_free’:
audio/coreaudio.c:52: warning: ‘CloseComponent’ is deprecated (declared at /System/Library/Frameworks/CoreServices.framework/Frameworks/CarbonCore.framework/Headers/Components.h:593)
audio/coreaudio.c: In function ‘coreaudio_init’:
audio/coreaudio.c:132: warning: ‘FindNextComponent’ is deprecated (declared at /System/Library/Frameworks/CoreServices.framework/Frameworks/CarbonCore.framework/Headers/Components.h:471)
audio/coreaudio.c:136: warning: ‘OpenAComponent’ is deprecated (declared at /System/Library/Frameworks/CoreServices.framework/Frameworks/CarbonCore.framework/Headers/Components.h:561)
CC audio/coreaudio.c
ld: library not found for -lCg
collect2: ld returned 1 exit status
make: *** [retroarch] Error 1

Try now …

Works!

Thanks!

My new package from the release thread should support video recording now but I forgot about Cg support >.<

I’ll try to get it in for 0.9.8 final.