Re: [gtk-list] Re: gtk on freebsd



As the well known Norbert Bladt said...
->Emmanuel DELOGET wrote:
->> 
->> Hi, lords.
->> 
->> I'm currently updating gtk (from 1.0.6 (!) to 1.2.2) on a freebsd
->> 2.2.8 box, and I have some problems.
->Because I'll do it myself, I am happy that you did try it, first.
->So I can learn from you :-)
->
->No, just half kidding.
->
->[snip]
->
->I think I know what the problem is:
->	1. configure is "very dumb" about the link errors in my opinion.
->	   That means, it does not distinguish between, e.g.
->	   "multiply defined" errors from "undefined" ones.
->	2. You have GIMP installed, have you ?
->	   This is indicated by these lines:
->[snip]
->>         53:-lglib-1.2.0.2 => /usr/local/lib/libglib-1.2.so.0.2
->>         57:-lglib.0.2 => /usr/local/lib/libglib.so.0.2
->[snip]
->>         69:-lgdk-1.2.2.0 => /usr/local/lib/libgdk-1.2.so.2.0
->>         72:-lgdk.2.0 => /usr/local/lib/libgdk.so.2.0
->>         73:-lgtk-1.2.2.0 => /usr/local/lib/libgtk-1.2.so.2.0
->>         74:-lgtk.2.0 => /usr/local/lib/libgtk.so.2.0
->
->I didn't look at my system (it's at home) but it seems to me that
->you still have gtk+-1.0.2, glib-1.0.2, etc. for GIMP installed.
->If you still need GIMP, I don't know exactly what to do to get it
->running, again.
	The libs for gtk-1.0.x that I have installed were ripped off
	my box with a make uninstall, or by hand... So I do not have
	any gtk/glib version installed except the 1.2.2 that I
	have installed...
 
	Currently , the installed gimp  [v1.0.2] does not run
	(of course). I was installing
	Gimp v1.0.4 (that run with gtk 1.2), but it failed on the
	configure script (again).

->I would remove libgtk.2.0 (is this gtk 1.0.2 ???), libglib.0.2 (is this
->glib 1.0.2 ?) and libgdk.2.0 (gdk 1.0.2 ??) or, at least,
->move it to some other directory for a test.
	No. libgtk.2.0 is a symlink to libgtk-1.2.so.2.0, which was 
	created by the 'make install' of gtk 1.2.2. I were suspicious
	about version number too, but I compiled one of the example
	program, and the run gave me :
		ld.so : undefined symbol __isthreaded
	which is not the same as :
		ld.so : cannot find library xxxx...
	So it links [nearly] succesfully. 

	The cause of the error is probably the following : the gdkpixmap.o
	file contain a reference to __isthreaded, that is defined in
	the libc_r.a library, and this library is not included in the
	classic gtk link process. I explain : when
	configure compile its test program, it uses something like :

	gcc -o conftest `gtk-config --cflags` conftest.c `gtk-config --libs`

	It should be (on a system that is compiled with the multithread 
	support) 

	gcc -o ct  `gtk-config --cflags gthread` ct.c `gtk-config --libs gthread`
	
	So, I should propose the two following solution : 
	
	* either : gtk-config should return the complete set of 
	used library, without the need of the 'gthread' argument, at 
	least on freebsd boxes, since the gcc command line to add 
	thread support to programs is different of
	the linux one. This should not need a lot of work :)

	* or : avoid the use of __isthreaded in the gdkpixmap.c file
	(although I don't see were it is use).

	To make this work on my box, I modified gtk-config to make the
	glib_libs and glib_cflags equal to glib_thread_libs and 
	glib_thread_cflags. After this bad hack, I can compile both
	imlib 1.9.4 and gimp 1.0.4 without any configure error...

	About this particular stuff : the freebsd team seems to says that it's
	better to use the freebsd specific gcc option '-pthread' to link
	threaded applications. As the libc_r is a replacement for the std libc,
	a program compiled with :
		gcc -o k k.c -lc_r 
	is linked both with libc and libc_r. I think that the correct gcc
	invocation should be :
		gcc -pthread -o k k.c
	[which automagically use libc_r instead of libc (see pthread(3) on
	freebsd)]. 

	By the way, thanx for you replies.

	BAV,
 
->Norbert.
->
->-- 
->Norbert Bladt		 Payphone Management System Software Development
->ascom Autelca AG
->Worbstrasse 201		 CH-3073 Guemligen, Switzerland
->abladtn@autelca.ascom.ch VOICE: +41 31 999 6552, FAX: +41 31 999 6575
->

-- 
__________________________________________________________________________
   Emmanuel DELOGET [pixel] pixel@{dotcom.fr,epita.fr}  ----  DotCom SA
         http://www.epita.fr/~pixel | http://www.dotcom.fr/~pixel
"On the last day, God created Linux. And Microsoft won its antitrust case"
--------------------------------------------------------------------------



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