#20 Sun Studio needs explicit linking


The Sun Studio compiler can only link audacity if it explicitely links in the GTK libraries when linking audacity. Otherwise the linker complains about symbols not found.

The attached patch shows that adding `pkg-config --libs gtk+-2.0` to the link statement fixes this problem.

This probably isn't the right fix, though. It would be better to just check pkg-config in the configure script and add something like $(GTK_LIBS) here.

I can provide a patch that works this way if you need help doing this.


  • Richard Ash

    Richard Ash - 2008-03-16

    Logged In: YES
    Originator: NO

    What has GTK symbols in it but isn't providing the correct dependent libraries to audacity? This is probably really a problem with the output of something else's pkg-config file or similar, because audacity itself shouldn't be using GTK directly. Almost certainly they are used in some library, in which case we ought to get the GTK library flags from there, in case it has used a specific (non-standard) version of GTK when it was built, we shouldn't assume that the one pkg-config gives us is right. It may be that library concerned isn't outputting the right library flags, or we aren't adding them in the right places.

  • Brian Cameron

    Brian Cameron - 2008-03-18

    Logged In: YES
    Originator: YES

    Looking at the error logs, when I do not apply this patch, I see a ton of errors that look like this. So it seems audacity links in FileDialog, which links in GTK+. I'm not sure if it is possible to add the GTK+ linker flags when building the FileDialog library or not. If so, this might fix the problem. Or perhaps the configure file could check if you are going to link in FileDialog and know it needs to add the gtk libs when linking audacity when this is the case. What do you think?

    gtk_expander_set_expanded ../lib-src/FileDialog.a(FileDialogPrivate.o) (symbol belongs to implicit dependency /usr/lib/libgtk-x11-2.0.so.0)
    gtk_file_chooser_set_select_multiple ../lib-src/FileDialog.a(FileDialogPrivate.o) (symbol belongs to implicit dependency /usr/lib/libgtk-x11-2.0.so.0)


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.

No, thanks