:: Re: [DNG] Harbour programming langu…
Página superior
Eliminar este mensaje
Responder a este mensaje
Autor: Marc Shapiro
Fecha:  
A: dng
Asunto: Re: [DNG] Harbour programming language

On 10/18/23 03:46, Olaf Meeuwissen wrote:
> Hi Marc,
>
> Marc Shapiro via Dng <dng@???> writes:
>
>> On 10/16/23 02:34, Olaf Meeuwissen wrote:
>>
>>> 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.
>> I would do that, if 'configure' was present anywhere in the source
>> tree that I downloaded. Unfortunately, it is not. I am using the
>> Makefile that came with the source.
> Sorry about that. For some reason incorrectly assumed harbour used
> automake/autoconf. My bad.
>
> Your initial mail said
>
>    make[2]: *** [../../config/lib.mk:68: descend] Error 2gcc  -I. -I../../../../../include -W -Wall -O3 -DHB_LEGACY_TYPES_OFF -DHB_HAS_PCRE -I/usr/local/harbour/harbour-3.0.0/src/3rd/pcre -DPCRE_STATIC -DHB_HAS_ZLIB -I/usr/include  -oarc4.o  -c ../../../arc4.c
>    ../../../arc4.c:80:15: fatal error: sys/sysctl.h: No such file or directory
>       80 | #     include <sys/sysctl.h>
>          |               ^~~~~~~~~~~~~~
>    compilation terminated.
>    make[3]: *** [../../../../../config/rules.mk:97: arc4.o] Error 1
>    make[2]: *** [../../config/lib.mk:68: descend] Error 2

>
> A note to everyone else that chimed in, this says <sys/sysctl.h>, *not*
> <linux/sysctl.h>. The former was removed from glibc in 2.32. If you
> have an older glibc, like on Chimaera, you should still have it.
>
> I suggested installing dietlibc-dev which still provides this file, even
> in Daedalus. After you installed it, the above error changed to
>
>    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

>
> This means that the compiler found <sys/sysctl.h> but could not find the
> library that provides the sysctl() implementation. That library is part
> of the dietlibc-dev package. Getting the compiler to find the library
> would involve adding a -L option with a path to the directory holding
> the library and a -l with the library file's name, minus the `lib`
> prefix and file extension. You could copy the above gcc line and edit
> it to do so or look into the Makefile that sets it up.
>
> However, looking at the list of files that the package includes I cannot
> tell which of the many libraries, the lib*.a, files. Also, it might not
> play nice with the default libc linkage. On top of that, reading the
> package description I now think trying to use dietlibc-dev is a good
> idea.
>
> Sorry to have sent you down a dead-end but I think your best bet is to
> build this on Chimaera (or earlier).


I still have Chimaera and Beowulf on my system.  So you are suggesting
compile on Chimaera, but run on Daedalus?

Marc