Help installing newLISP on a shared server

Started by joejoe, December 13, 2009, 12:33:10 PM

Previous topic - Next topic

joejoe

Hi -



I am trying to install newLISP on a dreamhost.com account.



I downloaded nL 10.1.7 and was able to successfullly run the ./configure-alt with these results:


Detected Operating System LINUX
Detected memory model ILP32, using memory model ILP32
UTF-8 is enabled
readline support is disabled

To enable readline support, use the --enable-readline option, and specify the
proper libraries to link by setting the RLFLAGS variable when running
configure.  Also if necessary, use the INCLUDES variable to specify where the
readline header files are."


Type "make" to build your newlisp binary.

If that doesn't work, type "make help"


I then run make w/ these seemingly successful results:


make -f makefile_configure
make[1]: Entering directory `/home/..myhomedirectory../bin/newlisp-10.1.7'
gcc -m32 -Wall -pedantic -Wno-long-long -Wno-strict-aliasing -O2 -c  -DNEWCONFIG newlisp.c
gcc -m32 -Wall -pedantic -Wno-long-long -Wno-strict-aliasing -O2 -c  -DNEWCONFIG nl-symbol.c
gcc -m32 -Wall -pedantic -Wno-long-long -Wno-strict-aliasing -O2 -c  -DNEWCONFIG nl-math.c
gcc -m32 -Wall -pedantic -Wno-long-long -Wno-strict-aliasing -O2 -c  -DNEWCONFIG nl-list.c
gcc -m32 -Wall -pedantic -Wno-long-long -Wno-strict-aliasing -O2 -c  -DNEWCONFIG nl-liststr.c
gcc -m32 -Wall -pedantic -Wno-long-long -Wno-strict-aliasing -O2 -c  -DNEWCONFIG nl-string.c
gcc -m32 -Wall -pedantic -Wno-long-long -Wno-strict-aliasing -O2 -c  -DNEWCONFIG nl-filesys.c
gcc -m32 -Wall -pedantic -Wno-long-long -Wno-strict-aliasing -O2 -c  -DNEWCONFIG nl-sock.c
gcc -m32 -Wall -pedantic -Wno-long-long -Wno-strict-aliasing -O2 -c  -DNEWCONFIG nl-import.c
gcc -m32 -Wall -pedantic -Wno-long-long -Wno-strict-aliasing -O2 -c  -DNEWCONFIG nl-xml.c
gcc -m32 -Wall -pedantic -Wno-long-long -Wno-strict-aliasing -O2 -c  -DNEWCONFIG nl-web.c
gcc -m32 -Wall -pedantic -Wno-long-long -Wno-strict-aliasing -O2 -c  -DNEWCONFIG nl-matrix.c
gcc -m32 -Wall -pedantic -Wno-long-long -Wno-strict-aliasing -O2 -c  -DNEWCONFIG nl-debug.c
gcc -m32 -Wall -pedantic -Wno-long-long -Wno-strict-aliasing -O2 -c  -DNEWCONFIG pcre.c
gcc -m32 -Wall -pedantic -Wno-long-long -Wno-strict-aliasing -O2 -c  -DNEWCONFIG nl-utf8.c
gcc newlisp.o nl-symbol.o nl-math.o nl-list.o nl-liststr.o nl-string.o nl-filesys.o     nl-sock.o nl-import.o nl-xml.o nl-web.o nl-matrix.o nl-debug.o pcre.o nl-utf8.o -m32 -lm -ldl  -o newlisp
strip newlisp
make[1]: Leaving directory `/home/..myhomedirectory../bin/newlisp-10.1.7'


and then I run make install which results w/ this:


{... abbreviated errors ...]

