<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p>
      <blockquote type="cite">
        <pre class="moz-quote-pre" wrap="">the more complicated part is the first one, as it requires to actually
open the file that dlopen()/LoadLibrary() could not open and inspect the
binary data to understand the architecture of the blob.
</pre>
      </blockquote>
      Yes, but I already have the code (I wrote it for [vstplugin~]).
      It's ~300 lines of C++, I just have to port it to C.</p>
    <p><a class="moz-txt-link-freetext" href="https://git.iem.at/pd/vstplugin/-/blob/master/vst/Plugin.cpp#L352">https://git.iem.at/pd/vstplugin/-/blob/master/vst/Plugin.cpp#L352</a><br>
    </p>
    <p>It maybe overkill, though. Dunno...</p>
    <p>Christof<br>
    </p>
    <div class="moz-cite-prefix">On 28.05.2020 20:53, IOhannes m zmölnig
      wrote:<br>
    </div>
    <blockquote type="cite"
      cite="mid:4eacc13b-a8f0-16dc-1f35-3e3372095486@iem.at">
      <pre class="moz-quote-pre" wrap="">to answer martin's question: deken will print platform information at
startup time, albeit the printout is only visible if you raise the
verbosity in the Pd-console.

something like:
</pre>
      <blockquote type="cite">
        <pre class="moz-quote-pre" wrap="">[deken] Platform detected: Linux-x86_64-float32
[deken] Platform re-detected: Linux-amd64-float32
</pre>
      </blockquote>
      <pre class="moz-quote-pre" wrap="">
this is basically the information you asked for, with a few caveats:
- if you clear the Pd-console, the printouts are gone.
- there's some naming inconsistency (e.g. in the example above you see
both "amd64" and "x86_64" which is really the same.
- it might be confusing to see *two* lines with essentially the same
information.

the first line is the result of an architecture detection on the
GUI-side. however, the GUI might have a *different* architecture than
the Pd-core (and the latter matters when it comes to loading externals).
therefore the Pd-core sends its architecture to the GUI as well,
triggering the 2nd output.

i guess the printout could be improved, i'm open to suggestions.

On 5/28/20 7:22 PM, Christof Ressi wrote:
</pre>
      <blockquote type="cite">
        <pre class="moz-quote-pre" wrap="">I have some cross-platform CPU architecture detection code which I code
port to Pd, so that we could have more descriptive error messages.
</pre>
      </blockquote>
      <pre class="moz-quote-pre" wrap="">
hmm, i don't think *that* is the problem here.
it's quite clear which binaries Pd can load at compile time (as is
reported by the 2nd line in the deken initialisation; see above)


but i think your idea is to improve the error message along the lines of:
</pre>
      <blockquote type="cite">
        <pre class="moz-quote-pre" wrap="">failed to load foo.dll (the library is 32bit, but Pd is a 64bit process)
</pre>
      </blockquote>
      <pre class="moz-quote-pre" wrap="">
the trivial part is the 2nd one ("this Pd is 64bit").
the more complicated part is the first one, as it requires to actually
open the file that dlopen()/LoadLibrary() could not open and inspect the
binary data to understand the architecture of the blob.

the deken cmdline utility can do this, but it utilizes several
specialized libraries for the task.
i think embedding such libraries into Pd would be an overkill for the
problem.

mgasf
IOhannes

</pre>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <pre class="moz-quote-pre" wrap="">_______________________________________________
Pd-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Pd-dev@lists.iem.at">Pd-dev@lists.iem.at</a>
<a class="moz-txt-link-freetext" href="https://lists.puredata.info/listinfo/pd-dev">https://lists.puredata.info/listinfo/pd-dev</a>
</pre>
    </blockquote>
  </body>
</html>