fluid-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [fluid-dev] making a standalone fluidsynth plugin on Mac


From: Ebrahim Mayat
Subject: Re: [fluid-dev] making a standalone fluidsynth plugin on Mac
Date: Mon, 26 Mar 2012 08:10:52 -0400


On Mar 25, 2012, at 5:48 PM, Antoine Schmitt wrote:

Hi list,
coming back on this. I stippped down my dependencies, and now my Xtra only depends on glib and gthread.
But now I am stuck again, trying to not depend on these shlibs.
- I used Sven install_name_tool idea, which seems to work and load the locally copied shlibs, but then it crashes my app at runtime, with the error : 25/03/12 23:29:32 [0x0-0x1514513].com.adobe.director.application[47865] GLib-ERROR **: The thread system is not yet initialized.
I have found no lead on the net to understand what this means.
- I tried compiling the glib static library by hand from the sources, in order to ba able to statically link against it, and this really became a small hell, with dependencies on libffi then gettext which required compiling them, which required new dependencies... And so on. I tried to find a way with fink to compile the static version but did not find any. I also tried to remove fink (which is really complex — sorry Ebrahim), and use homebrew, which is much simpler, but same problem : no way to have them compile the static version of glib.
Now I am stuck. Any idea ?

Hello Antoine

It seems like you could be running into the problem of cyclic dependencies though I hope that this is not the case (see below).

The dependencies for glib2 are the following . . .

$ fink show-deps glib2
Information about 12757 packages read in 2 seconds.

Package: glib2 (2.12.0-103)
To install the compiled package...
The following other packages (and their dependencies) must be installed:
    glib2-shlibs (>= 2.12.0-103)
  The following other packages must not be installed:
    glib2-common
To compile this package from source...
  The following packages are also compiled at the same time:
    glib2-shlibs (2.12.0-103)
    glib2-dev (2.12.0-103)
The following other packages (and their dependencies) must be installed:
    gettext-bin
    gettext-tools
    libgettext3-dev
    libgettext3-shlibs
    libiconv
    libiconv-dev
    pkgconfig (>= 0.15.0-2)
    xdg-base
  The following other packages must not be installed:
    [none]

. . . and for libgettext3-dev

$ fink show-deps libgettext3-dev
Information about 12757 packages read in 3 seconds.

Package: libgettext3-dev (0.14.5-4)
To install the compiled package...
The following other packages (and their dependencies) must be installed:
    gettext-bin (>= 0.14.5-4)
    libgettext3-shlibs (= 0.14.5-4)
  The following other packages must not be installed:
    gettext-dev
    libgettext8-dev
To compile this package from source...
  The following packages are also compiled at the same time:
    libgettext3-shlibs (0.14.5-4)
    gettext-bin (0.14.5-4)
    gettext-doc (0.14.5-4)
The following other packages (and their dependencies) must be installed:
    base-files
    fink (>= 0.24.12)
    libiconv
    libiconv-bin
    libiconv-dev
  The following other packages must not be installed:
    [none]

I don't see libffi in the dependency list for neither glib2 nor libgettext2-dev.

What I may suggest is that

1. You get the sources for the respective dependencies using a command like

$ fink fetch PACKAGE or even directly from the URLs of the respective packages

2. Compile the sources with flags like --enable-static (if configure scripts come with the sources) or any equivalent if build scripts for other build systems come with the source code. If you have problems compiling any of these dependencies, you could always (where they exist) manually apply the respective fink patch files prior to compilation.

3. Use an INSTALL_PATH different from /sw, /usr or /usr/local. You could try something like ~/Desktop for example.

4. When you compile your plug-in, you would then link with the ~/ Desktop/lib directory.

If I remember correctly, libffi is the foreign function interface that can be used if you want to interface your programming language implementation (Perl, Ruby etc.) with "foreign" functions and libraries written in a "foreign" language like C used for fluidsynth. In your case, I imagine that you need libffi for implementing your plug-in.

You could use any distribution that you are comfortable with when applying the above suggestions :-) (Some people I know prefer Gentoo, others prefer Fedora or Ubuntu . . . in the same way that some people prefer fink, while others prefer MacPorts and still others like homebrew. Each distribution has its unique merits.)

Best wishes for your progress and the successful completion of your project.
E




reply via email to

[Prev in Thread] Current Thread [Next in Thread]