install: cannot create regular file `/usr/share/newlisp/guiserver/stroke-demo.lsp': No such file or directory
make: [install] Error 1 (ignored)
install -m 644 guiserver/tabs-demo.lsp /usr/share/newlisp/guiserver/tabs-demo.lsp
install: cannot create regular file `/usr/share/newlisp/guiserver/tabs-demo.lsp': No such file or directory
make: [install] Error 1 (ignored)
install -m 644 guiserver/textrot-demo.lsp /usr/share/newlisp/guiserver/textrot-demo.lsp
install: cannot create regular file `/usr/share/newlisp/guiserver/textrot-demo.lsp': No such file or directory
make: [install] Error 1 (ignored)
install -m 644 guiserver/widgets-demo.lsp /usr/share/newlisp/guiserver/widgets-demo.lsp
install: cannot create regular file `/usr/share/newlisp/guiserver/widgets-demo.lsp': No such file or directory
make: [install] Error 1 (ignored)
install -m 644 guiserver/word-count.lsp /usr/share/newlisp/guiserver/word-count.lsp
install: cannot create regular file `/usr/share/newlisp/guiserver/word-count.lsp': No such file or directory
make: [install] Error 1 (ignored)
install -m 644 guiserver/uppercase.lsp /usr/share/newlisp/guiserver/uppercase.lsp
install: cannot create regular file `/usr/share/newlisp/guiserver/uppercase.lsp': No such file or directory
make: [install] Error 1 (ignored)


From the INSTALL.txt, I am guessing that this direction is relevant:


When using the READLINE option on some OSs, the library options
-lreadline and -lncurses or -ltermcap have to be replaced. 'readline'
support enables command line editing and key-word expansion using the
TAB-key.  Study the makefile of your platform to see what options are
supported.


But I am not sure. It looks like it is trying to install things into places Im sure a shared hosting user does not have access to. Is there a workaround that I am missing?



Here is my uname -a:


Linux ... 2.6.31.5-aufs2-grsec-1.0-x86_64-opteron #2 SMP Wed Oct 28 09:43:52 PDT 2009 x86_64 GNU/Linux

thanks very much!!

itistoday

#1
Unless you're using their private server virtual hosting stuff you don't have root access, therefore you cannot make install into /usr.



Instead, install newlisp into your home folder (~/bin, ~/share/newlisp, etc.). Then if you want to run it for say, Dragonfly, change the shebangs at the top of scripts to point to #!/home/yourusername/bin/newlisp. Dragonfly http://www.rundragonfly.com/setup_example">gives an example of this (see Step #3).
Get your Objective newLISP groove on.

joejoe

#2
thanks itistoday --



i created the ~/bin dir and unpacked it there but tries to put the /share stuff on the main part of the server. how do i instruct it to use my ~/share directory? thanks so much!

itistoday

#3
Look through the Makefile, you'll see that it documents a target called 'install_home'. So instead of doing 'sudo make install', do 'make install_home'. As the Makefile mentions in the comments, you'll also probably want to define NEWLISPDIR to point to /home/username/share/newlisp so that the 'module' function works properly (if you want to use it).  You can edit your .bash_profile to define it there (which, btw, you may need to update anyway so that $PATH includes your /home/username/bin directory, otherwise typing 'newlisp' at the command prompt won't work).
Get your Objective newLISP groove on.

joejoe

#4
thanks again itistoday - :)



ill try this and report back my success.



i appreciate your detail very much.

joejoe

#5
Hello again,



I managed to open the Makefile and set the prefix=/home/myusername and created the /bin /share and /share/man directories.



I did



make clean

./configure-alt

make

make install



and didnt see any errors and i went to the /bin/newlisp directory and typed



./newlisp



and i got the newLISP prompt!



woohoo!!



thank you itistoday for the extra direction. utmost appreciation!

itistoday

#6
No problemo.
Get your Objective newLISP groove on.

Ryon

#7
There are two installation documents in newlisp-1-.1.10, the README, and doc/install. They are similar, but not the same. Could they be consolidated into one document?



I want to install to a non-root shared hosting account too, on a redhat server.



doc/install says: "For a minimum install, only the executable file: newlisp needs to be moved to a directory in the executable path,.." That would be great, but the is no executable included in the .tgz.



