Subject: [Nel] Compiling NeL on debian woody + error during compilation

From: David Mentre <[email-masked]>
Date: 05 Jan 2002 14:09:41 +0100

Hello all NeL developers and users,

I'm trying to compile NeL on debian woody/testing 3.0.

First of all, here is the list of needed packages :
 libxml2-dev libttf-dev autoconf automake libtool flex bison
 python1.5-dev xlibmesa-dev

However, both STLport4.5 and OpenAL (from cvs) should be installed
manually.

Here is my configure :
./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/

Now, the bad news: the compilation in nel/ fails.

c++ -DHAVE_CONFIG_H -I. -I. -I../../include -I/usr/include/libxml2/libxml -I/usr/include/libxml2 -I/usr/local/Installed/STLport4.5/include/stlport -O3 -ftemplate-depth-24 -Wno-multichar -D_REENTRANT -I/usr/X11R6/include -Wp,-MD,.deps/mutex.pp -c mutex.cpp  -fPIC -DPIC -o .libs/mutex.lo
mutex.cpp: In method `NLMISC::CUnfairMutex::CUnfairMutex(const _STL::string &)':
mutex.cpp:246: `PTHREAD_MUTEX_FAST_NP' undeclared (first use this function)
mutex.cpp:246: (Each undeclared identifier is reported only once
mutex.cpp:246: for each function it appears in.)
make[3]: *** [mutex.lo] Error 1
make[3]: Leaving directory `/home/david/pub/NeL/code/nel/src/misc'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/david/pub/NeL/code/nel/src/misc'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/david/pub/NeL/code/nel/src'
make: *** [all-recursive] Error 1

I've not found this symbol in .c nor .h. Is it a standard symbol that
should be included (from STLport ?) or is it an forgotten NeL symbol?

Hope I'm not doing something stupid.

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

---

From: David Mentre <[email-masked]>
Date: 05 Jan 2002 15:19:03 +0100

> should be included (from STLport ?) or is it an forgotten NeL symbol?

Ok. I'm stupid. PTHREAD_MUTEX_FAST_NP is defined in pthread.h which is
included. I'm not fluent at all with C++ so I can't say more.

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

---

From: David Mentre <[email-masked]>
Date: 05 Jan 2002 23:02:07 +0100

> mutex.cpp:246: `PTHREAD_MUTEX_FAST_NP' undeclared (first use this function)

Ok. I've finally compiled nel/ with the following hack:
CUnfairMutex::CUnfairMutex(const std::string &name)
{
//      pthread_mutexattr_t attr;
//      pthread_mutexattr_init( &attr );
//      // Fast mutex. Note: on Windows all mutexes are recursive
//      pthread_mutexattr_setkind_np( &attr, PTHREAD_MUTEX_FAST_NP ); //PTHREAD_MUTEX_ERRORCHECK_NP );//PTHREAD_MUTEX_ADAPTIVE_NP );//PTHREAD_MUTEX_RECURSIVE_NP );
        pthread_mutex_init( &mutex, NULL );
        //      pthread_mutexattr_destroy( &attr );
}

 It comments everything except the pthread_mutex_init() call. I don't
 know why the original code doesn't work.

Next steps nelns and snowball2. :)

d.
-- 
 [email-masked]

---

From: David Mentre <[email-masked]>
Date: 06 Jan 2002 00:00:39 +0100

> Next steps nelns and snowball2. :)

Ok. I've now compiled all required binaries. But I have some remaining
issues:

 - I need to set
   LD_LIBRARY_PATH=/usr/local/Installed/NeL/lib/:/usr/local/Installed/STLport4.5/lib/
   otherwise libraries are not found. Strange as their location was
   given to the various configure script.

 - when running snowballs2 binary, I get the following error:
david@oops:~/pub/NeL/code/snowballs2/client$ /usr/local/Installed/NeL/bin/snowballs 
INF20825 client.cpp 145 : Starting Snowballs !
WRN20825 path.cpp 440 : CPath::addSearchPath(data/pacs/, 0, 1): 'data/pacs/' is not found, skip it
WRN20825 path.cpp 440 : CPath::addSearchPath(data/anims/, 0, 1): 'data/anims/' is not found, skip it
WRN20825 dru.cpp 95 : when loading dynamic library 'libnel_drv_opengl.so': /usr/local/Installed/NeL/lib/libnel_drv_opengl.so: undefined symbol: glSetFenceNV
WRN20825 common.cpp 390 : Exception will be launched: libnel_drv_opengl.so not found
Aborted

Any idea where I should look to solve this issue? I'm stuck.

My config:
XFree86 4.1.0.1 on ATI rage 128.
Mesa 4.0.1 (as given by debian dpkg)
some glxinfo:
 OpenGL vendor string: VA Linux Systems, Inc.
 OpenGL renderer string: Mesa DRI Rage128 20010405 AGP 1x x86/MMX
 OpenGL version string: 1.2 Mesa 3.4.2

Tell me if you need further info.

Any help would be very appreciated.

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

---

From: Thomas RIBO <[email-masked]>
Date: Mon, 7 Jan 2002 19:54:14 +0100

> david@oops:~/pub/NeL/code/snowballs2/client$
> /usr/local/Installed/NeL/bin/snowballs INF20825 client.cpp 145 :
> Starting Snowballs !
> WRN20825 path.cpp 440 : CPath::addSearchPath(data/pacs/, 0, 1):
> 'data/pacs/' is not found, skip it WRN20825 path.cpp 440 :
> CPath::addSearchPath(data/anims/, 0, 1): 'data/anims/' is not found,

Did you download the data pack?

-- 
[email-masked]
"Le temps ne fait rien à l'affaire, quand on est con, on-est-con !"
-- Georges Brassens

---

From: David Mentre <[email-masked]>
Date: 08 Jan 2002 21:21:33 +0100

> Did you download the data pack?

Yes.

I think my problem is more a library issue.

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

---

From: David Mentre <[email-masked]>
Date: 12 Jan 2002 23:35:14 +0100

> > Did you download the data pack?

However, I just discovered I did not downloaded the LATEST data pack. It
would be necessary, I think, to put a link to
/download/cvs/ in snowballs2/README.

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

---

From: Cedric Valignat <[email-masked]>
Date: Wed, 23 Jan 2002 15:07:00 +0100

Hi David,

> /download/cvs/ in snowballs2/README.

Oops, i add a line about the latest Snowballs data pack in the Requirement
section in the INSTALL file of Snowballs2 ... sorry about that.

Thanks a lot for your help ...

Cedric.