Date: Fri, 10 Sep 1999 02:30:02 -0700 (PDT) From: Thomas Gellekum <tg@ihf.rwth-aachen.de> To: freebsd-ports@FreeBSD.org Subject: Re: ports/13677: Misc. Ports fix ups. Message-ID: <199909100930.CAA89926@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR ports/13677; it has been noted by GNATS. From: Thomas Gellekum <tg@ihf.rwth-aachen.de> To: Jeremy Lea <reg@shale.csir.co.za> Cc: FreeBSD-gnats-submit@FreeBSD.ORG, nectar@FreeBSD.ORG Subject: Re: ports/13677: Misc. Ports fix ups. Date: 10 Sep 1999 11:28:18 +0200 Jeremy Lea <reg@shale.csir.co.za> writes: > Hi, > > On Fri, Sep 10, 1999 at 10:02:58AM +0200, Thomas Gellekum wrote: > > Since -pthread is a linker flag, not a compiler flag, I'd prefer: ^^^^^^^^^^^^^^^^^^^^^^^^^ > > Does this help you with py-gnome, whatever the problem is? > > The problem was that python would hang during one or other phase of the > build of py-gnome. It was caused by being compiled with > '-D_THREAD_SAFE' but not being linked with '-pthread', since gcc not ld > was being used for linking, so the patch above would have the same > effect... I'm afraid I don't understand what you're saying here. The relevant definitions in /usr/local/lib/python1.5/config/Makefile are: CC= cc OPT= -O -pipe -D_THREAD_SAFE LDFLAGS= -pthread LDSHARED= gcc -shared ${LDFLAGS} CCSHARED= -fpic LINKFORSHARED= -Xlinker -export-dynamic # $(PURIFY) is empty LINKCC= $(PURIFY) $(CC) CFLAGS= $(OPT) -I$(INCLDIR) -I$(CONFIGINCLDIR) $(DEFS) link: $(MAINOBJ) $(LINKCC) $(LDFLAGS) $(LINKFORSHARED) $(MAINOBJ) \ $(LDLIBRARY) $(MODLIBS) $(LIBS) $(SYSLIBS) -o python $(LDLAST) mv python$(EXE) ../python$(EXE) # example for a shared module mpzmodule.o: $(srcdir)/mpzmodule.c; $(CC) $(CCSHARED) -I$(GMP) -I$(GMP)/mpn/generic $(CFLAGS) -c $(srcdir)/mpzmodule.c mpzmodule$(SO): mpzmodule.o; $(LDSHARED) mpzmodule.o -lgmp -o mpzmodule$(SO) `-D_THREAD_SAFE' is added to ${OPT} only when python is built with thread support. `-pthread' is added to the linker flags at the same time. I don't see how python (the interpreter) can be compiled with `-D_THREAD_SAFE' but not linked against libc_r and _only_ libc_r. Mixing libc and libc_r does not work. ld(1) is never used explicitly (except in FreeBSD-2.x.x for ${LDSHARED}). Of course, C extensions to python, like py-gnome, should take care to pick up the correct flags for the interpreter they're using. > The problem might have only been temporary (it was on -CURRENT) and > might not happen with all the fixes in libc_r... But it's being > compiled with the wrong flags anyway, so it needs to be fixed. See above. `-pthread' in CFLAGS should not do anything. Maybe Jacques can enlighten me here about py-gnome. I never touched that. tg To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199909100930.CAA89926>