Search code examples
boostcudax86osx-snow-leopardamd-processor

build gpuocelot fails due to boost linkage errors on OS X Snow Leopard


I used the latest trunk version of gpuocelot on a mac snow 10.6.8 with gcc 4.5.3 and boost @1.49.0_0+universal (active) (boost installed via macports).

I run scons and I get

.release_build/ocelot/ptx.os .release_build/ocelot/ptxgrammar.os -L/usr/lib -lboost_system-mt -lboost_filesystem-mt -lboost_thread-mt -ldl ld: library not found for -lboost_system-mt collect2: ld returned 1 exit status

this reports failure on OS X Lion. anyone with similar issue?


Solution

  • You should try this command line instead:

    .release_build/ocelot/ptx.os .release_build/ocelot/ptxgrammar.os -L/opt/local/lib -lboost_system-mt -lboost_filesystem-mt -lboost_thread-mt -ldl
    

    Indeed, on my system, Mac ports installs boost libraries in /opt/local/lib instead of /usr/lib.