Building Harbour with BCC 7.60 64-bit (CLANG)

813 views
Skip to first unread message

Enrico Maria Giordano

unread,
Oct 9, 2023, 10:59:05 PM10/9/23
to Harbour Developers
Hi all,

I'm trying to build Harbour myself. WIth MSC32, MSC64 and BCC 7.60 32-bit no problem. With BCC 7.60 64-bit (CLANG) I get these error messages:

bcc64.exe   -I. -I../../../../../../include -q -tWM -CP437 -w-sig- -w-aus- -w-ccc- -w-csu- -w-par- -w-rch- -w-ucp- -w-use- -w-prc- -w-pia- -d -O2 -OS -Ov -Oc  -DUNICODE -IE:/FW/core-master/src/3rd/zlib -DPNG_NO_STDIO -DPNG_ARM_NEON_OPT=0  -opng.o  -c ../../../png.c
bcc64.exe: error: unknown argument: '-CP437'
bcc64.exe: error: unknown argument: '-w-sig-'
bcc64.exe: error: unknown argument: '-w-aus-'
bcc64.exe: error: unknown argument: '-w-ccc-'
bcc64.exe: error: unknown argument: '-w-csu-'
bcc64.exe: error: unknown argument: '-w-par-'
bcc64.exe: error: unknown argument: '-w-rch-'
bcc64.exe: error: unknown argument: '-w-ucp-'
bcc64.exe: error: unknown argument: '-w-use-'
bcc64.exe: error: unknown argument: '-w-prc-'
bcc64.exe: error: unknown argument: '-w-pia-'

Any ideas on what is the best way to solve this problem? This is the batch I'm using:

@ ECHO OFF

SET HB_COMPILER=bcc64

SET PATH=e:\fw\bcc64\bcc\bin

SET HB_INSTALL_PREFIX=e:\fw\core-master\harbour64

win-make install

PAUSE

Thank you in advance.

Grigory Filatov

unread,
Oct 11, 2023, 5:16:47 AM10/11/23
to Harbour Developers
Hi Enrico,

> Any ideas on what is the best way to solve this problem?
You cannot compile a BCC64-based Harbour build because the standard HBMK2 tool is deprecated.

Try using the updated source code of the hbmk2 utility for BCC64 (see attachment).

Please note that you will have problems supporting the broken codepage library anyway.

BTW And thank you very much for your EMAG DBU, which inspired me.

Best regards,
Grigory

вторник, 10 октября 2023 г. в 04:59:05 UTC+2, Enrico Maria Giordano:
hbmk2.zip

Enrico Maria Giordano

unread,
Oct 11, 2023, 5:45:46 AM10/11/23
to Harbour Developers
After some fixes I get this strange error that I have no clue on how to fix:

ilink64.exe  -je:\fw\bcc64\bcc\lib;e:\fw\bcc64\bcc\lib\psdk;e:\fw\temp\harbour\lib\win\bcc64 -Gn -Tpe  -ap c0x64.o hbi18n.o, "..\..\..\..\..\bin\win\bcc64\hbi18n.exe", nul, hbcplr hbdebug hbmainstd hbmainwin harbour-32 winmm kernel32 user32 ws2_32 iphlpapi advapi32 gdi32 cw64mt import64,,
Turbo Incremental Link64 6.75 Copyright (c) 1997-2016 Embarcadero Technologies, Inc.
        1 file copiati.
../bin/win/bcc64/hbmk2.exe ../contrib/make.hb install

Unrecoverable error 9994: Harbour CP (BG866) initialization failure

Any ideas?

Enrico Maria Giordano

unread,
Oct 11, 2023, 5:45:47 AM10/11/23
to harbou...@googlegroups.com


Il 11/10/2023 11:16, Grigory Filatov ha scritto:

> You cannot compile a BCC64-based Harbour build because the standard
> HBMK2 tool is deprecated.
>
> Try using the updated source code of the hbmk2 utility for BCC64 (see
> attachment).
>
> Please note that you will have problems supporting the broken codepage
> library anyway.

Exactly what I'm facing now. :-( So, there is nothing to do with BCC64?
I'm using MSC now but I would like to have a working BCC64 Harbour too.

> BTW And thank you very much for your EMAG DBU, which inspired me.

Great! :-)

--
Enrico Maria Giordano

http://www.emagsoftware.it
http://www.emagsoftware.it/emgmusic
http://www.emagsoftware.it/spectrum
http://www.emagsoftware.it/tbosg

Enrico Maria Giordano

unread,
Oct 11, 2023, 5:46:36 AM10/11/23
to Harbour Developers
I just tried with BCC 7.30 64-bit (NO CLANG) and got this error:

bcc64.exe   -I. -I../../../../../../include -q -tWM -CP437 -w-sig- -w-aus- -w-ccc- -w-csu- -w-par- -w-rch- -w-ucp- -w-use- -w-prc- -w-pia- -d -O2 -OS -Ov -Oc  -DUNICODE -IE:/FW/core-master/src/3rd/zlib -DPNG_NO_STDIO -DPNG_ARM_NEON_OPT=0  -opng.o  -c ../../../png.c
../../../png.c:
error: invalid integral value 'c' in '-Oc'

So, there is something to fix, probably in bcc.mk. Can I have write access for github repository to fix it myself, please? I already have write access for xHarbour and FWH github repositories.

Enrico Maria Giordano

unread,
Oct 11, 2023, 6:31:14 AM10/11/23
to harbou...@googlegroups.com


Il 11/10/2023 11:16, Grigory Filatov ha scritto:

> Try using the updated source code of the hbmk2 utility for BCC64 (see
> attachment).