README says 'make install_home', but does not detail how this fits into the make - make install cycle. Every combination I've tried fails for one reason or another.



OP had success by changing Makefile, but should this be necessary? And if it is, could details be included in the install docs?



Thanks!
\"Give me a Kaypro 64 and a dial tone, and I can do anything!\"

TedWalther

#8
Ryon, as of the last release, *.1.10, you can now use configure-alt to tell the installer exactly where to install everything.  There is no need to change the Makefile!



If you are using configure-alt, the install_home target in the Makefile doesn't work anymore.  Just set up --prefix and --bindir appropriately.



For the executable, you are right, it isn't included in the .tgz.  What you do there is "make".  This builds the binary.  But instead of running "make install", you just manually copy the executable file named "newlisp" over to where-ever you want.



If you are planning a chroot jail, static compilation doesn't work on most BSD's and Linux.  Something to do with the resolver library.   Not newlisps fault; it is a characteristic of these platforms and how they support networking.



Type in



./configure-alt --help


And that will show you the following options:



    --prefix=dir        # standard GNU option
     --exec-prefix=dir   # standard GNU option
     --bindir=dir        # standard GNU option
     --datadir=dir       # standard GNU option
     --datarootdir=dir   # standard GNU option
     --docdir=dir        # standard GNU option
     --mandir=dir        # standard GNU option
     --man1dir=dir       # standard GNU option


At the end of running configure-alt, it will always report what values those options are set to.  For example, if you don't specify --prefix, here is what you end up with by default:



Variables:

package=newlisp
version=10.1.10
prefix=/usr/local
exec_prefix=/usr/local
bindir=/usr/local/bin
datarootdir=/usr/local/share
datadir=/usr/local/share
docdir=/usr/local/share/doc/newlisp-10.1.10
mandir=/usr/local/man
man1dir=/usr/local/man/man1
Cavemen in bearskins invaded the ivory towers of Artificial Intelligence.  Nine months later, they left with a baby named newLISP.  The women of the ivory towers wept and wailed.  \"Abomination!\" they cried.

TedWalther

#9
Using configure-alt with --prefix is superior to editing the prefix variable in the Makefile directly.  The reason for this is that configure-alt does some magic so that the newlisp binary knows where the modules are stored, so you can use the (module) function.
Cavemen in bearskins invaded the ivory towers of Artificial Intelligence.  Nine months later, they left with a baby named newLISP.  The women of the ivory towers wept and wailed.  \"Abomination!\" they cried.

Ryon

#10
It took me a while to take all this in, but I think I've got it:



$ ./configure-alt --prefix=/home/myacct --bindir=/home/myacct/bin



then,



$ make



then,



$ cp newlisp /home/myacct/bin



Seems to be working fine. Thanks!
\"Give me a Kaypro 64 and a dial tone, and I can do anything!\"

joejoe

#11
Hi again,



Im installing on a different shared server and I used the example provided by Ryon:


$ ./configure-alt --prefix=/home/myacct --bindir=/home/myacct/bin

after I created my bin and share directories.



This is the result I am getting running make:


[me@asdf ~/newlisp/newlisp-10.2.8]$ make
make -f makefile_build
make[1]: Entering directory `/home/me/newlisp/newlisp-10.2.8'
gcc  -Wall -pedantic -Wno-long-long -Wno-strict-aliasing -O2 -c  -DNEWCONFIG newlisp.c
make[1]: execvp: gcc: Permission denied
make[1]: *** [newlisp.o] Error 127
make[1]: Leaving directory `/home/me/newlisp/newlisp-10.2.8'
make: *** [default] Error 2


Am I correct to read that Im getting a permission denied trying to access gcc? Any workarounds on this?



Thanks!

itistoday

#12
Quote from: "joejoe"Am I correct to read that Im getting a permission denied trying to access gcc? Any workarounds on this?


Yup, you'll have to contact whoever admins the server about this.
Get your Objective newLISP groove on.

joejoe

#13
QuoteYup, you'll have to contact whoever admins the server about this.


Okay thanks a lot!