Showing posts with label mac. Show all posts
Showing posts with label mac. Show all posts

18 February 2013

Lapack in Mac OS X

I previously used this when compiling:
gcc ... -llapack
It worked, but I came into error for these two:
 dgetrf_
 dgetrf_
It was solved by using
gcc ... -framework Accelerate

Using Posix Threads in Mac OS X

Got into an EMFILE error
Too many semaphore descriptors or file descriptors are currently in use by this process.
when trying to run a program which runs on Ubuntu well.
The problem is that apparently Mac creates a file for every semaphore, and there's a limit for the number of opened files at one time, and it's set very low for Mac...
This can be fixed by
ulimit -n 10000
do not use sudo.

03 January 2013

Linking file from host in Virtual Box


mkdir /home/<user>/vboxshare
sudo mount -t vboxsf -o uid=1000,gid=1000 share /home/<hostuser>/vboxshare
sudo adduser <user> vboxsf
make dir in vboxshare, ln -s that folder in the virtual os

Virtual OS was Ubuntu 12.04, Host was Mac OSX 10.6.8

29 October 2012

[Mac] Photoshop in case-sensitive harddisk

Just found out that Photoshop apparently is not installable on Mac OSX with case sensitive volumes. Someone make a hack to make it work on one.

See the solution here. Installed smoothly.

Disregard of why one decide to have a case sensitive volumes, I don't understand why Adobe didn't put such (simple) hack to make it work, despite it being such a big company, with such expensive softwares...

05 October 2012

GLUT in Mac OSX

source

GL Header
#ifdef __APPLE__
#  include 
#  include 
#  include 
#else
#  include 
#  include 
#  include 
#endif

Makefile
# Mac OS alternate cmdline link options
UNAME = $(shell echo `uname`)
ifeq "$(UNAME)" "Darwin"
 LDFLAGS = -framework Carbon -framework OpenGL -framework GLUT
endif

GtkglArea

install from macport
sudo port install gtkglarea2

makefile (same as Ubuntu)
CPPFLAGS += `pkg-config gtkgl-2.0 --cflags`                                                                             
LIBS += `pkg-config gtkgl-2.0 --libs`   

21 June 2012

Compiling in Emacs (MacOSX 10.6)

when compiling gtkmm (installed with MacPorts) in emacs, command not found message appeared.
solution:
in ~/.emacs
;;; A quick & ugly PATH solution to Emacs on Mac OSX
(if (string-equal "darwin" (symbol-name system-type))
  (setenv "PATH" (concat "/opt/local/bin:/opt/local/sbin:" (getenv "PATH"))))
restart emacs

source

11 June 2012

pybotwar 0.7

must use pygame 1.9.1
I uses 64 bit install
SDL framework from Xcode build, make sure it's for MacOSX 10.6, uses Standard DMG, and x86_64, copy SDL.framework at build/Release/ to /Library/Frameworks
SDL_* frameworks from http://www.libsdl.org/
smpeg, universal means 32 bit and 64 bit both installed
sudo port install smpeg +universal
source

ld: framework not found SDL
problem is:
/Developer/SDKs/MacOSX10.6.sdk/Library/Frameworks/Frameworks -> /Library/Frameworks
so:
cd /Developer/SDKs/MacOSX10.6.sdk/Library/Frameworks/
ln -s Frameworks/*.framework .

source