mod_harbour + ADS on linux server
mod_harbour + ADS on linux server
Hello everybody,
I'm trying to set up a small site that uses mod_harbour with ADS libraries on a linux server.
The same application is already working on Windows (XAMPP) but I can't find anywhere how to configure a linux server to do the same thing.
The mod_harbour application is installed in /var/www/html/top.
Following this guide https://github.com/FiveTechSoft/mod_har ... ster/linux I have put libharbour.so.3.2.0 in /var/www/html and mod_harbour.so in /usr/lib/apache2/modules.
I found a small guide about mod_harbour + ADS on linux here https://github.com/FiveTechSoft/mod_har ... r-on-Linux that says to use libace.so and libadsloc.so in the same way as ace32.dll and AdsLoc32.dll are used in Windows.
In Windows I put ace32.dll and AdsLoc32.dll in apache/bin directory (eg. c:\xampp\apache\bin).
Where should I put libace.so and libadsloc.so to make them visible to mod_harbour? Is there a libharbour.so specific to use with ADS?
By the way, the error shown by the application is this:
Error: Unknown or unregistered symbol
operation: ADSSETSERVERTYPE
called from: HB_HRBLOAD, line: 0
called from: ../source/exec.prg, LOADHRB, line: 167
called from: ../source/exec.prg, (b)REPLACEBLOCKS, line: 141
called from: ../source/exec.prg, REPLACEBLOCKS, line: 141
called from: ../source/exec.prg, EXECUTE, line: 63
Thank you in advance.
I'm trying to set up a small site that uses mod_harbour with ADS libraries on a linux server.
The same application is already working on Windows (XAMPP) but I can't find anywhere how to configure a linux server to do the same thing.
The mod_harbour application is installed in /var/www/html/top.
Following this guide https://github.com/FiveTechSoft/mod_har ... ster/linux I have put libharbour.so.3.2.0 in /var/www/html and mod_harbour.so in /usr/lib/apache2/modules.
I found a small guide about mod_harbour + ADS on linux here https://github.com/FiveTechSoft/mod_har ... r-on-Linux that says to use libace.so and libadsloc.so in the same way as ace32.dll and AdsLoc32.dll are used in Windows.
In Windows I put ace32.dll and AdsLoc32.dll in apache/bin directory (eg. c:\xampp\apache\bin).
Where should I put libace.so and libadsloc.so to make them visible to mod_harbour? Is there a libharbour.so specific to use with ADS?
By the way, the error shown by the application is this:
Error: Unknown or unregistered symbol
operation: ADSSETSERVERTYPE
called from: HB_HRBLOAD, line: 0
called from: ../source/exec.prg, LOADHRB, line: 167
called from: ../source/exec.prg, (b)REPLACEBLOCKS, line: 141
called from: ../source/exec.prg, REPLACEBLOCKS, line: 141
called from: ../source/exec.prg, EXECUTE, line: 63
Thank you in advance.
- Antonio Linares
- Site Admin
- Posts: 42259
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Re: mod_harbour + ADS on linux server
Dear Paolo,
What Linux version are you using ? 32 or 64 bits ?
What Linux version are you using ? 32 or 64 bits ?
Re: mod_harbour + ADS on linux server
Dear Antonio,
thank you for you kind reply.
I am using Ubuntu Server 20.04 64 bit.
I also forget to mention the version of the ADS libraries which is 11.10.0.24. I tried with the 64 bit version of libace.so and libadsloc.so.
thank you for you kind reply.
I am using Ubuntu Server 20.04 64 bit.
I also forget to mention the version of the ADS libraries which is 11.10.0.24. I tried with the 64 bit version of libace.so and libadsloc.so.
- Antonio Linares
- Site Admin
- Posts: 42259
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Re: mod_harbour + ADS on linux server
Dear Paolo,
We are trying to build it for you but we get these errors:
We are trying to build it for you but we get these errors:
Now trying this possible solution:/usr/bin/ld: /home/anto/harbour/lib/linux/gcc/libhbvmmt.a(hvmall.o): relocation R_X86_64_TPOFF32 against `hb_stack_ptr' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: /home/anto/harbour/lib/linux/gcc/libhbpcre.a(pcreexec.o): relocation R_X86_64_PC32 against symbol `_pcre_ucd_stage2' can not be used when making a shared object; recompile with -fPIC
seen at https://github.com/gabime/spdlog/issues/1405$ cmake -DCMAKE_POSITION_INDEPENDENT_CODE=ON (other option) ..
$ make -j
- Antonio Linares
- Site Admin
- Posts: 42259
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Re: mod_harbour + ADS on linux server
same error...
looking for a solution
looking for a solution
- Antonio Linares
- Site Admin
- Posts: 42259
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Re: mod_harbour + ADS on linux server
next try using export HB_USER_CFLAGS=-fPIC before building Harbour
- Antonio Linares
- Site Admin
- Posts: 42259
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Re: mod_harbour + ADS on linux server
Problem solved
Re: mod_harbour + ADS on linux server
Thank you for your effort.
I also tried to compile mod_harbour following this guide https://github.com/FiveTechSoft/mod_har ... ster/linux but did not succeed.
I got stuck on the step
because I could not find the go.sh script mentioned in the guide.
Anyway, I think that I should also include something from ADS while compiling harbour/mod_harbour but I don't know what...
Thanks again.
I also tried to compile mod_harbour following this guide https://github.com/FiveTechSoft/mod_har ... ster/linux but did not succeed.
I got stuck on the step
Code: Select all | Expand
chmod +x go.sh
./go.sh
Anyway, I think that I should also include something from ADS while compiling harbour/mod_harbour but I don't know what...
Thanks again.
- Antonio Linares
- Site Admin
- Posts: 42259
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Re: mod_harbour + ADS on linux server
Dear Paolo,
I just emailed you mod_harbour for Ubuntu 20.04 64 bits including ADS support
Please try it and let us know how it works for you
I just emailed you mod_harbour for Ubuntu 20.04 64 bits including ADS support
Please try it and let us know how it works for you
Re: mod_harbour + ADS on linux server
I am trying, but now it does not work anymore (even the examples bundled with harbour).
Maybe it's something about the permissions.
I will try to reconfigure mod_harbour environment from the start and I'll let you know if it works.
Thank you.
Maybe it's something about the permissions.
I will try to reconfigure mod_harbour environment from the start and I'll let you know if it works.
Thank you.
Re: mod_harbour + ADS on linux server
Ok, I got it... I had to restart apache...
Now I get this error (both in my application and in mod_harbour examples):
mod_harbour version Dec 1 2022, 10:10:00
/tmp/libharbour.-846395648.-210844650: undefined symbol: HB_FUN_ADS
failed to load hb_apache()
Am I doing something wrong?
Now I get this error (both in my application and in mod_harbour examples):
mod_harbour version Dec 1 2022, 10:10:00
/tmp/libharbour.-846395648.-210844650: undefined symbol: HB_FUN_ADS
failed to load hb_apache()
Am I doing something wrong?
- Antonio Linares
- Site Admin
- Posts: 42259
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Re: mod_harbour + ADS on linux server
Dear Paolo,
I have just emailed you a new libharbour.so.3.2.0
Please replace it and try it again
many thanks for your feedback
I have just emailed you a new libharbour.so.3.2.0
Please replace it and try it again
many thanks for your feedback
- Antonio Linares
- Site Admin
- Posts: 42259
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Re: mod_harbour + ADS on linux server
As a reminder for the future, here are the instructions to build it:
1. git clone https://github.com/harbour/core harbour
2. Install these packages:
sudo apt install libssl-dev
sudo apt install libcurl4-openssl-dev
3. before building Harbour use this export from the terminal:
export HB_USER_CFLAGS=-fPIC
4. run make in harbour folder and Harbour will get built
5. To build librddads.a we need ace.h that we can get from here (installing the ADS SDK):
https://github.com/FiveTechSoft/harbour ... x86_64.exe
6. copy ace.h from above step into harbour/contrib/rddads
7. Manually compile each C file this way:
gcc -c -fPIC -I../../include ads1.c
gcc -c -fPIC -I../../include adsfunc.c
gcc -c -fPIC -I../../include adsmgmnt.c
gcc -c -fPIC -I../../include adsx.c
8. to build the librddads.a for Linux do this:
ar rc ./librddads.a ads1.o adsx.o adsfunc.o adsmgmnt.o
9. copy librddads.a to harbour/lib/linux/gcc
10. In mod_harbour/linux add this lib name to libs.txt:
-lrddads
11. In mod_harbour apache.prg modify this to force the use of ADS:
#define HB_WITH_ADS // new !!!
#ifdef HB_WITH_ADS
#define __HBEXTERN__RDDADS__REQUEST
#include "../../harbour/contrib/rddads/rddads.hbx"
#endif
12. build mod_harbour running ./go.sh from mod_harbour/linux folder
1. git clone https://github.com/harbour/core harbour
2. Install these packages:
sudo apt install libssl-dev
sudo apt install libcurl4-openssl-dev
3. before building Harbour use this export from the terminal:
export HB_USER_CFLAGS=-fPIC
4. run make in harbour folder and Harbour will get built
5. To build librddads.a we need ace.h that we can get from here (installing the ADS SDK):
https://github.com/FiveTechSoft/harbour ... x86_64.exe
6. copy ace.h from above step into harbour/contrib/rddads
7. Manually compile each C file this way:
gcc -c -fPIC -I../../include ads1.c
gcc -c -fPIC -I../../include adsfunc.c
gcc -c -fPIC -I../../include adsmgmnt.c
gcc -c -fPIC -I../../include adsx.c
8. to build the librddads.a for Linux do this:
ar rc ./librddads.a ads1.o adsx.o adsfunc.o adsmgmnt.o
9. copy librddads.a to harbour/lib/linux/gcc
10. In mod_harbour/linux add this lib name to libs.txt:
-lrddads
11. In mod_harbour apache.prg modify this to force the use of ADS:
#define HB_WITH_ADS // new !!!
#ifdef HB_WITH_ADS
#define __HBEXTERN__RDDADS__REQUEST
#include "../../harbour/contrib/rddads/rddads.hbx"
#endif
12. build mod_harbour running ./go.sh from mod_harbour/linux folder
Re: mod_harbour + ADS on linux server
Thank you for the instruction on how to compile mod_harbour with ADS.
I've tried the file you sent me but I'm sorry to say that it does not work.
The browser receives no response from the server and in apache error.log there is the error:
/usr/sbin/apache2: symbol lookup error: /tmp/libharbour.-318593280.-1236078313: undefined symbol: AdsSetDateFormat
I hope that this could help you.
If you think that is better I will give you my next feedback by email.
I've tried the file you sent me but I'm sorry to say that it does not work.
The browser receives no response from the server and in apache error.log there is the error:
/usr/sbin/apache2: symbol lookup error: /tmp/libharbour.-318593280.-1236078313: undefined symbol: AdsSetDateFormat
I hope that this could help you.
If you think that is better I will give you my next feedback by email.
- Antonio Linares
- Site Admin
- Posts: 42259
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Re: mod_harbour + ADS on linux server
Dear Paolo,
Do you have libace.so and libadsloc.so in the same folder where libharbour.so.3.2.0 is placed ?
Yes, you can write me to alinares@fivetechsoft.com or we continue here, as you prefer
Do you have libace.so and libadsloc.so in the same folder where libharbour.so.3.2.0 is placed ?
Yes, you can write me to alinares@fivetechsoft.com or we continue here, as you prefer