Hello there,
I am experencing a nightmarre with FreeBSD ports.
They want that pthreads flags and libs to be specified namely to the program it is compiling.
I have some patches and tryed some works on CVS but it cannot use the specified flags and libs.
So I have 2 choices :
- I find a way to specify that (and that's why I am asking that on pike-devel ml) - I give up and I let pike maintainance on freebsd to someone want it... (personaly I still want to use and work with pike so...)
So I am asking for help from people that understand well how pike detect and use pthreads to help me to add a couple of flags to automake like :
--with-named-thread-lib= --with-named-threds-flags=
Notice that current one I have add into 7.5 doesn't honor the libs I specify...
/Xavier PS: If it is working, I really like to backport that on 7.4 as well
-- Xavier Beaudouin - Unix System Administrator & Projects Leader. President of Kazar Organization : http://www.kazar.net/ Please visit http://caudium.net/, home of Caudium & Camas projects
In the last episode (Mar 13), Xavier Beaudouin said:
I am experencing a nightmarre with FreeBSD ports.
They want that pthreads flags and libs to be specified namely to the program it is compiling.
I have some patches and tryed some works on CVS but it cannot use the specified flags and libs.
So I have 2 choices :
- I find a way to specify that (and that's why I am asking that on
pike-devel ml)
According to configure.in, --with-named-thread-lib=${PTHREAD_LIBS} should be what you need. 7.4's configure.in is missing the named-thread code but it should be trivial to backport.
Hello Dan,
According to configure.in, --with-named-thread-lib=${PTHREAD_LIBS} should be what you need. 7.4's configure.in is missing the named-thread code but it should be trivial to backport.
This is what I try to port from mysql 4.0 configure.in... But it doesn't works at all...
The current ports of pike 7.4 and 7.5 (ports lang/pike74 and lang/pike75) have "conformity" of FreeBSD PTHREADS_CFLAGS and LIBS but they are completly b0rken (eg threads are not working). As you can see, FreeBSD commiters tryed to make some patches to Makefiles and configure scripts to make them compliant, but break them completly :
- pike74 cannot be compiled on 5.x :
===> Checking if lang/pike74 already installed Installing Pike in /usr/local/pike/7.4.44, please wait...
Fatal error 'Unable to read from thread kernel pipe' at line 1100 in file /usr/src/lib/libc_r/uthread/uthread_kern.c (errno = 0) Abort trap (core dumped) gmake: *** [install] Error 134 *** Error code 2
Stop in /usr/ports/lang/pike74.
- pike75 can be compiled and installed but threads support is dead ;(
So since this can is *really* a nightmare to make 'em FreeBSD ports compliant, I ask for hint to make 'em working....
I really think that on some other OS there is some clue on make it working with different threading support ?
/Xavier
-- Xavier Beaudouin - Unix System Administrator & Projects Leader. President of Kazar Organization : http://www.kazar.net/ Please visit http://caudium.net/, home of Caudium & Camas projects
They want that pthreads flags and libs to be specified namely to the program it is compiling.
Ok. I guess this is due to some system-wide configuration option? Where is the option specified?
I have some patches and tryed some works on CVS but it cannot use the specified flags and libs.
So what flags are needed to compile with threads on a recent FreeBSD machine?
/Xavier
/ Henrik Grubbström (Lysator)
Previous text:
2004-03-13 23:15: Subject: Flags and libs for pthread support nightmarre on FreeBSD ports
Hello there,
I am experencing a nightmarre with FreeBSD ports.
They want that pthreads flags and libs to be specified namely to the program it is compiling.
I have some patches and tryed some works on CVS but it cannot use the specified flags and libs.
So I have 2 choices :
- I find a way to specify that (and that's why I am asking that on
pike-devel ml)
- I give up and I let pike maintainance on freebsd to someone want
it... (personaly I still want to use and work with pike so...)
So I am asking for help from people that understand well how pike detect and use pthreads to help me to add a couple of flags to automake like :
--with-named-thread-lib= --with-named-threds-flags=
Notice that current one I have add into 7.5 doesn't honor the libs I specify...
/Xavier PS: If it is working, I really like to backport that on 7.4 as well
-- Xavier Beaudouin - Unix System Administrator & Projects Leader. President of Kazar Organization : http://www.kazar.net/ Please visit http://caudium.net/, home of Caudium & Camas projects
/ Brevbäraren
Le 15 mars 04, à 10:25, Henrik Grubbström (Lysator) @ Pike (-) developers forum a écrit :
They want that pthreads flags and libs to be specified namely to the program it is compiling.
Ok. I guess this is due to some system-wide configuration option? Where is the option specified?
It it specified in port's Makefile... I can provide it whatever I want : gnu configure script, a environment variable, ....
It is separated into 2 parts :
PTHREAD_FLAGS PTHREAD_LIBS
But port (then pike for us) have to allow named pthreads flags and libs to be forced....
I have some patches and tryed some works on CVS but it cannot use the specified flags and libs.
So what flags are needed to compile with threads on a recent FreeBSD machine?
Here is extract of /usr/ports/Mk/bsd.ports.mk
.if ${OSVERSION} < 500016 PTHREAD_CFLAGS?= -D_THREAD_SAFE PTHREAD_LIBS?= -pthread .elif ${OSVERSION} < 502102 PTHREAD_CFLAGS?= -D_THREAD_SAFE PTHREAD_LIBS?= -lc_r .else PTHREAD_CFLAGS?= PTHREAD_LIBS?= -lpthread .endif
*but* is "default" values. eg some poweruser can namely specify other kind of pthreads :
-lkse -lpthr
for example...
That's why I have to find a way to specify it at configure time and fail back to the "old" way if it is not specified.
/Xavier
-- Xavier Beaudouin - Unix System Administrator & Projects Leader. President of Kazar Organization : http://www.kazar.net/ Please visit http://caudium.net/, home of Caudium & Camas projects
Le 15 mars 04, à 10:25, Henrik Grubbström (Lysator) @ Pike (-) developers forum a écrit :
It is separated into 2 parts :
PTHREAD_FLAGS PTHREAD_LIBS
But port (then pike for us) have to allow named pthreads flags and libs to be forced....
I have some patches and tryed some works on CVS but it cannot use the specified flags and libs.
Looks like your modifications were in a dead section of code.
I've now added/modified --with-thread-library.
That's why I have to find a way to specify it at configure time and fail back to the "old" way if it is not specified.
Ok.
/Xavier
/ Henrik Grubbström (Lysator)
Previous text:
2004-03-15 16:27: Subject: Re: Flags and libs for pthread support nightmarre on FreeBSD ports
Le 15 mars 04, à 10:25, Henrik Grubbström (Lysator) @ Pike (-) developers forum a écrit :
They want that pthreads flags and libs to be specified namely to the program it is compiling.
Ok. I guess this is due to some system-wide configuration option? Where is the option specified?
It it specified in port's Makefile... I can provide it whatever I want : gnu configure script, a environment variable, ....
It is separated into 2 parts :
PTHREAD_FLAGS PTHREAD_LIBS
But port (then pike for us) have to allow named pthreads flags and libs to be forced....
I have some patches and tryed some works on CVS but it cannot use the specified flags and libs.
So what flags are needed to compile with threads on a recent FreeBSD machine?
Here is extract of /usr/ports/Mk/bsd.ports.mk
.if ${OSVERSION} < 500016 PTHREAD_CFLAGS?= -D_THREAD_SAFE PTHREAD_LIBS?= -pthread .elif ${OSVERSION} < 502102 PTHREAD_CFLAGS?= -D_THREAD_SAFE PTHREAD_LIBS?= -lc_r .else PTHREAD_CFLAGS?= PTHREAD_LIBS?= -lpthread .endif
*but* is "default" values. eg some poweruser can namely specify other kind of pthreads :
-lkse -lpthr
for example...
That's why I have to find a way to specify it at configure time and fail back to the "old" way if it is not specified.
/Xavier
-- Xavier Beaudouin - Unix System Administrator & Projects Leader. President of Kazar Organization : http://www.kazar.net/ Please visit http://caudium.net/, home of Caudium & Camas projects
/ Brevbäraren
Hello Henrik,
I have some patches and tryed some works on CVS but it cannot use the specified flags and libs.
Looks like your modifications were in a dead section of code.
:) Now I see then why it doesn't works well :)
I've now added/modified --with-thread-library.
Good work like a charm, can this backported to 7.4 as well ?
Thanks again Henrik, /Xavier
-- Xavier Beaudouin - Unix System Administrator & Projects Leader. President of Kazar Organization : http://www.kazar.net/ Please visit http://caudium.net/, home of Caudium & Camas projects
pike-devel@lists.lysator.liu.se