View Issue Details

IDProjectCategoryView StatusLast Update
0014518LazarusWidgetsetpublic2011-12-01 11:22
ReporterPhil Assigned ToVincent Snijders  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
PlatformMac PowerPCOSOS X 
Product Version0.9.27 (SVN) 
Target Version0.9.28Fixed in Version0.9.28 
Summary0014518: Can't compile against Gimp's GTK2 anymore
DescriptionFollowing instructions here:

http://wiki.lazarus.freepascal.org/GTK2_Interface#Using_the_GTK2_libraries_included_with_Gimp

Now gives this link error with 0.9.27:

/usr/bin/ld: Undefined symbols:
_g_thread_init
An error occurred while linking

Previously this worked fine with 0.9.26.

Thanks.

-Phil
TagsNo tags attached.
Fixed in Revision21599,21600
LazTarget0.9.28
WidgetsetGTK 2
Attached Files

Relationships

related to 0014533 closedVincent Snijders FPC Can't compile against Gimp's GTK2 anymore 

Activities

Phil

2009-09-07 07:44

reporter   ~0030499

I found a workaround for linking against the Gimp GTK2 libraries by inserting -k'-lgthread-2.0' in the FPC gimplib.cfg file. I think this is due to an FPC 2.2.4 bug. Looking at glib2.pas, it appears to be missing the usual {$ifdef darwin} and $linklib lines at the top of the file in the OS dependent defines. See the top of gtk2.pas by comparison.

This bug report can probably be moved over to FPC.

Has anyone tested GTK2 on Mac with FPC 2.2.4?

Thanks.

-Phil

Vincent Snijders

2009-09-07 12:55

manager   ~0030509

Thanks for your analysis.

Vincent Snijders

2009-09-07 13:56

manager   ~0030510

For fpc 2.2.4 a fix has been committed in r21599 and 21600.

Would adding some default gtk2 linker flags from fink hurt your setup to compile with gtk2 from gimp?
See patch below:
Index: ide/compileroptions.pp
===================================================================
--- ide/compileroptions.pp (revision 21598)
+++ ide/compileroptions.pp (working copy)
@@ -750,7 +750,11 @@
 {$ELSE}
     '', // gtk
 {$ENDIF}
+{$IFDEF DARWIN}
+ ' -Fl/usr/X11R6/lib -Fl/sw/lib -Fl/sw/lib/pango-ft219/lib', // gtk2
+{$ELSE}
     '', // gtk2
+{$ENDIF}
     '', // win32
     '', // wince
 {$IFDEF DARWIN}

Phil

2009-09-07 19:30

reporter   ~0030518

Adding /usr/X11R6/lib;/sw/lib to Libraries path in Compiler Options doesn't seem to hurt it any. I don't have pango-ft219/lib in my /sw/lib, probably because I have never installed GTK2 with fink, so I'm not sure about that.

Thanks.

-Phil

Issue History

Date Modified Username Field Change
2009-09-05 22:29 Phil New Issue
2009-09-05 22:29 Phil Widgetset => GTK 2
2009-09-06 22:28 Vincent Snijders LazTarget => 0.9.28
2009-09-06 22:28 Vincent Snijders Status new => confirmed
2009-09-06 22:28 Vincent Snijders Target Version => 0.9.28
2009-09-07 07:44 Phil Note Added: 0030499
2009-09-07 12:55 Vincent Snijders Note Added: 0030509
2009-09-07 13:12 Vincent Snijders Issue cloned: 0014533
2009-09-07 13:12 Vincent Snijders Relationship added related to 0014533
2009-09-07 13:56 Vincent Snijders Fixed in Revision => 21599,21600
2009-09-07 13:56 Vincent Snijders Status confirmed => resolved
2009-09-07 13:56 Vincent Snijders Fixed in Version => 0.9.28
2009-09-07 13:56 Vincent Snijders Resolution open => fixed
2009-09-07 13:56 Vincent Snijders Assigned To => Vincent Snijders
2009-09-07 13:56 Vincent Snijders Note Added: 0030510
2009-09-07 19:30 Phil Note Added: 0030518
2011-12-01 11:22 Marc Weustink Status resolved => closed