baDibere Posted March 7, 2011 Share Posted March 7, 2011 Hi there,My distribution has only Enet 1.3So I compiled Enet 1.2 and placed it to /opt/enet12Before compiling 0AD, I changed source/lib/external_libs/enet.h:30 like #include "/opt/enet12/include/enet/enet.h"So there is no compilation error about enet and 0ad. But ldd pyrogenesissays that pyrogenesis needs /usr/lib/libenet.so.1. So, this is a Enet 1.3 library. What should I do to use /opt/enet12/lib/libenet.so.1 instead of /usr/lib/libenet.so.1Regards. Link to comment Share on other sites More sharing options...
Ykkrosh Posted March 7, 2011 Share Posted March 7, 2011 (What distro is this? I thought most still had 1.2, or had it under a name "enet-old" or similar.)If you have the library in a non-standard location, I think the only way to make it work is to edit build/premake/extern_libs.lua, around line 115 where it says tinsert(package.links, "enet"), and add a new line like tinsert(package.libpaths, libraries_dir.."/opt/enet12/lib")then run update-workspaces.sh and make again. I think that should take precedence over /usr/lib and make it compile with the right version. I'm not sure whether it'll still use the old when running, though - in that case you might have to run it like 'LD_LIBRARY_PATH=/opt/enet12/lib ./pyrogenesis' to make it look in the right place.(It would be nice if we had a better way to handle this situation, but I don't know what would work ) Link to comment Share on other sites More sharing options...
baDibere Posted March 7, 2011 Author Share Posted March 7, 2011 I use Pardus GNU/Linux and I prepare an unofficial PiSi(*) repository for Pardus.Unfortunately enet-old or similar one is not available for Pardus and I prepared enet12 package. Since other applications may use Enet 1.3, I want to keep it and I installed Enet 1.2 to a non-standart directory (/opt/enet12)Your solution works. But instead of tinsert(package.libpaths, libraries_dir.."/opt/enet12/lib"),I usedtinsert(package.libpaths, "/opt/enet12/lib")Because, if I use previous one, something like "-L"../../../libraries//opt/enet12/lib"" is added to pyrogenesis.make. Since I changed, only "-L"/opt/enet12/lib"" is added and I think the right one is that.After compiling, "ldd pyrogenesis" says thatlibenet.so.0 => not foundSo I used LD_LIBRARY_PATH=/opt/enet12/lib ./pyrogenesis and it works.(*) PiSi is Pardus's package management system. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now