New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[WIP] --How to handle Windows 32 and 64 bit externals #40
Comments
That could be extended to Linux as well. Also see issue #30. We could set 'alternative extensions' (where available) as the default to facilitate 'fat libraries'. I guess that people will frown upon such a decision though. |
|
yes, it should be handled (consistently) on all platforms, at least those that don't natively support fat binaries (everything but OSX). @katja i'm not sure abut which part of which decision people would frown upon. |
|
Although I like the idea of changing file extension I believe we are going to clash with other [external] resources. For example the pthread implementation of Msys2 has the same name for w32 and w64: “libwinpthread-1.dll” and we are going to find same clash with other dependencies. Eg: Even if we had:
Would be nice to test if a simple rename of a dll extension will effectivly allow this file to be called (windows auto-magic?). Will try to test but I’m expecting negative results. |
|
no, you cannot just rename Pd manually does special handling of the extensions, but the windows dependency resolution will not. |
|
How horrible will be if Pd adds w64 to the search path. trying cyclone/coll.dll ...not found |
|
very horrible. |
|
Obviously is not true as it will be there and it will be found but incompatible. : ( |
|
Are you sure is "very horrible"? |
|
yes: very |
|
So I guess users that wants 32 & 64 versions of Pd to coexist should do their appropriate |
|
well, they could install the 32bit externals into the system-specific path ( |
|
Good solution. Will test asap... : ) |
|
i'd rather say its a somewhat sane hack (but far from a good solution) |
Quoting @umlaeute as in https://lists.puredata.info/pipermail/pd-dev/2015-02/020082.html:
I'm not personally opposed to the 'carnival of extensions' (quoting Miller in the same mailing list thread). It is very useful for projects where you want to supply binaries for 'all' platforms. |
After thinking about this a bit more, the following 'test phase arrangement' came to mind:
This is a relatively safe arrangement with many advantages, most important of which is: no spurious incompatibilities with Pd's and externals already around. I've seen people puzzled and frustrated about Pd-double which was distributed a few years ago with many non-functional externals. This has done more harm than good to Pd's reputation. Especially for the sake of Pd beginners, this history must not be repeated. The only thing is, such a 'test phase arrangement' runs ahead of Miller's decision about proposed changes. |
anyhow, the good thing about the 32bit vs 64bit thingee is, that it is simply not possible to load a 32bit dll with a 64bit host - which is somewhat different from the Pd-double experience where externals would load but crash. also, i hope that the few people will have both 32bit and 64bit installations at the same time, leaving little room for much confusion (though this will most likely not be true in the near future) |
Yes futile as such, but on the other hand consider the following: since Miller doesn't distribute 64 bit binaries for Windows yet, those that will circulate coming months will be 'inofficial' anyhow. To support extension I'm just brainstorming aloud, not saying this would solve all trouble or is worth the effort. Of course anyone can still distribute 64 bit .dll even when |
I had also brainstormed the fact that foo.m_amd64 might need to load pthread.dll or any other compiled lib eg: ogglib.dll, mp3lib.dll or whateverlib.dll. Those dll will clash if they are on the same folder (being impossible to have both.) I think is better to keep the .dll extension. There are many [externals] that call other dlls and there's no solution for that. |
|
small update:
|
but there are, so this makes conflicts if 32 and 64 dlls are in the same folder. I have nothing against |
|
With no benefit I mean we can't ship 32 and 64 externals on the same folder. we can have: but here we get stuck as different runtime archs have the same name. : |
|
after re-thinking this, i think that the only way to resolve multi-arch dependencies in a generic way is to add architecture-specific "dll-paths" to Pd's loading mechanism (with "dll-path" i mean the path searched for dependency dlls of an external; not to be confused with Pd's "search-path") e.g. when loading an external on Windows, there is nothing that pd-lib-builder can do about it. on linux, we could use i'm afraid that by the time an updated Pd that has arch-specific search-paths has come into wide-spread use (it's not going to be Pd-0.49-0; maybe Pd-0.49-1 but more likely Pd-0.50; then add something like 3 years of grace period), the problem will be much less of an issue than it is now. |
this is just wrong for >75% of all Windows packages available via deken, as they don't need any external dlls. of the remaining packages (those with some .dll that are not an external but support libraries), some are just outdated/legacy ( of the rest, I think about 5 have so far switched to pd-lib-builder (or are likely to do a switch in the near future, like so any solution might just be over-engineering. |
This sounds very good for the Windows dll hell. |
Extracted from @umlaeute @ #38 :
that problem only exists if somebody wants to use both 32bit and 64bit Pds on the same machine.
in theory Pd already has a mechanism to care for this: use a different filename extension for each platform/architecture. e.g. on linux we use .pd_linux instead of the (more standard) .so.
on w32 we could already use
.m_i386instead of the (more standard).dll. so far nobody has adopted to this. also there currently isn't a.m_amd64searched for on w64.so, i think:
.m_i386extension instead of.dll.dllas the extensionthat's probably a much better scheme than using different paths for different architectures, as it allows a single deken-external to contain multiple architectures.
The text was updated successfully, but these errors were encountered: