By the way, I have added a build to the dashboard ( which is currently affected by the issue in question. 



On Tue, Jul 16, 2013 at 9:00 AM, Daniel Crispell <> wrote:
There currently exist a handful of libraries (python modules) within contrib/brl that are built as shared, even if "BUILD_SHARED_LIBS" is set to "off".   On Linux, this requires adding "-fPIC" to the compiler flags, since it is not possible (as far as I know) to link static libraries with position dependent code into a shared library.  (If the "-fPIC" flag is not manually added, the user will get linker errors when building the shared modules.)

In order to avoid the user having to manually add these flags, I was thinking of adding a new cmake option (BUILD_SHARED_PYTHON_MODULES?), which would automatically add the -fPIC option to CMAKE_CXX_FLAGS and CMAKE_C_FLAGS when enabled, and "UNIX" is true. 

I wanted to run this idea by the collective mind of the list before I went ahead with it because there may be implications of adding the -fPIC flag to static builds that I'm not aware of, or possibly a better way of accomplishing this that I haven't thought of.  Any thoughts?