Page 3 of 3

PostPosted: Tue Sep 02, 2008 3:05 pm
by Antonio Linares
Doug,

I will check it in a while from Linux.

Please have a look at the first draft for Harbour installation from Linux and Mac:

http://wiki.fivetechsoft.com/doku.php?i ... ng_harbour

PostPosted: Tue Sep 02, 2008 8:48 pm
by xProgrammer
Hi Antonio

I will test it out from scratch. My guess is that if svn is required one would have to go

Code: Select all  Expand view
sudo apt-get install subversion


as a first step?

Also it might be worthwhile pointing out that sudo apt-get install is the command for Debian based (and therefore Ubuntu etc) LInux distributions ans distributions such as Red Hat, Centos etc will require different commands. The SVN web site you point them to is very helpful in this regard, but its probably something a LInux newbie especially needs to know as they will need to download libraries as well with commands like

Code: Select all  Expand view
sudo apt-get install glade-2


Regards
Doug

PostPosted: Wed Sep 03, 2008 12:24 am
by Antonio Linares
Doug,

Probably the first step is to type svn --version (or similar) and check if it is installed, so there is no need to install it.

Maybe we could point to a website where packages installation for Linux is explained, so we don't have to go to that level of details in the wiki.

PostPosted: Wed Sep 03, 2008 12:39 am
by xProgrammer
Hi Antonio

Probably the first step is to type svn --version (or similar) and check if it is installed, so there is no need to install it.


apt-get install advises if you have the latest version and if so does nothing so just suggesting that is possibly simpler.

When you said that the download would take some time you weren't kidding. Its been going in excess of 2 hours here. Downloading (I gather) source for many different releases of Harbour. (Thank goodness for large hard disks.) Would the average user want this or can they just download the l;atest? How do you determine which release you are going to make?

Maybe we could point to a website where packages installation for Linux is explained, so we don't have to go to that level of details in the wiki.


Good idea - I wonder if there is one that covers most distributions as they do rather differ? My suggestion would be to at least explain on the wiki for Ubuntu on the assumption that it is your suggested distribution. That's why I went Ubuntu.

Regards

Doug

PostPosted: Wed Sep 03, 2008 1:00 am
by xProgrammer
Hi Antonio

I haven't yet found a site that gives instructions on how to install packages on the various Linux distributions but I did find some excellent (and very detailed) documentation on apt at

http://www.debian.org/doc/user-manuals

under APT How To. Includes a lot of very useful information such as how to find package names (page 23 and following).

PostPosted: Wed Sep 03, 2008 1:41 am
by xProgrammer
Hi Antonio

Download went fine. Rather than type the svn command in I copied the command into my text editor and saved it as geth.sh, made that file executable and ran the shell script. Less potential problem with typos that way?

I first had to find make_gnu.sh. That required:

Code: Select all  Expand view
cd ./harbour-project/branches/harbour-1.0   


(not in your current instructions). Then as you said

Code: Select all  Expand view
chmod +x ./make_gnu.sh
./make_gnu.sh


The make_gnu.sh shell script seemed to run fine although I did get some messages about ignoring certain libraries at the end.

Next step is to work out what I need to transfer to the regular directories. (Final instructions will need to be more specific here.)

It took a bit of effort to find the harbour executable. I didn't expect it to be in a fairly deep directory labelled source. It was at

./harbour-project/branches/harbour-1.0/source/main/linux/gcc

I've copied it to /harbour/bin which I assume is correct.

I assume there are a lot of libraries to be copied etc. Can you be a little more specific about what has to happen from hereon in?

Regards
Doug

PostPosted: Wed Sep 03, 2008 10:46 am
by Antonio Linares
Doug,

> How do you determine which release you are going to make?

It depends on which build you are interested in: an "official" release or the "trunk" (current one). IMO Harbour and xHarbour are so stable that the current build can safely be used (if problems are found you can always go to a previous build).

Thats why I have not mentioned it. We don't know what build the user is interested in. Lets the user do some research by himself :-)

PostPosted: Wed Sep 03, 2008 10:48 am
by Antonio Linares
Doug,

>
Rather than type the svn command in I copied the command into my text editor and saved it as geth.sh, made that file executable and ran the shell script. Less potential problem with typos that way?
>

yes, thats the way we do it here :-)

PostPosted: Wed Sep 03, 2008 10:50 am
by Antonio Linares
Doug,

>
It took a bit of effort to find the harbour executable. I didn't expect it to be in a fairly deep directory labelled source. It was at

