Bug 27036

Summary: All Ports using Mesa3 are required with -pthread.
Product: Ports & Packages Reporter: nork <nork>
Component: Individual Port(s)Assignee: Maxim Sobolev <sobomax>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   

Description nork 2001-05-02 18:40:01 UTC
I cannot compile many ports(i.e. x11-clocks/glclock, games/gltron, mail/glbiff, ...) using graphics/Mesa3.  Because these are required with -pthread flag in compile or link time.

Fix: 

adhoc:-)
  env CFLAGS="$CFLAGS -pthread" LDFLAGS="$LDFLAGS -pthread" make install
How-To-Repeat: $ cd /usr/ports/x11-clocks
$ make
===>  Extracting for glclock-5.0
Comment 1 greid freebsd_committer freebsd_triage 2001-05-02 19:06:00 UTC
On Wed, 2 May 2001 nork@cityfujisawa.ne.jp wrote:

> >Description:
> I cannot compile many ports(i.e. x11-clocks/glclock,
> games/gltron, mail/glbiff, ...) using graphics/Mesa3.  Because these
> are required with -pthread flag in compile or link time.

A quick grep of the errorlogs on bento yields:

FlightGear-0.6.1
battalion-1.4
battleball-2.1
bzflag-1.7e.2
flwm-1.00
giram-0.1.7
glasteroids-1.0
glbiff-0.3.5
glclock-5.0
gle-3.0.1
gleyes-0.2
glload-0.4.0
gltron-0.61
gracer-0.1.4
gtkglarea-1.2.2
knightcap-3.6
opendx-4.1.0_1
openuniverse-1.0.b3
pose-3.1
spiralloops-0.0.1
spiralsynth-0.1.7
tank-0.4a
togl-1.5
vtk-3.2
wmanager-0.2
xdiskusage-1.41
xracer-0.94

Since these ports presumably respect CFLAGS, perhaps USE_MESA in
bsd.port.mk could be modified to add PTHREAD_CFLAGS to CFLAGS and
PTHREAD_LIBS to LDFLAGS. Perhaps not the best solution, just a quick idea
off the top of my head.

greid
Comment 2 Doug Barton freebsd_committer freebsd_triage 2001-06-09 09:52:21 UTC
Responsible Changed
From-To: freebsd-ports->sobomax


Over to the Mesa maintainer. FWIW, I fixed graphics/gle by adding 
${PTHREAD_LIBS} to CONFIGURE_ENV in the port makefile. A more general 
solution would be good though.
Comment 3 dwcjr 2001-08-31 10:25:03 UTC
Is this still a problem?
Comment 4 nork 2001-08-31 20:28:55 UTC
Wrote by "David W. Chapman Jr." in 2001/08/31 18:25 JST
>> Is this still a problem?

	Yes. i.e. games/gltron package has a problem X-).

	Plase add follow this line to bsd.port.mk.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
.if defined(USE_MESA)
CFLAGS+=	${PTHREAD_CFLAGS}
LDFLAGS+=	${PTHREAD_LIBS}
.endif
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
	I want use LIBS instead of LDFLAGS, but Configure updates LIBS.
	So LIBS is ignore.... Hum....
Comment 5 Maxim Sobolev freebsd_committer freebsd_triage 2002-08-30 13:28:51 UTC
State Changed
From-To: open->feedback

Prese report problems to maintainers of each individual package you are 
having problem with. It is impossible for a single person (me) to fix 
all packages broken due to Mesa, especially considering that libGL now 
being installed by XFree86-4 port and not by Mesa3 port. 

Thanks!
Comment 6 Maxim Sobolev freebsd_committer freebsd_triage 2002-09-23 15:57:34 UTC
State Changed
From-To: feedback->closed

Closed at originator's request, as already resolved one.