[PD] Help with window error loading sfont~ external

Christof Ressi info at christofressi.com
Sun Jan 1 11:16:43 CET 2023


Hi Alex,

happy new year!

I have recently experienced the same issue! I am also using zexy and for 
some reason [sfont~] would only load if [sfont~] loaded /before /zexy. 
Here's a hacky solution:

[declare -lib else/sfont~ -lib zexy]

---

I think the reason for such problems is this:

Plugin A and plugin B both link dynamically to third-party library C.

A and B ship their own versions of C (C-a and C-b)

If A is loaded first, C-a is loaded into memory and B will try to use C-a.

If B is loaded first, C-b is loaded into memory and A will try to use C-b.

This is ok if C-a and C-b are compatible, but it leads to problems if 
they are not.

That's why /plugins /should be linked statically whenever possible, 
because they cannot know which modules have already been loaded. (The 
only big exception is when plugins are distributed via package managers, 
since the latter are responsible for managing dependencies.)

---

In this particular case, the problem is the following:

Both zexy and libfluidsynth link against libintl-8; zexy wants to import 
"libintl_gettext", libfluidsynth wants to import "DllMain". However, the 
libintl-8 version shipped with zexy does not export "DllMain", so 
libfluidsynth won't load.

If I replace zexy's libintl-8 with else's libintl-8, both objects load 
correctly, regardless of which is loaded first.

Actually, I don't really understand why libfluidsynth's libintl-8 
exports "DllMain" in the first place and why libfluidsynth wants to 
import it... According to the output of Dependencies, it does not seem 
to call any other function (see attachment).

Christof

On 31.12.2022 21:14, Alexandre Torres Porres wrote:
> Hi everybody! There's this issue we're having a hard time 
> troubleshooting and I hope Windows and Pd experts can help figuring 
> this out!
>
> So, a user is having issues loading the [sfont~] object from ELSE in 
> Pd on Windows, even though me and others cannot reproduce the error. 
> When trying to create the object, he gets:
>
> H:\JOE-W10\Documents\Pd\externals\else\sfont~.m_amd64: La procédure 
> spécifiée est introuvable (/The specified procedure is not found/).
> (127)
>  sfont~
> ...couldn't create
>
> An error window also pops up and says:
>
> "_Entry point not found _
> _The DllMain procedure entry point is not found in the dynamic link 
> library _
> _H:\JOE-W10\Documents\Pd\externals\libfluidsynth-3.w64._"
>
> I don't know what this error means and why me and others don't get 
> this error!
>
> Of course we did troubleshoot installation and everything but we still 
> can't figure it out and I have ZERO experience with windows.
>
> It is important to note that the user reports he can use PlugData 
> which carries ELSE and the object works just fine. The similar 
> [fluid~] object (equally based on FluidSynth like sfont~) also works 
> when used in the PurrData installation, but the user is also having 
> problems loading fuild~ in Vanilla.
>
> A screenshot and further discussion is found here 
> https://github.com/porres/pd-else/issues/1405#issuecomment-1368250330
>
> Thanks
> Alex
>
> AND HAPPY 2023!!!!
>
>
>
> _______________________________________________
> Pd-list at lists.iem.at  mailing list
> UNSUBSCRIBE and account-management ->https://lists.puredata.info/listinfo/pd-list
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20230101/6ba0c575/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: libintl-8.png
Type: image/png
Size: 167513 bytes
Desc: not available
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20230101/6ba0c575/attachment-0001.png>


More information about the Pd-list mailing list