Tried. Unfortunately, nothing changed. :-(

Unrecoverable error 9994: Harbour CP (BG866) initialization failure

Enrico Maria Giordano

unread,
Oct 11, 2023, 8:22:42 AM10/11/23
to harbou...@googlegroups.com


Il 11/10/2023 12:31, Enrico Maria Giordano ha scritto:

>> Try using the updated source code of the hbmk2 utility for BCC64 (see
>> attachment).
>
> Tried. Unfortunately, nothing changed. :-(
>
> Unrecoverable error 9994: Harbour CP (BG866) initialization failure

I just realize that the version of hbmk2 you sent me is identical to the
one in the repository.

Enrico Maria Giordano

unread,
Oct 12, 2023, 4:24:47 AM10/12/23
to harbou...@googlegroups.com
Please, somebody knows how to fix this error or do I have to give up?

Aleksander Czajczynski

unread,
Oct 12, 2023, 10:26:38 AM10/12/23
to harbou...@googlegroups.com
Enrico Maria Giordano wrote:
> Please, somebody knows how to fix this error or do I have to give up?
>
> Unrecoverable error 9994: Harbour CP (BG866) initialization failure
>
Are you using the following as a starting point on bcc64 changes in
Harbour tree?
https://github.com/FiveTechSoft/Harbour_builder/blob/master/.github/workflows/harbour_bcc_64.yml

Best regards, Aleksander

Enrico Maria Giordano

unread,
Oct 12, 2023, 11:40:51 AM10/12/23
to harbou...@googlegroups.com


Il 12/10/2023 16:25, Aleksander Czajczynski ha scritto:

> Are you using the following as a starting point on bcc64 changes in
> Harbour tree?
> https://github.com/FiveTechSoft/Harbour_builder/blob/master/.github/workflows/harbour_bcc_64.yml

Tried: same error, sorry. :-(

Unrecoverable error 9994: Harbour CP (BG866) initialization failure

Aleksander Czajczynski

unread,
Oct 12, 2023, 12:17:01 PM10/12/23
to harbou...@googlegroups.com
Enrico Maria Giordano wrote:
>
>
> Il 12/10/2023 16:25, Aleksander Czajczynski ha scritto:
>
>> Are you using the following as a starting point on bcc64 changes in
>> Harbour tree?
>> https://github.com/FiveTechSoft/Harbour_builder/blob/master/.github/workflows/harbour_bcc_64.yml
>>
>
> Tried: same error, sorry. :-(
>
> Unrecoverable error 9994: Harbour CP (BG866) initialization failure
>
There's even a this years binary build...
https://github.com/FiveTechSoft/harbour_and_xharbour_builds/blob/master/harbour_bcc64_20230615.zip

Enrico Maria Giordano

unread,
Oct 12, 2023, 1:17:35 PM10/12/23
to harbou...@googlegroups.com


Il 12/10/2023 18:16, Aleksander Czajczynski ha scritto:

>> Tried: same error, sorry. :-(
>>
>> Unrecoverable error 9994: Harbour CP (BG866) initialization failure
>
> There's even a this years binary build...
> https://github.com/FiveTechSoft/harbour_and_xharbour_builds/blob/master/harbour_bcc64_20230615.zip

This has been built with BCC 7.10:

Extra linker options: -Lc:\bcc7164\LIB;c:\bcc7164\LIB\psdk

Enrico Maria Giordano

unread,
Oct 12, 2023, 5:43:23 PM10/12/23
to harbou...@googlegroups.com
I tried to compile hbmk2.prg myself (with Harbour BCC 7.10 64-bit) and
it is working fine (ie. no error 9994 anymore). Then I changed something
in hbmk2.prg to make bcc64 happy and now the Harbour build script runs
fine till the end! What is wrong with harbour.exe produced by the
current version?

Francesco Perillo

unread,
Oct 12, 2023, 6:02:32 PM10/12/23
to harbou...@googlegroups.com
My 2 cents:

Hbmk2 doesn't full recognize that compiler/version and use inappropriate command line parameters.
You said that it worked with version 7.10. Is the produced command line the same?



--
You received this message because you are subscribed to the Google Groups "Harbour Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to harbour-deve...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/harbour-devel/d54cca41-9dc8-4430-a179-fa384584ecd5n%40googlegroups.com.

Wen Sheng

unread,
Oct 12, 2023, 10:28:28 PM10/12/23
to Harbour Developers
Please clear all .hbmk2 directories manually!!

Enrico Maria Giordano 在 2023年10月12日 星期四下午4:24:47 [UTC+8] 的信中寫道:

Enrico Maria Giordano

unread,
Oct 13, 2023, 3:36:34 AM10/13/23
to harbou...@googlegroups.com


Il 13/10/2023 00:02, Francesco Perillo ha scritto:

> My 2 cents:
>
> Hbmk2 doesn't full recognize that compiler/version and use inappropriate
> command line parameters.
> You said that it worked with version 7.10. Is the produced command line
> the same?

Yes, I just replaced the file hbmk2.exe and nothing else.

Enrico Maria Giordano

unread,
Oct 13, 2023, 4:33:58 AM10/13/23
to harbou...@googlegroups.com


Il 13/10/2023 04:28, Wen Sheng ha scritto:

> Please clear all .hbmk2 directories manually!!

Ok, I'll try, thank you.

Aleksander Czajczynski

unread,
Oct 13, 2023, 4:58:41 AM10/13/23
to harbou...@googlegroups.com
Enrico Maria Giordano wrote:
>
>
> Il 13/10/2023 04:28, Wen Sheng ha scritto:
>
>> Please clear all .hbmk2 directories manually!!
>
> Ok, I'll try, thank you.
>
My loose observation is that with BCC64 7.60 hbmk2 util is not linked
correctly and fails with :
Unrecoverable error 9994: Harbour CP (BG866) initialization failure
If you replace it with another build of hbmk2, then it will continue,
but final applications may have the same problem.

Anyway, this seems to be a problem with the linker, that it either
gathers too many symbols or discards too many, this happens on less
popular platform regarding linking .ctor sections.

Best regards, Aleksander


Enrico Maria Giordano

unread,
Oct 13, 2023, 5:16:08 AM10/13/23
to harbou...@googlegroups.com


Il 13/10/2023 10:33, Enrico Maria Giordano ha scritto:

>> Please clear all .hbmk2 directories manually!!
>
> Ok, I'll try, thank you.

There are no .hbmk2 directories. :-(

Enrico Maria Giordano

unread,
Oct 13, 2023, 5:20:02 AM10/13/23
to harbou...@googlegroups.com


Il 13/10/2023 10:57, Aleksander Czajczynski ha scritto:

> My loose observation  is that with BCC64 7.60 hbmk2 util is not linked
> correctly and fails with :
> Unrecoverable error 9994: Harbour CP (BG866) initialization failure

No. As I already wrote, I tried to recompile hbmk2.prg with BCC64 7.60
myself and it worked fine, no error 9994. So, the problem could be in
the build script. But I couldn't find it so far... :-(

Aleksander Czajczynski

unread,
Oct 13, 2023, 5:49:15 AM10/13/23
to harbou...@googlegroups.com
Enrico Maria Giordano wrote:


Il 13/10/2023 10:57, Aleksander Czajczynski ha scritto:

My loose observation  is that with BCC64 7.60 hbmk2 util is not linked correctly and fails with :
Unrecoverable error 9994: Harbour CP (BG866) initialization failure

No. As I already wrote, I tried to recompile hbmk2.prg with BCC64 7.60 myself and it worked fine, no error 9994. So, the problem could be in the build script. But I couldn't find it so far... :-(

I mean...


Enrico Maria Giordano wrote:
I tried to compile hbmk2.prg myself (with Harbour BCC 7.10 64-bit) and it is working fine (ie. no error 9994 anymore). Then I changed something in hbmk2.prg to make bcc64 happy and now the Harbour build script runs fine till the end! What is wrong with harbour.exe produced by the current version?
I read it differently (no word about 7.60). Anyway hbmk2 is not being built by hbmk2 (obviously) but by gmake + Makefiles. How a change in hbmk2.prg can fix other build scripts, i don't know :-(

Then some log you've pasted earlier:
After some fixes I get this strange error that I have no clue on how to fix:

ilink64.exe  -je:\fw\bcc64\bcc\lib;e:\fw\bcc64\bcc\lib\psdk;e:\fw\temp\harbour\lib\win\bcc64 -Gn -Tpe  -ap c0x64.o hbi18n.o, "..\..\..\..\..\bin\win\bcc64\hbi18n.exe", nul, hbcplr hbdebug hbmainstd hbmainwin harbour-32 winmm kernel32 user32 ws2_32 iphlpapi advapi32 gdi32 cw64mt import64,,
Turbo Incremental Link64 6.75 Copyright (c) 1997-2016 Embarcadero Technologies, Inc.
        1 file copiati.
../bin/win/bcc64/hbmk2.exe ../contrib/make.hb install

Unrecoverable error 9994: Harbour CP (BG866) initialization failure

hbmk2 compiled by Makefiles does not run there.

Best regards, Aleksander

Wen Sheng

unread,
Oct 13, 2023, 6:25:28 AM10/13/23
to Harbour Developers
Does harbour also have this error message?

Enrico Maria Giordano 在 2023年10月13日 星期五下午5:16:08 [UTC+8] 的信中寫道:

Enrico Maria Giordano

unread,
Oct 13, 2023, 6:32:18 AM10/13/23
to harbou...@googlegroups.com


Il 13/10/2023 12:25, Wen Sheng ha scritto:

> Does harbour also have this error message?

No, harbour.exe seems to work fine.

Enrico Maria Giordano

unread,
Oct 13, 2023, 6:43:37 AM10/13/23
to harbou...@googlegroups.com


Il 13/10/2023 11:48, Aleksander Czajczynski ha scritto:

>> I tried to compile hbmk2.prg myself (with Harbour BCC 7.10 64-bit) and
>> it is working fine (ie. no error 9994 anymore). Then I changed
>> something in hbmk2.prg to make bcc64 happy and now the Harbour build
>> script runs fine till the end! What is wrong with harbour.exe produced
>> by the current version?
>
> I read it differently (no word about 7.60).

Ok, sorry, let's start again. These are the facts:

- using win-make.exe and the current repository I get a non-working
hbmk2.exe (error 9994)

- compiling hbmk2.prg using on old Harbour for BCC64 7.10 (but compiling
with BCC64 7.60) I get a working hbmk2.exe (no error 9994)

Can you find where the problem is? This is the old harbour.exe I used:

Harbour 3.2.0dev (r2104281802)
Copyright (c) 1999-2021, https://harbour.github.io/

Harbour Build Info
---------------------------
Version: Harbour 3.2.0dev (r2104281802)
Compiler: LLVM/Clang C 3.3.1 (35465.f352ad3.17344af) (64-bit)
Platform: Windows 10 10.0
PCode version: 0.3
ChangeLog last entry: 2021-04-28 20:02 UTC+0200 Aleksander Czajczynski
(hb fki.pl)
ChangeLog ID: 4643587824552fd877e7f02ad11596e0b30c465d
Built on: Feb 20 2022 16:10:26
Extra Harbour compiler options: -l-
Extra C compiler options: -O2
Extra linker options: -Lc:\bcc7164\LIB -Lharbour\lib\win\bcc64
Build options: (Clipper 5.3b) (Clipper 5.x undoc)
---------------------------

Enrico Maria Giordano

unread,
Oct 13, 2023, 7:10:41 AM10/13/23
to harbou...@googlegroups.com


Il 13/10/2023 12:43, Enrico Maria Giordano ha scritto:

> - using win-make.exe and the current repository I get a non-working
> hbmk2.exe (error 9994)
>
> - compiling hbmk2.prg using on old Harbour for BCC64 7.10 (but compiling
> with BCC64 7.60) I get a working hbmk2.exe (no error 9994)

Update: I tried to replace the older hbcpage.lib with the new one and
the generated hbmk2.exe still works fine (no error 9994). So, it seems
that the new codepage lib is ok. What else I can test?

Enrico Maria Giordano

unread,
Oct 13, 2023, 7:20:20 AM10/13/23
to harbou...@googlegroups.com


Il 13/10/2023 13:10, Enrico Maria Giordano ha scritto:

>> - using win-make.exe and the current repository I get a non-working
>> hbmk2.exe (error 9994)
>>
>> - compiling hbmk2.prg using on old Harbour for BCC64 7.10 (but
>> compiling with BCC64 7.60) I get a working hbmk2.exe (no error 9994)
>
> Update: I tried to replace the older hbcpage.lib with the new one and
> the generated hbmk2.exe still works fine (no error 9994). So, it seems
> that the new codepage lib is ok. What else I can test?

This is how the script compiles hbmk2.prg. Can you see anything wrong?

../../../../../bin/win/bcc64/harbour.exe ../../../hbmk2.prg
-i../../../../../include -n1 -q0 -w3 -es2 -kmo -i- -l -u -i../../../
-DHBMK_USE_APPMAIN -DHBMK_WITH_BUILTIN_HEADERS_ALL
bcc64.exe -I. -I../../../../../include -q -tWM -w -Q -d -O2 -DUNICODE
-ohbmk2.o -c hbmk2.c
hbmk2.c:
ilink64.exe -L"..\..\..\..\..\lib\win\bcc64" -Gn -Tpe -ap
-je:\fw\bcc64\bcc\lib;e:\fw\bcc64\bcc\lib\psdk c0x64.o hbmk2.o,
"..\..\..\..\..\bin\win\bcc64\hbmk2.exe", nul, hbextern hbdebug hbvmmt
hbrtl hblang hbcpage gtcgi gtpca gtstd gtwvt gtgui gtwin hbrdd rddntx
rddnsx rddcdx rddfpt hbsix hbhsx hbusrrdd hbuddall hbrtl hbvmmt hbmacro
hbcplr hbpp hbcommon hbpcre hbzlib winmm kernel32 user32 ws2_32 iphlpapi
advapi32 gdi32 cw64mt import64,, harbour.res
Turbo Incremental Link64 6.98 Copyright (c) 1997-2023 Embarcadero
Technologies, Inc.
1 file copiati.

Aleksander Czajczynski

unread,
Oct 13, 2023, 7:23:36 AM10/13/23
to harbou...@googlegroups.com
If the only difference is swapped harbour.exe, then you can compare the
contents it outputs (generated *.c files) inside %HARBOUR%\utils\hbmk2\obj
between non-working tree and working tree.

Regards, AC


Enrico Maria Giordano

unread,
Oct 13, 2023, 8:24:12 AM10/13/23
to harbou...@googlegroups.com


Il 13/10/2023 13:22, Aleksander Czajczynski ha scritto:

> If the only difference is swapped harbour.exe, then you can compare the
> contents it outputs (generated *.c files) inside %HARBOUR%\utils\hbmk2\obj
> between non-working tree and working tree.

Good idea. The first difference is this:

Old Harbour:

HB_FUNC( __HBMK_FAKE_ENTRY );

New Harbour:

HB_FUNC( _APPMAIN );

The two C source code are attached.
hbmk2c.zip

Aleksander Czajczynski

unread,
Oct 13, 2023, 11:07:08 AM10/13/23
to harbou...@googlegroups.com
Hey, they don't look like created in the same way. One may come from
hbrun which reuses hbmk2.prg or something

old:
* Generated C source from "hbmk2.prg" <- hbrun(?) or boostrapped with
another hbmk2 hbmk2.hbp(?)

new:
* Generated C source from "../../../hbmk2.prg" <- this is what
win-make does

Regards, AC

Enrico Maria Giordano

unread,
Oct 13, 2023, 11:15:44 AM10/13/23
to harbou...@googlegroups.com


Il 13/10/2023 17:06, Aleksander Czajczynski ha scritto:

> Hey, they don't look like created in the same way. One may come from
> hbrun which reuses hbmk2.prg or something
>
> old:
>  * Generated C source from "hbmk2.prg" <- hbrun(?) or boostrapped with
> another hbmk2 hbmk2.hbp(?)
>
> new:
>  * Generated C source from "../../../hbmk2.prg" <- this is what
> win-make does

Yes, the first, created by myself (with my batch) using an old Harbour,
works fine, while the second, creates by win-make.exe, generates the
error 9994 at the start. Any ideas to solve this problem? I really would
like to build latest Harbour with BCC64 7.60, if possible.

Aleksander Czajczynski

unread,
Oct 13, 2023, 12:16:41 PM10/13/23
to harbou...@googlegroups.com
Enrico Maria Giordano wrote:
>
>
> Il 13/10/2023 17:06, Aleksander Czajczynski ha scritto:
>
>> Hey, they don't look like created in the same way. One may come from
>> hbrun which reuses hbmk2.prg or something
>>
>> old:
>> * Generated C source from "hbmk2.prg" <- hbrun(?) or boostrapped
>> with another hbmk2 hbmk2.hbp(?)
>>
>> new:
>> * Generated C source from "../../../hbmk2.prg" <- this is what
>> win-make does
>
> Yes, the first, created by myself (with my batch) using an old
> Harbour, works fine, while the second, creates by win-make.exe,
> generates the error 9994 at the start. Any ideas to solve this
> problem? I really would like to build latest Harbour with BCC64 7.60,
> if possible.
>
Then I highly doubt that there was any change in hbmk2/bcc64. If you try
to rebuild "old Harbour" with win-make and BCC64 7.60 the result will be
the same -> error 9994, don't you think?

Considering differences between .mk/Makefile and what hbmk2 does:
// win-make
ilink64.exe -L"..\..\..\..\..\lib\win\bcc64" -Gn -Tpe -ap
-je:\fw\bcc64\bcc\lib;e:\fw\bcc64\bcc\lib\psdk c0x64.o hbmk2.o,
"..\..\..\..\..\bin\win\bcc64\hbmk2.exe", nul, hbextern hbdebug hbvmmt
hbrtl hblang hbcpage gtcgi gtpca gtstd gtwvt gtgui gtwin hbrdd rddntx
rddnsx rddcdx rddfpt hbsix hbhsx hbusrrdd hbuddall hbrtl hbvmmt hbmacro
hbcplr hbpp hbcommon hbpcre hbzlib winmm kernel32 user32 ws2_32 iphlpapi
advapi32 gdi32 cw64mt import64,, harbour.res
// hbmk2
-Gn -Tpe -L"%HARBOUR%\lib" -ap c0x64.obj %TEMP%\hbmk2.o c0x64.obj
%TEMP%\hbmk_4cfgtn.o, hbmk2.exe, nul, hbextern.a hbdebug.a hbvmmt.a
hbrtl.a hblang.a hbcpage.a gtcgi.a gtpca.a gtstd.a gtwin.a gtwvt.a
gtgui.a hbrdd.a hbuddall.a hbusrrdd.a rddntx.a rddcdx.a rddnsx.a
rddfpt.a hbrdd.a hbhsx.a hbsix.a hbmacro.a hbcplr.a hbpp.a hbcommon.a
winmm.a kernel32.a user32.a gdi32.a advapi32.a ws2_32.a iphlpapi.a
winspool.a comctl32.a comdlg32.a shell32.a uuid.a ole32.a oleaut32.a
mpr.a mapi32.a imm32.a msimg32.a wininet.a cw64mt.lib import64.lib, ,
harbour.res

Please see attached %HARBOUR%\config\win\bcc.mk and .diff, try to see
if supplying extensions matter for win-make.

Regards, AC



bcc.mk
bcc.mk.diff

Enrico Maria Giordano

unread,
Oct 13, 2023, 2:03:18 PM10/13/23
to harbou...@googlegroups.com


Il 13/10/2023 18:15, Aleksander Czajczynski ha scritto:

>> Yes, the first, created by myself (with my batch) using an old
>> Harbour, works fine, while the second, creates by win-make.exe,
>> generates the error 9994 at the start. Any ideas to solve this
>> problem? I really would like to build latest Harbour with BCC64 7.60,
>> if possible.
>
> Then I highly doubt that there was any change in hbmk2/bcc64. If you try
> to rebuild "old Harbour" with win-make and BCC64 7.60 the result will be
> the same -> error 9994, don't you think?

Probably. So, what's the solution?

> Please see attached %HARBOUR%\config\win\bcc.mk and .diff,  try to see
> if supplying extensions matter for win-make.

Tried your modified bcc.mk: no change, still error 9994. :-(

Guillermo Varona Silupú

unread,
Oct 13, 2023, 7:47:37 PM10/13/23
to harbou...@googlegroups.com


El vie., 13 de octubre de 2023 4:16 a. m., Enrico Maria Giordano <e.m.gi...@emagsoftware.it> escribió:


Il 13/10/2023 10:33, Enrico Maria Giordano ha scritto:

>> Please clear all .hbmk2 directories manually!!
>
> Ok, I'll try, thank you.

There are no .hbmk2 directories. :-(

I think the folders are named like:

 .hbmk

BR
--
You received this message because you are subscribed to the Google Groups "Harbour Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to harbour-deve...@googlegroups.com.

Enrico Maria Giordano

unread,
Oct 14, 2023, 3:33:08 AM10/14/23
to harbou...@googlegroups.com


Il 14/10/2023 01:47, Guillermo Varona Silupú ha scritto:

>> There are no .hbmk2 directories. :-(
>
> I think the folders are named like:
>
>  .hbmk

Sorry, no .hbmk either.

Pete

unread,
Oct 14, 2023, 4:41:26 AM10/14/23
to Harbour Developers
On Saturday, 14 October 2023 at 10:33:08 UTC+3 e.m.gi...@emagsoftware.it wrote:

Il 14/10/2023 01:47, Guillermo Varona Silupú ha scritto:

>> There are no .hbmk2 directories. :-(
>
> I think the folders are named like:
>
>  .hbmk

Sorry, no .hbmk either.


Please note that these .hbmk folders (containing intermediate object files) are created 
under the binaries destination folders and they're flagged as HIDDEN
(you have to enable `show hidden files` to be able to locate them).
for example: in my `windows:mingw32` build, these .hbmk folders are created into:
C:\Harbour\bin\win\mingw\.hbmk  --> (executables)
C:\Harbour\lib\win\mingw\.hbmk  --> (libraries)
Also note that they are created during incremental build model (which AFAIK is the default method
being applied by win-make). On non-incremental builds hbmk2.exe creates temporary disposable files.
Besides the .hbmk folders, there are several `obj` folders being created inside (almost all) sub-directories under
harbour/src and harbour/utils.
When do a "clean install" build, it's always a good idea to entirely delete  all those `.hbmk` and `obj` folders.
("manually" or "automated" -- I do it via a batch script which I could upload here, if needed)

regards,
Pete

Enrico Maria Giordano

unread,
Oct 14, 2023, 5:10:43 AM10/14/23
to harbou...@googlegroups.com


Il 14/10/2023 10:41, Pete ha scritto:

>> Sorry, no .hbmk either.
>
> Please note that these *.hbmk* folders (containing intermediate object
> files) are created
> under the binaries destination folders and they're flagged as *HIDDEN*!
> (you have to enable `show hidden files` to be able to locate them).

Right! Deleted two .hbmk directories. Relaunched win-make.exe. No
change: still error 9994. The only way to get a working hbmk2.exe I
found so far is recompiling it with an old Harbour version.

Enrico Maria Giordano

unread,
Oct 14, 2023, 5:17:48 AM10/14/23
to harbou...@googlegroups.com


Il 14/10/2023 11:10, Enrico Maria Giordano ha scritto:

> Right! Deleted two .hbmk directories. Relaunched win-make.exe. No
> change: still error 9994. The only way to get a working hbmk2.exe I
> found so far is recompiling it with an old Harbour version.

WIth the recompiled hbmk2.exe I get this error now:

Fatal: Unable to open file 'HARBOUR.A'

I've done something wrong for sure. Any ideas?

Enrico Maria Giordano

unread,
Oct 14, 2023, 8:20:39 AM10/14/23
to harbou...@googlegroups.com


Il 14/10/2023 11:17, Enrico Maria Giordano ha scritto:

> WIth the recompiled hbmk2.exe I get this error now:
>
> Fatal: Unable to open file 'HARBOUR.A'
>
> I've done something wrong for sure. Any ideas?

I add

SET HB_BUILD_CONTRIB_DYN=no
SET HB_BUILD_DYN=no

and now the the script ends successfully (using the recompiled
hbmk2.exe). Is it the proper solution?

kennyOoi

unread,
Oct 14, 2023, 8:49:14 AM10/14/23
to Harbour Developers

hi Enrico Maria Giordano,

try change this line...inside utils\hbmk2\Makefile

# Not possible to override default entry
# function cleanly when using plain GNU Make
# to build, so we're using _APPMAIN(), which
# is better than Main()
HB_PRGFLAGS += -DHBMK_USE_APPMAIN
to...
#HB_PRGFLAGS += -DHBMK_USE_APPMAIN

kenny .

Enrico Maria Giordano

unread,
Oct 14, 2023, 9:18:21 AM10/14/23
to harbou...@googlegroups.com


Il 14/10/2023 14:05, kennyOoi ha scritto:

> hi Enrico Maria Giordano,
>
> try change this line...inside utils\hbmk2\Makefile
>
> # Not possible to override default entry
> # function cleanly when using plain GNU Make
> # to build, so we're using _APPMAIN(), which
> # is better than Main()
> HB_PRGFLAGS += -DHBMK_USE_APPMAIN
> to...
> #HB_PRGFLAGS += -DHBMK_USE_APPMAIN

Done, no change:

Unrecoverable error 9994: Harbour CP (BG866) initialization failure

:-(

kennyOoi

unread,
Oct 14, 2023, 12:25:43 PM10/14/23
to Harbour Developers
hi Enrico Maria Giordano
have you remove folder obj or win-make clean

kenny

Enrico Maria Giordano

unread,
Oct 14, 2023, 1:24:41 PM10/14/23
to harbou...@googlegroups.com


Il 14/10/2023 15:31, kennyOoi ha scritto:

> hi Enrico Maria Giordano
> have you remove folder obj or win-make clean

Yes, win-make clean.

Enrico Maria Giordano

unread,
Oct 15, 2023, 10:44:32 AM10/15/23
to harbou...@googlegroups.com
I just made this test: replaced only hbcpage.a with the old one (from
the old Harbour version) and left the rest intact. Compiled hbmk2.exe
and it worrked fine. So the problem is only in the new hbcpage library.

Any ideas?

Francesco Perillo

unread,
Oct 15, 2023, 10:51:05 AM10/15/23
to harbou...@googlegroups.com
Old... which version?

Which is the diff?

--
You received this message because you are subscribed to the Google Groups "Harbour Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to harbour-deve...@googlegroups.com.

Enrico Maria Giordano

unread,
Oct 15, 2023, 11:10:00 AM10/15/23
to harbou...@googlegroups.com


Il 15/10/2023 16:50, Francesco Perillo ha scritto:

> Old... which version?

Harbour 3.2.0dev (r2104281802)
Copyright (c) 1999-2021, https://harbour.github.io/

Harbour Build Info
---------------------------
Version: Harbour 3.2.0dev (r2104281802)
Compiler: LLVM/Clang C 3.3.1 (35465.f352ad3.17344af) (64-bit)
Platform: Windows 10 10.0
PCode version: 0.3
ChangeLog last entry: 2021-04-28 20:02 UTC+0200 Aleksander Czajczynski
(hb fki.pl)
ChangeLog ID: 4643587824552fd877e7f02ad11596e0b30c465d
Built on: Feb 20 2022 16:10:26
Extra Harbour compiler options: -l-
Extra C compiler options: -O2
Extra linker options: -Lc:\bcc7164\LIB -Lharbour\lib\win\bcc64
Build options: (Clipper 5.3b) (Clipper 5.x undoc)
---------------------------

Aleksander Czajczynski

unread,
Oct 16, 2023, 1:58:07 AM10/16/23
to harbou...@googlegroups.com
Hello!

Enrico Maria Giordano wrote:
> I just made this test: replaced only hbcpage.a with the old one (from
> the old Harbour version) and left the rest intact. Compiled hbmk2.exe
> and it worrked fine. So the problem is only in the new hbcpage library.
>
> Any ideas?
>
No, your old one hbcpage.a (from the old Harbour version) was compiled
with BCC 7.10, wasn't it? There are more varying changes? I don't know,
because this thread is not very easy to catch up. Let's hope there is
someone else interested in BCC 7.60.

Best regards, Aleksander

Enrico Maria Giordano

unread,
Oct 16, 2023, 4:04:04 AM10/16/23
to harbou...@googlegroups.com


Il 16/10/2023 07:57, Aleksander Czajczynski ha scritto:

>> I just made this test: replaced only hbcpage.a with the old one (from
>> the old Harbour version) and left the rest intact. Compiled hbmk2.exe
>> and it worrked fine. So the problem is only in the new hbcpage library.
>>
>> Any ideas?
>
> No, your old one hbcpage.a (from the old Harbour version) was compiled
> with BCC 7.10, wasn't it?

Yes, it was.

> There are more varying changes? I don't know,
> because this thread is not very easy to catch up. Let's hope there is
> someone else interested in BCC 7.60.

Ok, I give up for now. Thank you all anyway.

Enrico Maria Giordano

unread,
Oct 16, 2023, 8:19:37 AM10/16/23
to harbou...@googlegroups.com


Il 15/10/2023 16:44, Enrico Maria Giordano ha scritto:

> I just made this test: replaced only hbcpage.a with the old one (from
> the old Harbour version) and left the rest intact. Compiled hbmk2.exe
> and it worrked fine. So the problem is only in the new hbcpage library.
>
> Any ideas?

I made another test. Downloaded the repository at the old commit
(2021-04-28) and tried to build that old Harbour with BCC 7.60 64-bit:
same result with hbmk2.exe (error 9994). So the problem IS NOT in the
hbcpage library. If only the error came with a line number...

Enrico Maria Giordano

unread,
Oct 18, 2023, 4:49:18 AM10/18/23
to Harbour Project Developers Mailing List
I drilled down the problem in cdpapi.c here:

if( used[ ucUp ] != 0 )
ucUp = ' ';
if( used[ ucLo ] != 0 )
ucLo = ' ';
if( ucUp == ' ' && ucLo == ' ' )
{
fError = HB_TRUE;
break;
}

used[ ucUp ] and used[ ucLo ] are both != 0, so fError is assigned to
true and here it fails:

if( fError || nACSort > HB_CDP_ACSORT_INTERLEAVED ||
nCaseSort > HB_CDP_CSSORT_IGNORE )
{
#ifdef __HB_IGNORE_CP_ERRORS
fprintf( stderr, "Harbour CP (%s) initialization failure (1)\n",
id ); fflush( stderr );
return NULL;
#else
hb_errInternal( 9994, "Harbour CP (%s) initialization failure",
id, NULL );
#endif
}

Any hint?

Enrico Maria Giordano

unread,
Oct 18, 2023, 8:14:06 AM10/18/23
to Harbour Project Developers Mailing List
The last ucUp and ucLo values before the error are 63 and 63. Does this
mean something for you?

Enrico Maria Giordano

unread,
Oct 18, 2023, 8:17:39 AM10/18/23
to Harbour Project Developers Mailing List


Il 18/10/2023 14:14, Enrico Maria Giordano ha scritto:

> The last ucUp and ucLo values before the error are 63 and 63. Does this
> mean something for you?

More specifically the values are:

63 63
63 63

And error is because the item of used[] for this value is already set to 1.

Enrico Maria Giordano

unread,
Oct 26, 2023, 2:30:59 PM10/26/23
to Harbour Project Developers Mailing List


Il giorno mercoledì 18 ottobre 2023 alle 14:17:39 UTC+2 Enrico Maria
Giordano ha scritto:

>> The last ucUp and ucLo values before the error are 63 and 63. Does
>> this mean something for you?
>
> More specifically the values are:
>
> 63 63 63 63
>
> And error is because the item of used[] for this value is already set
> to 1.

Nobody can help me?

al...@belacy.ru

unread,
Oct 27, 2023, 6:16:29 AM10/27/23
to harbou...@googlegroups.com
Why not try to delete some of codepage files?
 
 Regards, Alexander
 
26.10.2023, 21:31, "Enrico Maria Giordano" <e.m.gi...@emagsoftware.it>:
--
You received this message because you are subscribed to the Google Groups "Harbour Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to harbour-deve...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/harbour-devel/c23b5ebe-221f-4703-9724-fe03fa7889a5%40emagsoftware.it.

Enrico Maria Giordano

unread,
Oct 27, 2023, 7:04:09 AM10/27/23
to harbou...@googlegroups.com


Il 27/10/2023 12:16, al...@belacy.ru ha scritto:

> Why not try to delete some of codepage files?

Do you mean, for example:

src\codepage\cpbg866.c

? If yes, I tried to rename it but the error message did non change. Can
you clarify, please? Thank you for the idea, anyway!

Enrico Maria Giordano

unread,
Oct 27, 2023, 9:54:02 AM10/27/23
to harbou...@googlegroups.com


Il 27/10/2023 13:04, Enrico Maria Giordano ha scritto:

>> Why not try to delete some of codepage files?
>
> Do you mean, for example:
>
> src\codepage\cpbg866.c
>
> ? If yes, I tried to rename it but the error message did non change. Can
> you clarify, please? Thank you for the idea, anyway!

Ok, I understood how to eliminate a codepage from compilation. I removed
BG866 and now the error is

Unrecoverable error 9994: Harbour CP (BGISO) initialization failure

So the problem it is not the single codepage. Any other ideas on what to
look at now?

Enrico Maria Giordano

unread,
Oct 27, 2023, 11:21:37 AM10/27/23
to harbou...@googlegroups.com
I defined

#define __HB_IGNORE_CP_ERRORS

in cdpapi.c. Now hbmk2.exe, even it seems to work fine, report this. Any
hint?

Harbour CP (BG866) initialization failure (1)
Harbour CP (BGISO) initialization failure (1)
Harbour CP (BGMIK) initialization failure (1)
Harbour CP (BGWIN) initialization failure (1)
Harbour CP (CS852) initialization failure (1)
Harbour CP (CSISO) initialization failure (1)
Harbour CP (CSKAMC) initialization failure (1)
Harbour CP (CSWIN) initialization failure (1)
Harbour CP (DE850) initialization failure (1)
Harbour CP (DE858) initialization failure (1)
Harbour CP (DEISO) initialization failure (1)
Harbour CP (DEWIN) initialization failure (1)
Harbour CP (EE775) initialization failure (1)
Harbour CP (EEWIN) initialization failure (1)
Harbour CP (EL737) initialization failure (1)
Harbour CP (ELISO) initialization failure (1)
Harbour CP (ELWIN) initialization failure (1)
Harbour CP (ES850) initialization failure (1)
Harbour CP (ESISO) initialization failure (1)
Harbour CP (ESMWIN) initialization failure (1)
Harbour CP (ESWIN) initialization failure (1)
Harbour CP (FI850) initialization failure (1)
Harbour CP (FR850) initialization failure (1)
Harbour CP (FR850C) initialization failure (1)
Harbour CP (FRISO) initialization failure (1)
Harbour CP (FRWIN) initialization failure (1)
Harbour CP (HR646) initialization failure (1)
Harbour CP (HR852) initialization failure (1)
Harbour CP (HRISO) initialization failure (1)
Harbour CP (HRWIN) initialization failure (1)
Harbour CP (HU852) initialization failure (1)
Harbour CP (HU852C) initialization failure (1)
Harbour CP (HUISO) initialization failure (1)
Harbour CP (HUWIN) initialization failure (1)
Harbour CP (IS850) initialization failure (1)
Harbour CP (IS861) initialization failure (1)
Harbour CP (IT437) initialization failure (1)
Harbour CP (IT850) initialization failure (1)
Harbour CP (ITISB) initialization failure (1)
Harbour CP (ITISO) initialization failure (1)
Harbour CP (ITWIN) initialization failure (1)
Harbour CP (LT775) initialization failure (1)
Harbour CP (LTWIN) initialization failure (1)
Harbour CP (LV775) initialization failure (1)
Harbour CP (LVWIN) initialization failure (1)
Harbour CP (NO865) initialization failure (1)
Harbour CP (PL852) initialization failure (1)
Harbour CP (PLISO) initialization failure (1)
Harbour CP (PLMAZ) initialization failure (1)
Harbour CP (PLWIN) initialization failure (1)
Harbour CP (PT850) initialization failure (1)
Harbour CP (PTISO) initialization failure (1)
Harbour CP (RO852) initialization failure (1)
Harbour CP (ROISO) initialization failure (1)
Harbour CP (ROWIN) initialization failure (1)
Harbour CP (RU1251) initialization failure (1)
Harbour CP (RU866) initialization failure (1)
Harbour CP (RUISO) initialization failure (1)
Harbour CP (RUKOI8) initialization failure (1)
Harbour CP (SK852) initialization failure (1)
Harbour CP (SKISO) initialization failure (1)
Harbour CP (SKKAMC) initialization failure (1)
Harbour CP (SKWIN) initialization failure (1)
Harbour CP (SL646) initialization failure (1)
Harbour CP (SL852) initialization failure (1)
Harbour CP (SLISO) initialization failure (1)
Harbour CP (SLWIN) initialization failure (1)
Harbour CP (SR646) initialization failure (1)
Harbour CP (SR646C) initialization failure (1)
Harbour CP (SRWIN) initialization failure (1)
Harbour CP (SVISO) initialization failure (1)
Harbour CP (SVWIN) initialization failure (1)
Harbour CP (TR857) initialization failure (1)
Harbour CP (TRISO) initialization failure (1)
Harbour CP (TRWIN) initialization failure (1)
Harbour CP (UA1125) initialization failure (1)
Harbour CP (UA1251) initialization failure (1)
Harbour CP (UA866) initialization failure (1)
Harbour CP (UAKOI8) initialization failure (1)

Enrico Maria Giordano

unread,
Oct 28, 2023, 11:49:09 AM10/28/23
to harbou...@googlegroups.com
My investigation led me to this function:

HB_BOOL hb_cdpRegisterNew( const char * id, const char * info,
PHB_UNITABLE uniTable,
const char * pszUpper, const char * pszLower,
unsigned int nACSort,
unsigned int nCaseSort,
HB_BOOL fUtf8 )

Where is the call to it? I can't find it in the whole Harbour source
code. Somebody can help me find it?

Grigory Filatov

unread,
Oct 28, 2023, 1:13:22 PM10/28/23
to Harbour Developers
Hi Enrico,

> Where is the call to it? 
Please look at the following header file:
hbcdpreg.h in your folder harbour\include.

HTH,
Grigory

суббота, 28 октября 2023 г. в 17:49:09 UTC+2, Enrico Maria Giordano:

Enrico Maria Giordano

unread,
Oct 28, 2023, 1:27:15 PM10/28/23
to harbou...@googlegroups.com


Il 28/10/2023 19:13, Grigory Filatov ha scritto:

> Hi Enrico,
>
> > Where is the call to it?
> Please look at the following header file:
> *hbcdpreg.h* in your folder /harbour\include/.

Thank you! I missed it, I thought it was a declaration. :-)

Enrico Maria Giordano

unread,
Oct 28, 2023, 2:01:21 PM10/28/23
to harbou...@googlegroups.com
I found the root of the problem! The following example:

#include <stdio.h>


#define HB_CP_UPPER
"РБВГДЕЖЗИЙКЛМРОПРСТУФХЦЧШЩЪЫЬЭЮЯ"
#define HB_CP_LOWER
"Ð°Ð±Ð²Ð³Ð´ÐµÐ¶Ð·Ð¸Ð¹ÐºÐ»Ð¼Ð½Ð¾Ð¿Ñ€Ñ Ñ‚ÑƒÑ„Ñ…Ñ†Ñ‡ÑˆÑ‰ÑŠÑ‹ÑŒÑ ÑŽÑ "


int main()
{
printf( "%d - %d\n", *HB_CP_UPPER, *HB_CP_LOWER );

return 0;
}

prints:

-48 - -48

with MSC32, MSC64 and BCC32, while prints:

63 - 63

with BCC64. Now I have to understand why. Any suggestions is well
accepted. :-)

Enrico Maria Giordano

unread,
Oct 28, 2023, 3:21:08 PM10/28/23
to harbou...@googlegroups.com


Il 28/10/2023 20:01, Enrico Maria Giordano ha scritto:

> I found the root of the problem! The following example:
>
> #include <stdio.h>
>
>
> #define HB_CP_UPPER "РБВГДЕЖЗИЙКЛМÐ
> ОПРСТУФХЦЧШЩЪЫЬЭЮЯ"
> #define HB_CP_LOWER "абвгдежзийклмнопрÑ
> Ñ‚ÑƒÑ„Ñ…Ñ†Ñ‡ÑˆÑ‰ÑŠÑ‹ÑŒÑ ÑŽÑ "
>
>
> int main()
> {
>     printf( "%d - %d\n", *HB_CP_UPPER, *HB_CP_LOWER );
>
>     return 0;
> }
>
> prints:
>
> -48 - -48
>
> with MSC32, MSC64 and BCC32, while prints:
>
> 63 - 63
>
> with BCC64. Now I have to understand why. Any suggestions is well
> accepted. :-)

It works if I add just this to the sample:

//"Ð"

I don't understand...

Enrico Maria Giordano

unread,
Nov 3, 2023, 11:32:21 AM11/3/23
to Harbour Project Developers Mailing List
The last version of BCC64 that doesn't have this problem is the 7.10.
All the next ones interpret the source code as UTF-8 or Windows-1252
with a rule that I don't fully understand. And I could not find any
compiler switch to change this behavior (-finput-charset accepts only
UTF-8).

kennyOoi

unread,
Nov 8, 2023, 8:27:28 AM11/8/23
to Harbour Developers
hi  Enrico Maria Giordano ,

I'm trying to build but i have these error ...

In file included from ../../../auxtif.c:34:
P:\hb\mingw\Bcc\BCC76064\bin\..\include\windows\crtl\math.h:1030:1: error: conflicting types for '__tg_promote'
_Tg_promote(unsigned int, double);
^
P:\hb\mingw\Bcc\BCC76064\bin\..\include\windows\crtl\math.h:1027:46: note: expanded from macro '_Tg_promote'
        static To __attribute__((__overloadable__)) __tg_promote(From)
                                                    ^
P:\hb\mingw\Bcc\BCC76064\bin\..\include\windows\crtl\math.h:1029:1: note: previous declaration is here
_Tg_promote(int, double);
^
P:\hb\mingw\Bcc\BCC76064\bin\..\include\windows\crtl\math.h:1027:46: note: expanded from macro '_Tg_promote'
        static To __attribute__((__overloadable__)) __tg_promote(From)
                                                    ^
P:\hb\mingw\Bcc\BCC76064\bin\..\include\windows\crtl\math.h:1031:1: error: conflicting types for '__tg_promote'
_Tg_promote(long, double);
^
P:\hb\mingw\Bcc\BCC76064\bin\..\include\windows\crtl\math.h:1027:46: note: expanded from macro '_Tg_promote'
        static To __attribute__((__overloadable__)) __tg_promote(From)
                                                    ^
P:\hb\mingw\Bcc\BCC76064\bin\..\include\windows\crtl\math.h:1029:1: note: previous declaration is here
_Tg_promote(int, double);
^
P:\hb\mingw\Bcc\BCC76064\bin\..\include\windows\crtl\math.h:1027:46: note: expanded from macro '_Tg_promote'
        static To __attribute__((__overloadable__)) __tg_promote(From)
                                                    ^
P:\hb\mingw\Bcc\BCC76064\bin\..\include\windows\crtl\math.h:1032:1: error: conflicting types for '__tg_promote'
_Tg_promote(unsigned long, double);
^
P:\hb\mingw\Bcc\BCC76064\bin\..\include\windows\crtl\math.h:1027:46: note: expanded from macro '_Tg_promote'
        static To __attribute__((__overloadable__)) __tg_promote(From)
                                                    ^
P:\hb\mingw\Bcc\BCC76064\bin\..\include\windows\crtl\math.h:1029:1: note: previous declaration is here
_Tg_promote(int, double);
^
P:\hb\mingw\Bcc\BCC76064\bin\..\include\windows\crtl\math.h:1027:46: note: expanded from macro '_Tg_promote'
        static To __attribute__((__overloadable__)) __tg_promote(From)
                                                    ^
P:\hb\mingw\Bcc\BCC76064\bin\..\include\windows\crtl\math.h:1033:1: error: conflicting types for '__tg_promote'
_Tg_promote(long long, double);
^
P:\hb\mingw\Bcc\BCC76064\bin\..\include\windows\crtl\math.h:1027:46: note: expanded from macro '_Tg_promote'
        static To __attribute__((__overloadable__)) __tg_promote(From)
                                                    ^
P:\hb\mingw\Bcc\BCC76064\bin\..\include\windows\crtl\math.h:1029:1: note: previous declaration is here
_Tg_promote(int, double);
^
P:\hb\mingw\Bcc\BCC76064\bin\..\include\windows\crtl\math.h:1027:46: note: expanded from macro '_Tg_promote'
        static To __attribute__((__overloadable__)) __tg_promote(From)
                                                    ^
P:\hb\mingw\Bcc\BCC76064\bin\..\include\windows\crtl\math.h:1034:1: error: conflicting types for '__tg_promote'
_Tg_promote(unsigned long long, double);

******************
this is my environment setting...........

HB_BUILD_3RDEXT=no
HB_BUILD_CONTRIB_DYN=no
HB_BUILD_DYN=no
HB_BUILD_OPTIM=no
HB_BUILD_WARN=yes
HB_COMPILER=bcc64
HB_INSTALL_PREFIX=P:\hb\hb3235\harBour\bin\win\bcc64
HB_SRC_ROOTPATH=P:\hb\hb3235\harBour
HB_STATIC_OPENSSL=yes
HB_TRACE=yes
HB_USER_LDFLAGS=-LP:\hb\mingw\Bcc\BCC76064\LIB -LP:\hb\hb3235\harBour\lib\win\bcc64
HB_USER_LIBS=-LP:\hb\mingw\Bcc\BCC76064\LIB xmath
HB_USER_RESFLAGS=-IP:\hb\mingw\Bcc\BCC76064\include\windows\sdk
HB_WITH_ADS=
HB_WITH_CAIRO=D:\hb\contrib_lib\cairo\include\cairo
HB_WITH_CURL=D:\hb\contrib_lib\curl-8.1.2_2-64\include
HB_WITH_FIREBIRD=D:\fbSQLx64\include
HB_WITH_FREEIMAGE=D:\hb\contrib_lib\FreeImage\x64\include
HB_WITH_MYSQL=D:\temp\mariadb-10.1.22-winx64\MariaDB 10.0\include
HB_WITH_OPENSSL=D:\hb\contrib_lib\OpenSSL-111x64\include
HB_WITH_PGSQL=D:\hb\contrib_lib\pgsql\x64\include
..............................
can you share your environment setting & build script.

kenny ,
thank.






On Tuesday, October 10, 2023 at 10:59:05 AM UTC+8 Enrico Maria Giordano wrote:
Hi all,

I'm trying to build Harbour myself. WIth MSC32, MSC64 and BCC 7.60 32-bit no problem. With BCC 7.60 64-bit (CLANG) I get these error messages:

bcc64.exe   -I. -I../../../../../../include -q -tWM -CP437 -w-sig- -w-aus- -w-ccc- -w-csu- -w-par- -w-rch- -w-ucp- -w-use- -w-prc- -w-pia- -d -O2 -OS -Ov -Oc  -DUNICODE -IE:/FW/core-master/src/3rd/zlib -DPNG_NO_STDIO -DPNG_ARM_NEON_OPT=0  -opng.o  -c ../../../png.c
bcc64.exe: error: unknown argument: '-CP437'
bcc64.exe: error: unknown argument: '-w-sig-'
bcc64.exe: error: unknown argument: '-w-aus-'
bcc64.exe: error: unknown argument: '-w-ccc-'
bcc64.exe: error: unknown argument: '-w-csu-'
bcc64.exe: error: unknown argument: '-w-par-'
bcc64.exe: error: unknown argument: '-w-rch-'
bcc64.exe: error: unknown argument: '-w-ucp-'
bcc64.exe: error: unknown argument: '-w-use-'
bcc64.exe: error: unknown argument: '-w-prc-'
bcc64.exe: error: unknown argument: '-w-pia-'

Any ideas on what is the best way to solve this problem? This is the batch I'm using:

@ ECHO OFF

SET HB_COMPILER=bcc64

SET PATH=e:\fw\bcc64\bcc\bin

SET HB_INSTALL_PREFIX=e:\fw\core-master\harbour64

win-make install

PAUSE

Thank you in advance.

Enrico Maria Giordano

unread,
Nov 8, 2023, 8:43:56 AM11/8/23
to harbou...@googlegroups.com


Il 08/11/2023 12:19, kennyOoi ha scritto:

> hi Enrico Maria Giordano ,
>
> I'm trying to build but i have these error ...
>
> In file included from ../../../auxtif.c:34:
> P:\hb\mingw\Bcc\BCC76064\bin\..\include\windows\crtl\math.h:1030:1:
> error: conflicting types for '__tg_promote'
> _Tg_promote(unsigned int, double);
> ^

Yes, we are working on it. As a workaround, move #include <math.h> to
the top in auxtif.c and color.c.
Reply all
Reply to author
Forward
0 new messages