XTHREADLIB and DragonFly and x11.pc

Jeremy C. Reed reed at reedmedia.net
Tue Feb 21 14:01:26 PST 2006


Building modular X.org on DragonFly failed in app/ico:

...
checking build system type... i386-unknown-dragonfly1.5.0
checking host system type... i386-unknown-dragonfly1.5.0
configure: creating ./config.status
config.status: creating Makefile
config.status: creating config.h
config.status: executing depfiles commands
make  all-am
if gcc -DHAVE_CONFIG_H -I. -I. -I.    -I/home/reed/xorg/include -g -O2 -MT 
ico-ico.o -MD -MP -MF ".deps/ico-ico.Tpo" -c -o ico-ico.o `test -f 'ico.c' 
|| echo './'`ico.c;  then mv -f ".deps/ico-ico.Tpo" ".deps/ico-ico.Po"; 
else rm -f ".deps/ico-ico.Tpo"; exit 1; fi
gcc  -g -O2   -o ico  ico-ico.o -L/home/reed/xorg/lib -lX11  -lm 
ico-ico.o(.text+0x1aca): In function `main':
/home/reed/modular-xorg/app/ico/ico.c:1317: undefined reference to 
`pthread_create'
*** Error code 1

That line is:

            xthread_fork(do_ico_window, closure);

I looked closer and saw it did include my pthread.h.

I manually modified empty setting of XTHREADLIB in Makefile to become:
XTHREADLIB = -pthread

and it built fine. (The old imake way for this platform defines 
ThreadsLibraries as -pthread.)

I see for modular X.org is this defined with lib/pkgconfig/x11.pc's 
xthreadlib variable (which is empty for me).

Index: lib/X11/configure.ac
===================================================================
RCS file: /cvs/xorg/lib/X11/configure.ac,v
retrieving revision 1.43
diff -b -u -r1.43 configure.ac
--- lib/X11/configure.ac	19 Feb 2006 02:14:11 -0000	1.43
+++ lib/X11/configure.ac	21 Feb 2006 20:41:08 -0000
@@ -158,6 +158,8 @@
     freebsd*)
         XTHREAD_CFLAGS="-D_THREAD_SAFE"
         XTHREADLIB="-pthread" ;;
+    dragonfly*)
+        XTHREADLIB="-pthread" ;;
     solaris*)
 	XTHREAD_CFLAGS="-D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS" ;;
     esac


I do not know git yet (and I don't have a git client installed yet).

Can someone commit the above if okay? (And log and share the steps 
involved in doing this using git?)

I have another problem  that I now see after doing this. I don't know if 
related yet ... so I will email in another message.

 Jeremy C. Reed

 	  	 	 BSD News, BSD tutorials, BSD links
	  	 	 http://www.bsdnewsletter.com/



More information about the xorg mailing list