Page 1 of 1

FiveLinux on Raspberry Pi compile Error.

PostPosted: Tue Feb 02, 2016 1:01 am
by yunbg1
Hi Antonio.

compiling...
Harbour 3.2.0.dev (Rev. 17919)
Copyright (c) 1999-2012, http://harbour-project.org/
Compiling 'testbrow.prg'...
Lines 1141, Functions/procedures 1
Generating C source output to 'testbrow.c'... Done.
compiling C module...
testbrow.c:In fonction 'HB_FUN_MAIN':
testbrow.c:48:2: error: unknow type name 'HB_BYTE'
testbrow.c:75:2: warning: passing argument 1 of 'hb_vmExecute' from incompatiable pointer type [enabled by default]

...
...

testbrow.c:48:2: error: unknow type name 'HB_BYTE'

How to fix this error ?

Linux raspberrypi 4.1.7-v7+

Re: FiveLinux on Raspberry Pi compile Error.

PostPosted: Tue Feb 02, 2016 8:21 am
by Antonio Linares
This should be in harbour\include\hbdefs.h:

typedef HB_UCHAR HB_BYTE;

Please check that it is there

Re: FiveLinux on Raspberry Pi compile Error.

PostPosted: Tue Feb 02, 2016 4:49 pm
by yunbg1
harbour/include/hbdefs.h
Line 237:

/*Convenience */
typedef HB_UCHAR HB_BYTE;

Yes.

Re: FiveLinux on Raspberry Pi compile Error.

PostPosted: Tue Feb 02, 2016 6:34 pm
by Antonio Linares
Are you using fivelinux/samples/build.sh to build your app ?

If not, then please check that you are using the same flags as in build.sh for Harbour and for the C compiler

Re: FiveLinux on Raspberry Pi compile Error.

PostPosted: Wed Feb 03, 2016 4:38 am
by yunbg1
My build

/home/pi/fwh/samples/build.sh

//--------------------------------------------------------

clear

echo compiling...
/home/pi/harbour/bin/harbour $1 -n -I/home/pi/fwh/include -I/home/pi/harbour/include -I/usr/include/mysql $2

echo compiling C module...
gcc $1.c -c -I/home/pi/fwh/include -I/home/pi/harbour/include -I/usr/include/mysql `pkg-config --cflags gtk+-2.0`

# -D_FILE_OFFSET_BITS=64

echo linking...
gcc $1.o -o$1 -L/home/pi/fwh/lib -L/home/pi/harbour/lib -L/usr/lib/mysql -lmysqlclient_r `pkg-config --libs gtk+-2.0` `pkg-config --libs libglade-2.0` `pkg-config --libs libgnomeprintui-2.2` -Wl,--start-group -lfivex -lfivec -lcommon -lvm -lrtl -lrdd -lmacro -llang -lcodepage -lpp -ldbfntx -ldbfcdx -ldbffpt -lhbsix -lhsx -lpcrepos -lusrrdd -ltip -lct -lcgi -lgtstd -lgtcgi -lgtcrs -lgttrm -lhbodbc -ldebug -lm -lgpm -lncurses -Wl,--end-group

rm $1.c
rm $1.o

echo done!

Re: FiveLinux on Raspberry Pi compile Error.

PostPosted: Wed Feb 03, 2016 9:49 am
by Antonio Linares
Why don't you use the most recent Harbour ?

Please check if your Linux supports git from a terminal window

Simply type:

git

Re: FiveLinux on Raspberry Pi compile Error.

PostPosted: Wed Feb 03, 2016 11:50 am
by yunbg1
The latest harbour(Raspberry pi) version. ?
Where do I get download ?

Re: FiveLinux on Raspberry Pi compile Error.

PostPosted: Wed Feb 03, 2016 5:11 pm
by Antonio Linares

Re: FiveLinux on Raspberry Pi compile Error.

