• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Compiling I have multiple versions of Lua installed, but can't select the one i want

Eventide

Member
Joined
Sep 16, 2008
Messages
79
Reaction score
6
Location
Brasil
How can i setup cmake/make to use the correct Lua version? I'm not sure that is the problem, but it seems it is, i already have that problem when compiling OTClient.

However, the error that make outputs is:
Linking CXX executable tfs
/usr/bin/ld: /usr/local/lib/liblua.a(loadlib.o): undefined reference to symbol 'dlclose@@GLIBC_2.2.5'
//lib/x86_64-linux-gnu/libdl.so.2: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status

I already googled this issue, and one of the answers i found is to use LIBS=-ldl make instead of make, it didn't solved anything

Of course with a proper IDE that would be relatively easy to solve, i just need to change the path to the library and that's it, but I'm still too noob on Linux to properly transfer a project from cmake/make to an IDE project, so, any help on that would be AMAZING too.
 
Just uninstall the other versions of lua meanwhile?
Yeah, that would work, but i have several Lua versions because each project uses one, OTClient uses 5.1, TFS uses 5.2 and my own project uses 5.3, I'm not going to install/remove/install every time I'm working on a different project, that's extremely counter-productive.
 
Yeah, that would work, but i have several Lua versions because each project uses one, OTClient uses 5.1, TFS uses 5.2 and my own project uses 5.3, I'm not going to install/remove/install every time I'm working on a different project, that's extremely counter-productive.
Then i work recommend upgrading tfs and otclient to use 5.3 and remove the old ones
 
I suppose you installed them with different names (with versionname or number).

There are two variables to make that should define the right version to use.

Variable | Description | Default Value
USE_LUA | List of versions the port can use | All available versions
USE_LUA_NOT | List of versions the port can not use | None

Well, there is a lot of better information at the freebsd page.

You can take a look here: http://people.freebsd.org/~rafan/ph/using-lua.html
 
I suppose you installed them with different names (with versionname or number).

There are two variables to make that should define the right version to use.

Variable | Description | Default Value
USE_LUA | List of versions the port can use | All available versions
USE_LUA_NOT | List of versions the port can not use | None

Well, there is a lot of better information at the freebsd page.

You can take a look here: http://people.freebsd.org/~rafan/ph/using-lua.html
I solved it in a simpler way, just installed cmake-gui and then it's easier to configure, even managed to make a CodeBlocks project from it! But thanks anyways, really, knowledge never is too much.
 
I solved it in a simpler way, just installed cmake-gui and then it's easier to configure, even managed to make a CodeBlocks project from it! But thanks anyways, really, knowledge never is too much.

You get a plus on my list, not every OTLander post their solutions here, keep your work up, this forum needs more people like you!

As you say, knowledge is never enough. :)
 
I had same problem on Linux Mint 18 and TFS 1.x. With normal libraries everything worked fine, but after I compiled and installed LUA 5.1 for TFS 0.4 it started showing that error.
I fixed it by adding:
PHP:
set(CMAKE_CXX_STANDARD_LIBRARIES -ldl)
Under:
PHP:
set(CMAKE_CXX_FLAGS_PERFORMANCE "${CMAKE_CXX_FLAGS_RELEASE} -march=native")
In CMakeLists.txt
 
Back
Top