./harbour-project/branches/harbour-1.0/source/main/linux/gcc
>

Yeah, its crazy where it gets placed :-)

> I've copied it to /harbour/bin which I assume is correct.

Yes, much simpler :-)

>
I assume there are a lot of libraries to be copied etc. Can you be a little more specific about what has to happen from hereon in?
>

I would explain what Linux packages are required to be installed in order to build and run FiveLinux applications.

PostPosted: Wed Sep 03, 2008 10:52 am
by Antonio Linares
Also it may be a good idea to explain that libraries start with "lib..." and ends with ".a" and where they are placed by make_gnu.sh, so they can be copied all together to a lib folder.

PostPosted: Wed Sep 03, 2008 11:40 am
by xProgrammer
Hi Antonio

Also it may be a good idea to explain that libraries start with "lib..." and ends with ".a" and where they are placed by make_gnu.sh, so they can be copied all together to a lib folder.


Thanks. That's the bit I wasn't sure about. Easy to find given the above skeleton. They are in

./harbour-project/branches/harbour-1.0/lib/linux/gcc

Include files were easy to find

./harbour-project/branches/harbour-1.0/include

as are the doc files

./harbour-project/branches/harbour-1.0/doc
(and) ./harbour-project/branches/harbour-1.0/doc/en (for me)

I'll try to get it working tomorrow (its late tonight) and then write it up. It all went a lot more smoothly than trying to create xHarbour from source - which I still need to resolve.

I would explain what Linux packages are required to be installed in order to build and run FiveLinux applications.


That bit I know rather well!

Regards
Doug

PostPosted: Wed Sep 03, 2008 11:47 am
by xProgrammer
Hi Antonio

I did try to quickly compile testdlg.prg from /fivelinux/samples/ using build.sh (rather than buildx.sh) but got an error so I've done something wrong.

Error message was:

/usr/bin/ld: cannot find -lcommon

I note that /harbour/lib/ has a libhbcommon.a

Regards
Doug

PostPosted: Thu Sep 04, 2008 3:31 am
by xProgrammer
Hi Antonio

I just got /samples/testdlg.prg compiling with harbour / FiveLinux. Maybe my build.sh was out of date? I had to change the names of many of the libraries to be linked in. Many now had hb in the name (eg had to change -lcommon to -lhbcommon), others had other changes as well ( eg -lcodepage to -lhbcpage ), the libraries that started dbf generally changed to rdd ( eg -ldbfntx to -lrddntx). Additionally I had to add a library ( -lgttrm).

My modified build.sh (I called it buildh.sh in order to keep the original intact for the time being) is as follows:

Code: Select all  Expand view
# ./buildh.sh

clear

if [ $# = 0 ]; then
   echo syntax: ./build.sh file [options...]
   exit
fi

echo compiling...
./../../harbour/bin/harbour $1 -n -I./../include -I./../../harbour/include $2

echo compiling C module...
gcc $1.c -c -I./../include -I./../../harbour/include `pkg-config --cflags gtk+-2.0`

echo linking...
gcc $1.o -o$1 -L./../lib -L./../../harbour/lib `pkg-config --libs gtk+-2.0` `pkg-config --libs libglade-2.0` `pkg-config --libs libgnomeprintui-2.2` -Wl,--start-group -lfive -lfivec -lhbcommon -lhbvm -lhbrtl -lhbrdd -lhbmacro -lhblang -lhbcpage -lhbpp -lrddntx -lrddcdx -lrddfpt -lhbsix -lhbusrrdd -lhbct -lgtstd -lhbdebug -lgttrm -lm -lgpm -lncurses -Wl,--end-group

rm $1.c
rm $1.o

echo done!
./$1


Is this correct?

Regards
Doug

PostPosted: Sun Sep 07, 2008 12:49 am
by xProgrammer
Hi Antonio

I have been posting to this thread because it was the one started on the FiveTech wiki, but as this thread is getting rather long, and my work on the wiki is related to FiveLinux, I'll start a wiki thread on the FiveLinux forum and tell you what I've done.

Regards
Doug

PostPosted: Sun Sep 07, 2008 9:33 am
by Antonio Linares
Doug,

> I note that /harbour/lib/ has a libhbcommon.a

Yes, Harbour libs have been renamed in this past months.

> I'll start a wiki thread on the FiveLinux forum and tell you what I've done.

yes, good idea, specially for Linux specific issues. Thanks,