<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body style="overflow-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;">Patrick,<div><br></div><div>Can you please roll up a pull request with everything you needed to get Matlab going? The next person who comes along will very much appreciate it.</div><div><br></div><div>Howard<br id="lineBreakAtBeginningOfMessage"><div><br><blockquote type="cite"><div>On Jun 4, 2024, at 10:00 AM, Patrick Rennich via pdal <pdal@lists.osgeo.org> wrote:</div><br class="Apple-interchange-newline"><div><meta charset="UTF-8"><div class="WordSection1" style="page: WordSection1; caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 18px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;"><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span style="font-size: 11pt;">Ok, so here’s what I had to do to get things to compile with BUILD_PLUGIN_MATLAB=ON on macOS:<o:p></o:p></span></div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span style="font-size: 11pt;"><o:p> </o:p></span></div><ol start="1" type="1" style="margin-bottom: 0cm; margin-top: 0cm;"><li class="MsoListParagraph" style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span style="font-size: 11pt;">In matlab.cmake, I commented out the<span class="Apple-converted-space"> </span></span><span style="font-size: 11pt; font-family: "Aptos Mono";">find_library(Matlab REQUIRED)<span class="Apple-converted-space"> </span></span><span style="font-size: 11pt;">directive.<o:p></o:p></span></li><li class="MsoListParagraph" style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span style="font-size: 11pt;">Replaced FindMatlab.cmake with the latest version from<a href="https://github.com/Kitware/CMake/" style="color: blue; text-decoration: underline;">https://github.com/Kitware/CMake/</a><o:p></o:p></span></li><li class="MsoListParagraph" style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span style="font-size: 11pt;">Added FindPackageHandleStandardArgs.cmake and FindPackageMessage.cmake also from<span class="Apple-converted-space"> </span><a href="https://github.com/Kitware/CMake/" style="color: blue; text-decoration: underline;">https://github.com/Kitware/CMake/</a><o:p></o:p></span></li></ol><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span style="font-size: 11pt;"><o:p> </o:p></span></div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span style="font-size: 11pt;">The command<span class="Apple-converted-space"> </span><o:p></o:p></span></div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span style="font-size: 11pt;"><o:p> </o:p></span></div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span style="font-size: 11pt; font-family: "Aptos Mono";">% cmake -G Ninja -DBUILD_PLUGIN_MATLAB=ON ..</span><span style="font-size: 11pt;"><o:p></o:p></span></div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span style="font-size: 11pt;"><o:p> </o:p></span></div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span style="font-size: 11pt;">now finds and configures things properly, and<span class="Apple-converted-space"> </span></span><span style="font-size: 11pt; font-family: "Aptos Mono";">ninja</span><span style="font-size: 11pt;"><span class="Apple-converted-space"> </span>builds the executables. I tested by modifying the “Reading data from EPT” tutorial to write to a MAT file instead of a GeoTIFF and then loaded this file into Matlab.<o:p></o:p></span></div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span style="font-size: 11pt;"><o:p> </o:p></span></div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span style="font-size: 11pt;">Success!<o:p></o:p></span></div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span style="font-size: 11pt;"><o:p> </o:p></span></div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span style="font-size: 11pt; font-family: Calibri, sans-serif;">Patrick</span><span style="font-size: 11pt;"><o:p></o:p></span></div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span style="font-size: 11pt;"><o:p> </o:p></span></div><div id="mail-editor-reference-message-container"><div><div style="border-width: 1pt medium medium; border-style: solid none none; border-color: rgb(181, 196, 223) currentcolor currentcolor; border-image: none; padding: 3pt 0cm 0cm;"><p class="MsoNormal" style="margin: 0cm 0cm 12pt; font-size: 12pt; font-family: Aptos, sans-serif;"><b><span style="">From:<span class="Apple-converted-space"> </span></span></b><span style="">Patrick Rennich <<a href="mailto:patrick.rennich@aloftsensing.com" style="color: blue; text-decoration: underline;">patrick.rennich@aloftsensing.com</a>><br><b>Date:<span class="Apple-converted-space"> </span></b>Monday, June 3, 2024 at 11:55</span><span style="font-family: Arial, sans-serif;"> </span><span style="">AM<br><b>To:<span class="Apple-converted-space"> </span></b><a href="mailto:pdal@lists.osgeo.org" style="color: blue; text-decoration: underline;">pdal@lists.osgeo.org</a><span class="Apple-converted-space"> </span><<a href="mailto:pdal@lists.osgeo.org" style="color: blue; text-decoration: underline;">pdal@lists.osgeo.org</a>><br><b>Cc:<span class="Apple-converted-space"> </span></b><a href="mailto:karney@alum.mit.edu" style="color: blue; text-decoration: underline;">karney@alum.mit.edu</a><span class="Apple-converted-space"> </span><<a href="mailto:karney@alum.mit.edu" style="color: blue; text-decoration: underline;">karney@alum.mit.edu</a>>, Charles Karney <<a href="mailto:charles.karney@gmail.com" style="color: blue; text-decoration: underline;">charles.karney@gmail.com</a>>, Andrew Bell <<a href="mailto:andrew.bell.ia@gmail.com" style="color: blue; text-decoration: underline;">andrew.bell.ia@gmail.com</a>><br><b>Subject:<span class="Apple-converted-space"> </span></b>Re: [pdal] Trouble compiling PDAL with MATLAB Plugin on Mac OS<o:p></o:p></span></p></div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span style="font-size: 11pt;">Makes sense. I’ll debug on my end and report back when fixed.</span><o:p></o:p></div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span style="font-size: 11pt;"> </span><o:p></o:p></div><div id="mail-editor-reference-message-container"><div><div style="border-width: 1pt medium medium; border-style: solid none none; border-color: rgb(181, 196, 223) currentcolor currentcolor; border-image: none; padding: 3pt 0cm 0cm;"><p class="MsoNormal" style="margin: 0cm 0cm 12pt; font-size: 12pt; font-family: Aptos, sans-serif;"><b><span style="">From:<span class="Apple-converted-space"> </span></span></b><span style="">Andrew Bell <<a href="mailto:andrew.bell.ia@gmail.com" style="color: blue; text-decoration: underline;">andrew.bell.ia@gmail.com</a>><br><b>Date:<span class="Apple-converted-space"> </span></b>Monday, June 3, 2024 at 11:45</span><span style="font-family: Arial, sans-serif;"> </span><span style="">AM<br><b>To:<span class="Apple-converted-space"> </span></b>Patrick Rennich <<a href="mailto:patrick.rennich@aloftsensing.com" style="color: blue; text-decoration: underline;">patrick.rennich@aloftsensing.com</a>><br><b>Cc:<span class="Apple-converted-space"> </span></b><a href="mailto:karney@alum.mit.edu" style="color: blue; text-decoration: underline;">karney@alum.mit.edu</a><span class="Apple-converted-space"> </span><<a href="mailto:karney@alum.mit.edu" style="color: blue; text-decoration: underline;">karney@alum.mit.edu</a>>,<span class="Apple-converted-space"> </span><a href="mailto:pdal@lists.osgeo.org" style="color: blue; text-decoration: underline;">pdal@lists.osgeo.org</a><<a href="mailto:pdal@lists.osgeo.org" style="color: blue; text-decoration: underline;">pdal@lists.osgeo.org</a>>, Charles Karney <<a href="mailto:charles.karney@gmail.com" style="color: blue; text-decoration: underline;">charles.karney@gmail.com</a>><br><b>Subject:<span class="Apple-converted-space"> </span></b>Re: [pdal] Trouble compiling PDAL with MATLAB Plugin on Mac OS</span><o:p></o:p></p></div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;">This doesn't seem to have anything to do with PDAL, so I would do the normal debug process of making a simple reproducer. In this case that means using the most basic CMakeLists.txt that requires matlab and debug that. If you can recreate the error with something simple, you should be able to ask questions elsewhere to resolve the issue of go through it until you can figure it out.<o:p></o:p></div></div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"> <o:p></o:p></div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;">On Mon, Jun 3, 2024 at 11:07<span style="font-family: Arial, sans-serif;"> </span>AM Patrick Rennich via pdal <<a href="mailto:pdal@lists.osgeo.org" style="color: blue; text-decoration: underline;">pdal@lists.osgeo.org</a>> wrote:<o:p></o:p></div></div><blockquote style="border-width: medium medium medium 1pt; border-style: none none none solid; border-color: currentcolor currentcolor currentcolor rgb(204, 204, 204); border-image: none; padding: 0cm 0cm 0cm 6pt; margin: 5pt 0cm 5pt 4.8pt;"><div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span style="font-size: 11pt;">Thanks for the pointers. I pulled the latest FindMatlab.cmake from the cmake repository. This latest file has updates for Matlab 2024a which is what I’m using, but it doesn’t seem to help. I still get the same error.</span><o:p></o:p></div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span style="font-size: 11pt;"> </span><o:p></o:p></div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span style="font-size: 11pt; font-family: Calibri, sans-serif;">Patrick</span><o:p></o:p></div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span style="font-size: 11pt;"> </span><o:p></o:p></div><div id="m_-4873231953363652836mail-editor-reference-message-container"><div><div style="border-width: 1pt medium medium; border-style: solid none none; border-color: rgb(181, 196, 223) currentcolor currentcolor; border-image: none; padding: 3pt 0cm 0cm;"><p class="MsoNormal" style="margin: 0cm 0cm 12pt; font-size: 12pt; font-family: Aptos, sans-serif;"><b><span style="">From:<span class="Apple-converted-space"> </span></span></b><span style="">pdal <<a href="mailto:pdal-bounces@lists.osgeo.org" target="_blank" style="color: blue; text-decoration: underline;">pdal-bounces@lists.osgeo.org</a>> on behalf of Charles Karney via pdal <<a href="mailto:pdal@lists.osgeo.org" target="_blank" style="color: blue; text-decoration: underline;">pdal@lists.osgeo.org</a>><br><b>Date:<span class="Apple-converted-space"> </span></b>Monday, June 3, 2024 at 10:50</span><span style="font-family: Arial, sans-serif;"> </span><span style="">AM<br><b>To:<span class="Apple-converted-space"> </span></b><a href="mailto:pdal@lists.osgeo.org" target="_blank" style="color: blue; text-decoration: underline;">pdal@lists.osgeo.org</a><span class="Apple-converted-space"> </span><<a href="mailto:pdal@lists.osgeo.org" target="_blank" style="color: blue; text-decoration: underline;">pdal@lists.osgeo.org</a>><br><b>Cc:<span class="Apple-converted-space"> </span></b>Charles Karney <<a href="mailto:charles.karney@gmail.com" target="_blank" style="color: blue; text-decoration: underline;">charles.karney@gmail.com</a>><br><b>Subject:<span class="Apple-converted-space"> </span></b>Re: [pdal] Trouble compiling PDAL with MATLAB Plugin on Mac OS</span><o:p></o:p></p></div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span style="font-size: 11pt;">Note well that the error is occurring in find_library(Matlab REQUIRED)<br>before it gets to find_package. (But I don't know why find_library<br>is needed in addition to find_package.)<br><br>On 6/3/24 10:34, Howard Butler via pdal wrote:<br>> I also no longer have access to Matlab but I remember the Find logic<span class="Apple-converted-space"> </span><br>> being extra finicky on MacOS with the frameworks and weird OSXisms that<span class="Apple-converted-space"> </span><br>> are possible. It might also be worth it to track down a more recent<span class="Apple-converted-space"> </span><br>> FindMatlab.cmake file out there.<br>><span class="Apple-converted-space"> </span><br>>> On Jun 3, 2024, at 8:48</span><span style="font-size: 11pt; font-family: Arial, sans-serif;"> </span><span style="font-size: 11pt;">AM, Andrew Bell via pdal<br>>> <<a href="mailto:pdal@lists.osgeo.org" target="_blank" style="color: blue; text-decoration: underline;">pdal@lists.osgeo.org</a>> wrote:<br>>><br>>> I have no access to Matlab and I don't know who does at this point.<br>>><br>>> Looking at the FindMatlab file, you might try just setting<span class="Apple-converted-space"> </span><br>>> Matlab_ROOT_DIR and lose the defines for the specific libraries. :shrug:<br>>><br>>> On Mon, Jun 3, 2024 at 9:41</span><span style="font-size: 11pt; font-family: Arial, sans-serif;"> </span><span style="font-size: 11pt;">AM Patrick Rennich via pdal<br>>> <<a href="mailto:pdal@lists.osgeo.org" target="_blank" style="color: blue; text-decoration: underline;">pdal@lists.osgeo.org</a><span class="Apple-converted-space"> </span><<a href="mailto:pdal@lists.osgeo.org" target="_blank" style="color: blue; text-decoration: underline;">mailto:pdal@lists.osgeo.org</a>>> wrote:<br>>><br>>> Hello,____<br>>><br>>> ____<br>>><br>>> I’m having trouble compiling PDAL from source on Mac OS when<br>>> turning on the BUILD_MATLAB_PLUGIN=ON. PDAL compiles fine without<br>>> this, but when I execute cmake as follows:____<br>>><br>>> ____<br>>><br>>> cmake -G Ninja -DBUILD_PLUGIN_MATLAB=ON<br>>> -DMatlab_MX_LIBRARY=/Applications/MATLAB_R2024a.app/bin/maca64<br>>> -DMatlab_MAT_LIBRARY=/Applications/MATLAB_R2024a.app/bin/maca64<br>>> -DMatlab_ENG_LIBRARY=/Applications/MATLAB_R2024a.app/bin/maca64<br>>> -DMatlab_INCLUDE_DIRS=/Applications/MATLAB_R2024a.app/extern/include ..____<br>>><br>>> ____<br>>><br>>> I get the following error message:____<br>>><br>>> ____<br>>><br>>> CMake Error at cmake/matlab.cmake:4 (find_library):____<br>>><br>>> Could not find Matlab using the following names:____<br>>><br>>> Call Stack (most recent call first):____<br>>><br>>> plugins/matlab/CMakeLists.txt:3 (include)____<br>>><br>>> ____<br>>><br>>> Let me know if there’s any other info I can provide, and any help<br>>> is much appreciated. Thanks.____<br>>><br>>> __ __<br>>><br>>> __ __<br>>><br>>> Patrick<br>_______________________________________________<br>pdal mailing list<br><a href="mailto:pdal@lists.osgeo.org" target="_blank" style="color: blue; text-decoration: underline;">pdal@lists.osgeo.org</a><br><a href="https://lists.osgeo.org/mailman/listinfo/pdal" target="_blank" style="color: blue; text-decoration: underline;">https://lists.osgeo.org/mailman/listinfo/pdal</a></span><o:p></o:p></div></div></div></div></div></div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;">_______________________________________________<br>pdal mailing list<br><a href="mailto:pdal@lists.osgeo.org" target="_blank" style="color: blue; text-decoration: underline;">pdal@lists.osgeo.org</a><br><a href="https://lists.osgeo.org/mailman/listinfo/pdal" target="_blank" style="color: blue; text-decoration: underline;">https://lists.osgeo.org/mailman/listinfo/pdal</a><o:p></o:p></div></div></blockquote></div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><br clear="all"><o:p></o:p></div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"> <o:p></o:p></div></div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span class="gmailsignatureprefix">--<span class="Apple-converted-space"> </span></span><o:p></o:p></div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;">Andrew Bell<br><a href="mailto:andrew.bell.ia@gmail.com" target="_blank" style="color: blue; text-decoration: underline;">andrew.bell.ia@gmail.com</a><o:p></o:p></div></div></div></div></div></div></div></div><span style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 18px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;">_______________________________________________</span><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 18px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;"><span style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 18px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;">pdal mailing list</span><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 18px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;"><a href="mailto:pdal@lists.osgeo.org" style="color: blue; text-decoration: underline; font-family: Helvetica; font-size: 18px; font-style: normal; font-variant-caps: normal; font-weight: 400; 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;">pdal@lists.osgeo.org</a><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 18px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;"><a href="https://lists.osgeo.org/mailman/listinfo/pdal" style="color: blue; text-decoration: underline; font-family: Helvetica; font-size: 18px; font-style: normal; font-variant-caps: normal; font-weight: 400; 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;">https://lists.osgeo.org/mailman/listinfo/pdal</a><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 18px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;"></div></blockquote></div><br></div></body></html>