From owner-freebsd-ports Thu Feb 15 10:22:59 2001 Delivered-To: freebsd-ports@freebsd.org Received: from blizzard.sabbo.net (ns.sabbo.net [193.193.218.18]) by hub.freebsd.org (Postfix) with ESMTP id C569837B67D; Thu, 15 Feb 2001 10:21:36 -0800 (PST) Received: from vic.sabbo.net (root@vic.sabbo.net [193.193.218.112]) by blizzard.sabbo.net (8.10.1/8.10.1) with ESMTP id f1FIIQn06120; Thu, 15 Feb 2001 20:18:33 +0200 Received: from FreeBSD.org (big_brother.vega.com [192.168.1.1]) by vic.sabbo.net (8.11.2/8.11.2) with ESMTP id f1FIIUm20278; Thu, 15 Feb 2001 20:18:30 +0200 (EET) (envelope-from sobomax@FreeBSD.org) Message-ID: <3A8C1D70.E59D0CEA@FreeBSD.org> Date: Thu, 15 Feb 2001 20:18:25 +0200 From: Maxim Sobolev Organization: Vega International Capital X-Mailer: Mozilla 4.76 [en] (WinNT; U) X-Accept-Language: uk,ru,en MIME-Version: 1.0 To: John Indra Cc: FUJISHIMA Satsuki , freebsd-current@FreeBSD.org, kevlo@FreeBSD.org, ports@FreeBSD.org, asami@FreeBSD.org Subject: Re: -lc_r against shared library (Re: Failed to build kdesupport2 port) References: <20010215110428.A31614@office.naver.co.id> <86n1bop2vs.wl@cheerful.com> <3A8BD0E7.BA197AB0@FreeBSD.org> <20010215230135.A34077@office.naver.co.id> Content-Type: text/plain; charset=koi8-r Content-Transfer-Encoding: 7bit Sender: owner-freebsd-ports@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org John Indra wrote: > On Thu, Feb 15, 2001 at 02:51:51PM +0200, Maxim Sobolev wrote: > > >> CONFIGURE_ARGS= "LIBS=-pthread" > >> to kdesupport2/Makefile would help. > >> > >> There are some way to ``fix'' this problem: > >> c) Use -lc_r instead of -pthread. > >> As -pthread will be depreciated, we should use -lc_r for FreeBSD > >> 5.0 and later, shouldn't we? > > > >Yes, it looks like a most appropriate solution to me. If you read -ports, > >recently I proposed to add a small patch for the bsd.port.mk to help with > >transition process, but have not heard anything back from PW yet. > > Either I do it the wrong way, or you are not paying attention to my > first message thoroughly. I HAVE applied your patch to my > /usr/ports/Mk/bsd.port.mk! But still, I failed to build kdesupport2 > > So, here's the summary of what I have done: > 1. Reformat hard drive (cause I have a broken -CURRENT caused by FILE struct > changes) > 2. Install from current.freebsd.org a -CURRENT snapshot of 20000210 > 3. cvsup the latest ports tree > 4. Applied Maxim Sobolev patch against my /usr/ports/Mk/bsd.port.mk > The patch is: > > --- bsd.port.mk 2001/02/08 19:09:54 1.2 > +++ bsd.port.mk 2001/02/08 19:15:50 > @@ -948,6 +948,14 @@ > MAKEFILE?= Makefile > MAKE_ENV+= PREFIX=${PREFIX} LOCALBASE=${LOCALBASE} X11BASE=${X11BASE} MOTIFLIB="${MOTIFLIB}" LIBDIR="${LIBDIR}" CFLAGS="${CFLAGS}" CXXFLAGS="${CXXFLAGS}" > > +.if ${OSVERSION} < 500000 > +PTHREAD_CFLAGS= -D_THREAD_SAFE > +PTHREAD_LIBS= "-pthread" > +.else > +PTHREAD_CFLAGS= "" > +PTHREAD_LIBS= "-lc_r" > +.endif > + > .if exists(/usr/bin/fetch) > # avoid -A for 2.2 -- it's not ported to that branch > .if ${OSVERSION} < 300000 > > Correct isn't it? > > 5. Start building my ports > 6. Everything from XFree86-4.0.2_6 to qt-2.2.4 build and installed just fine > 7. kdesupport2 started bombing error messages > > So, if after all of this I SHOULD have not undergone any errors, then the > mistakes is on me, please forgive me for wasting your time and bandwith. > > I am only seeking for some enlightenment. You have totally misunderstood the purpose of my patch. The patch *isn't* intended as a quick fix for the recent -lc_r/-pthread weirdness, but instead it would provide porting team with infrastructure necessary to start converting existing ports to the new world order. In a nutshell, -pthread should be replaced with ${PTHREAD_LIBS} and -D_THREAD_SAFE with ${PTHREAD_CFLAGS} in all Makefiles from the ports collection. In addition all places where -pthread hardcoded in patches should also be identified and adjusted to respect ${PTHREAD_LIBS} and ${PTHREAD_CFLAGS}. -Maxim To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message