Giter VIP home page Giter VIP logo

libsml's People

Contributors

dapaulid avatar juriglx avatar stv0g avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

libsml's Issues

Compile error "undefined reference to `test_helper_c2ptoi'"

I tried to compile libsml on a fresh Debian 9 Stretch amd64 box. uuid-dev and uuid-runtime is installed. This happens:

make[1]: Entering directory '/home/roi/src/libsml/sml'
make[1]: Nothing to be done for 'libsml'.
make[1]: Leaving directory '/home/roi/src/libsml/sml'
make[1]: Entering directory '/home/roi/src/libsml/examples'
make[1]: 'sml_server' is up to date.
make[1]: Leaving directory '/home/roi/src/libsml/examples'
make[1]: Entering directory '/home/roi/src/libsml/test'
make[2]: Entering directory '/home/roi/src/libsml/sml'
make[2]: Nothing to be done for 'libsml'.
make[2]: Leaving directory '/home/roi/src/libsml/sml'
cc -I../sml/include/ -Wall -luuid unity/unity.o unity/unity_fixture.o src/test_helper.o src/sml_octet_string_test.o src/sml_buffer_test.o src/sml_number_test.o src/sml_boolean_test.o src/sml_value_test.o src/sml_status_test.o src/sml_list_test.o src/sml_time_test.o src/sml_tree_test.o src/sml_file_test.o src/sml_open_request_test.o src/sml_get_profile_pack_request_test.o src/sml_message_test.o ../sml/lib/libsml.a test_main.c -o test
src/test_helper.o: In function `hex2binary':
test_helper.c:(.text+0xa3): undefined reference to `test_helper_c2ptoi'
collect2: error: ld returned 1 exit status
Makefile:33: recipe for target 'test' failed
make[1]: *** [test] Error 1
make[1]: Leaving directory '/home/roi/src/libsml/test'
Makefile:3: recipe for target 'all' failed
make: *** [all] Error 2

Bug or did I do something wrong?

Compile glibc got error `__stack_chk_fail_local' on Ubuntu

Hi Juri,

I do this:

git clone https://github.com/dailab/libsml.git
cd libsml
make

and I get this:

make
make[1]: Entering directory /opt/libsml/sml' cc -I./include/ -fPIC -g -Wall -c -o src/sml_file.o src/sml_file.c cc -I./include/ -fPIC -g -Wall -c -o src/sml_attention_response.o src/sml_attention_response.c cc -I./include/ -fPIC -g -Wall -c -o src/sml_transport.o src/sml_transport.c cc -I./include/ -fPIC -g -Wall -c -o src/sml_octet_string.o src/sml_octet_string.c cc -I./include/ -fPIC -g -Wall -c -o src/sml_shared.o src/sml_shared.c cc -I./include/ -fPIC -g -Wall -c -o src/sml_number.o src/sml_number.c cc -I./include/ -fPIC -g -Wall -c -o src/sml_message.o src/sml_message.c cc -I./include/ -fPIC -g -Wall -c -o src/sml_time.o src/sml_time.c cc -I./include/ -fPIC -g -Wall -c -o src/sml_list.o src/sml_list.c cc -I./include/ -fPIC -g -Wall -c -o src/sml_status.o src/sml_status.c cc -I./include/ -fPIC -g -Wall -c -o src/sml_value.o src/sml_value.c cc -I./include/ -fPIC -g -Wall -c -o src/sml_tree.o src/sml_tree.c cc -I./include/ -fPIC -g -Wall -c -o src/sml_boolean.o src/sml_boolean.c cc -I./include/ -fPIC -g -Wall -c -o src/sml_crc16.o src/sml_crc16.c cc -I./include/ -fPIC -g -Wall -c -o src/sml_open_request.o src/sml_open_request.c cc -I./include/ -fPIC -g -Wall -c -o src/sml_open_response.o src/sml_open_response.c cc -I./include/ -fPIC -g -Wall -c -o src/sml_get_list_request.o src/sml_get_list_request.c cc -I./include/ -fPIC -g -Wall -c -o src/sml_get_list_response.o src/sml_get_list_response.c cc -I./include/ -fPIC -g -Wall -c -o src/sml_close_request.o src/sml_close_request.c cc -I./include/ -fPIC -g -Wall -c -o src/sml_close_response.o src/sml_close_response.c cc -I./include/ -fPIC -g -Wall -c -o src/sml_set_proc_parameter_request.o src/sml_set_proc_parameter_request.c cc -I./include/ -fPIC -g -Wall -c -o src/sml_get_proc_parameter_request.o src/sml_get_proc_parameter_request.c cc -I./include/ -fPIC -g -Wall -c -o src/sml_get_proc_parameter_response.o src/sml_get_proc_parameter_response.c cc -I./include/ -fPIC -g -Wall -c -o src/sml_get_profile_pack_request.o src/sml_get_profile_pack_request.c cc -I./include/ -fPIC -g -Wall -c -o src/sml_get_profile_pack_response.o src/sml_get_profile_pack_response.c cc -I./include/ -fPIC -g -Wall -c -o src/sml_get_profile_list_request.o src/sml_get_profile_list_request.c cc -I./include/ -fPIC -g -Wall -c -o src/sml_get_profile_list_response.o src/sml_get_profile_list_response.c ld -luuid -shared -soname libsml.so.1 -o lib/libsml.so.1 src/sml_file.o src/sml_attention_response.o src/sml_transport.o src/sml_octet_string.o src/sml_shared.o src/sml_number.o src/sml_message.o src/sml_time.o src/sml_list.o src/sml_status.o src/sml_value.o src/sml_tree.o src/sml_boolean.o src/sml_crc16.o src/sml_open_request.o src/sml_open_response.o src/sml_get_list_request.o src/sml_get_list_response.o src/sml_close_request.o src/sml_close_response.o src/sml_set_proc_parameter_request.o src/sml_get_proc_parameter_request.o src/sml_get_proc_parameter_response.o src/sml_get_profile_pack_request.o src/sml_get_profile_pack_response.o src/sml_get_profile_list_request.o src/sml_get_profile_list_response.o src/sml_transport.o: In functionsml_transport_read':
/opt/libsml/sml/src/sml_transport.c:109: undefined reference to __stack_chk_fail_local' src/sml_transport.o: In functionsml_transport_write':
/opt/libsml/sml/src/sml_transport.c:163: undefined reference to __stack_chk_fail_local' src/sml_octet_string.o: In functionsml_octet_string_init_from_hex':
/opt/libsml/sml/src/sml_octet_string.c:55: undefined reference to __stack_chk_fail_local' src/sml_octet_string.o: In functionsml_octet_string_generate_uuid':
/opt/libsml/sml/src/sml_octet_string.c:122: undefined reference to __stack_chk_fail_local' src/sml_number.o: In functionsml_number_byte_swap':
/opt/libsml/sml/src/sml_number.c:106: undefined reference to __stack_chk_fail_local' ld: lib/libsml.so.1: hidden symbol__stack_chk_fail_local' isn't defined
ld: final link failed: Nonrepresentable section on output
make[1]: *** [lib/libsml.so.1] Error 1
make[1]: Leaving directory `/opt/libsml/sml'
make: *** [all] Error 2

