Path: utzoo!utgpu!watmath!uunet!xanth!nic.MR.NET!shamash!halcdc!cctb!randy From: randy@cctb.mn.org (Randy Orrison) Newsgroups: unix-pc.sources Subject: Re: usnotime problems Message-ID: <149@cctb.mn.org> Date: 29 Nov 88 14:25:48 GMT References: <39030@uunet.UU.NET> Reply-To: randy@cctb.mn.org (Randy Orrison) Organization: Chemical Computer Thinking Battery, St. Paul, MN Lines: 65 In article <39030@uunet.UU.NET> pjb@pjbell.UUCP writes: |i am trying to compile the usnotime code which receintly passed thru |this group, and am having the following problem. any ideas??? |undefined first referenced | symbol in file |tgetent //lib/libc.a |tgetstr //lib/libc.a |tgetnum //lib/libc.a |ld fatal: Symbol referencing errors. No output written to a.out My system is 3.51, but I think the remarks will apply (does 3.5 have shared libraries?). When I tried to link it without the shared library, I had the same problem. There are two solutions: link it with the curses library cc -O -o usnotime usnotime.c -lcurses link it with the shared library cc -O -c usnotime.c ld -o usnotime usnotime.o /lib/crt0s.o /lib/shlib.ifile Why on earth it would want to be linking in the termcap routines, I have no idea. (I looked through the code, and still couldn't see why it wanted them!) Either of these fixes will work, though... just give it what it wants. Also, another thing I did... The first time cron ran it for me, it ran it twice! Once at 2:45, when it set the clock back 22 seconds, then again at 2:45 when it set it back 0 seconds. I added 'sleep(120);' as the first statment in main(), so that it can set the clock back up to two minutes without having cron re-run it. Question: In my crontab is a call to /etc/clockupd.wk, which is: |#sccs "@(#)fndetc:clockupd.wk 1.7" |# Write to the hardware clock every Sunday morning to accomodate |# synchronization of time between s/w and h/w clock in case day light |# saving time is being used. Wait a minute to prevent recursion. |# Note: backslash needed to avoid SCCS conflict | |sleep 60 |date `date +%m%d%H\%M` (Note: no AT&T or Convergent proprietary or copyright notices! Wow!) (Of course, this is probably included in my license - oh well, sue me.) Anyway... This reads the software clock and sets the hardware clock from it. Which does usnotime set? If it sets the hardware clock, running usnotime then clockupd sort of defeats the purpose of usnotime, doesn't it? (This is what I do, usnotime at 2:45am, then clockup at 2:50am) How difficult would it be to have usnotime set both the hardware and software clocks, so I wouldn't have to run this? (Does it already?) I could look the answers to these and more exciting questions up in the FM, but I have to run to work now. Thanks! -randy -- Randy Orrison - Chemical Computer Thinking Battery - randy@cctb.mn.org (aka randy@{umn-cs.uucp, ux.acss.umn.edu, umnacvx.bitnet, halcdc.uucp}) "Blow a lawyer to pieces / It's the obvious way Don't wait for a thesis / Do it today" - Al Stewart