Date: Thu, 11 Feb 1999 21:51:04 -0600 From: "Eric L. Hernes" <erich@lodgenet.com> To: "Eric L. Hernes" <erich@lodgenet.com> Cc: Andres <dae@via.ecp.fr>, multimedia@FreeBSD.ORG Subject: Re: building x11amp-0.9 Message-ID: <199902120351.VAA06794@jake.lodgenet.com> In-Reply-To: Your message of "Thu, 11 Feb 1999 21:44:51 CST." <199902120344.VAA06720@jake.lodgenet.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Andres, I'm cc'ing the rest of the list, 'cause I think there might be more interest in it. I hope that's ok. Plus I forgot the patch :( It's below really this time... ;-) "Eric L. Hernes" writes: >Andres writes: >> >>ok, i've got a question about this. i've tried to compile freeamp, and >>managed to get it running, but it caused me no end of trouble (i guess >>it's because of my thread unsafe Xlib). >>i recall doing this with the -lc_r instead of the -lpthread.. could you >>explain what the differences between -lpthread and -lc_r are ? guess i'm >>sort of confused ... > >I haven't looked at freeamp, but libc_r is a re-entrant libc with pthread >functions. It's all handled in user-space. -lpthread is used in conjunction >with linuxthreads, which basically do a fancy fork() (rfork(), actually) >and show up as multiple processes, that share a bunch of stuff. In this >case, the libpthread supplies the missing pthread* functions. > >The problems I've seen with using the non-thread-safe libraries are error >messages like `Xlib error: unexpected async reply', or things `just not >working right', like the main window pops up, but the widgets don't get >updated right, until it gets mouse-focus. > >>and how do i recompile my X libs to make them thread safe? i have tried, >>but didn't make it through .. (my poor ol'pentium had a good time >>compiling X once and again, only to find that the libs were not thread >>safe :-) > >I extracted the whole thing, then looked in xc/config/cf/* for examples of >thread-safe platforms (I think linux.cf has it), then stick those defs in >FreeBSD.cf, and build it. Actually, if you stick the following patch in >/usr/ports/x11/XFree86/patches, you can build X with thread safe libs, but >anything in xc/programs/** that uses libX11, won't link because of undefined >pthread_* refs... although you'll get the thread safe libs... I took that >one step further. After that make got through, I went into xc/lib/X11 and >xc/lib/Xext and hacked the Makefiles to build X11_t, and Xext_t (which is >pre-linked against libX11_t). That's where my libraries came from, I'm >not sure if that's exactly according to Hoyle, but my x11amp is now >pretty stable. > >> >>cheers, >> >>-- >>Krapf Andres, Engineering student at the Ecole Centrale Paris >>IRCnet: X-dae -- dae@via.ecp.fr >>-=- FreeBSD:The Power To Serve -=- >> --- config/cf/FreeBSD.cf.orig Sun Nov 8 05:19:10 1998 +++ config/cf/FreeBSD.cf Tue Feb 9 15:55:20 1999 @@ -35,15 +35,20 @@ #define GccUsesGas YES #define UseGas YES #define GnuCpp YES #define HasNdbm YES #define HasPutenv YES #define HasSnprintf YES #define HasBSD44Sockets YES +#define HasPosixThreads YES +#define ThreadedX YES +#define HasThreadSafeAPI YES +#define ThreadsLibraries -lpthread +#define SystemMTDefines -D_REENTRANT -DLINUXTHREADS -D_THREAD_SAFE #ifndef HasLibCrypt # define HasLibCrypt YES #endif #ifndef HasShm # define HasShm YES #endif #define HasWChar32 YES Eric. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-multimedia" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199902120351.VAA06794>