:: Re: [DNG] Harbour programming langu…
Etusivu
Poista viesti
Vastaa
Lähettäjä: Olaf Meeuwissen
Päiväys:  
Vastaanottaja: Marc Shapiro
Kopio: dng
Aihe: Re: [DNG] Harbour programming language
Hi Marc,

Marc Shapiro via Dng <dng@???> writes:

> Sorry, Olaf, this was supposed to go to the list.


That's okay.

> On 10/15/23 14:33, Marc Shapiro wrote:
>
> 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
>
> Close, but no cigar.
>
> I installed the three packages, as suggested. It is now finding the headers for libgpm and libslang2, but it still is not finding sys/sysctl.h.


Your logs seems to indicate it did find sys/sysctl.h but could not find
any library implementing a `sysclt()` function when linking.

> marc@quixote:/usr/local/harbour/harbour-3.0.0$ sudo make install
> [...]
> ! Installing ../../lib/linux/gcc/libharbour.so.3.0.0 on /usr/local/lib/harbour
> gcc -L../../../../../lib/linux/gcc -L/usr/X11R6/lib64 -L/usr/X11R6/lib -o../../../../../bin/linux/gcc/hbmk2 hbmk2.o -lhbextern -lhbdebug -lhbvmmt -lhbrtl
> -lhblang -lhbcpage -lgtcgi -lgtpca -lgtstd -lgtcrs -lgtsln -lgtxwc -lgttrm -lhbnulrdd -lhbrtl -lhbvmmt -lhbmacro -lhbcplr -lhbpp -lhbcommon -lhbpcre
> -lncurses -lslang -lX11 -lgpm -lz -lrt -ldl -lpthread -lm
> /usr/bin/ld: ../../../../../lib/linux/gcc/libhbrtl.a(arc4.o): in function `arc4_stir':
> arc4.c:(.text+0x470): undefined reference to `sysctl'
> collect2: error: ld returned 1 exit status


I also got the impression you hadn't re-run ./configure after installing
the extra packages. You probably should have and maybe even recompile
from scratch. I would the re-./configure to pick up on the location of
dietlibc, assuming harbour supports its use, and then add the necessary
linker flag to the gcc invocation.

> marc@quixote:/usr/local/harbour/harbour-3.0.0$ marc@quixote:/$ sudo find -name sysctl.h
> ./usr/include/diet/sys/sysctl.h
> ./usr/include/linux/sysctl.h


As for that latter linux/sysctl.h, it seems that sysctl() was removed
in Linux 5.5 and glibc 2.32. Perhaps you have more success on a
somewhat older Devuan version such as chimaera? Or check for issues
and hints from wherever you got the harbour source.

See https://www.man7.org/linux/man-pages/man2/sysctl.2.html for notes on
the sysctl() removal from the kernel and glibc.

Hope this helps,
--
Olaf Meeuwissen