Message boards : API : Cannot compile a simple work_generator
Message board moderation
Author | Message |
---|---|
Send message Joined: 26 Aug 10 Posts: 6 ![]() |
I've been struggling while trying to compile a simple application that uses the libraries of BOINC. The application can be found on the following website: http://blog.os-tools.net/en/how-to-create-your-own-work-generator-script-part-1/ My Makefile looks like the following: INCLUDES= -I. -I$(BOINC_BUILD) \ -I$(BOINC_BUILD)/api \ -I$(BOINC_BUILD)/lib \ -I$(BOINC_BUILD)/db \ -I$(BOINC_BUILD)/sched \ -I$(BOINC_BUILD)/tools \ -I$(BOINC_BUILD)/include/boinc \ -I/usr/include/mysql ##- Libraries: LIBDIRS= -L. -L$(BOINC_BUILD)/lib \ -L$(BOINC_BUILD)/api \ -L$(BOINC_BUILD)/sched \ -L/usr/lib LIBS= -lm $(LIBDIRS) -lsched -lmysqlclient -lboinc_api -lboinc -lz ----------------------------------------------- The error message I am getting is the following: /usr/lib/libmysqlclient.a(mf_pack.o): In function `unpack_dirname': (.text+0xac9): warning: Using 'getpwnam' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking /usr/lib/libmysqlclient.a(libmysql.o): In function `read_user_name': (.text+0x4271): warning: Using 'getpwuid' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking /usr/lib/libmysqlclient.a(mf_pack.o): In function `unpack_dirname': (.text+0xae9): warning: Using 'endpwent' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking /usr/lib/libmysqlclient.a(my_gethostbyname.o): In function `my_gethostbyname_r': (.text+0x3c): warning: Using 'gethostbyname_r' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking /usr/lib/libmysqlclient.a(libmysql.o): In function `mysql_server_init': (.text+0x49c2): warning: Using 'getservbyname' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking /home/francis/boinc/sched/libsched.a(libsched_la-process_result_template.o): In function `add_signatures(char*, R_RSA_PRIVATE_KEY&)': /home/francis/boinc/sched/../tools/process_result_template.cpp:63: undefined reference to `generate_signature(char*, char*, R_RSA_PRIVATE_KEY&)' collect2: ld returned 1 exit status make: *** [workgen] Error 1 -------------------------------------------- When I'm compiling not using -static, I only get the libsched.a error. (saying the function generate_signatures is undefined) But when I execute the following command: nm -s libsched.a I can clearly see that this function (defined in crypt) is 'U'ndefined in that library... ====Library libsched.a==== libsched_la-process_result_template.o: 00000000 D BOINC_RCSID_e5e1e879f3 00000000 T _Z14add_signaturesPcR17R_RSA_PRIVATE_KEY U _Z18generate_signaturePcS_R17R_RSA_PRIVATE_KEY Although when crypt is compiled into a library, the symbol is present ====Library libboinc_crypt.a==== 000017e0 T _Z18generate_signaturePcS_R17R_RSA_PRIVATE_KEY ----------------------------------------- I tried under different platforms (Kubuntu-32bit/64bit) The version of BOINC is 6.11.1 The version of MySQL is mysql Ver 14.14 Distrib 5.1.41, for debian-linux-gnu (i486) using readline 6.1 ------------------------------------------ I have put some C++ source code at the following address for extra information: http://ec.codepad.org/qCMZMmz5#output Thank you. Francis |
Send message Joined: 2 Jun 11 Posts: 4 ![]() |
I got the same error as you. Did anyone know a solution to this problem. Thank you, Loonis |
Copyright © 2025 University of California.
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License,
Version 1.2 or any later version published by the Free Software Foundation.