[torqueusers] TORQUE-3.0.3 on Mac OS X 10.7.2

Jon Bringhurst jonb at lanl.gov
Tue Jan 17 09:33:13 MST 2012


One more time. It looks like -lrt is set through the configure.ac. So, just to see if things are working, you can remove it from there and rerun 'autogen.sh && ./configure && make all'

For a more permanent patch, it might be a good idea to merge the check into torque/buildutils/acx_pthread.m4 and remove the (redundant?) check from configure.ac.

-Jon

On Jan 17, 2012, at 9:25 AM, Jon Bringhurst wrote:

> Oh, I forgot to address your original issue. -lrt is just the realtime lib. So, if you've found a way to safely use gettimeofday, there's (probably) no need for it in the Makefile.am.
> 
> -Jon
> 
> On Jan 17, 2012, at 9:20 AM, Jon Bringhurst wrote:
> 
>> I haven't looked at this particular section of code, so your patch may work just fine. However, I'd just like to point out that gettimeofday is not real-time safe. Assuming something depends on this property, using gettimeofday may cause a (really difficult to debug) race condition.
>> 
>> -Jon
>> 
>> On Jan 16, 2012, at 9:33 AM, Rashid, Z. (Zahid) wrote:
>> 
>>> Instead of using the mach_absolute_time(.....) suggested by Jon, I used gettimeofday(.....) as described on the page;
>>> 
>>> http://www.clusterresources.com/bugzilla/attachment.cgi?id=95&action=diff
>>> 
>>> which obviously works. 
>>> With another minor change (i.e., changing mom_mach.c:130 #include <ufs/ufs/quota.h> to #include <sys/quota.h> because the earlier does not work) I get another error during <make>
>>> 
>>> gcc -g -O2 -o .libs/pbs_mom catch_child.o mom_comm.o mom_inter.o mom_main.o mom_server.o prolog.o requests.o start_exec.o checkpoint.o tmsock_recov.o req_quejob.o job_func.o attr_recov.o dis_read.o job_attr_def.o job_recov.o process_request.o reply_send.o resc_def_all.o job_qs_upgrade.o  darwin/libmommach.a ../lib/Libattr/libattr.a ../lib/Libsite/libsite.a ../lib/Libutils/libutils.a ../lib/Libpbs/.libs/libtorque.dylib -lpthread -lrt
>>> ld: library not found for -lrt
>>> collect2: ld returned 1 exit status
>>> make[3]: *** [pbs_mom] Error 1
>>> make[2]: *** [all-recursive] Error 1
>>> make[1]: *** [all-recursive] Error 1
>>> make: *** [all-recursive] Error 1
>>> 
>>> I tried Google to get some clue but did not get anywhere yet. Any help/suggestion?
>>> 
>>> Regards.
>>> 
>>> Zahid
>>> 
>>> ________________________________________
>>> From: torqueusers-bounces at supercluster.org [torqueusers-bounces at supercluster.org] on behalf of Jon Bringhurst [jonb at lanl.gov]
>>> Sent: 13 January 2012 23:02
>>> To: Torque Users Mailing List
>>> Subject: Re: [torqueusers] TORQUE on Mac OS X 10.7.2
>>> 
>>> Instead of clock_gettime(...) you need to use mach_absolute_time(...).
>>> 
>>> http://developer.apple.com/library/mac/#qa/qa1398/_index.html
>>> 
>>> Example patch that was used for mysqld: http://lists.mysql.com/commits/70966
>>> 
>>> -Jon
>>> 
>>> On Jan 13, 2012, at 2:43 PM, Rashid, Z. (Zahid) wrote:
>>> 
>>>> Dear All,
>>>> 
>>>> I am trying to compile TORQUE on Mac Book Pro (Intel Core i7, NCores = 4) with OS X 10.7.2, Xcode 4.2, and gcc 4.2.1 [Target: i686-apple-darwin11
>>>> Configured with: /private/var/tmp/llvmgcc42/llvmgcc42-2336.1~1/src/configure --disable-checking --enable-werror --prefix=/Developer/usr/llvm-gcc-4.2 --mandir=/share/man --enable-languages=c,objc,c++,obj-c++ --program-prefix=llvm- --program-transform-name=/^[cg][^.-]*$/s/$/-4.2/ --with-slibdir=/usr/lib --build=i686-apple-darwin11 --enable-llvm=/private/var/tmp/llvmgcc42/llvmgcc42-2336.1~1/dst-llvmCore/Developer/usr/local --program-prefix=i686-apple-darwin11- --host=x86_64-apple-darwin11 --target=i686-apple-darwin11 --with-gxx-include-dir=/usr/include/c++/4.2.1
>>>> Thread model: posix
>>>> gcc version 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.1.00)] installed.
>>>> 
>>>> I want to compile TORQUE on this machine.
>>>> 
>>>> Torque-3.0.3 configured with
>>>> 
>>>> only "configure" gives the following error when I do "make"
>>>> 
>>>> gcc -DHAVE_CONFIG_H -I. -I. -I../../../src/include -I../../../src/include -I../../../src/lib/Libdis -DIFF_PATH=\"/usr/local/torque/sbin/pbs_iff\" -DPBS_DEFAULT_FILE=\"/var/spool/torque/server_name\" -DPBS_SERVER_HOME=\"/var/spool/torque\" -g -O2 -MT pbsD_connect.lo -MD -MP -MF .deps/pbsD_connect.Tpo -c ../Libifl/pbsD_connect.c  -fno-common -DPIC -o .libs/pbsD_connect.o
>>>> ../Libifl/pbsD_connect.c: In function ‘send_unix_creds’:
>>>> ../Libifl/pbsD_connect.c:688: error: ‘struct ucred’ has no member named ‘cr_uid’
>>>> ../Libifl/pbsD_connect.c:689: error: ‘struct ucred’ has no member named ‘cr_groups’
>>>> make[3]: *** [pbsD_connect.lo] Error 1
>>>> make[2]: *** [all-recursive] Error 1
>>>> make[1]: *** [all-recursive] Error 1
>>>> make: *** [all-recursive] Error 1
>>>> 
>>>> With
>>>> 
>>>> configure --disable-unixsockets --disable-gcc-warnings
>>>> 
>>>> or
>>>> 
>>>> configure --with-default-server=name --with-server-home=/var/spool/pbs --with-rcp=scp --disable-unixsockets --disable-gcc-warnings
>>>> 
>>>> or
>>>> 
>>>> configure --with-default-server=name --with-server-home=/var/spool/pbs --with-rcp=scp --host=x86_64-apple-darwin11 --build=x86_64-apple-darwin11 --target=x86_64-apple-darwin11 --disable-unixsockets  --disable-gcc-warnings
>>>> 
>>>> always gives the following error when I run "make" command.
>>>> 
>>>> if gcc -DHAVE_CONFIG_H -I. -I. -I../../../src/include  -I../../../src/include   -g -O2 -MT u_dynamic_string.o -MD -MP -MF ".deps/u_dynamic_string.Tpo" -c -o u_dynamic_string.o u_dynamic_string.c; \
>>>> then mv -f ".deps/u_dynamic_string.Tpo" ".deps/u_dynamic_string.Po"; else rm -f ".deps/u_dynamic_string.Tpo"; exit 1; fi
>>>> u_threadpool.c: In function ‘work_thread’:
>>>> u_threadpool.c:246: error: ‘CLOCK_REALTIME’ undeclared (first use in this function)
>>>> u_threadpool.c:246: error: (Each undeclared identifier is reported only once
>>>> u_threadpool.c:246: error: for each function it appears in.)
>>>> make[3]: *** [u_threadpool.o] Error 1
>>>> make[3]: *** Waiting for unfinished jobs....
>>>> make[2]: *** [all-recursive] Error 1
>>>> make[1]: *** [all-recursive] Error 1
>>>> make: *** [all-recursive] Error 1
>>>> 
>>>> In "configure" it does not show any error or warning message.
>>>> 
>>>> I also tried the older versions of TORQUE
>>>> TORQUE-3.0.0 version gives error
>>>> 
>>>> if gcc -DHAVE_CONFIG_H -I. -I. -I../../src/include  -I../../src/include  -DPBS_SERVER_HOME=\"/var/spool/pbs\" -DPBS_ENVIRON=\"/var/spool/pbs/pbs_environment\" -g -O2 -MT req_runjob.o -MD -MP -MF ".deps/req_runjob.Tpo" -c -o req_runjob.o req_runjob.c; \
>>>> then mv -f ".deps/req_runjob.Tpo" ".deps/req_runjob.Po"; else rm -f ".deps/req_runjob.Tpo"; exit 1; fi
>>>> req_runjob.c: In function ‘post_sendmom’:
>>>> req_runjob.c:1135: error: ‘ulong’ undeclared (first use in this function)
>>>> req_runjob.c:1135: error: (Each undeclared identifier is reported only once
>>>> req_runjob.c:1135: error: for each function it appears in.)
>>>> req_runjob.c:1135: error: expected ‘;’ before ‘addr’
>>>> req_runjob.c:1266: error: ‘addr’ undeclared (first use in this function)
>>>> make[2]: *** [req_runjob.o] Error 1
>>>> make[1]: *** [all-recursive] Error 1
>>>> make: *** [all-recursive] Error 1
>>>> 
>>>> while TORQUE-2.5.0 or earlier versions give
>>>> 
>>>> if gcc -DHAVE_CONFIG_H -I. -I. -I../../../src/include  -I../../../src/include -DPBS_MOM -DDEMUX=\"/usr/local/torque/sbin/pbs_demux\"   -g -O2 -MT mom_mach.o -MD -MP -MF ".deps/mom_mach.Tpo" -c -o mom_mach.o mom_mach.c; \
>>>> then mv -f ".deps/mom_mach.Tpo" ".deps/mom_mach.Po"; else rm -f ".deps/mom_mach.Tpo"; exit 1; fi
>>>> mom_mach.c:130:27: error: ufs/ufs/quota.h: No such file or directory
>>>> mom_mach.c: In function ‘quota’:
>>>> mom_mach.c:3002: error: storage size of ‘qi’ isn’t known
>>>> mom_mach.c:3166: error: ‘Q_GETQUOTA’ undeclared (first use in this function)
>>>> mom_mach.c:3166: error: (Each undeclared identifier is reported only once
>>>> mom_mach.c:3166: error: for each function it appears in.)
>>>> make[3]: *** [mom_mach.o] Error 1
>>>> make[2]: *** [all-recursive] Error 1
>>>> make[1]: *** [all-recursive] Error 1
>>>> make: *** [all-recursive] Error 1
>>>> 
>>>> I also tried the Intel icc instead of gcc in all cases but it does not seem compiler dependent errors.
>>>> With version 3.0.3, perhaps the "clock_gettime(CLOCK_REALTIME, &ts);" is not available in Max OS X. but how can I get around this? Any help with any of the above versions of TORQUE would be appreciated.
>>>> 
>>>> Regards.
>>>> 
>>>> Zahid
>>>> _______________________________________________
>>>> torqueusers mailing list
>>>> torqueusers at supercluster.org
>>>> http://www.supercluster.org/mailman/listinfo/torqueusers
>>> 
>>> _______________________________________________
>>> torqueusers mailing list
>>> torqueusers at supercluster.org
>>> http://www.supercluster.org/mailman/listinfo/torqueusers
>>> _______________________________________________
>>> torqueusers mailing list
>>> torqueusers at supercluster.org
>>> http://www.supercluster.org/mailman/listinfo/torqueusers
>> 
>> _______________________________________________
>> torqueusers mailing list
>> torqueusers at supercluster.org
>> http://www.supercluster.org/mailman/listinfo/torqueusers
> 
> _______________________________________________
> torqueusers mailing list
> torqueusers at supercluster.org
> http://www.supercluster.org/mailman/listinfo/torqueusers



More information about the torqueusers mailing list