[Paraview] Building a plugin that works with Mac binary distribution

Moreland, Kenneth kmorel at sandia.gov
Mon Nov 3 15:21:29 EST 2008


I'm happy to say that I got this working, although with slightly different
instructions than Mike suggests below.  I already had matched up the Xcode
and Qt for my build of ParaView.  The way I got it to work was to compile my
plugin and copy that to the bin directory of my ParaView build.  I then ran
"make install" on ParaView.  The make install target converts all of the
library links from executables and libraries within ParaView to paths
relative to the executables.  Because I copied my plugin to be with the rest
of the ParaView libraries, the appropriate library directory mangling was
applied to it as well.

Although this works, the process is a little, uh, awkward.  Would the
library type (MODULE vs. SHARED) clear up the difference?  I am simply using
the ADD_PARAVIEW_PLUGIN macro to create the library.  It looks like it is
creating a SHARED library.  Should that be set to MODULE instead?

-Ken


On 11/3/08 12:06 PM, "Michael Jackson" <mike.jackson at bluequartz.net> wrote:

> Funny, I was betting how long it would take before someone asked just
> these same questions.
>
> The short answer is, Yes, it _could_ be done.
>
> The long answer is, well, long..
>
> In order to compile/link against the binary distribution you need to
> first have the exact same Xcode version that Kitware's Qt and ParaView
> were compiled with.
>
> Next you need all the headers from ParaView (which I am not sure if
> those are included in the binary distribution or not).
>
> Next you will need to have a project where when you compile your
> plugin against all the libraries that are within the binary
> distribution.
>
> If you compile your plugin as a MODULE and NOT SHARED then you should
> be good to go at this point. You will need to copy your plugin to the
> ParaView 3.4.0.app/Contents/Plugins directory and see if it loads.
>
>
> What would be nice is if there were some cmake files included with the
> binary distribution that allowed all this. As of yet, there isn't
> anything like this so you are into brand new territory.
> _________________________________________________________
> Mike Jackson                  mike.jackson at bluequartz.net
> BlueQuartz Software                    www.bluequartz.net
> Principal Software Engineer                  Dayton, Ohio
>
>
>
>
> On Nov 3, 2008, at 1:01 PM, Moreland, Kenneth wrote:
>
>> Does anyone have experience building a plugin on Mac that will work
>> with the
>> binary distribution of ParaView?  I tried getting the 3.4.0 source,
>> compiling with the same dependent libraries as listed on the Wiki,
>> and then
>> compiling my plugin against that, but it did not work.
>>
>> I think the issue is with getting the libraries to link.  If I compile
>> ParaView with rpath off, the plugin fails to load with an unhelpful
>> error
>> saying that it is not a valid Qt plugin.  If I compile ParaView with
>> rpath
>> on, then the libraries get hard coded against my build.  If I try to
>> load
>> the plugin on my machine, I get an error about Qt objects being in
>> different
>> threads, which I think is because the plugin is using a different
>> set of
>> Qt/VTK/ParaView libraries then the application.  I suspect it would
>> not load
>> at all on another machine.
>>
>> How do you get the libraries to resolve correctly?
>>
>> -Ken
>>
>>   ****      Kenneth Moreland
>>    ***      Sandia National Laboratories
>> ***********
>> *** *** ***  email: kmorel at sandia.gov
>> **  ***  **  phone: (505) 844-8919
>>    ***      fax:   (505) 845-0833
>
>
>
>


   ****      Kenneth Moreland
    ***      Sandia National Laboratories
***********
*** *** ***  email: kmorel at sandia.gov
**  ***  **  phone: (505) 844-8919
    ***      fax:   (505) 845-0833





More information about the ParaView mailing list