nanosleep for holodeck?

Hi,

I get a undefined symbol nanospeed when compiling todays head, on solaris with sun forte c. I do not get the holodeck tools compiled for that reason.

CU Lars.

Hi Lars,

I don't know what's going on with Version.c -- try removing it and running "rmake Version.c" in your src/rt directory. Send me the output if there's an error.

As for nanosleep(), it's probably in some odd library. Run "man nanosleep" and see what library it says it's in. If you can't add the appropriate link option to the Rmakefile in src/hd, try removing the calls from rhd_ogl.c and rhd_x11.c. They aren't essential.

-Greg

···

From: "Lars O. Grobe" <[email protected]>
Date: March 8, 2006 12:01:21 PM PST

Hi,

I get a undefined symbol nanospeed when compiling todays head, on solaris with sun forte c. I do not get the holodeck tools compiled for that reason.

CU Lars.

On 08/03/06, 21:32:48, Greg Ward <[email protected]> wrote regarding
Re: [Radiance-dev] nanosleep for holodeck?:

As for nanosleep(), it's probably in some odd library. Run "man
nanosleep" and see what library it says it's in. If you can't add
the appropriate link option to the Rmakefile in src/hd, try removing
the calls from rhd_ogl.c and rhd_x11.c. They aren't essential.

nanosleep for Solaris is in lib rt:

$ nm -D /usr/lib/librt.so | grep nanosleep
[76] | 0| 0|FUNC |GLOB |0 |UNDEF |__nanosleep
[104] | 10848| 36|FUNC |GLOB |0 |10 |_nanosleep
[170] | 10848| 36|FUNC |WEAK |0 |10 |nanosleep

So I think you can see a problem, the name clash this the radiance
rt lib. To compile I patch to change the name of the radiance librt.a
lib to libradrt.a and -lrt to -lradrt throughout. As the static lib
is temporary this affects build only.

Would be great if similar renaming was made to the distribution's
makefiles.

James

I seem to recall running across this problem under Solaris years ago. I can't believe they haven't renamed their library by now, so it doesn't conflict with mine!

An easy workaround is to put it on the compile line explicitly as "/usr/lib/librt.so" instead of the shorthand -lrt, which is already there. Since no other system uses it and I can't add -lrt to the Rmakefile anyway, you might as well give the full path for Solaris.

In other words, I could rename my library, but it would only save you and other Solaris users from typing 14 characters, while requiring that I alter every makefile in Radiance. Even if I make the changes, you still need to go in and edit your src/hd/Rmakefile to add the real-time library link.

-Greg

···

From: James Lee <[email protected]>
Date: March 9, 2006 10:22:38 AM PST

On 08/03/06, 21:32:48, Greg Ward <[email protected]> wrote regarding
Re: [Radiance-dev] nanosleep for holodeck?:

As for nanosleep(), it's probably in some odd library. Run "man
nanosleep" and see what library it says it's in. If you can't add
the appropriate link option to the Rmakefile in src/hd, try removing
the calls from rhd_ogl.c and rhd_x11.c. They aren't essential.

nanosleep for Solaris is in lib rt:

$ nm -D /usr/lib/librt.so | grep nanosleep
[76] | 0| 0|FUNC |GLOB |0 |UNDEF |__nanosleep
[104] | 10848| 36|FUNC |GLOB |0 |10 |_nanosleep
[170] | 10848| 36|FUNC |WEAK |0 |10 |nanosleep

So I think you can see a problem, the name clash this the radiance
rt lib. To compile I patch to change the name of the radiance librt.a
lib to libradrt.a and -lrt to -lradrt throughout. As the static lib
is temporary this affects build only.

Would be great if similar renaming was made to the distribution's
makefiles.

James

regarding Re: [Radiance-dev] nanosleep for holodeck?:

