Closed ianamason closed 8 years ago
brew install protobuf-c
need to fix the library generation step in the src/Makefile
too.
OK so the C++ compiles fine on my darwin, need to fix the python. Not today.
Python fixed, not sure if the libprevirt loads properly. Since opt does not recognize the library's args.
seems like libhello
does not work either (using the OCCAM/src Makefile). lets try a global install of llvm-3.5 with
brew install homebrew/versions/llvm35
rather than use my local build from source.
no luck with the brew install. Trying a rebuild from source via:
../configure --prefix=/Users/iam/LLVM/llvm-3.5-install --enable-shared --enable-keep-symbols
Bingo.
Though the build failed near the end with some missing ocaml symbols. It did build the libLLVM-3.5.1.dylib that seems to work, at least with hello ...
OK that got the previrtualization to work on my mac. Had to explicity link with my new dylib
/Users/iam/LLVM/llvm-3.5-install/lib/libLLVM-3.5.1.dylib
but that can be fixed. Now the next issue is:
driver.run: prog clang++
driver.run: args ['/var/folders/b6/9ghp1z8d7vz9ht4btx1yk5g40000gn/T/tmpwjEl2r.o', u'-L/usr/lib', u'-L/usr/local/lib', '-Wl,-static', '-Wl,-call_shared', u'-onweb']
ld: unknown option: -call_shared
clang: error: linker command failed with exit code 1 (use -v to see invocation)
which is probably not that surprising since I seem to be picking up the cupertino clang++
lappy-lazuli:nweb iam$ which clang++
/usr/bin/clang++
lappy-lazuli:nweb iam$
Actually I think the problem here is not with clang but with the flags?
-Wl,-static -Wl,-call_shared
which seem a little optimistic for a mac.
@ashish-gehani looks like just a little more TLC will get this puppy working on my mac.
10bbdbc5c63e8d8ddc404508065f58ef2911f0af
Trying to build 3.5 with:
../configure --prefix=/Users/iam/LLVM/llvm-3.5-install --enable-shared --enable-keep-symbols --disable-bindings
to see if I can avoid the ocaml problems.
Ok so that avoided the ocaml problems. I guess when we start doing big examples I should rebuild with:
--enable-optimized
On OS X, install Google Protocol Buffers (with MacPorts):
sudo port install protobuf-c protobuf-cpp
modulo instructions this is toast.
It looks hard coded that OCCAM can't work on darwin.
For example, in genconfig.py:
libprevirt = os.getenv('OCCAM_LIB') + '/libprevirt.so'