Code compile error

svarun
Posts: 16
Joined: Tue Apr 25, 2017 5:45 pm

Thu Sep 14, 2017 1:26 am

when i try to Run ./build.sh to compile supla-server i end up getting following error..

Building file: ../src/db.cpp
Invoking: Cross G++ Compiler
g++ -D__OPEN_SSL=1 -I/usr/include/mysql -O3 -Wall -c -fmessage-length=0 -fstack-protector-all -MMD -MP -MF"src/db.d" -MT"src/db.d" -o "src/db.o" "../src/db.cpp"
../src/db.cpp:18:23: fatal error: my_global.h: No such file or directory
#include <my_global.h>
^
compilation terminated.
src/subdir.mk:100: recipe for target 'src/db.o' failed
make: *** [src/db.o] Error 1
make: Leaving directory '/usr/lib/supla-core/supla-server/Release'
nexgen@server:/usr/lib/supla-core/supla-server$

can anyone help please

Thanks
pzygmunt
Posts: 2761
Joined: Tue Jan 19, 2016 9:26 am
Location: Paczków
Contact:

Thu Sep 14, 2017 7:47 am

apt-get install libmysqlclient-dev
svarun
Posts: 16
Joined: Tue Apr 25, 2017 5:45 pm

Thu Sep 14, 2017 2:03 pm

Thanks Sir, that problem has resolved but my client are not connecting to server, though my devices are able to connect to server.

i have made the changes in config.cfg not no luck.

Please advice, Thanks.
pzygmunt
Posts: 2761
Joined: Tue Jan 19, 2016 9:26 am
Location: Paczków
Contact:

Thu Sep 14, 2017 4:01 pm

You must use ssl compiled without flag no-ssl2

viewtopic.php?f=4&t=2215&p=10740&hilit= ... ssl#p10740
svarun
Posts: 16
Joined: Tue Apr 25, 2017 5:45 pm

Tue Sep 26, 2017 7:37 am

I had compiled without flag no-ssl2 but still unable to connect clients with server, when i try to run debug mode .../supla-server -D, getting error "can't bind port"... please suggest solution.


Thanks.
pzygmunt
Posts: 2761
Joined: Tue Jan 19, 2016 9:26 am
Location: Paczków
Contact:

Tue Sep 26, 2017 8:04 am

Can't bind port mean that you have already run supla-server daemon.
svarun
Posts: 16
Joined: Tue Apr 25, 2017 5:45 pm

Tue Sep 26, 2017 6:03 pm

Now i m getting error.... Sorry for my silly questions as i am new bee and not well versed with programming.

root@server:/usr/sbin# ./supla-server -D
INFO[1506448442.215110] Server version 1.8 [Protocol v7]
INFO[1506448442.215435] Started at Tue Sep 26 23:24:02 2017
INFO[1506448541.437451] Connection accepted: 192.168.2.102:48602 ClientSD: 10 Secure: 1
ERR[1506448541.483628] error:14076102:SSL routines:SSL23_GET_CLIENT_HELLO:unsupported protocol
DEBUG[1506448541.483919] Connection Finished
INFO[1506448652.310701] Connection accepted: 192.168.2.102:48656 ClientSD: 13 Secure: 1
ERR[1506448652.311598] error:14076102:SSL routines:SSL23_GET_CLIENT_HELLO:unsupported protocol
DEBUG[1506448652.311766] Connection Finished
INFO[1506448654.364645] Connection accepted: 192.168.2.102:48657 ClientSD: 12 Secure: 1
ERR[1506448654.364870] error:14076102:SSL routines:SSL23_GET_CLIENT_HELLO:unsupported protocol
DEBUG[1506448654.364921] Connection Finished
pzygmunt
Posts: 2761
Joined: Tue Jan 19, 2016 9:26 am
Location: Paczków
Contact:

Wed Sep 27, 2017 8:31 am

https://github.com/SUPLA/raspberry/blob ... server#L23

LD_LIBRARY_PATH=/usr/lib/supla-server
export LD_LIBRARY_PATH
svarun
Posts: 16
Joined: Tue Apr 25, 2017 5:45 pm

Wed Sep 27, 2017 11:01 am

Thanks Sir, Now my devices and client both able to login to server without any issue but my devices are not visible on my App.

I tried running in Debug mode and found following error..

INFO[1506507969.311896] Connection accepted: 192.168.2.101:38107 ClientSD: 10 Secure: 1
DEBUG[1506507969.346333] Connection Started -1258255168, secure=1
DEBUG[1506507969.351050] Adjusting protocol version to 5
DEBUG[1506507969.351982] SUPLA_CS_CALL_REGISTER_CLIENT
DEBUG[1506507969.353059] SUPLA_CS_CALL_REGISTER_CLIENT_B
ERR[1506507969.364007] MySQL - stmt prepare error - Table 'supla.supla_v_client_location' doesn't exist
ERR[1506507969.364541] MySQL - stmt prepare error - Table 'supla.supla_v_client_channel' doesn't exist
DEBUG[1506508015.171847] Connection Finished
INFO[1506509068.581228] Connection accepted: 192.168.2.104:35282 ClientSD: 14 Secure: 1
DEBUG[1506509068.615976] Connection Started -1258207176, secure=1
DEBUG[1506509068.625650] Adjusting protocol version to 5
DEBUG[1506509068.626811] SUPLA_CS_CALL_REGISTER_CLIENT
DEBUG[1506509068.626927] SUPLA_CS_CALL_REGISTER_CLIENT_B
DEBUG[1506509070.670631] Connection Finished
pzygmunt
Posts: 2761
Joined: Tue Jan 19, 2016 9:26 am
Location: Paczków
Contact:

Wed Sep 27, 2017 11:09 am

mysql -u user -p dbname < supla_views.sql
Attachments
supla_views.sql.gz
(1.37 KiB) Downloaded 11 times
Post Reply