I wonder why this didn't came up earlier, for one thing 
hbmk script is unrelated to default build process, and in 
default build process -n1 option is added by config/rules.mk. 
This is right for libs, but not right for bins.

(default build process also uses hbmk2, but it's 
using -n1/-n2 correctly)

So question is: Why is a problem now, and why wasn't 
it so far?

(correction is easy after that point)

Brgds,
Viktor

On 2009 Dec 16, at 01:37, Tamas TEVESZ wrote:

> On Tue, 15 Dec 2009, [email protected] wrote:
> 
> hi,
> 
>> Revision: 13255
>>          
>> http://harbour-project.svn.sourceforge.net/harbour-project/?rev=13255&view=rev
>> Author:   druzus
>> Date:     2009-12-15 23:24:29 +0000 (Tue, 15 Dec 2009)
>> 
>> Log Message:
>> -----------
>> 2009-12-16 00:24 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
>>  * harbour/bin/hb-func.sh
>>    * use -n2 as default harbour compiler parameter in hb* scripts
> 
> that didn't really help, and it's getting even more strange.
> 
> the build log clearly shows harbour still being called with -n1, i 
> checked the older ones, it was so all along the way as well.
> 
> the completely strange part is that if, using the very same options, 
> copy-pasted from the build log, i build a "private copy" of hbrun, 
> then it works.
> 
> so, the result of a "make" in the source tree gets me a 
> bin/$plat/$comp/hbrun which gives BASE/1003
> 
> the following gives a working hbrun:
> 
> unixware714:~/hb/harbour$ env | fgrep HB
> unixware714:~/hb/harbour$ gmake > ../log 2>&1                                 
>                                                  
> unixware714:~/hb/harbour$ ./bin/unixware/gcc/hbrun
> Error BASE/1003  Variable does not exist: S_AINCDIR
> Called from _APPMAIN(90)                                                      
>                                                  
> unixware714:~/hb/harbour$ ./bin/unixware/gcc/harbour utils/hbrun/hbrun.prg 
> -iinclude -n1 -q0 -w2 -es2 -kmo -i- -l              
> unixware714:~/hb/harbour$ gcc -DHB_OS_UNIXWARE -I. -Iinclude -D_SCO_DS 
> -Wall -W -O3   -o hbrun.o -c hbrun.c
> unixware714:~/hb/harbour$ gcc  -pthread -I. -Llib/unixware/gcc 
> -Iinclude -L/usr/X11R6/lib -ohbrun hbrun.o -lhbcplr -lhbpp
> -lhbcommon -lhbextern -lhbdebug -lhbvm -lhbrtl -lhblang -lhbcpage 
> -lgtcgi -lgtpca -lgtstd -lgtcrs -lgtxwc -lgttrm -lhbrdd
> -lrddntx -lrddnsx -lrddcdx -lrddfpt -lhbsix -lhbhsx -lhbusrrdd 
> -lhbuddall -lhbrtl -lhbvm -lhbmacro -lhbcplr -lhbpp -lhbcommon
> -lhbpcre -lcurses -lX11 -lz -lsocket -lnsl -lresolv -lm
> unixware714:~/hb/harbour$ ./hbrun --> runs fine
> 
> what gets me thinking is that the size difference between the two 
> files is relatively big:
> 
> -rwxr-xr-x    1 ice      other       3541060 Dec 16 00:54 ./hbrun             
>                                                  
> -rwxr-xr-x    1 ice      other       3541592 Dec 16 00:52 
> bin/unixware/gcc/hbrun                                               
> 
> which they proportionally keep after being stripped:
> 
> -rwxr-xr-x    1 ice      other       3252400 Dec 16 01:05 ./hbrun
> -rwxr-xr-x    1 ice      other       3252848 Dec 16 01:05 
> bin/unixware/gcc/hbrun
> 
> and even after a treat of `mcs -d': (this strips the .comment 
> sections, which the native binutils populate with the exact versions 
> of files, tools and stuff that were involved producing said elf 
> object):
> 
> -rwxr-xr-x    1 ice      other       3031452 Dec 16 01:05 ./hbrun
> -rwxr-xr-x    1 ice      other       3031900 Dec 16 01:05 
> bin/unixware/gcc/hbrun
> 
> there is no real (to me..) difference between the generated c sources:
> 
> unixware714:~/hb/harbour$ /usr/local/bin/diff -u ./hbrun.c 
> ./utils/hbrun/obj/unixware/gcc/hbrun.c
> --- ./hbrun.c   2009-12-16 00:53:29.240000007 +0100
> +++ ./utils/hbrun/obj/unixware/gcc/hbrun.c      2009-12-16 00:52:07.190000002 
> +0100
> @@ -1,7 +1,7 @@
> /*
>  * Harbour 2.0.0beta3 (Rev. 13256)
>  * GNU C 2.95 (32-bit)
> - * Generated C source from "utils/hbrun/hbrun.prg"
> + * Generated C source from "../../../hbrun.prg"
>  */
> 
> #include "hbvmpub.h"
> @@ -156,7 +156,7 @@
> { "HB_GT_PCA", {HB_FS_PUBLIC}, {HB_FUNCNAME( HB_GT_PCA )}, NULL },
> { "HB_GT_STD", {HB_FS_PUBLIC}, {HB_FUNCNAME( HB_GT_STD )}, NULL },
> { "(_INITSTATICS00003)", {HB_FS_INITEXIT | HB_FS_LOCAL}, {hb_INITSTATICS}, 
> NULL }
> -HB_INIT_SYMBOLS_EX_END( hb_vm_SymbolInit_HBRUN, "utils/hbrun/hbrun.prg", 
> 0x0, 0x0002 )
> +HB_INIT_SYMBOLS_EX_END( hb_vm_SymbolInit_HBRUN, "../../../hbrun.prg", 0x0, 
> 0x0002 )
> 
> #if defined( HB_PRAGMA_STARTUP )
>    #pragma startup hb_vm_SymbolInit_HBRUN
> 
> 
> yet, there is some strange (related?) difference between the c strings 
> in the binaries (hbrun.ok and hbrun.bad are the outputs of `strings' on
> the working and the non-working binaries, respectively):
> 
> unixware714:~/hb/harbour$ /usr/local/bin/diff -u1 hbrun.ok hbrun.bad 
> --- hbrun.ok    2009-12-16 01:13:37.700000100 +0100
> +++ hbrun.bad   2009-12-16 01:13:44.940000011 +0100
> @@ -8,2 +8,3 @@
> __MVSETBASE
> +S_NCOL
> HB_HRBDO
> @@ -35,2 +36,3 @@
> OUTSTD
> +S_NROW
> ALLTRIM
> @@ -66,2 +68,3 @@
> PCOUNT
> +S_AINCDIR
> AADD
> @@ -70,3 +73,4 @@
> _APPMAIN
> -utils/hbrun/hbrun.prg
> +HBRUN
> +hbrun.prg
> HB_INC_INSTALL
> @@ -83,2 +87,3 @@
> dddddd
> +z1S(
> j'Harbour "DOt Prompt" Console / runner 
> 
> ... ok, so these suspiciously look like the static variables in 
> hbrun.prg (and are good account for the size difference)...
> 
> and i am lost again. if i am doing this, i have no idea how...
> 
> -- 
> [-]
> 
> mkdir /nonexistent
> _______________________________________________
> Harbour mailing list (attachment size limit: 40KB)
> [email protected]
> http://lists.harbour-project.org/mailman/listinfo/harbour

_______________________________________________
Harbour mailing list (attachment size limit: 40KB)
[email protected]
http://lists.harbour-project.org/mailman/listinfo/harbour

Reply via email to