<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:Helvetica;
        panose-1:0 0 0 0 0 0 0 0 0 0;}
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Aptos;
        panose-1:2 11 0 4 2 2 2 2 2 4;}
@font-face
        {font-family:"Aptos Mono";
        panose-1:2 11 0 9 2 2 2 2 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        font-size:12.0pt;
        font-family:"Aptos",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
        {mso-style-priority:34;
        mso-margin-top-alt:auto;
        margin-right:0cm;
        mso-margin-bottom-alt:auto;
        margin-left:0cm;
        font-size:12.0pt;
        font-family:"Aptos",sans-serif;}
span.apple-converted-space
        {mso-style-name:apple-converted-space;}
span.gmailsignatureprefix
        {mso-style-name:gmailsignatureprefix;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;
        mso-ligatures:none;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
/* List Definitions */
@list l0
        {mso-list-id:34962938;
        mso-list-template-ids:1576017628;}
@list l0:level1
        {mso-level-tab-stop:36.0pt;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l0:level2
        {mso-level-tab-stop:72.0pt;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l0:level3
        {mso-level-tab-stop:108.0pt;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l0:level4
        {mso-level-tab-stop:144.0pt;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l0:level5
        {mso-level-tab-stop:180.0pt;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l0:level6
        {mso-level-tab-stop:216.0pt;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l0:level7
        {mso-level-tab-stop:252.0pt;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l0:level8
        {mso-level-tab-stop:288.0pt;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l0:level9
        {mso-level-tab-stop:324.0pt;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l1
        {mso-list-id:1264074731;
        mso-list-template-ids:-873823140;}
ol
        {margin-bottom:0cm;}
ul
        {margin-bottom:0cm;}
--></style>
</head>
<body lang="EN-US" link="blue" vlink="purple" style="word-wrap:break-word;line-break:after-white-space">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt">Happy to do it, but I may need a bit of hand holding. I’m not a software developer or computer scientist, and I’ve never done a “pull request” before. I’ve just now read up on the Contributing and Pull Requests
 pages, so I’ll make a topic branch and then go from there…<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">Patrick</span><span style="font-size:11.0pt"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<div id="mail-editor-reference-message-container">
<div>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal" style="margin-bottom:12.0pt"><b><span style="color:black">From:
</span></b><span style="color:black">Howard Butler <howard@hobu.co><br>
<b>Date: </b>Tuesday, June 4, 2024 at 11:05</span><span style="font-family:"Arial",sans-serif;color:black"> </span><span style="color:black">AM<br>
<b>To: </b>Patrick Rennich <patrick.rennich@aloftsensing.com><br>
<b>Cc: </b>pdal@lists.osgeo.org <pdal@lists.osgeo.org><br>
<b>Subject: </b>Re: [pdal] Trouble compiling PDAL with MATLAB Plugin on Mac OS<o:p></o:p></span></p>
</div>
<p class="MsoNormal">Patrick,</p>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">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.</p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Howard</p>
<div>
<p class="MsoNormal"><br>
<br>
</p>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<div>
<p class="MsoNormal">On Jun 4, 2024, at 10:00<span style="font-family:"Arial",sans-serif"> </span>AM, Patrick Rennich via pdal <pdal@lists.osgeo.org> wrote:</p>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt">Ok, so here’s what I had to do to get things to compile with BUILD_PLUGIN_MATLAB=ON on macOS:</span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt"> </span></p>
</div>
<ol style="margin-top:0cm" start="1" type="1">
<li class="MsoListParagraph" style="margin-top:0cm;margin-bottom:0cm;mso-list:l0 level1 lfo3">
<span style="font-size:11.0pt">In matlab.cmake, I commented out the<span class="apple-converted-space"> </span></span><span style="font-size:11.0pt;font-family:"Aptos Mono"">find_library(Matlab REQUIRED)<span class="apple-converted-space"> </span></span><span style="font-size:11.0pt">directive.</span><o:p></o:p></li><li class="MsoListParagraph" style="margin-top:0cm;margin-bottom:0cm;mso-list:l0 level1 lfo3">
<span style="font-size:11.0pt">Replaced FindMatlab.cmake with the latest version from</span><a href="https://github.com/Kitware/CMake/"><span style="font-size:11.0pt">https://github.com/Kitware/CMake/</span></a><o:p></o:p></li><li class="MsoListParagraph" style="margin-top:0cm;margin-bottom:0cm;mso-list:l0 level1 lfo3">
<span style="font-size:11.0pt">Added FindPackageHandleStandardArgs.cmake and FindPackageMessage.cmake also from<span class="apple-converted-space"> </span></span><a href="https://github.com/Kitware/CMake/"><span style="font-size:11.0pt">https://github.com/Kitware/CMake/</span></a><o:p></o:p></li></ol>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt"> </span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt">The command<span class="apple-converted-space"> </span></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt"> </span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Aptos Mono"">% cmake -G Ninja -DBUILD_PLUGIN_MATLAB=ON ..</span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt"> </span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt">now finds and configures things properly, and<span class="apple-converted-space"> </span></span><span style="font-size:11.0pt;font-family:"Aptos Mono"">ninja</span><span class="apple-converted-space"><span style="font-size:11.0pt"> </span></span><span style="font-size:11.0pt">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.</span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt"> </span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt">Success!</span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt"> </span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">Patrick</span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt"> </span></p>
</div>
<div id="mail-editor-reference-message-container">
<div>
<div style="border:none;border-top:solid windowtext 1.0pt;padding:3.0pt 0cm 0cm 0cm;border-color:currentcolor currentcolor">
<p class="MsoNormal" style="margin-bottom:12.0pt"><b>From:<span class="apple-converted-space"> </span></b>Patrick Rennich <<a href="mailto:patrick.rennich@aloftsensing.com">patrick.rennich@aloftsensing.com</a>><br>
<b>Date:<span class="apple-converted-space"> </span></b>Monday, June 3, 2024 at 11:55<span style="font-family:"Arial",sans-serif"> </span>AM<br>
<b>To:<span class="apple-converted-space"> </span></b><a href="mailto:pdal@lists.osgeo.org">pdal@lists.osgeo.org</a><span class="apple-converted-space"> </span><<a href="mailto:pdal@lists.osgeo.org">pdal@lists.osgeo.org</a>><br>
<b>Cc:<span class="apple-converted-space"> </span></b><a href="mailto:karney@alum.mit.edu">karney@alum.mit.edu</a><span class="apple-converted-space"> </span><<a href="mailto:karney@alum.mit.edu">karney@alum.mit.edu</a>>, Charles Karney <<a href="mailto:charles.karney@gmail.com">charles.karney@gmail.com</a>>,
 Andrew Bell <<a href="mailto:andrew.bell.ia@gmail.com">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></p>
</div>
<div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt">Makes sense. I’ll debug on my end and report back when fixed.</span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt"> </span></p>
</div>
<div id="mail-editor-reference-message-container">
<div>
<div style="border:none;border-top:solid windowtext 1.0pt;padding:3.0pt 0cm 0cm 0cm;border-color:currentcolor currentcolor">
<p class="MsoNormal" style="margin-bottom:12.0pt"><b>From:<span class="apple-converted-space"> </span></b>Andrew Bell <<a href="mailto:andrew.bell.ia@gmail.com">andrew.bell.ia@gmail.com</a>><br>
<b>Date:<span class="apple-converted-space"> </span></b>Monday, June 3, 2024 at 11:45<span style="font-family:"Arial",sans-serif"> </span>AM<br>
<b>To:<span class="apple-converted-space"> </span></b>Patrick Rennich <<a href="mailto:patrick.rennich@aloftsensing.com">patrick.rennich@aloftsensing.com</a>><br>
<b>Cc:<span class="apple-converted-space"> </span></b><a href="mailto:karney@alum.mit.edu">karney@alum.mit.edu</a><span class="apple-converted-space"> </span><<a href="mailto:karney@alum.mit.edu">karney@alum.mit.edu</a>>,<span class="apple-converted-space"> </span><a href="mailto:pdal@lists.osgeo.org">pdal@lists.osgeo.org</a><<a href="mailto:pdal@lists.osgeo.org">pdal@lists.osgeo.org</a>>,
 Charles Karney <<a href="mailto:charles.karney@gmail.com">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<o:p></o:p></p>
</div>
<div>
<div>
<p class="MsoNormal">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.</p>
</div>
</div>
<div>
<p class="MsoNormal"> </p>
</div>
<div>
<div>
<div>
<p class="MsoNormal">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">pdal@lists.osgeo.org</a>> wrote:<o:p></o:p></p>
</div>
</div>
<blockquote style="border:none;border-left:solid windowtext 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-top:5.0pt;margin-right:0cm;margin-bottom:5.0pt;border-color:currentcolor currentcolor currentcolor rgb(204,204,204)">
<div>
<div>
<div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt">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></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt"> </span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">Patrick</span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt"> </span></p>
</div>
<div id="m_-4873231953363652836mail-editor-reference-message-container">
<div>
<div style="border:none;border-top:solid windowtext 1.0pt;padding:3.0pt 0cm 0cm 0cm;border-color:currentcolor currentcolor">
<p class="MsoNormal" style="margin-bottom:12.0pt"><b>From:<span class="apple-converted-space"> </span></b>pdal <<a href="mailto:pdal-bounces@lists.osgeo.org" target="_blank">pdal-bounces@lists.osgeo.org</a>> on behalf of Charles Karney via pdal <<a href="mailto:pdal@lists.osgeo.org" target="_blank">pdal@lists.osgeo.org</a>><br>
<b>Date:<span class="apple-converted-space"> </span></b>Monday, June 3, 2024 at 10:50<span style="font-family:"Arial",sans-serif"> </span>AM<br>
<b>To:<span class="apple-converted-space"> </span></b><a href="mailto:pdal@lists.osgeo.org" target="_blank">pdal@lists.osgeo.org</a><span class="apple-converted-space"> </span><<a href="mailto:pdal@lists.osgeo.org" target="_blank">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">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<o:p></o:p></p>
</div>
<div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt">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:11.0pt;font-family:"Arial",sans-serif"> </span><span style="font-size:11.0pt">AM, Andrew Bell via pdal<br>
>> <</span><a href="mailto:pdal@lists.osgeo.org" target="_blank"><span style="font-size:11.0pt">pdal@lists.osgeo.org</span></a><span style="font-size:11.0pt">> 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:11.0pt;font-family:"Arial",sans-serif"> </span><span style="font-size:11.0pt">AM Patrick Rennich via pdal<br>
>> <</span><a href="mailto:pdal@lists.osgeo.org" target="_blank"><span style="font-size:11.0pt">pdal@lists.osgeo.org</span></a><span class="apple-converted-space"><span style="font-size:11.0pt"> </span></span><span style="font-size:11.0pt"><</span><a href="mailto:pdal@lists.osgeo.org" target="_blank"><span style="font-size:11.0pt">mailto:pdal@lists.osgeo.org</span></a><span style="font-size:11.0pt">>>
 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>
</span><a href="mailto:pdal@lists.osgeo.org" target="_blank"><span style="font-size:11.0pt">pdal@lists.osgeo.org</span></a><span style="font-size:11.0pt"><br>
</span><a href="https://lists.osgeo.org/mailman/listinfo/pdal" target="_blank"><span style="font-size:11.0pt">https://lists.osgeo.org/mailman/listinfo/pdal</span></a></p>
</div>
</div>
</div>
</div>
</div>
</div>
<div>
<p class="MsoNormal">_______________________________________________<br>
pdal mailing list<br>
<a href="mailto:pdal@lists.osgeo.org" target="_blank">pdal@lists.osgeo.org</a><br>
<a href="https://lists.osgeo.org/mailman/listinfo/pdal" target="_blank">https://lists.osgeo.org/mailman/listinfo/pdal</a></p>
</div>
</div>
</blockquote>
</div>
<div>
<p class="MsoNormal"><br clear="all">
</p>
</div>
<div>
<div>
<p class="MsoNormal"> </p>
</div>
</div>
<div>
<p class="MsoNormal"><span class="gmailsignatureprefix">--</span><span class="apple-converted-space"> </span></p>
</div>
<div>
<div>
<p class="MsoNormal">Andrew Bell<br>
<a href="mailto:andrew.bell.ia@gmail.com" target="_blank">andrew.bell.ia@gmail.com</a></p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<p class="MsoNormal"><span style="font-size:13.5pt;font-family:Helvetica">_______________________________________________<br>
pdal mailing list<br>
</span><a href="mailto:pdal@lists.osgeo.org"><span style="font-size:13.5pt;font-family:Helvetica">pdal@lists.osgeo.org</span></a><span style="font-size:13.5pt;font-family:Helvetica"><br>
</span><a href="https://lists.osgeo.org/mailman/listinfo/pdal"><span style="font-size:13.5pt;font-family:Helvetica">https://lists.osgeo.org/mailman/listinfo/pdal</span></a></p>
</div>
</blockquote>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</div>
</div>
</div>
</body>
</html>