I'm running Ubuntu 10.04.3 LTS using commit dd813cd.

Following http://ubuntuforums.org/showthread.php?t=352642 (thx to stv0g!) I found out that adding "-fno-stack-protector" to the CFLAGS helps - make runs fine, then.

Please let me know, if you need more details.

Regards, J.

do not printf errors on stdout, please use fprintf(stderr,...) instead

libsml prints errors on stdout and not on stderr.

please consider using fprintf(stderr,"error.....\n",value); instead

2 reasons for that:

1st:
root@wheezy:~/libsml# while true;do cat /dev/ttyUSB0 |./sml_server_stdio ;done
error: unknown type in sml_value_to_double
error: unknown type in sml_value_to_double
14797050.70 Wh
2012.40 Wh
error: unknown type in sml_value_to_double
20.70 W
^C

root@wheezy:~/libsml# while true;do cat /dev/ttyUSB0 |./sml_server_stdio ;done 2>/dev/null
14797050.80 Wh
2012.40 Wh
21.10 W
^C

2nd:
People re-implement sml_value_to_double() within their code - see: http://knx-user-forum.de/201949-post60.html

regards
roland

root@wheezy:~/libsml/libsml/sml/src# grep print * |egrep "warning|error"
sml_file.c: printf("warning: could not read the whole file\n");
sml_message.c: printf("error: message type %04X not yet implemented\n", *(msg_body->tag));
sml_message.c: printf("error: message type %04X not yet implemented\n", *(message_body->tag));
sml_transport.c: printf("error: unrecognized sequence\n");
sml_tree.c: printf("error: unknown tag in %s\n", FUNCTION);
sml_value.c: printf("error: unknown type in %s\n", FUNCTION);

NOTE: THIS REPO IS OFICIALLY DEAD & ORPHANED !

Please go to: https://github.com/volkszaehler/libsml

For reason, have a look at https://demo.volkszaehler.org/pipermail/volkszaehler-dev/2015-January/004064.html (german text)

Translated with www.DeepL.com/Translator

Servus,

after a bit of initiative and mail requests from Roland to Juri and the Dai-Lab it turned out that libsml (an important base component for the census project) is currently "unmaintained", i. e. nobody cares about the further development of libsml (as it has been in the last 2 years).

Adding even small but helpful changes like "make install"support (PR by Peter Evertz, also here on the list: peterevertz@d7ab04a) has been pending for almost two years now, but this has failed due to the fact that Juri is no longer working in the Dai-Lab and has no more commit privileges on the repository, and that the priorities are elsewhere in the Dai-Lab and the actual successor of Juri does not take on the role of maintainer.

We, i. e. Juri, Roland and I have come to the conclusion that it makes sense to fork libsml and hang it within the census project. As a prerequisite for this, however, I see that there are also people here who are involved - otherwise we will only be able to create the next siding here.

Roland himself would in principle be willing to take over the position as libsml-maintainer, but says that he does not have enough experience with SML, C and Git for maintaining a not uncomplicated C-software. In short, he would feel a little overwhelmed on his own.

Would people on this list be willing to take over or at least carry the libsml care?

This means that we are looking for people who would either take over the maintenance of the library completely or who could at least provide technical advisory board and support to help Roland to bring libsml "forward".

In short: now is the time to implement the New Year's resolutions; -)

Thanks again to Roland for his commitment!

Greetings, J.

argument to ‘sizeof’ in ‘memset’ call is the same expression as the destination

src/sml_value.c: In function ‘sml_value_init’

sml_value *sml_value_init() {
sml_value *value = (sml_value *) malloc(sizeof(sml_value));
memset(value, 0, sizeof(value));
return value;
}

the memset size argument should be either sizeof(*value) or sizeof(sml_value). sizeof(value) is the size of the pointer itself. Can work, but I guess thats wrong... ;-)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.