compiling ZThread

Post here if you need help setting up your server, etc.
User avatar
hoop
Round Winner
Posts: 201
Joined: Tue Jul 24, 2007 7:45 am
Contact:

compiling ZThread

Post by hoop »

from http://wiki.armagetronad.net/index.php? ... or_Players :
wiki wrote: To compile ZThread with gcc-4.x, you need to pass CXXFLAGS=-fpermissive to its ./configure script
how do I pass that value? Should I edit the script, or what?
User avatar
Z-Man
God & Project Admin
Posts: 11589
Joined: Sun Jan 23, 2005 6:01 pm
Location: Cologne
Contact:

Post by Z-Man »

You just type

Code: Select all

CXXFLAGS=-fpermissive ./configure
User avatar
hoop
Round Winner
Posts: 201
Joined: Tue Jul 24, 2007 7:45 am
Contact:

Post by hoop »

so simple! thanks :)
User avatar
hoop
Round Winner
Posts: 201
Joined: Tue Jul 24, 2007 7:45 am
Contact:

Post by hoop »

I've built and installed ZThread, same for the dedicated alpha20080308.
Authentication works fine, but only in the pauses between rounds (tested with the alpha client of course).
I've done exactly what's written in the wiki page linked above.
Am I missing anything? A flag for the ZThread perhaps?
epsy
Adjust Outside Corner Grinder
Posts: 2003
Joined: Tue Nov 07, 2006 6:02 pm
Location: paris
Contact:

Post by epsy »

did you install zthreads on your own? in this case it might be in /usr/local/. if so use the -with-zthread-prefix= option at the ./configure phase

Also, are you sure you have at least version 2.3.2 of zthread ?
User avatar
hoop
Round Winner
Posts: 201
Joined: Tue Jul 24, 2007 7:45 am
Contact:

Post by hoop »

shall I add that option to the wiki?

anyway, yes: ZThread version is 2.3.2
but arma's configure says:

Code: Select all

checking for zthread-config... /usr/local/bin/zthread-config
checking for ZTHREAD - version >= 2.3.2... no
*** Could not run ZThread test program, checking why...
-lxml2 -L/usr/local/lib -lZThread -lpthread -lrt
*** The test program failed to compile or link. See the file config.log for the
*** exact error that occured. This usually means ZThread was incorrectly installed
*** or that you have moved ZThread since it was installed. In the latter case, you
*** may want to edit the zthread-config script: /usr/local/bin/zthread-config
here is the config.log
http://pastebin.com/d5f8cda40

shall I post the config.log from ZThread too?
User avatar
Z-Man
God & Project Admin
Posts: 11589
Joined: Sun Jan 23, 2005 6:01 pm
Location: Cologne
Contact:

Post by Z-Man »

One of those days, I'm going to find the guy who is responsible for /usr/local/lib not being in the library search path on Debian and... well, think of something nasty to do to him.

You either need to add /usr/local/lib to your library search path (environment variable LD_LIBRARY_PATH, IIRC), or install ZThread (and all other libraries) with prefix /usr instead of /usr/local. Use the --prefix command line argument to ZThrad's configure script for that.
User avatar
hoop
Round Winner
Posts: 201
Joined: Tue Jul 24, 2007 7:45 am
Contact:

Post by hoop »

Installed ZThread with --prefix=/usr
problem solved!
thanks again
Monkey
Match Winner
Posts: 759
Joined: Thu May 22, 2008 12:36 am
Location: England, UK

Post by Monkey »

I had the same issue a little while back. It seems that Debian/Ubuntu (hoop is on ubuntu) has a bug because, as usual, they have been fiddling around with things, in this case '/etc/ld.so.conf'. I don't use Debian any more as my main distro and I haven't looked back since.
Playing since December 2006
User avatar
Z-Man
God & Project Admin
Posts: 11589
Joined: Sun Jan 23, 2005 6:01 pm
Location: Cologne
Contact:

Post by Z-Man »

According to what I gather, it's not a bug, it's a conscious design decision. Debian does not want user-installed libraries on the system, fearing support problems.
User avatar
Lucifer
Project Developer
Posts: 8641
Joined: Sun Aug 15, 2004 3:32 pm
Location: Republic of Texas
Contact:

Post by Lucifer »

Z-Man wrote:According to what I gather, it's not a bug, it's a conscious design decision. Debian does not want user-installed libraries on the system, fearing support problems.
Yep, that's the kind of freedom Debian believes in. I use it in Kubuntu anyway, but I am starting to feel that the implementation of the ideology doesn't quite match the rhetoric anymore.
Image

Be the devil's own, Lucifer's my name.
- Iron Maiden
User avatar
Z-Man
God & Project Admin
Posts: 11589
Joined: Sun Jan 23, 2005 6:01 pm
Location: Cologne
Contact:

Post by Z-Man »

Oh, my bad. It's actually ZThread's fault, at least on (K)Ubuntu; /usr/local/lib is in /etc/ld.so.conf. Putting the path to the static lib into CFLAGS would be the task of zthread's configure script (and I think the patch I published in the other thread addresses that, too). We should be able to work around that in the configure script.
Monkey
Match Winner
Posts: 759
Joined: Thu May 22, 2008 12:36 am
Location: England, UK

Post by Monkey »

From Googling it seems that the policy is to not include '/usr/local/lib' in the search path by default.

I spoke to the Debian experts in #debian. I said "/usr/local/lib" is in '/etc/ld.so.conf'. They said that '/etc/ld.so.conf' is for run-time not compile-time. They said that libraries in '/usr/local' should be found. As soon as I mentioned that I was no longer on Debian they didn't like it and told me that if I am not on Debian I should stop wasting their time.

Ah ok I have just read your above post now but here is a little extract from #debian just for fun:
Debian expert wrote:Why don't you just use Debian packages?
Monkey wrote:A lot of packages in Debian are too old. For example, Debian Unstable version of Armagetron is 0.2.8.2.1. I don't understand how that can be in unstable when it is so old. I am on the latest 0.2.8_alpha.
Debian expert wrote:0.2.8.2.1 is actually newer than the latest 0.2.8_alpha.
Monkey wrote:lol no.
Playing since December 2006
User avatar
Z-Man
God & Project Admin
Posts: 11589
Joined: Sun Jan 23, 2005 6:01 pm
Location: Cologne
Contact:

Post by Z-Man »

Oh bugger, I was wrong a second time:
The only problem on (K)Ubuntu is that the ZThread installation fails to run ldconfig. If you do that manually, everything is fine. LIBS is set correctly already. I'll update the documentation.

And unfortunately, if plain Debian or anyone else does not include /usr/local/lib in to ld.so.conf, there's nothing we can sensibly do. There are special linker flags to hardcode search paths into the applications, but they break things badly when libraries are moved.
User avatar
ivantis
Round Winner
Posts: 269
Joined: Mon Mar 03, 2008 2:33 pm
Contact:

Post by ivantis »

sorry if this was already answered, but i got zthread to work on my ubuntu, how do i compile arma-server with it?
Image
Image
Image
Post Reply