Subject: [Nel] OpenAL issues to build nel

From: David MENTRE <[email-masked]>
Date: 24 Jan 2002 18:02:08 +0100

Hi NeL guys,

[ BTW, should I send my compilation issues on the mailing list or should
I create a bug report? ]

The nel/configure scripts doesn't find the OpenAL libraries on my
machine which are however installed :

david@oops:~/pub/NeL/code/nel$ ./configure --with-stlport=/usr/local/Installed/STLport4.5/ --with-stlport-include=/usr/local/Installed/STLport4.5/include/stlport --with-stlport-lib=/usr/local/Installed/STLport4.5/lib/ --enable-sound --enable-ai --disable-xmltest --with-openal=/usr/local/Installed/OpenAL-1.0/ --with-openal-lib=/usr/local/Installed/OpenAL-1.0/lib/ --prefix=/usr/local/Installed/NeL
[...]
checking for OpenAL headers... /usr/local/Installed/OpenAL-1.0//include
checking for OpenAL libraries... no
                                 ^^ why??
[...]

david@oops:~/pub/NeL/code/nel$ ls /usr/local/Installed/OpenAL-1.0/lib
libopenal.a  libopenal.so  libopenal.so.0  libopenal.so.0.0.6

It was working before, as I has been able to compile nel at least once,
with the same configure (but without the --with-openal-lib option, only
with the --with-openal option).

Any idea?

Best regards,
d.
-- 
 [email-masked]

---

From: David MENTRE <[email-masked]>
Date: 24 Jan 2002 20:02:27 +0100

> machine which are however installed :

However, nel compiles without sound enabled.

d.
-- 
 [email-masked]

---

From: David MENTRE <[email-masked]>
Date: 24 Jan 2002 21:03:19 +0100

> However, nel compiles without sound enabled.

Well, nearly. Once nel/bootstrap has run, it is no longer to configure
nel *without* sound:
david@oops:~/pub/NeL/code/nel$ ./configure --with-stlport=/usr/local/Installed/STLport4.5/ --with-stlport-include=/usr/local/Installed/STLport4.5/include/stlport --with-stlport-lib=/usr/local/Installed/STLport4.5/lib/ --enable-ai  --prefix=/usr/local/Installed/NeL --disable-sound
checking for OpenAL headers... no
checking for OpenAL libraries... no
configure: error: OpenAL is needed to compile NeL (http://www.openal.org).

Best regards,
d.
-- 
 [email-masked]

---

From: nik gaffney <[email-masked]>
Date: Fri, 25 Jan 2002 18:41:07 +0100 (CET)

ok,. so nel (from yesterdays cvs) compiles + installs fine on debian-ppc with only a little change to time_nl.cpp. for the moment, it just fudges a return value to CTime::getPerformanceTime

specifcally here ->

#else // NL_OS_WINDOWS
	unsigned long long int x;
	__asm__ volatile (".byte 0x0f, 0x31" : "=A" (x));
	return x;
#endif // NL_OS_WINDOWS

what is this line of asm actually doing?+
 and could it also be done in c?

nk

---

From: David MENTRE <[email-masked]>
Date: 25 Jan 2002 19:07:33 +0100

nik gaffney <[email-masked]> writes:

> ok,. so nel (from yesterdays cvs) compiles + installs fine on
> debian-ppc with only a little change to time_nl.cpp. for the moment,
> it just fudges a return value to CTime::getPerformanceTime

I've been able to run it? You have an NVidia graphic card?

Best regards,
d.
-- 
 [email-masked]

---

From: nik gaffney <[email-masked]>
Date: Fri, 25 Jan 2002 19:16:22 +0100 (CET)

> I've been able to run it? You have an NVidia graphic card?

 i havent run it yet., is there a simpler demo than snowballs, or is that
the test-suite :)

 still trying to compile the ai code, a few small problems with python,
but the sound stuff compiles fine.

video card im using is ati, the nvidia drivers for ppc linux are still in
the works i think.

nk

---

From: David MENTRE <[email-masked]>
Date: 25 Jan 2002 19:29:28 +0100

> but the sound stuff compiles fine.

Could you give me your configure ?

d.
-- 
 [email-masked]

---

From: nik gaffney <[email-masked]>
Date: Fri, 25 Jan 2002 19:41:26 +0100 (CET)

> Could you give me your configure ?

im not sure how usefull it would be., best method is to get rid of errors
that ./configure script spits out.

---

From: Vincent Caron <[email-masked]>
Date: 26 Jan 2002 01:52:35 +0100

>  and could it also be done in c?

This is an invokation of the RDTSC x86 instruction, present in PPro/PII
and newer models. It gives the value of a 64bit counter which is init'ed
to zero at CPU boot, and inc'ed at each CPU cycle. You can't convert it
to 'real time' without the knowledge of the CPU internal clock speed.

I believe this is an unneeded optimisation because :

1) gettimeofday() is often precise enough (sub-millisec) for a game (say
100fps, thus 10ms average frame period)

2) the implementation of gettimeofday() on Linux (it's a system call, so
the glibc proto is only a thin wrapper) has been supporting RDTSC since
a while (see arch/i386/kernel/time.c:do_fast_gettimeoffset(void))

Conclusion: use gettimeofday() for time measures on Linux ! :)

---

From: "Vianney Lecroart" <[email-masked]>
Date: Mon, 28 Jan 2002 10:29:23 +0100

Hi,

> I believe this is an unneeded optimisation because :

We use the RDTSC only for profile/bench purpose when we want to tune little
part of code but if CTime::getPerformanceTime() returns 0, all the code will
work fine (but you ll don't have profil timing, but anyway, they are
temporary). But if  you want, you can use gettimeofday() instead of
returning 0.

PPC issues:

Even if you can compile NeL and NeL services (NeLNS) I think you should have
some problem between communication if you use x86 and PPC because it could
have some bug in the endianess functions in serialization (we never really
try them). So if you have some Stream Exception, it could come from this
problem.

Vianney Lecroart
---
lead network programmer / nevrax.com
icq#: 6870415
homepage: http://ace.planet-d.net
www.geekcode.com: GCS/E d- s+++: a-- C+++$ UL++ P- L+++>+$ E+>- W++ N+ o? K-
w++$ O- M- V- PS- PE? Y PGP t 5? X+ R- tv++ b- DI D+ G e++ h+ r-- y?

---

From: Cedric Valignat <[email-masked]>
Date: Mon, 28 Jan 2002 16:10:15 +0100

Hi David, hi all,

> checking for OpenAL libraries... no

It's because i made a little syntax error in the OpenAL macro ... it's
fixed ... sorry about that :-(

Thanks for the report ...

-- 
Cedric

    Frappe ta tête contre une cruche. Si tu obtiens un son creux,
    n'en déduis pas que c'est forcément la cruche qui est vide.

                                                       Lao Tseu.

---

From: Cedric Valignat <[email-masked]>
Date: Mon, 28 Jan 2002 16:24:34 +0100

Another stupid mistake from me ... it's fixed ... grrrr

Thanks again David :-)

I hope it will works fine now ;-)

-- 
Cedric

                                                       Lao Tseu.