- multimedia/libv4l links to -lpthread instead of PTHREAD_LIBS How-To-Repeat: - build multimedia/libv4l
Responsible Changed From-To: freebsd-ports-bugs->hselasky Over to maintainer (via the GNATS Auto Assign Tool) http://www.freebsd.org/cgi/query-pr.cgi?pr=170508 Date: Thu, 9 Aug 2012 18:53:49 +0200
It would apply to any version of FreeBSD. See: http://www.freebsd.org/doc/en_US.ISO8859-1/books/porters-handbook/dads-pthread.html - Jason
Does this also apply for multimedia/webcamd ? BTW: I just committed a patch there: =================================================================== --- Makefile (revision 2368) +++ Makefile (working copy) @@ -116,6 +116,7 @@ NOGCCERROR= MLINKS= BITS_PER_LONG!=${CC} -o long_size_test ${.CURDIR}/tests/long_size_test.c && ./long_size_test +PTHREAD_LIBS?= -lpthread .include "${.CURDIR}/build/obj-y/Makefile" @@ -171,7 +172,7 @@ # # List of linker flags # -LDFLAGS+= -L${LIBDIR} -lusb -lcuse4bsd -lpthread -lutil +LDFLAGS+= -L${LIBDIR} -lusb -lcuse4bsd ${PTHREAD_LIBS} -lutil # # List of Linux specific sources --HPS
On Thursday, August 09, 2012 21:22:18 Hans Petter Selasky wrote: > > Does this also apply for multimedia/webcamd ? > Yes. I see in multimedia/webcamd the Makefile has: LDFLAGS+= -L${LIBDIR} -lusb -lcuse4bsd -lpthread -lutil -lpthread should be replaced with PTHREAD_LIBS > BTW: I just committed a patch there: > > =================================================================== > --- Makefile (revision 2368) > +++ Makefile (working copy) > @@ -116,6 +116,7 @@ > NOGCCERROR= > MLINKS= > BITS_PER_LONG!=${CC} -o long_size_test ${.CURDIR}/tests/long_size_test.c && > ./long_size_test > +PTHREAD_LIBS?= -lpthread > > .include "${.CURDIR}/build/obj-y/Makefile" > > @@ -171,7 +172,7 @@ > # > # List of linker flags > # > -LDFLAGS+= -L${LIBDIR} -lusb -lcuse4bsd -lpthread -lutil > +LDFLAGS+= -L${LIBDIR} -lusb -lcuse4bsd ${PTHREAD_LIBS} -lutil > > # > # List of Linux specific sources > That's fine, but the port Makefile would still need: MAKE_ENV+= PTHREAD_LIBS="${PTHREAD_LIBS}" -Jason
> That's fine, but the port Makefile would still need: > MAKE_ENV+= PTHREAD_LIBS="${PTHREAD_LIBS}" Do you mean, MAKE_ENV or MAKE_ARGS? MAKE_ARGS+= PTHREAD_LIBS="${PTHREAD_LIBS}" Currently webcamd is using MAKE_ARGS for passing variables. --HPS
On Friday, August 10, 2012 19:47:10 Hans Petter Selasky wrote: > On Thursday 09 August 2012 22:06:10 Jason E. Hale wrote: > > That's fine, but the port Makefile would still need: > > MAKE_ENV+= PTHREAD_LIBS="${PTHREAD_LIBS}" > > Do you mean, MAKE_ENV or MAKE_ARGS? > > MAKE_ARGS+= PTHREAD_LIBS="${PTHREAD_LIBS}" > > Currently webcamd is using MAKE_ARGS for passing variables. > I guess that's up to you. It's really a matter of precedence. An environment variable in make has the lowest precedence. In this case, it would work either way since PTHREAD_LIBS is defined with "?=". If it were defined wtih "=" then MAKE_ARGS would be necessary. -Jason
Is this PR still relevant?
(In reply to Carlo Strub from comment #7) > Is this PR still relevant? Apparently so. I am the originator of this PR. I suppose that since I have become a committer since I submitted this, I could take care of it myself since a significant amount of time has passed.
I am sure hselasky is happy to get rid of this PR ;-) It would be nice if you could take it over.
Hi, There is a new version of libv4l in the works: svn --username anonsvn --password anonsvn \ checkout svn://svn.turbocat.net/i4b/trunk/ports/multimedia/libv4l --HPS
PTHREAD_CFLAGS and PTHREAD_LIBS are deprecated. They were needed when FreeBSD had multiple threading libs but this hasn't been the case for a long time. Either -pthread or -lpthread is fine. They mean exactly the same.
Maintainer was reset some time ago. Reassign to submitter. Add maintainer (mailing list) to Cc: .
Closing this bug report as it is irrelevant now.