GAMS Requires LD Path?

Archive of Gamsworld Google Group
Post Reply
Archiver
User
User
Posts: 7876
Joined: 7 years ago

GAMS Requires LD Path?

Post by Archiver »



I have GAMS working successfully on my development machine (Mac OS X,
PPC). I am now moving to a hosted server (Intel 64 bit).

Running GAMS from the SSH command line on the hosted server gives me
an error message.

Here's the GAMS command run at the SSH command line:

> > /home/vik/domains/myURL.com/public_html/cgi-bin/22_dot_6/
> > gams b2cd7ddba560914f7feb20d08d0ae46f.gms lo=2
> > WORKDIR=/home/vik/domains/myURL.com/public_html/GAMS_Output/

Here's the error message:

> > /home/vik/domains/myURL.com/public_html/cgi-bin/22_dot_6/
> > gams: error while loading shared libraries: libimf.so:
> > cannot open shared object file: No such file or directory

I contacted tech support at the hosted server, and they responded:

> > Hi Vik,
> >
> > The solution is actually quite simple :)
> >
> > Although the lib is contained within the dir of the app, it
> > doesn't source it from there, and it instead uses paths
> > defined by LD.
> >
> > So, if you run this before executing the script:
> >
> > export
> > LD_LIBRARY_PATH=/home/vik/domains/flavorzoom.com/public_html
> > /cgi-bin/22_dot_6:$LD_LIBRARY_PATH
> >
> > It appears to work as intended.
> >
> > Let us know if you need anything further and sorry for the
> > delay in resolution.
> >
> > Regards,

And indeed, if I enter the "export LD_LIBRARY_PATH" command on the SSH
command line, and then run GAMS using the same GAMS command shown
above, GAMS runs fine.

I need to run GAMS via a PHP application, and if possible, I'd like to
avoid running a shell script with the "export LD_LIBRARY_PATH" command
prior to every run of GAMS.

I notice that the GAMS installation documents say:

> > Casual users can always type the absolute path names of the
> > GAMS programs.

Since my GAMS command has the absolute path of the GAMs file and of
the working directory, why do I have to run the "export
LD_LIBRARY_PATH" command prior to calling GAMS? Is there a way to
avoid running the "export LD_LIBRARY_PATH" command?

Thanks very much in advance for any info.

--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to gamsworld@googlegroups.com
To unsubscribe from this group, send email to gamsworld-unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/gamsworld?hl=en
-~----------~----~----~----~------~----~------~--~---

Archiver
User
User
Posts: 7876
Joined: 7 years ago

Re: GAMS Requires LD Path?

Post by Archiver »



Vik,

The 22.6 Linux 64 bit executable was build with a linker flag missing,
the result is that you need to include the GAMS system directory in
your LD_LIBRARY_PATH environment variable. We will make a corrected
gams and some other executables available on www.gams.com. I'll post
to the list when this is done. In the meantime, you could either do as
your sysadmin told you (add the directory to LD_LIBRARY_PATH) or you
could install the 32bit Linux distribution on this machine which does
not suffer from this problem.

Regards,
Michael

On Dec 23, 12:43�pm, Vik wrote:
> > I have GAMS working successfully on my development machine (Mac OS X,
> > PPC). I am now moving to a hosted server (Intel 64 bit).
> >
> > Running GAMS from the SSH command line on the hosted server gives me
> > an error message.
> >
> > Here's the GAMS command run at the SSH command line:
> >
>> > > /home/vik/domains/myURL.com/public_html/cgi-bin/22_dot_6/
>> > > gams b2cd7ddba560914f7feb20d08d0ae46f.gms lo=2
>> > > WORKDIR=/home/vik/domains/myURL.com/public_html/GAMS_Output/
> >
> > Here's the error message:
> >
>> > > /home/vik/domains/myURL.com/public_html/cgi-bin/22_dot_6/
>> > > gams: error while loading shared libraries: libimf.so:
>> > > cannot open shared object file: No such file or directory
> >
> > I contacted tech support at the hosted server, and they responded:
> >
> >
> >
> >
> >
>> > > Hi Vik,
> >
>> > > The solution is actually quite simple :)
> >
>> > > Although the lib is contained within the dir of the app, it
>> > > doesn't source it from there, and it instead uses paths
>> > > defined by LD.
> >
>> > > So, if you run this before executing the script:
> >
>> > > export
>> > > LD_LIBRARY_PATH=/home/vik/domains/flavorzoom.com/public_html
>> > > /cgi-bin/22_dot_6:$LD_LIBRARY_PATH
> >
>> > > It appears to work as intended.
> >
>> > > Let us know if you need anything further and sorry for the
>> > > delay in resolution.
> >
>> > > Regards,
> >
> > And indeed, if I enter the "export LD_LIBRARY_PATH" command on the SSH
> > command line, and then run GAMS using the same GAMS command shown
> > above, GAMS runs fine.
> >
> > I need to run GAMS via a PHP application, and if possible, I'd like to
> > avoid running a shell script with the "export LD_LIBRARY_PATH" command
> > prior to every run of GAMS.
> >
> > I notice that the GAMS installation documents say:
> >
>> > > Casual users can always type the absolute path names of the
>> > > GAMS programs.
> >
> > Since my GAMS command has the absolute path of the GAMs file and of
> > the working directory, why do I have to run the �"export
> > LD_LIBRARY_PATH" command prior to calling GAMS? Is there a way to
> > avoid running the �"export LD_LIBRARY_PATH" command?
> >
> > Thanks very much in advance for any info.- Hide quoted text -
> >
> > - Show quoted text -
--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to gamsworld@googlegroups.com
To unsubscribe from this group, send email to gamsworld-unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/gamsworld?hl=en
-~----------~----~----~----~------~----~------~--~---


Post Reply