* Sleep my program
@ 2002-06-18 13:21 Wei koong Chai
2002-06-18 14:40 ` Claudio Bley
2002-06-18 18:43 ` SCO UNIX 5.0.5 with gcc 2.95.2 link problem Alex Chan
0 siblings, 2 replies; 4+ messages in thread
From: Wei koong Chai @ 2002-06-18 13:21 UTC (permalink / raw)
To: gcc-help; +Cc: Wei koong Chai
Hi all,
I have a little gcc problem here. I need to sleep my program for a
period of time (down to micro-second).
After fumbling with different books and websites, I still can't find how
to do this. I would really appreciate if any kind soul here can give me a hand on this problem.
Please reply to me directly as i'm not subscribing the mailing list
yet...
Thank you.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Sleep my program
2002-06-18 13:21 Sleep my program Wei koong Chai
@ 2002-06-18 14:40 ` Claudio Bley
2002-06-18 18:43 ` SCO UNIX 5.0.5 with gcc 2.95.2 link problem Alex Chan
1 sibling, 0 replies; 4+ messages in thread
From: Claudio Bley @ 2002-06-18 14:40 UTC (permalink / raw)
To: Wei koong Chai; +Cc: gcc-help
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
>>>>> "Wei" == Wei koong Chai <eem1wc@eim.surrey.ac.uk> writes:
Wei> Hi all, I have a little gcc problem here. I need to sleep my
Wei> program for a period of time (down to micro-second).
Wei> After fumbling with different books and websites, I still
Wei> can't find how to do this. I would really appreciate if any
Wei> kind soul here can give me a hand on this problem.
You are a little sparse on information here. What kind of system, OS,
C library etc. ?
Additionally, this is really not a gcc question. Look up the usleep
function in your C library manual ('man usleep').
Claudio
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: Processed by Mailcrypt 3.5.6 <http://mailcrypt.sourceforge.net/>
iD8DBQE9D6iLTpSishmp0ioRAiZrAKCNbZqs3xAH4JTGUVfJx33wMezGwwCeP2ia
BXaBT02wOQmZ466DYn9KRQI=
=NjfC
-----END PGP SIGNATURE-----
^ permalink raw reply [flat|nested] 4+ messages in thread
* SCO UNIX 5.0.5 with gcc 2.95.2 link problem
2002-06-18 13:21 Sleep my program Wei koong Chai
2002-06-18 14:40 ` Claudio Bley
@ 2002-06-18 18:43 ` Alex Chan
2002-06-19 0:27 ` Alex Chan
1 sibling, 1 reply; 4+ messages in thread
From: Alex Chan @ 2002-06-18 18:43 UTC (permalink / raw)
To: gcc-help; +Cc: StanleyYu
Dear all,
When we try to build shared libraries (.so) on SCO UNIX 5.0.5 with gcc
2.95.2, it often complains with messages similar to the following (e.g.):
g++ -O -I. -I/usr/abc/isam/include -I/usr/abc/SSF/include -I/usr/abc/S
SF/ddf/cpp -I/usr/abc/utility -I/usr/local/include -I/usr/local/include -I/u
s
r/informix/incl/esql -fPIC -shared -o procf.so
procf.o -L/usr/informix/lib -L/us
r/informix/lib/esql `esql -libs` -linfxxa
relocations referenced
from file(s)
procf.o
/usr/lib/libnsl_s.a(t_accept.o)
/usr/lib/libnsl_s.a(t_bind.o)
/usr/lib/libnsl_s.a(t_connect.o)
/usr/lib/libnsl_s.a(t_close.o)
/usr/lib/libnsl_s.a(t_listen.o)
/usr/lib/libnsl_s.a(t_look.o)
/usr/lib/libnsl_s.a(t_rcv.o)
/usr/lib/libnsl_s.a(t_rcvconnect.o)
/usr/lib/libnsl_s.a(t_rcvdis.o)
/usr/lib/libnsl_s.a(t_snd.o)
/usr/lib/libnsl_s.a(t_snddis.o)
/usr/lib/libnsl_s.a(t_unbind.o)
/usr/lib/libnsl_s.a(t_optmgmt.o)
/usr/lib/libnsl_s.a(t_rcvudata.o)
/usr/lib/libnsl_s.a(t_sndudata.o)
/usr/lib/libnsl_s.a(t_sndrel.o)
/usr/lib/libnsl_s.a(t_rcvrel.o)
/usr/lib/libnsl_s.a(t_alloc.o)
/usr/lib/libnsl_s.a(t_free.o)
/usr/lib/libnsl_s.a(t_open.o)
/usr/lib/libnsl_s.a(t_sync.o)
/usr/lib/libnsl_s.a(_conn_util.o)
/usr/lib/libnsl_s.a(_utility.o)
/usr/ccs/lib/libcrypt_i.a(crypt.o)
/usr/ccs/lib/libcrypt_i.a(des_crypt.o)
fatal error: relocations remain against allocatable but non-writable
section: .
text
collect2: ld returned 1 exit status
Does it suggest that some symbols are unresolved or what?
We have solved this once (for a particular case) involving linking against
the math library -lm which comes with an archive (.a) only on SCO. We either
have to instruct the linker to static link with the math library or
reconstruct a libm.so from the archive contents to get it work.
Surely this is not a good idea in general.
Any advice?
Thanks and Regards
Alex
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: SCO UNIX 5.0.5 with gcc 2.95.2 link problem
2002-06-18 18:43 ` SCO UNIX 5.0.5 with gcc 2.95.2 link problem Alex Chan
@ 2002-06-19 0:27 ` Alex Chan
0 siblings, 0 replies; 4+ messages in thread
From: Alex Chan @ 2002-06-19 0:27 UTC (permalink / raw)
To: Alex Chan, gcc-help
Dear all,
We have found the reason now. The object files producing the shared library
was not compiled with -fPIC to generate Position Independent Codes.
Thanks anyway.
Cheers!
Alex
----- Original Message -----
From: "Alex Chan" <alexchan@task.com.hk>
To: <gcc-help@gcc.gnu.org>
Cc: "StanleyYu" <stanleyyu@task.com.hk>
Sent: Wednesday, June 19, 2002 10:28 AM
Subject: SCO UNIX 5.0.5 with gcc 2.95.2 link problem
> Dear all,
>
> When we try to build shared libraries (.so) on SCO UNIX 5.0.5 with gcc
> 2.95.2, it often complains with messages similar to the following (e.g.):
>
> g++ -O -I. -I/usr/abc/isam/include -I/usr/abc/SSF/include -I/usr/abc/S
>
SF/ddf/cpp -I/usr/abc/utility -I/usr/local/include -I/usr/local/include -I/u
> s
> r/informix/incl/esql -fPIC -shared -o procf.so
> procf.o -L/usr/informix/lib -L/us
> r/informix/lib/esql `esql -libs` -linfxxa
> relocations referenced
> from file(s)
> procf.o
> /usr/lib/libnsl_s.a(t_accept.o)
> /usr/lib/libnsl_s.a(t_bind.o)
> /usr/lib/libnsl_s.a(t_connect.o)
> /usr/lib/libnsl_s.a(t_close.o)
> /usr/lib/libnsl_s.a(t_listen.o)
> /usr/lib/libnsl_s.a(t_look.o)
> /usr/lib/libnsl_s.a(t_rcv.o)
> /usr/lib/libnsl_s.a(t_rcvconnect.o)
> /usr/lib/libnsl_s.a(t_rcvdis.o)
> /usr/lib/libnsl_s.a(t_snd.o)
> /usr/lib/libnsl_s.a(t_snddis.o)
> /usr/lib/libnsl_s.a(t_unbind.o)
> /usr/lib/libnsl_s.a(t_optmgmt.o)
> /usr/lib/libnsl_s.a(t_rcvudata.o)
> /usr/lib/libnsl_s.a(t_sndudata.o)
> /usr/lib/libnsl_s.a(t_sndrel.o)
> /usr/lib/libnsl_s.a(t_rcvrel.o)
> /usr/lib/libnsl_s.a(t_alloc.o)
> /usr/lib/libnsl_s.a(t_free.o)
> /usr/lib/libnsl_s.a(t_open.o)
> /usr/lib/libnsl_s.a(t_sync.o)
> /usr/lib/libnsl_s.a(_conn_util.o)
> /usr/lib/libnsl_s.a(_utility.o)
> /usr/ccs/lib/libcrypt_i.a(crypt.o)
> /usr/ccs/lib/libcrypt_i.a(des_crypt.o)
> fatal error: relocations remain against allocatable but non-writable
> section: .
> text
>
> collect2: ld returned 1 exit status
>
>
> Does it suggest that some symbols are unresolved or what?
>
> We have solved this once (for a particular case) involving linking against
> the math library -lm which comes with an archive (.a) only on SCO. We
either
> have to instruct the linker to static link with the math library or
> reconstruct a libm.so from the archive contents to get it work.
>
> Surely this is not a good idea in general.
>
> Any advice?
>
> Thanks and Regards
>
> Alex
>
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2002-06-19 7:27 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-06-18 13:21 Sleep my program Wei koong Chai
2002-06-18 14:40 ` Claudio Bley
2002-06-18 18:43 ` SCO UNIX 5.0.5 with gcc 2.95.2 link problem Alex Chan
2002-06-19 0:27 ` Alex Chan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).