PostPosted: Thu Feb 04, 2016 1:01 am
by yunbg1
/usr/bin/ld: skipping incompatible
compiling...
Harbour 3.2.0dev (r1602011355)
Copyright (c) 1999-2016, http://harbour-project.org/
Compiling 'testbrow.prg'...
Lines 1141, Functions/Procedures 1
Generating C source output to 'testbrow.c'... Done.
compiling...
Harbour 3.2.0dev (r1602011355)
Copyright (c) 1999-2016, http://harbour-project.org/
Compiling 'testbrow.prg'...
Lines 1141, Functions/Procedures 1
Generating C source output to 'testbrow.c'... Done.
compiling C module...
linking...
/usr/bin/ld: skipping incompatible /home/pi/fwh/lib/libfive.a when searching for -lfive
/usr/bin/ld: cannot find -lfive
/usr/bin/ld: skipping incompatible /home/pi/fwh/lib/libfivec.a when searching for -lfivec
/usr/bin/ld: cannot find -lfivec
/usr/bin/ld: skipping incompatible /home/pi/fwh/lib/libcommon.a when searching for -lcommon
/usr/bin/ld: cannot find -lcommon
/usr/bin/ld: skipping incompatible /home/pi/fwh/lib/libvm.a when searching for -lvm
/usr/bin/ld: cannot find -lvm
/usr/bin/ld: skipping incompatible /home/pi/fwh/lib/librtl.a when searching for -lrtl
/usr/bin/ld: cannot find -lrtl
/usr/bin/ld: skipping incompatible /home/pi/fwh/lib/librdd.a when searching for -lrdd
/usr/bin/ld: cannot find -lrdd
/usr/bin/ld: skipping incompatible /home/pi/fwh/lib/libmacro.a when searching for -lmacro
/usr/bin/ld: cannot find -lmacro
/usr/bin/ld: skipping incompatible /home/pi/fwh/lib/liblang.a when searching for -llang
/usr/bin/ld: cannot find -llang
/usr/bin/ld: skipping incompatible /home/pi/fwh/lib/libcodepage.a when searching for -lcodepage
/usr/bin/ld: cannot find -lcodepage
/usr/bin/ld: skipping incompatible /home/pi/fwh/lib/libpp.a when searching for -lpp
/usr/bin/ld: cannot find -lpp
/usr/bin/ld: skipping incompatible /home/pi/fwh/lib/libdbfntx.a when searching for -ldbfntx
/usr/bin/ld: cannot find -ldbfntx
/usr/bin/ld: skipping incompatible /home/pi/fwh/lib/libdbfcdx.a when searching for -ldbfcdx
/usr/bin/ld: cannot find -ldbfcdx
/usr/bin/ld: skipping incompatible /home/pi/fwh/lib/libdbffpt.a when searching for -ldbffpt
/usr/bin/ld: cannot find -ldbffpt
/usr/bin/ld: skipping incompatible /home/pi/fwh/lib/libhbsix.a when searching for -lhbsix
/usr/bin/ld: cannot find -lhbsix
/usr/bin/ld: skipping incompatible /home/pi/fwh/lib/libusrrdd.a when searching for -lusrrdd
/usr/bin/ld: cannot find -lusrrdd
/usr/bin/ld: skipping incompatible /home/pi/fwh/lib/libct.a when searching for -lct
/usr/bin/ld: cannot find -lct
/usr/bin/ld: skipping incompatible /home/pi/fwh/lib/libgtstd.a when searching for -lgtstd
/usr/bin/ld: cannot find -lgtstd
/usr/bin/ld: skipping incompatible /home/pi/fwh/lib/libdebug.a when searching for -ldebug
/usr/bin/ld: cannot find -ldebug
collect2: ld returned 1 exit status
done!


compile success.
This error---------------------------------------------------------

Re: FiveLinux on Raspberry Pi compile Error.

PostPosted: Thu Feb 04, 2016 8:00 am
by Antonio Linares
You have to change the libraries names this way:

-lfive -lfivec -lhbcommon -lhbvm -lhbrtl -lhbrdd -lhbmacro -lhblang -lhbcpage -lhbpp -lhbcplr -lrddntx -lrddcdx -lrddfpt -lhbsix -lhbusrrdd -lhbct -lgttrm -lhbdebug -lm -lgpm -lncurses

Please review:

https://bitbucket.org/fivetech/fivelinux/src/e4d39f059ef5a0310e7e0353287023e48d9b4f27/samples/build.sh?at=master&fileviewer=file-view-default

Re: FiveLinux on Raspberry Pi compile Error.

PostPosted: Fri Feb 05, 2016 2:38 pm
by yunbg1
I decided to use a gtk3.0 (only Gcc)
(I have a FIVE-LIB Linux Version.), which is not compatible
Thank you Antonio.