forked from pocl/pocl
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME.OSX
74 lines (50 loc) · 1.99 KB
/
README.OSX
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
Installing pocl on OS X (Darwin)
================================
pocl can be installed on OS X (Darwin) as follows:
1. Install hwloc, e.g. via MacPorts (sudo port install hwloc)
2. Install llvm:
svn checkout http://llvm.org/svn/llvm-project/llvm/branches/release_33 llvm-3.3
pushd llvm-3.3/tools
svn checkout http://llvm.org/svn/llvm-project/cfe/branches/release_33 clang
popd
mkdir llvm-3.3-build
pushd llvm-3.3-build
../llvm-3.3/configure --prefix=${HOME}/llvm-3.3 --enable-shared --enable-optimized
make REQUIRES_RTTI=1 -j8
make install -j8
popd
3. Install pocl
[Download pocl]
[untar pocl]
pushd pocl-0.8
export PATH="${HOME}/llvm-3.3/bin:${PATH}"
export LD_LIBRARY_PATH="${HOME}/llvm-3.3/lib:${LD_LIBRARY_PATH}"
export DYLD_FALLBACK_LIBRARY_PATH="${HOME}/llvm-3.3/lib"
export CC="${HOME}/llvm-3.3/bin/clang"
export CXX="${HOME}/llvm-3.3/bin/clang++"
export CPPFLAGS="-I/opt/local/include"
export LDFLAGS="-L/opt/local/lib"
./configure --prefix=${HOME}/pocl-0.8 --disable-icd --enable-testsuites=all
make -j8
make install -j8
popd
Note: Some of the environment variables set above before building pocl
also need to be set when running a program using pocl.
Note: These instructions were tested on 2013-07-10
Installation with Homebrew http://mxcl.github.io/homebrew/
==========================================================
1. brew install libxml2 hwloc
2. brew install llvm --with-clang --shared --rtti --all-targets
3. configure and install pocl
mkdir build-pocl
cd build-pocl
../pocl-sources/configure --prefix=$PWD/../pocl-install --disable-icd --enable-testsuites=all
4. make -j8 check
5. make install
NOTE: If configure cannot find hwloc library, problem is probably https://github.com/mxcl/homebrew/issues/20769
one can fix that by hand by editing libxml2 formula:
edit /usr/local/Library/Formula/libxml2.rb
remove line: "keg_only :provided_by_osx"
brew uninstall libxml2
brew install libxml2
NOTE: if there are any problems make sure you don't have macports/fink installed.