[PD-dev] 64-bit vs 32-bit info

IOhannes m zmölnig zmoelnig at iem.at
Thu May 28 20:53:13 CEST 2020


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:
> [deken] Platform detected: Linux-x86_64-float32
> [deken] Platform re-detected: Linux-amd64-float32

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:
> I have some cross-platform CPU architecture detection code which I code
> port to Pd, so that we could have more descriptive error messages.

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:
> failed to load foo.dll (the library is 32bit, but Pd is a 64bit process)

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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <http://lists.puredata.info/pipermail/pd-dev/attachments/20200528/be4e4d98/attachment.sig>


More information about the Pd-dev mailing list