[rabbitmq-discuss] [rabbitmq-c] linking libraries for cross compiling
Roberto Pagliari
roberto at canary.is
Tue Jan 14 21:17:06 GMT 2014
I tried to modify like this
cmake_push_check_state()
set(CMAKE_REQUIRED_LIBRARIES ${SOCKET_LIBRARIES})
if (WIN32)
check_symbol_exists(htonll Winsock2.h HAVE_HTONLL)
else (WIN32)
check_function_exists(htonll HAVE_HTONLL)
endif (WIN32)
cmake_pop_check_state()
check_library_exists(rt clock_gettime "time.h" CLOCK_GETTIME_NEEDS_LIBRT)
if (CLOCK_GETTIME_NEEDS_LIBRT)
set(LIBRT rt)
endif()
SET(LINK_LIBRARIES path_to_ssl_folder/)
but it is still pointing to x86 ssl lib...
On Tue, Jan 14, 2014 at 3:59 PM, Alan Antonuk <alan.antonuk at gmail.com>wrote:
> Make sure you're trying to link against the ARM version of libssl. You
> might need to look at the OPENSSL_LIBRARIES (or something like that) CMake
> variable and adjust it to point at the correct libssl.
>
> -Alan
>
>
> On Tue, Jan 14, 2014 at 12:07 PM, Roberto Pagliari <roberto at canary.is>wrote:
>
>> I'm building rabbitmq-c for ARM. I exported the library by running :
>>
>> export LD_LIBRARY_PATH=path_to_library_folder
>>
>> but I'm still getting this error. Somehow, cmake does not find it.
>>
>> $ cmake --build . --target install
>> Linking C shared library librabbitmq.so
>> /usr/lib/x86_64-linux-gnu/libssl.so: file not recognized: File format
>> not recognized
>> collect2: ld returned 1 exit status
>> make[2]: *** [librabbitmq/librabbitmq.so.1.1.1] Error 1
>> make[1]: *** [librabbitmq/CMakeFiles/rabbitmq.dir/all] Error 2
>> make: *** [all] Error 2
>>
>> I tried to use LINK_LIBRARIES in the CMakeLists but didn't work...
>>
>> _______________________________________________
>> rabbitmq-discuss mailing list
>> rabbitmq-discuss at lists.rabbitmq.com
>> https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
>>
>>
>
> _______________________________________________
> rabbitmq-discuss mailing list
> rabbitmq-discuss at lists.rabbitmq.com
> https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20140114/09bace0f/attachment.html>
More information about the rabbitmq-discuss
mailing list