Bug 13677 - Misc. Ports fix ups.
Summary: Misc. Ports fix ups.
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-ports (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 1999-09-10 07:30 UTC by reg
Modified: 1999-12-24 08:20 UTC (History)
0 users

See Also:


Attachments
file.diff (346 bytes, patch)
1999-09-10 07:30 UTC, reg
no flags Details | Diff
file.diff (293 bytes, patch)
1999-09-10 07:30 UTC, reg
no flags Details | Diff
file.diff (397 bytes, patch)
1999-09-10 07:30 UTC, reg
no flags Details | Diff
file.diff (888 bytes, patch)
1999-09-10 07:30 UTC, reg
no flags Details | Diff
file.diff (445 bytes, patch)
1999-09-10 07:30 UTC, reg
no flags Details | Diff
file.diff (519 bytes, patch)
1999-09-10 07:30 UTC, reg
no flags Details | Diff
file.diff (2.15 KB, patch)
1999-09-10 07:30 UTC, reg
no flags Details | Diff
file.diff (402 bytes, patch)
1999-09-10 07:30 UTC, reg
no flags Details | Diff
file.diff (446 bytes, patch)
1999-09-10 07:30 UTC, reg
no flags Details | Diff
file.diff (349 bytes, patch)
1999-09-10 07:30 UTC, reg
no flags Details | Diff
file.diff (2.77 KB, patch)
1999-09-10 07:30 UTC, reg
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description reg 1999-09-10 07:30:01 UTC
	This is a collection of misc. PLIST fixes and other minor things
	which are sitting in my ports tree.  Some things... python: this
	fixes a problem which I had with threads support in py-gnome. 
	gtkstep: these directories are owned by gtk12, which is a dependancy
	of gtkstep, so leave them alone.  XFree86: move the two symlinked
	directories down the PLIST so they are deleted without error.

Fix: archivers/unzip.with_encryption:
  Changes: pkg/PLIST
  Adds   :
  Removes:

devel/ORBacus:
  Changes: Makefile
  Adds   :
  Removes:

devel/gettext:
  Changes: pkg/PLIST
  Adds   :
  Removes: patches/patch-ag

graphics/gtkdps:
  Changes: Makefile
  Adds   :
  Removes: patches/patch-aa

graphics/jbigkit:
  Changes: pkg/PLIST
  Adds   :
  Removes:

graphics/libwmf:
  Changes: pkg/PLIST
  Adds   :
  Removes:

graphics/tiff:
  Changes: pkg/PLIST
  Adds   :
  Removes:

lang/python:
  Changes: Makefile
  Adds   :
  Removes:

lang/tcl80:
  Changes: files/manpages
  Adds   :
  Removes:

x11-toolkits/gtkstep:
  Changes: pkg/PLIST
  Adds   :
  Removes:

x11/XFree86:
  Changes: pkg/PLIST
  Adds   :
  Removes:
Comment 1 Thomas Gellekum 1999-09-10 09:02:58 UTC
reg@shale.csir.co.za writes:

> 	Some things... python: this
> 	fixes a problem which I had with threads support in py-gnome. 

> --- /usr/ports.ref/lang/python/Makefile	Tue Aug 31 21:36:12 1999
> +++ lang/python/Makefile	Tue Aug 31 22:04:17 1999
> @@ -52,7 +52,7 @@
>  LIBC_R!=	/sbin/ldconfig -r | grep c_r || true
>  .if ${LIBC_R} != "" && defined(WITH_THREADS) && ${WITH_THREADS} == yes
>  CONFIGURE_ARGS+=	--with-thread
> -CFLAGS+=		-D_THREAD_SAFE
> +CFLAGS+=		-D_THREAD_SAFE -pthread
>  CONFIGURE_ENV+=		LDFLAGS="-pthread ${LDFLAGS}"
>  .endif

Since -pthread is a linker flag, not a compiler flag, I'd prefer:

Index: patches/patch-ab
===================================================================
RCS file: /home/ncvs/ports/lang/python/patches/patch-ab,v
retrieving revision 1.12
diff -u -r1.12 patch-ab
--- patch-ab	1999/05/10 16:11:45	1.12
+++ patch-ab	1999/09/10 07:58:20
@@ -1,11 +1,11 @@
---- configure.orig	Mon May 10 23:49:46 1999
-+++ configure	Mon May 10 23:50:31 1999
+--- configure.orig	Sat Apr 10 18:02:18 1999
++++ configure	Fri Sep 10 09:47:29 1999
 @@ -2246,7 +2246,7 @@
  		fi ;;
  	Linux*) LDSHARED="gcc -shared";;
  	dgux*) LDSHARED="ld -G";;
 -	FreeBSD*/3*) LDSHARED="gcc -shared";;
