The error reported occurs in the launch time: the daemon doesn't starts and report (in terminal) a GLIBC version error. I mean, the daemon was compiled in a old CentOS (4.8) and i'm trying to run in the latest Ubuntu.<div>
<br></div><div>But anyway, i will make more tests as you sugested and try to discovery what exactly is happening.</div><div><br></div><div>Once again, thank you so much for your help!<br><br><div class="gmail_quote">On Thu, Nov 3, 2011 at 3:09 PM, Michael Hertling <span dir="ltr"><<a href="mailto:mhertling@online.de">mhertling@online.de</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="im">On 11/03/2011 03:51 PM, Mauricio Klein wrote:<br>
> Thank you Raphael, it worked!<br>
><br>
> One last question: i've tried to compile my code using static linkage, once<br>
> i need my daemon runs in many Linux releases. But, even static, in many<br>
> systems my code crashes because the GLIBC version.<br>
<br>
</div>How do these crashes manifest themselves, e.g. shell/syslog messages,<br>
return values, core dumps etc.? Are you sure they are related to the<br>
GLIBC version? Does the executable actually have no single dependency<br>
on any shared library, i.e. is it linked statically in its entirety?<br>
What does ldd or readelf report?<br>
<div class="im"><br>
> My question is: asking for static linkage in CMake can solve this problem?<br>
<br>
</div>If even a statically linked executable crashes on the target system,<br>
telling CMake to link statically will hardly solve this problem. ;)<br>
<div class="im"><br>
> Or maybe another approach in CMake, where i embed all the needed<br>
> libraries...<br>
<br>
</div>You might take a look the the BundleUtilities Module, but at first,<br>
I'd recommend to investigate what exactly causes the crashes. Your<br>
best bet is probably to provide a tiny but self-contained example<br>
that works on your development platform and crashes on a target<br>
system, along with some information about the latter's setup.<br>
<br>
Regards,<br>
<font color="#888888"><br>
Michael<br>
</font><div><div></div><div class="h5"><br>
> On Thu, Nov 3, 2011 at 12:19 PM, Raphael Kubo da Costa<br>
> <<a href="mailto:rakuco@freebsd.org">rakuco@freebsd.org</a>>wrote:<br>
><br>
>> Mauricio Klein<br>
>> <<a href="mailto:mauricio.klein.msk@gmail.com">mauricio.klein.msk@gmail.com</a>> writes:<br>
>><br>
>>> I can compile all my codes without problems, but in the linkage step, i<br>
>>> receive a lot of errors about undefined reference to OpenSSL functions<br>
>>> (yes, my code uses OpenSSL).<br>
>>><br>
>>> In my own (and ugly :P) Makefile, i use "-lssl" flag in g++ compile line.<br>
>>><br>
>>> My question is: how can i pass this flag in CMake.<br>
>>> Also, i'm not sure if i'm using CMake correctly. Is correctly use "-lssl"<br>
>>> flag in CMake or i need to copy the library to a folder inside my project<br>
>>> and link to this copy?<br>
>><br>
>> You need to find OpenSSL with `find_package(OpenSSL)' and then, assuming<br>
>> it is found (ie. OPENSSL_FOUND is true), link to its libraries with<br>
>> `target_link_libraries(YOUR_APP ${OPENSSL_LIBRARIES})'.<br>
--<br>
<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the CMake FAQ at: <a href="http://www.cmake.org/Wiki/CMake_FAQ" target="_blank">http://www.cmake.org/Wiki/CMake_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.cmake.org/mailman/listinfo/cmake" target="_blank">http://www.cmake.org/mailman/listinfo/cmake</a><br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br>Best regards,<br><br>Maurício Souza Klein.<br>
</div>