Recent

Author Topic: Free Spider for HostGator Linux  (Read 14888 times)

fenderlaz

  • New member
  • *
  • Posts: 7
Free Spider for HostGator Linux
« on: April 19, 2010, 08:29:09 am »
Hi Motaz and everybody else here

I am trying to use your Free Spider to port existing Turbo Pascal and Delphi programs to run under HostGator Linux web server. I am running Lazarus on Windows XP and it seems to work for Windows. Questions:

1) How do I cross compile to Linux on my Windows XP?

2) I can run Ubuntu on this machine. If I cannot cross compile from Windows XP, would downloading Lazarus for Ubuntu and uploading to the Linux webserver on HostGator be the solutino? Would that be the recommended route or would it be equally possible to run everything on Windows XP and cross compile from there (see question No. 1 above)?

3) Could you please produce a step by step, paint by numbers manual for compiling, cross compiling, uploading and running the Hello, world program starting with Lazarus on my machine and seeing it execute in my web browser from the web server?

Because both Lazarus and FreeSpider look very good, but I do not have the time to reinvent the wheel here...


motaz

  • Sr. Member
  • ****
  • Posts: 495
    • http://code.sd
Re: Free Spider for HostGator Linux
« Reply #1 on: April 19, 2010, 12:08:32 pm »
Hello fenderlaz
I'm not using cross compilation, and I don't know how to do it, sorry.
But I'm developing my web applications here at Work using Vista, the I reboot and enter by Ubuntu (Dual-boot), then I recompile the same source code without any modification, (Except for project options/output directory).

I already has a manual, about FreeSpider in my home page, but this manual suppose that the programmer already know about web applications. It is standard CGI application, so that it is standard steps to make this FreeSpider CGI application can work, The same like Delphi's WebBroker CGI application.

If you can cross-compile normal Lazarus application, then you could do it with FreeSpider, and if you success on that, you can write it in a documentation beside step by step Hello world application deployment and I'll put your document in FreeSpider homepage. This is an open source project, any one can participate.
Looking forward to hear your news.

btw. Did you mentioned Turbo Pascal, did you have a CGI web applications written in Turbo Pascal?

Thanks

« Last Edit: April 19, 2010, 12:37:38 pm by motaz »

fenderlaz

  • New member
  • *
  • Posts: 7
Re: Free Spider for HostGator Linux
« Reply #2 on: April 19, 2010, 07:16:10 pm »
Hi Motaz

Thank you very much for your answer.

I'll try to recompile on Ubuntu and upload to the HostGator webserver and see what happens. If I succeed, I'll make documentation about it!


motaz

  • Sr. Member
  • ****
  • Posts: 495
    • http://code.sd
Re: Free Spider for HostGator Linux
« Reply #3 on: April 20, 2010, 06:03:57 am »
Ok, I'll be happy of supporting and helping on making success Lazarus and also FreeSpider case studies.

Leledumbo

  • Hero Member
  • *****
  • Posts: 8835
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: Free Spider for HostGator Linux
« Reply #4 on: April 20, 2010, 06:37:24 am »
Quote
How do I cross compile to Linux on my Windows XP?
http://wiki.lazarus.freepascal.org/Cross_compiling
Quote
I recompile the same source code without any modification, (Except for project options/output directory)
I don't even have to. Lazarus macros helped a lot.

fenderlaz

  • New member
  • *
  • Posts: 7
Re: Free Spider for HostGator Linux
« Reply #5 on: April 20, 2010, 07:51:44 am »
Leledumbo

Thank you for the link for cross compiling, however, I am not able to use it as is. I need to recompile from Windows to Linux, and the page says

This is less trivial, there is some info in the buildfaq

where buildfaq is a manual of a few dozen pages. I have tried to read it but was quickly lost.

I do not want to learn about cross compiling in general, and I do not want to learn too much about Lazarus either, at least, not now. Currently, I just want to run a Hello world as a CGI on my HostGator Linux server, and if Lazarus can help me that, OK, if not, I have to discover how else, if at all, can I port my Pascal application to the web server that runs on Linux.

This is the third day that I am learning about Lazarus. That is way too long. Can anybody shorthen the learning curve for me by suppling the exact method for what I want to do, and also the exact files that I need to have in order to do that!? Or do I just need to use Lazarus under Ubuntu, and upload that to the web server? Will that work?


Leledumbo

  • Hero Member
  • *****
  • Posts: 8835
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: Free Spider for HostGator Linux
« Reply #6 on: April 20, 2010, 10:14:28 am »
Quote
Can anybody shorthen the learning curve for me by suppling the exact method for what I want to do, and also the exact files that I need to have in order to do that!? Or do I just need to use Lazarus under Ubuntu, and upload that to the web server? Will that work?
The last one should work.

