:: Re: [DNG] Harbour programming langu…
Page principale
Supprimer ce message
Répondre à ce message
Auteur: Marc Shapiro
Date:  
À: dng
Sujet: Re: [DNG] Harbour programming language

On 10/14/23 21:20, Olaf Meeuwissen wrote:
> Hi Marc,
>
> Marc Shapiro via Dng <dng@???> writes:
>
>> It has been many years since I have done any 'C' programming, and 'make' was never my friend. I have pasted, below, the output of 'sudo make' run in the
>> harbour-3.0.0 directory.
>> What am I doing wrong, or what dev file packages do I need to install?
>> I don't know why it says that gpm is not found, because it is installed.
> Your `sudo make` is very likely looking for the header files for gpm.
> These should be in libgpm-dev. Similarly, you'll need libslang2-dev.
> For the missing sys/sysctl.h, that's in dietlibc-dev according to
>
>    apt-file search sys/systctl.h

>

I rebooted into Chimaera and installed the above three packages (along
with libncurses-dev)

I then ran make, the output of which ended with:

hbmk2: Target up to date: ../lib/linux/gcc/libhbunix.a
/home/marc/harbour/harbour-3.0.0/bin/linux/gcc/hbmk2 -quiet -width=0
@hbpre -inc hbtpathy/hbtpathy.hbp @hbpost
/home/marc/harbour/harbour-3.0.0/bin/linux/gcc/hbmk2 -quiet -width=0
@hbpre -inc hbtip/hbtipssl.hbp @hbpost
../../../../../contrib/hbtip/utils.c: In function ‘s_findMimeStringInTree’:
../../../../../contrib/hbtip/utils.c:363:49: warning: bitwise comparison
always evaluates to false [-Wtautological-compare]
  363 |          ( ( elem->flags & MIME_FLAG_TRIMTABS ) ==
MIME_FLAG_TRIMSPACES && cData[ nPos ] == '\t' ) ) )
      |                                                 ^~
../../../../../contrib/hbtip/utils.c: In function ‘s_findStringMimeType’:
../../../../../contrib/hbtip/utils.c:417:51: warning: bitwise comparison
always evaluates to false [-Wtautological-compare]
  417 |            ( ( elem->flags & MIME_FLAG_TRIMTABS ) ==
MIME_FLAG_TRIMSPACES && cData[ nPos ] == '\t' ) ) )
      |                                                   ^~
/home/marc/harbour/harbour-3.0.0/bin/linux/gcc/hbmk2 -quiet -width=0
@hbpre -inc hbsqlit3/hbsqlit3.hbp @hbpost
/home/marc/harbour/harbour-3.0.0/bin/linux/gcc/hbmk2 -quiet -width=0
@hbpre -inc hbsms/hbsms.hbp @hbpost
/home/marc/harbour/harbour-3.0.0/bin/linux/gcc/hbmk2 -quiet -width=0
@hbpre -inc hbrun/hbrun.hbp @hbpost
/usr/bin/ld: ../lib/linux/gcc/libhbct.a(dattime3.o): in function
`HB_FUN_SETTIME':
dattime3.c:(.text+0x32f): undefined reference to `stime'
/usr/bin/ld: ../lib/linux/gcc/libhbct.a(dattime3.o): in function
`HB_FUN_SETDATE':
dattime3.c:(.text+0x3fb): undefined reference to `stime'
collect2: error: ld returned 1 exit status
hbmk2: Error: Running linker. 1
! 'hbrun/hbrun.hbp' returned status: 7
! Finished package build...
make[1]: [Makefile:12: first] Error 7 (ignored)
./bin/linux/gcc/hbmk2 ./config/postinst.hbs first
! postinst.hbs finished

**************************

NOTE the Linker error

but the following files were created:

root@quixote:/home/marc/harbour/harbour-3.0.0/bin/linux/gcc# ls
total 6676
-rwxr-xr-x 1 root root 1175184 Oct 18 21:32 harbour
-rwxr-xr-x 1 root root  963088 Oct 18 21:35 hbi18n
-rwxr-xr-x 1 root root 2699776 Oct 18 21:35 hbmk2
-rwxr-xr-x 1 root root  176256 Oct 18 21:31 hbpp
-rwxr-xr-x 1 root root 1809736 Oct 18 21:35 hbtest