-+	FreeBSD*/3*|FreeBSD*/4*) LDSHARED="gcc -shared";;
++	FreeBSD*/3*|FreeBSD*/4*) LDSHARED='gcc -shared ${LDFLAGS}';;
  	FreeBSD*|OpenBSD*) LDSHARED="ld -Bshareable";;
  	NetBSD*)
  		if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]

Does this help you with py-gnome, whatever the problem is?

tg
Comment 2 reg 1999-09-10 09:15:34 UTC
Hi,

On Fri, Sep 10, 1999 at 10:02:58AM +0200, Thomas Gellekum wrote:
> reg@shale.csir.co.za writes:
> 
> > 	Some things... python: this
> > 	fixes a problem which I had with threads support in py-gnome. 
> 
> > --- /usr/ports.ref/lang/python/Makefile	Tue Aug 31 21:36:12 1999
> > +++ lang/python/Makefile	Tue Aug 31 22:04:17 1999
> > @@ -52,7 +52,7 @@
> >  LIBC_R!=	/sbin/ldconfig -r | grep c_r || true
> >  .if ${LIBC_R} != "" && defined(WITH_THREADS) && ${WITH_THREADS} == yes
> >  CONFIGURE_ARGS+=	--with-thread
> > -CFLAGS+=		-D_THREAD_SAFE
> > +CFLAGS+=		-D_THREAD_SAFE -pthread
> >  CONFIGURE_ENV+=		LDFLAGS="-pthread ${LDFLAGS}"
> >  .endif
> 
> Since -pthread is a linker flag, not a compiler flag, I'd prefer:
> 
> Index: patches/patch-ab
> ===================================================================
> RCS file: /home/ncvs/ports/lang/python/patches/patch-ab,v
> retrieving revision 1.12
> diff -u -r1.12 patch-ab
> --- patch-ab	1999/05/10 16:11:45	1.12
> +++ patch-ab	1999/09/10 07:58:20
> @@ -1,11 +1,11 @@
> ---- configure.orig	Mon May 10 23:49:46 1999
> -+++ configure	Mon May 10 23:50:31 1999
> +--- configure.orig	Sat Apr 10 18:02:18 1999
> ++++ configure	Fri Sep 10 09:47:29 1999
>  @@ -2246,7 +2246,7 @@
>   		fi ;;
>   	Linux*) LDSHARED="gcc -shared";;
>   	dgux*) LDSHARED="ld -G";;
>  -	FreeBSD*/3*) LDSHARED="gcc -shared";;
> -+	FreeBSD*/3*|FreeBSD*/4*) LDSHARED="gcc -shared";;
> ++	FreeBSD*/3*|FreeBSD*/4*) LDSHARED='gcc -shared ${LDFLAGS}';;
>   	FreeBSD*|OpenBSD*) LDSHARED="ld -Bshareable";;
>   	NetBSD*)
>   		if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
> 
> 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...

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.

Regards,
 -Jeremy

-- 
  |   "Come home my prodigal son, come home and lets be one,
--+--  don't want to see you cry, don't make me tell you why,
  |    you've lived in a house with me, my blood has set you free,
  |    in the world you'll surely die, nothing else will satisfy." -MIC
Comment 3 Thomas Gellekum 1999-09-10 10:28:18 UTC
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
Comment 4 Michael Haro freebsd_committer freebsd_triage 1999-12-24 08:17:45 UTC
State Changed
From-To: open->closed

It appears that everything in this PR has been handled.  The 
only thing I'm not 100% about is the python change.  If something 
still needs to be changed to python please submit a new PR which 
specificly talks about python. 

I'm closing this PR because it covers so much stuff with regards to 
other ports which have already been fixed and if it is left open 
I'm worried that others might spend time looking into the fixed  
parts.