fenderlaz

  • New member
  • *
  • Posts: 7
Re: Free Spider for HostGator Linux
« Reply #7 on: April 20, 2010, 10:58:00 am »
Thank you, gonna try that ASAP.

fenderlaz

  • New member
  • *
  • Posts: 7
Re: Free Spider for HostGator Linux
« Reply #8 on: April 22, 2010, 10:26:10 pm »
Hi

I have installed Ubuntu and now I am trying to run Lazarus from it. There are many problems.

1) When I chose console application and inserted one writeln and one readn, its says "debugging" while there is no terminal window in sight. This works under Lazarus for windows. Strange that such a basic program cannot run identically for a piece of softare that offers "write once, run anywhere" approach.

2) Cannot do anything with the FreeSpider package. I have installed it successfuly under Lazarus for Windows, from a directory that has nothing to do with the usual directories for Lazarus. Under Ubuntu, I cannot install it. I find the LPK file and click on Install or Compile gives the following messages:

/usr/lib/lazarus/ideintf/newitemintf.pas(200,1) Error: Can't create object file: /usr/lib/lazarus/ideintf/newitemintf.o

What I am doing wrong?

Is there a specific folder for Lazarus under Ubuntu that the package has to be unpacked unto in order for Lazarus to accept it!?

motaz

  • Sr. Member
  • ****
  • Posts: 495
    • http://code.sd
Re: Free Spider for HostGator Linux
« Reply #9 on: April 23, 2010, 06:59:05 am »
1. If you want to run console applications in linux, you should un select debugger:
Environment/Options/Debugger/select (None)
That was for normal console application. But for freespider web application you don't need to do that, because you need to compile only not run from Lazarus.

2. To install FreeSpider in Lazarus, you should open Lazarus then click Package/Open Package file (.lpk) then select FreeSpider.lpk file then compile and click install. You can put FreeSpider in any directory before installation

Leledumbo

  • Hero Member
  • *****
  • Posts: 8835
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: Free Spider for HostGator Linux
« Reply #10 on: April 23, 2010, 08:40:26 am »
Quote
When I chose console application and inserted one writeln and one readn, its says "debugging" while there is no terminal window in sight.
Choose the terminal type in Run menu (I forgot which one). Unlike Windows, Linux has a variety of terminals.
Quote
/usr/lib/lazarus/ideintf/newitemintf.pas(200,1) Error: Can't create object file: /usr/lib/lazarus/ideintf/newitemintf.o
In normal Ubuntu (or most if not all Linux distros) installation, you won't have write access to /usr/lib and all directories under it. Either login as root, or give lazarus dir write access (recursively), or whatever approach that allows you to do it.

fenderlaz

  • New member
  • *
  • Posts: 7
Re: Free Spider for HostGator Linux
« Reply #11 on: April 23, 2010, 09:42:43 pm »
I havent found how to setup a terminal in the Run command, if someone could help me there!?

--------------------

I think that I am progressing. Now I (think I) can add a package, but  it stops with the following line:

/usr/lib/lazarus/packages/freespider.pas(18,52) Error: Identifier not found "Register"

and showing the second line afer begin in the Register procedure.

Help!?

motaz

  • Sr. Member
  • ****
  • Posts: 495
    • http://code.sd
Re: Free Spider for HostGator Linux
« Reply #12 on: April 24, 2010, 05:43:55 am »
Package installation is tested in Ubuntu, with Lazarus 0.9.29.2 and 0.9.28, both of them has no problems.
Try clean build for Lazarus.

Anybody can help on this please

fenderlaz

  • New member
  • *
  • Posts: 7
Re: Free Spider for HostGator Linux
« Reply #13 on: April 24, 2010, 07:12:52 pm »
Hi Motaz

Thank you for the clarification, however, I am working with Lazarus version 0.9.26, which is the current version taken from the official site. So, can you supply links as to where to get the version that you are using and exactly which files to take. For instance, I find this page

http://www.hu.freepascal.org/lazarus/

and what do I take from there!?

I presume that I would need to have identical versions for both Windows and Ubuntu, right? Exactly which versions to install?

Cheers, Dusko

motaz

  • Sr. Member
  • ****
  • Posts: 495
    • http://code.sd
Re: Free Spider for HostGator Linux
« Reply #14 on: April 25, 2010, 08:07:03 am »
Go to This link: http://sourceforge.net/projects/lazarus/files/

and download these files:

Code: [Select]
fpc-2.2.4-3.i386.deb.tar     
lazarus_0.9.28.2_i386.deb.tar

Then uninstall Lazarus, then install the new packages, and don't forget to recompile to install the FreeSpider


 

TinyPortal © 2005-2018