<i>tcl & tk's configure fails to correctly detect pthread_mutex</i>.
by
.
D 2000-10-26T01:10:02
J assignee nobody
J cmimetype text/plain
J comment OriginalBugID:\s4359\sBug\nVersion:\s8.3\nSubmitDate:\s'2000-03-10'\nLastModified:\s'2000-04-13'\nSeverity:\sMED\nStatus:\sReleased\nSubmitter:\stechsupp\nChangedBy:\shobbs\nOS:\sDigital\sUnix\nOSVersion:\sTru64\sUnix\s4.0f\swith\scurrent\spatches\nMachine:\salpha\sev56-based\sworkstation\nFixedDate:\s'2000-04-13'\nFixedInVersion:\s8.3.1\nClosedDate:\s'2000-10-25'\n\n\nName:\nTim\sMooney\n\nReproducibleScript:\nTcl\sand\sTk\shave\sautoconf\stests\sthat\sdon't\scorrectly\sdetect\show\sto\sget\sfull\sPOSIX\sthread\ssupport\son\nDigital/Tru64\sUnix.\s\sThe\sproblem\sis\sthat\smany\sof\sthe\sfunctions\sin\slibpthread.so\sare\snamed\swith\sa\s__\nprepended\sto\sthe\sfunction\sname.\s\sIf\syou\sinclude\s`pthread.h',\syou\sget\sdefines\sthat\smap\sthe\nexpected\snames\sto\sthe\sactual\ssymbols\sin\sthe\slibrary.\s\sIf\syou\sdon't\sinclude\spthread.h,\syou\sdon't\shave\nthose\sand\sthe\sAC_CHECK_LIB(pthread,pthread_mutex_init,...)\stherefore\sdoesn't\sdetect\sthat\syou\nonly\sneed\sthat\slibrary.\s\sIt\sthen\schecks\sfor\spthread_mutex_init\sin\sthe\solder\s`libpthreads.so',\swhich\shas\na\sDECthreads/early\sPOSIX\sinterface.\s\sIt\sdoes\sfind\sit\sin\sthere,\s\sand\s`-lpthreads'\sis\sthen\s(incorrectly)\nadded\sto\sthe\slist\sof\slibraries.\s\sMeanwhile,\s`-pthread'\sis\sadded\sto\sCFLAGS\sand\sLDFLAGS,\sso\s`-lpthread'\sis\sautomatically\slinked\sin.\s\sThis\smeans\sthat\swe're\slinking\swith\sboth\sthe\snewer\s`pthread'\slibrary\sand\sthe\nearlier\s`pthreads'\slibrary,\swhich\smay\scause\sproblems.\n\nThe\srelevant\soutput\sfrom\sconfigure\sfor\stcl:\n\nchecking\sfor\sbuilding\swith\sthreads...\syes\nchecking\sfor\spthread_mutex_init\sin\s-lpthread...\sno\nchecking\sfor\spthread_mutex_init\sin\s-lpthreads...\syes\n\nDesiredBehavior:\nTcl\s&\sTk's\sthread\stests\sneed\sto\suse\sAC_TRY_COMPILE\sto\sfind\spthread_mutex_init,\ssince\sAC_TRY_COMPILE\sallows\syou\sto\sspecify\snecessary\sincludes.\s\sThis\sonly\sneeds\sto\sbe\sattempted\nif\swe\sdidn't\sfind\spthread_mutex_init\sin\s-lpthread\swith\sthe\sAC_CHECK_LIB.\n\nI'm\sincluded\sa\spatch\sthat\sfixes\sthis\sfor\sTcl\s&\sTk.\n\nPatch:\nThe\spatches\sare\sat:\n\nftp://dogbert.cc.ndsu.nodak.edu/pub/tcl-8.3.0-pthread-configure.patch\nftp://dogbert.cc.ndsu.nodak.edu/pub/tk-8.3.0-pthread-configure.patch\n\nPatchFiles:\ntcl8.3.0/unix/tcl.m4\n\s\s\s\stk8.3.0/unix/aclocal.m4\n\n\n\nThis\sis\ssomewhat\scorrect,\sbut\swill\sbreak\son\ssome\ssystem\s(ie\sAIX4.2).\nThe\sproblem\sis\sthe\scompile\sworks\swith\spthread.h\sdefined,\sbut\sAIX\nstill\shas\sno\slibpthread\s(only\slibpthreads).\s\sOn\sTru64,\sthere\sdoes\nseem\sto\sbe\sa\s__pthread_mutex_init\sin\slibpthread,\sso\sperhaps\sthe\ncorrect\scheck\sis\sfor\n\s\s\s\sAC_CHECK_LIB(pthread,__pthread_mutex_init,...)\nif\sthe\sfirst\scheck\sfails.\n\nThis\sseems\sto\swork\son\sa\sTru64\sv4\smachine.\s\sThe\sbetter\sfix?\s\n--\s04/08/2000\shobbs\n\nI\sdecided\sto\sgo\swith\sthe\scheck\sfor\s__pthread_mutex_init\sin\spthread\nas\sthat\sworks\son\sTru64\sand\sAIX4.3\sand\scorrectly\sfails\son\sAIX4.2\n(where\sthe\spthread.h\scompile\sworks,\sbut\sno\slibpthread.a\sexists).\nThis\sis\sin\s8.3.1\sfor\sTcl\sand\sTk\s(tk\sdoesn't\ssupport\sthreads\sthough\ncurrently).\s\n--\s04/13/2000\shobbs
J foundin obsolete:\s8.3
J priority 5\sMedium
J resolution None
J status Open
J submitter nobody
J subsystem 75.\sTutorial
J title tcl\s&\stk's\sconfigure\sfails\sto\scorrectly\sdetect\spthread_mutex
J type Bug
K 219060ffffffffffffffffffffffffffffffffff
U nobody
Z ee137e029f641881ffe10780dc670722