<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
Hi everyone,
<div class=""><br class="">
</div>
<div class="">Inspired from the CDIReader sources and feeling a bit hackish, I managed a workaround by adding the following lines to CMakeLists.txt:</div>
<div class=""><br class="">
</div>
<div class="">…</div>
<div class="">
<div class=""># Only load VTK NetCDF on OS X</div>
<div class="">if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")</div>
<div class="">  vtk_module_load(vtknetcdf)</div>
<div class="">endif()</div>
<div class="">…</div>
<div class="">
<div class=""># Only load VTK NetCDF on OS X</div>
<div class="">if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")</div>
<div class="">  include_directories(${VTK_INCLUDE_DIRS})</div>
<div class="">endif()</div>
</div>
<div class="">…</div>
<div class="">
<div class=""># Only link VTK NetCDF on OS X</div>
<div class="">if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")</div>
<div class="">  target_link_libraries(AiaReaderUnified LINK_PRIVATE ${vtknetcdf_LIBRARIES})</div>
<div class="">endif()</div>
</div>
<div class=""><br class="">
</div>
<div class="">I don’t know why it works and I’m still interested in an actual solution, but I thought I’d post this anyway for others with similar issues.</div>
<div class=""><br class="">
</div>
<div class="">Michael</div>
<div class=""><br class="">
</div>
<div>
<blockquote type="cite" class="">
<div class="">On 14 Apr 2016, at 14:54 , Michael Schlottke-Lakemper <<a href="mailto:m.schlottke-lakemper@aia.rwth-aachen.de" class="">m.schlottke-lakemper@aia.rwth-aachen.de</a>> wrote:</div>
<br class="Apple-interchange-newline">
<div class="">
<div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
Hi folks,
<div class=""><br class="">
</div>
<div style="widows: 1;" class="">I’m trying to build our custom plugins on OS X for PV 5.0.1. To avoid the fact that the “<span style="widows: 1; background-color: rgb(255, 255, 255);" class=""><font face="sans-serif" class=""><span style="font-size: 12.7px; line-height: 19.05px;" class="">PARAVIEW_INSTALL_DEVELOPMENT_FILES</span></font><font face="sans-serif" size="2" class=""><span style="line-height: 19.049999237060547px;" class="">”</span></font><font face="sans-serif" class=""><span style="font-size: 12.7px; line-height: 19.05px;" class=""> flag
 is not available on OS X, I try to build the plugins against the ParaView build directory, which I remember to have worked at least once (2-3 years ago</span><font size="2" class=""><span style="line-height: 19.049999237060547px;" class="">…</span></font><span style="font-size: 12.7px; line-height: 19.05px;" class="">).</span></font></span></div>
<div style="widows: 1;" class=""><br class="">
</div>
<div style="widows: 1;" class="">Usually, in our plugins we link against external versions of Parallel netCDF and NetCDF (i.e. not against vtkNetCDF etc.), which works fine on Linux. However, on OS X we always get the following error at link time:</div>
<div style="widows: 1;" class=""><br class="">
</div>
<div style="widows: 1;" class="">########################################</div>
<div style="widows: 1;" class="">…</div>
<div style="widows: 1;" class="">
<div class="">[100%] Linking CXX shared library libAiaReaderUnified.dylib</div>
<div class="">Undefined symbols for architecture x86_64:</div>
<div class="">  "_vtk_netcdf_nc_close", referenced from:</div>
<div class="">      vtkAiaReaderUnified::CanReadFile(char const*) in vtkAiaReaderUnified.cxx.o</div>
<div class="">  "_vtk_netcdf_nc_open", referenced from:</div>
<div class="">      vtkAiaReaderUnified::CanReadFile(char const*) in vtkAiaReaderUnified.cxx.o</div>
<div class="">ld: symbol(s) not found for architecture x86_64</div>
<div class="">clang: error: linker command failed with exit code 1 (use -v to see invocation)</div>
<div class="">########################################</div>
<div class=""><br class="">
</div>
<div class="">These are, I believe, the relevant lines from the plugin CMakeLists.txt:</div>
<div class=""><br class="">
</div>
<div class="">########################################</div>
<div class="">...</div>
<div class="">
<div class="">find_package(NetCDF REQUIRED)</div>
<div class="">find_package(PNetCDF REQUIRED)</div>
</div>
<div class="">…</div>
<div class="">
<div class="">include_directories(</div>
<div class="">  SYSTEM</div>
<div class="">  ${NETCDF_INCLUDES}</div>
<div class="">  ${PNETCDF_INCLUDES}</div>
<div class="">)</div>
</div>
<div class="">…</div>
<div class="">
<div class="">target_link_libraries(AiaReaderUnified</div>
<div class="">  PUBLIC ${NETCDF_LIBRARIES} ${PNETCDF_LIBRARIES})</div>
</div>
<div class="">########################################</div>
<div class=""><br class="">
</div>
<div class="">Any idea what I’m doing wrong? To me it seems like the wrong version of the NetCDF library is picked up somehow, but I can’t figure out what is causing this and how it is even possible that it proceeds to this point… It’s been ages since I tried
 to compile the plugins on OS X, and while I know I always had some troubles, I do not recall this particular error..</div>
<div class=""><br class="">
</div>
<div class="">Regards,</div>
<div class=""><br class="">
</div>
<div class="">Michael</div>
</div>
<br class="">
<div apple-content-edited="true" class="">
<div style="letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
<span class="Apple-style-span" style="border-collapse: separate; font-family: Helvetica; border-spacing: 0px;">
<div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
<span class="Apple-style-span" style="border-collapse: separate; font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; border-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-stroke-width: 0px;">
<div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
--<br class="">
Michael Schlottke-Lakemper<br class="">
<br class="">
Chair of Fluid Mechanics and Institute of Aerodynamics<br class="">
RWTH Aachen University<br class="">
Wüllnerstraße 5a<br class="">
52062 Aachen<br class="">
Germany<br class="">
<br class="">
Phone: +49 (241) 80 95188<br class="">
Fax: +49 (241) 80 92257<br class="">
Mail: <a href="mailto:m.schlottke-lakemper@aia.rwth-aachen.de" class="">m.schlottke-lakemper@aia.rwth-aachen.de</a><br class="">
Web: <a href="http://www.aia.rwth-aachen.de/" class="">http://www.aia.rwth-aachen.de</a></div>
</span></div>
</span></div>
</div>
<br class="">
</div>
</div>
</blockquote>
</div>
<br class="">
</div>
</body>
</html>