**************************


Then I ran make install, which ended with:

/home/marc/harbour/harbour-3.0.0/bin/linux/gcc/hbmk2 -quiet -width=0
@hbpre -inc hbrun/hbrun.hbp @hbpost
/usr/bin/ld: ../lib/linux/gcc/libhbct.a(dattime3.o): in function
`HB_FUN_SETTIME':
dattime3.c:(.text+0x32f): undefined reference to `stime'
/usr/bin/ld: ../lib/linux/gcc/libhbct.a(dattime3.o): in function
`HB_FUN_SETDATE':
dattime3.c:(.text+0x3fb): undefined reference to `stime'
collect2: error: ld returned 1 exit status
hbmk2: Error: Running linker. 1
! 'hbrun/hbrun.hbp' returned status: 7
! Finished package build and install...
make[1]: [Makefile:12: install] Error 7 (ignored)
./bin/linux/gcc/hbmk2 ./config/postinst.hbs install
! Copying root documents...
! Copying Harbour script (.hbs) files...
! Copying *nix config files...
! Creating Linux ld config file...
! Creating dynamic lib symlinks...
! Error: Creating symlink libharbour.so.3.0.0 <=
/usr/local/lib/harbour/libharbour.so.3.0
! Error: Creating symlink libharbour.so.3.0.0 <=
/usr/local/lib/harbour/libharbour.so
! Error: Creating symlink harbour/libharbour.so.3.0.0 <=
/usr/local/lib/harbour/../libharbour.so
! Error: Creating symlink harbour/libharbour.so.3.0.0 <=
/usr/local/lib/harbour/../libharbour.so.3.0
! Error: Creating symlink harbour/libharbour.so.3.0.0 <=
/usr/local/lib/harbour/../libharbour.so.3.0.0
! Making core translation (.hbl) files...
! Created /usr/local/bin/hbmk2.pt_BR.hbl <= utils/hbmk2/hbmk2.pt_BR.po
! Created /usr/local/bin/hbmk2.hu_HU.hbl <= utils/hbmk2/hbmk2.hu_HU.po
! Created /usr/local/bin/hbmk2.es_PE.hbl <= utils/hbmk2/hbmk2.es_PE.po
! Compiling core documentation (.hbd)...
! Created /usr/local/share/doc/harbour/harbour.hbd <= ./
! postinst.hbs finished


*****************************************

NOTE the symlink errors, however /usr/local/lib/harbour contains:

lrwxrwxrwx 1 root staff      19 Oct 18 21:23 libharbour.so ->
libharbour.so.3.0.0
lrwxrwxrwx 1 root staff      19 Oct 18 21:23 libharbour.so.3.0 ->
libharbour.so.3.0.0
-rwxr-xr-x 1 root staff 5163232 Oct 18 21:40 libharbour.so.3.0.0

and /usr/local/lib contains:

lrwxrwxrwx 1 root staff      27 Oct 18 21:23 libharbour.so ->
harbour/libharbour.so.3.0.0
lrwxrwxrwx 1 root staff      27 Oct 18 21:23 libharbour.so.3.0 ->
harbour/libharbour.so.3.0.0
lrwxrwxrwx 1 root staff      27 Oct 18 21:23 libharbour.so.3.0.0 ->
harbour/libharbour.so.3.0.0

*****************************************


When running the test the output was:

root@quixote:/home/marc/harbour/harbour-3.0.0/tests# hbmk2 hello.prg
hbmk2: Processing local make script: hbmk.hbm
Harbour 3.0.0 (Rev. 16951)
Copyright (c) 1999-2011, http://harbour-project.org/
Compiling 'hello.prg'...
Lines 11, Functions/Procedures 1
Generating C source output to '/tmp/hbmk_slfkzm.dir/hello.c'... Done.
root@quixote:/home/marc/harbour/harbour-3.0.0/tests# ./hello
./hello: error while loading shared libraries: libharbour.so.3.0: cannot
open shared object file: No such file or directory


******************************************

I am assuming that there should be links to the libharbour.so.*
libraries from somewhere else, but I'm not sure where.

Any help appreciated.


Marc