Results 1 to 6 of 6

Thread: Installing prosody

  1. #1

    Question Installing prosody

    I'm trying to install prosody, an XMPP application written in Loa on an openSUSE 11.2 AMD64 system. It's complaining that it can't find sundry loa libraries, including:
    luaexpat
    luasocket
    luafilesystem
    LuaSec

    but
    YaST/zypper swears they're installed. Any ideas why this might be?

    maab

  2. #2

    Default Re: Installing prosody

    I'm guessing you're doing a source install any reason for not using packman? http://packages.opensuse-community.o...chTerm=prosody
    Man first, have a try at Info, have a look at Wiki, if all that fails Scroogle!!!!!
    If I've helped click on the Rep button I don't know what it does but it sounds cool.

  3. #3

    Default Re: Installing prosody

    No, the other way around. I used the packman binary figuring the source install would be a nuisance.

  4. #4

    Default Re: Installing prosody -- problem is openSUSE directory structure

    By way of closing this loop for other interested parties (if any), I had a discussion on other channels with Prosody developers.

    A perennial gotcha for people installing the lua-based program on an openSUSE box is a breakdown in agreement on where the scripting language libraries go.

    The issue seems to be that lua expects all it's components to be in the /usr/local tree, and the openSUSE package is storing them in /usr. That and also this is a 64-bit system, so libs built to that architecture are in something/lib64.

    One way to fix this, I believe, is by creating appropriate symbolic links, thus:

    sudo ln -s /usr/share/lua /usr/local/share/
    sudo ln -s /usr/lib64/lua /usr/local/lib/
    sudo ln -s /usr/lib64/lua /usr/local/lib64/

    That might also smooth the way for other lua-based apps, if any.

    Matthew Wild suggests, as a less global solution, that if you're building prosody from source (no great trick), to put at the top of your Prosody config:

    package.path = package.path:gsub("/usr/local/", "/usr/")
    package.cpath = package.cpath:gsub("/usr/local/", "/usr/")

    The former is for the location of pure-Lua modules, the latter for binary (.so) modules.


    maab

  5. #5
    Join Date
    Jun 2008
    Location
    Podunk
    Posts
    26,880
    Blog Entries
    15

    Default Re: Installing prosody

    Quote Originally Posted by maabaum
    By way of closing this loop for other interested parties (if any), I had
    a discussion on other channels with Prosody developers.

    A perennial gotcha for people installing the lua-based program on an
    openSUSE box is a breakdown in agreement on where the scripting language
    libraries go.

    The issue seems to be that lua expects all it's components to be in the
    /usr/local tree, and the openSUSE package is storing them in /usr. That
    and also this is a 64-bit system, so libs built to that architecture are
    in something/lib64.
    Hi
    Not quite true, I have several lua based applications running and
    installed as per /usr I have not looked at the source code, but
    normally I would expect the configure script to respect the --prefix
    option and adjust the makefiles as appropriate.

    Your above option shouldn't be necessary if you look at /etc/ld.so.conf
    the /usr/local is present, else add your specific config
    in /etc/ld.so.conf.d/ directory so any updates don't overwrite.

    --
    Cheers Malcolm (Linux Counter #276890)
    SUSE Linux Enterprise Desktop 11 (x86_64) Kernel 2.6.27.45-0.1-default
    up 1 day 21:16, 3 users, load average: 0.40, 0.47, 0.41
    GPU GeForce 8600 GTS Silent - CUDA Driver Version: 195.36.15


  6. #6

    Default Re: Installing prosody

    Hi Malcolm,

    Your above option shouldn't be necessary if you look at /etc/ld.so.conf
    the /usr/local is present, else add your specific config
    in /etc/ld.so.conf.d/ directory so any updates don't overwrite.
    Lua uses dlopen to load binary modules, so is unaffected by ld.so.conf (which just affects the dynamic linker). Lua's paths are configured at build time using src/luaconf.h in the Lua source.

    As far as I'm aware, OpenSUSE sets the prefix to /usr but does not update luaconf.h, leading Lua to look in /usr/local for libraries (the default).

    You can confirm it simply with: "lua -lnonsensemodule" which will print out the list of places Lua searched for the module.

    Hope this helps.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •