Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 19 Apr 2007 21:40:31 +0400
From:      Boris Samorodov <bsam@ipt.ru>
To:        "Henry Lenzi" <henry.lenzi@gmail.com>
Cc:        FreeBSD <freebsd-questions@freebsd.org>
Subject:   Re: Help with running Linux software LD_LIBRARY_PATH
Message-ID:  <91769984@srv.sem.ipt.ru>
In-Reply-To: <8b4c81f0704190915i3037133cne52c1986ee851049@mail.gmail.com> (Henry Lenzi's message of "Thu, 19 Apr 2007 13:15:28 -0300")
References:  <8b4c81f0704190915i3037133cne52c1986ee851049@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 19 Apr 2007 13:15:28 -0300 Henry Lenzi wrote:

> I'm trying to install a software package called LINGO for my
> operations research class. There's a Linux version (no BSD, though).

> http://www.lindo.com/downloads/downloadm.html

> I'm hoping I can get this to work with the Linux emulation layer
> (other stuff work already, like Maple 8).

> I am getting errors related to a shell script a LD_LIBRARY_PATH

> There are libraries that need to be loaded in /opt/lingo9
> > ls
> LINGO.CNF       libcxa.so       liblindo.so     libmosek.so.3.2 lingovars.sh
> libcxa.so.3     liblindo.so.3.0 libunwind.so.5
> libconsub3.so   libcxa.so.5     libmosek.so     lingo9


> I unpacked it under /opt.

> There's a bash shell script you're supposed to run:

> ##############################
> #! /bin/sh


> LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$HOME/opt/lingo9/bin/linux32
> export LD_LIBRARY_PATH

> LINGO_LICENSE_FILE="$HOME/opt/lingo9/license/lndlng90.lic"
> export LINGO_LICENSE_FILE
> ###############################

> My first question is if the shell script "translation" to tcsh is correct:

Why should you convert the script to tcsh? IMHO the best way is to
convert it to sh.

> ###############################
> #!/bin/tcsh

> setenv LD_LIBRARY_PATH ${LD_LIBRARY_PATH}:/opt/lingo9/bin/linux32
                           ^^^^^^^^^^^^^^^ [1]
recursive declaration?

> setenv LINGO_LICENSE_FILE "/opt/ling9/license/lndlng90.lic"
> ###############################

> When I try to execute it, I get the error below (BTW, set to 755).

> > ls -l bsdlingolic.sh
> -rwxr-xr-x  1 root  2527  143 19 Abr 13:00 bsdlingolic.sh
> > ./bsdlingolic.sh
> LD_LIBRARY_PATH: Undefined variable.

Yep, it's not defined at the time [1] occures. Actually, defining
LD_LIBRARY_PATH almost always is a Bad Thing.

> What suggestions do you have regarding this issue?

1. Create a port (local?) for the software. Don't forget to brand
   executables (only!).

2. Install it to PREFIX=/usr/local (i.e. libraries to /usr/local/lib
   etc), linuxulator will make the right thing to find needed
   libraries.

3. Delete the definition of LD_LIBRARY_PATH.

4. Enjoy you work. ;-)


WBR
-- 
Boris Samorodov (bsam)
Research Engineer, http://www.ipt.ru Telephone & Internet SP
FreeBSD committer, http://www.FreeBSD.org The Power To Serve



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?91769984>