An easy workaround is to put it on the compile line explicitly as "/
usr/lib/librt.so" instead of the shorthand -lrt, which is already
there. Since no other system uses it and I can't add -lrt to the
Rmakefile anyway, you might as well give the full path for Solaris.

In other words, I could rename my library, but it would only save you
and other Solaris users from typing 14 characters, while requiring
that I alter every makefile in Radiance. Even if I make the changes,
you still need to go in and edit your src/hd/Rmakefile to add the
real-time library link.

Fair point although you do provide a makeall and platform/sunos.cfg
which could take care of it.

These 14 characters are needed in several places, for each new
release and by each user. I will cope as I have been, I edit the
make files for other reasons anyway.

More importantly, I hope anyone else with the problem will read this
and now know what to do.

James.

···

On 09/03/06, 16:29:18, Gregory "J." Ward <[email protected]> wrote

Hi James,

Schorsch is the one working on the Python build scripts, which as you say can probably take care of this handily. To get it to work using the Rmakefile's and makeall, I would have to add a libraries option specific to the hd directory, which would be a very ugly solution.

I agree that it should be in there, but I don't have access to a Solaris system so it's a bit difficult for me to even test out a solution.

-Greg

···

From: James Lee <[email protected]>
Date: March 10, 2006 11:45:14 AM PST

On 09/03/06, 16:29:18, Gregory "J." Ward <[email protected]> > wrote
regarding Re: [Radiance-dev] nanosleep for holodeck?:

An easy workaround is to put it on the compile line explicitly as "/
usr/lib/librt.so" instead of the shorthand -lrt, which is already
there. Since no other system uses it and I can't add -lrt to the
Rmakefile anyway, you might as well give the full path for Solaris.

In other words, I could rename my library, but it would only save you
and other Solaris users from typing 14 characters, while requiring
that I alter every makefile in Radiance. Even if I make the changes,
you still need to go in and edit your src/hd/Rmakefile to add the
real-time library link.

Fair point although you do provide a makeall and platform/sunos.cfg
which could take care of it.

These 14 characters are needed in several places, for each new
release and by each user. I will cope as I have been, I edit the
make files for other reasons anyway.

More importantly, I hope anyone else with the problem will read this
and now know what to do.

James.

Gregory J. Ward wrote:

Schorsch is the one working on the Python build scripts, which as you
say can probably take care of this handily. To get it to work using
the Rmakefile's and makeall, I would have to add a libraries option
specific to the hd directory, which would be a very ugly solution.

The Python build system doesn't build one big library but several
smaller ones, so it didn't have this problem.

On the other side, I have taken the liberty of modifying all the
Rmakefiles, renaming the library from librt.a to librtrad.a.
This was mostly a straightforward search and replace operation,
without any obvious difficulties. I'm sure people will start to
scream soon, should I have broken anything in the proces...

-schorsch

···

--
Georg Mischler -- simulations developer -- schorsch at schorsch com
+schorsch.com+ -- lighting design tools -- http://www.schorsch.com/

Hi Schorsch,

Welcome back -- a lot of folks have been asking after you, wondering where you went. Madagascar, again?

Thanks for updating the library links. I tested out your changes, and from what I can tell it all seems to work. (Of course, I had to go and fix my external projects that link to the Radiance library, but that wasn't such a big deal.)

-Greg

···

From: Georg Mischler <[email protected]>
Date: March 10, 2006 11:44:41 AM PST

Gregory J. Ward wrote:

Schorsch is the one working on the Python build scripts, which as you
say can probably take care of this handily. To get it to work using
the Rmakefile's and makeall, I would have to add a libraries option
specific to the hd directory, which would be a very ugly solution.

The Python build system doesn't build one big library but several
smaller ones, so it didn't have this problem.

On the other side, I have taken the liberty of modifying all the
Rmakefiles, renaming the library from librt.a to librtrad.a.
This was mostly a straightforward search and replace operation,
without any obvious difficulties. I'm sure people will start to
scream soon, should I have broken anything in the proces...

-schorsch