[Libwebsockets] cmake .. - error --- linux system

Dinesh Guleria din.gulu.er at gmail.com
Sat Apr 27 18:16:12 CEST 2013


This is the file causing the error :----

*[ 44%] Building C object
CMakeFiles/test-client.dir/test-server/test-client.c.o*
Linking C executable bin/libwebsockets-test-client
Linking C executable bin/libwebsockets-test-client
/usr/local/lib/libcrypto.a(dso_dlfcn.o): In function `dlfcn_globallookup':
dso_dlfcn.c:(.text+0x10): undefined reference to `dlopen'
dso_dlfcn.c:(.text+0x24): undefined reference to `dlsym'
dso_dlfcn.c:(.text+0x30): undefined reference to `dlclose'
/usr/local/lib/libcrypto.a(dso_dlfcn.o): In function `dlfcn_bind_func':
dso_dlfcn.c:(.text+0x2f4): undefined reference to `dlsym'
dso_dlfcn.c:(.text+0x394): undefined reference to `dlerror'
/usr/local/lib/libcrypto.a(dso_dlfcn.o): In function `dlfcn_bind_var':
dso_dlfcn.c:(.text+0x41c): undefined reference to `dlsym'
dso_dlfcn.c:(.text+0x4b4): undefined reference to `dlerror'
/usr/local/lib/libcrypto.a(dso_dlfcn.o): In function `dlfcn_load':
dso_dlfcn.c:(.text+0x50c): undefined reference to `dlopen'
dso_dlfcn.c:(.text+0x56c): undefined reference to `dlclose'
dso_dlfcn.c:(.text+0x594): undefined reference to `dlerror'
/usr/local/lib/libcrypto.a(dso_dlfcn.o): In function `dlfcn_pathbyaddr':
dso_dlfcn.c:(.text+0x60c): undefined reference to `dladdr'
dso_dlfcn.c:(.text+0x660): undefined reference to `dlerror'
/usr/local/lib/libcrypto.a(dso_dlfcn.o): In function `dlfcn_unload':
dso_dlfcn.c:(.text+0x6b8): undefined reference to `dlclose'
collect2: ld returned 1 exit status
make[2]: *** [bin/libwebsockets-test-client] Error 1
make[1]: *** [CMakeFiles/test-client.dir/all] Error 2
make: *** [all] Error 2

On Sat, Apr 27, 2013 at 8:56 PM, Dinesh Guleria <din.gulu.er at gmail.com>wrote:

> one more problem .. how to set -ldl before linking -- openssl library
> ----- i have edited the error which i am getting ? -- libcrypto need ldl
>
> I am able to install openssl & cmake can find it but now error comes at
> time of make :-----
> Please suggest how to resolve it ?
>
> -------------------------------------------------- error
> -----------------------------
>  make
> [ 41%] Built target websockets
> Linking C executable bin/libwebsockets-test-client
> /usr/local/lib/libcrypto.a(dso_dlfcn.o): In function `dlfcn_globallookup':
> dso_dlfcn.c:(.text+0x10): undefined reference to `dlopen'
> dso_dlfcn.c:(.text+0x24): undefined reference to `dlsym'
> dso_dlfcn.c:(.text+0x30): undefined reference to `dlclose'
> /usr/local/lib/libcrypto.a(dso_dlfcn.o): In function `dlfcn_bind_func':
> dso_dlfcn.c:(.text+0x2f4): undefined reference to `dlsym'
> dso_dlfcn.c:(.text+0x394): undefined reference to `dlerror'
> /usr/local/lib/libcrypto.a(dso_dlfcn.o): In function `dlfcn_bind_var':
> dso_dlfcn.c:(.text+0x41c): undefined reference to `dlsym'
> dso_dlfcn.c:(.text+0x4b4): undefined reference to `dlerror'
> /usr/local/lib/libcrypto.a(dso_dlfcn.o): In function `dlfcn_load':
> dso_dlfcn.c:(.text+0x50c): undefined reference to `dlopen'
> dso_dlfcn.c:(.text+0x56c): undefined reference to `dlclose'
> dso_dlfcn.c:(.text+0x594): undefined reference to `dlerror'
> /usr/local/lib/libcrypto.a(dso_dlfcn.o): In function `dlfcn_pathbyaddr':
> dso_dlfcn.c:(.text+0x60c): undefined reference to `dladdr'
> dso_dlfcn.c:(.text+0x660): undefined reference to `dlerror'
> /usr/local/lib/libcrypto.a(dso_dlfcn.o): In function `dlfcn_unload':
> dso_dlfcn.c:(.text+0x6b8): undefined reference to `dlclose'
> collect2: ld returned 1 exit status
> make[2]: *** [bin/libwebsockets-test-client] Error 1
> make[1]: *** [CMakeFiles/test-client.dir/all] Error 2
> make: *** [all] Error 2
>
> ----------------------------------------------------------------
>
>
> On Sat, Apr 27, 2013 at 8:20 AM, Dinesh Guleria <din.gulu.er at gmail.com>wrote:
>
>> Does i need :----
>>
>> http://www.freedesktop.org/wiki/Software/pkg-config
>>
>> At present it is not installed ?
>>
>>
>> On Sat, Apr 27, 2013 at 8:14 AM, "Andy Green (林安廸)" <andy at warmcat.com>wrote:
>>
>>> On 27/04/13 10:43, the mail apparently from Dinesh Guleria included:
>>>
>>>> ok..
>>>>
>>>> but getting same error even if i set my .profile :--
>>>>
>>>> export
>>>> LD_LIBRARY_PATH=*/usr/local/**ssl/include/openssl:*/usr/lib:**
>>>> /usr/local/lib:/usr/local/**include/wx-2.8/wx:$LD_LIBRARY_**PATH
>>>> export OPENSSL_ROOT_DIR=*/usr/local/**ssl*
>>>>
>>>> PATH = $PATH:*/usr/local/ssl/bin*
>>>>
>>>
>>> Is there some reason you don't use your distro package and avoid all
>>> this?
>>>
>>> -Andy
>>>
>>>
>>>
>>>> On Sat, Apr 27, 2013 at 7:58 AM, "Andy Green (林安廸)" <andy at warmcat.com
>>>> <mailto:andy at warmcat.com>> wrote:
>>>>
>>>>     On 27/04/13 10:23, the mail apparently from Dinesh Guleria included:
>>>>
>>>>           >> export OPENSSL_ROOT_DIR=/usr/local/__**ssl
>>>>
>>>>         thanks, i will try this
>>>>
>>>>         Can i set this variable permanent in my  --------- > .profile
>>>>           ----- ?
>>>>
>>>>
>>>>     If it helps, you might make a bash script that sets the variable and
>>>>     then runs cmake / make
>>>>
>>>>     -Andy
>>>>
>>>>         //Regards,
>>>>         Din
>>>>         On Sat, Apr 27, 2013 at 7:20 AM, "Andy Green (林安廸)"
>>>>         <andy at warmcat.com <mailto:andy at warmcat.com>
>>>>         <mailto:andy at warmcat.com <mailto:andy at warmcat.com>>> wrote:
>>>>
>>>>              On 27/04/13 09:45, the mail apparently from Dinesh Guleria
>>>>         included:
>>>>
>>>>              I'm on the list, there is no need to mail me separately.
>>>>
>>>>                  I installed open ssl, still getting error at .. cmake
>>>>         time :---
>>>>
>>>>                  where to set this -- > *OPENSSL_ROOT_DIR*
>>>>  ................
>>>>                    ???????
>>>>
>>>>
>>>>                  Also openssl is installed here :---
>>>>                  ssl header   -- > /usr/local/ssl/include/____**
>>>> openssl/
>>>>
>>>>
>>>>                  ssl library is here  -- > /usr/local/ssl/lib/libssl.a
>>>>
>>>> /usr/local/ssl/lib/libcrypto.a
>>>>                  openssl is here  -- > /usr/local/ssl/bin
>>>>
>>>>                  ===================== Error ======================
>>>>
>>>>                  -- Found ZLIB: /usr/lib/arm-linux-gnueabihf/_**
>>>> ___libz.so
>>>>
>>>>         (found
>>>>
>>>>                  version "1.2.7")
>>>>                  ZLib include dirs: /usr/include
>>>>                  ZLib libraries: /usr/lib/arm-linux-gnueabihf/_**
>>>> ___libz.so
>>>>
>>>>
>>>>                  Compiling with SSL support
>>>>                  CMake Error at
>>>>
>>>>         /usr/local/share/cmake-2.8/___**_Modules/____**
>>>> FindPackageHandleStandardArgs.**____cmake:97
>>>>
>>>>
>>>>                  (message):
>>>>                  *Could NOT find OpenSSL, try to set the path to OpenSSL
>>>>         root
>>>>                  folder in the
>>>>
>>>>                      system variable OPENSSL_ROOT_DIR (missing:
>>>>         OPENSSL_LIBRARIES
>>>>
>>>>
>>>>              I don't know, since everyone uses their distro package and
>>>>         CMake
>>>>              finds them.
>>>>
>>>>              However looking at the error, did you try the advice it
>>>>         gave to set
>>>>              the environment var OPENSSL_ROOT_DIR?  eg
>>>>
>>>>              export OPENSSL_ROOT_DIR=/usr/local/__**__ssl
>>>>
>>>>
>>>>
>>>>              and then try cmake?
>>>>
>>>>              -Andy
>>>>
>>>>                      OPENSSL_INCLUDE_DIR)*
>>>>
>>>>                  Call Stack (most recent call first):
>>>>
>>>>
>>>>         /usr/local/share/cmake-2.8/___**_Modules/____**
>>>> FindPackageHandleStandardArgs.**____cmake:291
>>>>                  (_FPHSA_FAILURE_MESSAGE)
>>>>
>>>>         /usr/local/share/cmake-2.8/___**_Modules/FindOpenSSL.cmake:313
>>>>                  (find_package_handle_standard_**____args)
>>>>                      CMakeLists.txt:436 (find_package)
>>>>
>>>>
>>>>                  ==============================**____=
>>>>
>>>>
>>>>
>>>>
>>>>                  On Fri, Apr 26, 2013 at 9:14 AM, Dinesh Guleria
>>>>                  <din.gulu.er at gmail.com <mailto:din.gulu.er at gmail.com>
>>>>         <mailto:din.gulu.er at gmail.com <mailto:din.gulu.er at gmail.com>**>
>>>>                  <mailto:din.gulu.er at gmail.com
>>>>         <mailto:din.gulu.er at gmail.com> <mailto:din.gulu.er at gmail.com
>>>>         <mailto:din.gulu.er at gmail.com>**>__>__>
>>>>
>>>>
>>>>                  wrote:
>>>>
>>>>                       Thanks, then i will install this
>>>>         openssl-1.0.1e.tar.gz.
>>>>
>>>>                       //Regards,
>>>>                       Din
>>>>
>>>>                       On Fri, Apr 26, 2013 at 3:22 AM, Andy Green
>>>>                  <andy at warmcat.com <mailto:andy at warmcat.com>
>>>>         <mailto:andy at warmcat.com <mailto:andy at warmcat.com>>
>>>>                       <mailto:andy at warmcat.com <mailto:andy at warmcat.com
>>>> >
>>>>         <mailto:andy at warmcat.com <mailto:andy at warmcat.com>>>> wrote:
>>>>
>>>>                           If you're asking a question, stick "?"
>>>>         somewhere in
>>>>                  your mail.
>>>>
>>>>                           Make install will probably put the headers in
>>>>                           /usr/local/include/ssl/ or simila.
>>>>
>>>>
>>>>                           -Andy
>>>>
>>>>                           Dinesh Guleria <din.gulu.er
>>>>         <http://din.gulu.er> <http://din.gulu.er>
>>>>                  <http://din.gulu.er>@gmail.com <http://gmail.com>
>>>>         <http://gmail.com>
>>>>
>>>>                           <http://gmail.com>> wrote:
>>>>
>>>>                               Please anyone can confirm on it ?
>>>>
>>>>                               Regards,
>>>>                               Din
>>>>
>>>>                               On Wed, Apr 24, 2013 at 6:10 PM, Dinesh
>>>>         Guleria
>>>>                               <din.gulu.er at gmail.com
>>>>         <mailto:din.gulu.er at gmail.com>
>>>>                  <mailto:din.gulu.er at gmail.com
>>>>         <mailto:din.gulu.er at gmail.com>**> <mailto:din.gulu.er at gmail.com
>>>>         <mailto:din.gulu.er at gmail.com>
>>>>
>>>>                  <mailto:din.gulu.er at gmail.com
>>>>
>>>>         <mailto:din.gulu.er at gmail.com>**>__>__> wrote:
>>>>
>>>>                                   Thanks Andy.. actually i have, source
>>>>         tarball
>>>>                  from here.
>>>>                                   it have configure script to make &
>>>>         make install
>>>>         http://www.openssl.org/source/
>>>>                                   openssl-1.0.1e.tar.gz
>>>>
>>>>                                    >> You probably need to instal
>>>>         openssl-dev or
>>>>                                   openssl-devel package to get the
>>>> headers.
>>>>                                   So with this (openssl-1.0.1e.tar.gz) i
>>>>         be able
>>>>                  to achive
>>>>                                   same what you suggested above.
>>>>
>>>>                                   Regards,
>>>>                                   //Din
>>>>
>>>>                                   On Wed, Apr 24, 2013 at 3:58 PM, Andy
>>>>         Green
>>>>                                   <andy at warmcat.com
>>>>         <mailto:andy at warmcat.com> <mailto:andy at warmcat.com
>>>>         <mailto:andy at warmcat.com>>
>>>>                  <mailto:andy at warmcat.com <mailto:andy at warmcat.com>
>>>>
>>>>         <mailto:andy at warmcat.com <mailto:andy at warmcat.com>>>> wrote:
>>>>
>>>>                                       You probably need to instal
>>>>         openssl-dev or
>>>>                                       openssl-devel package to get the
>>>>         headers.
>>>>
>>>>                                       -Andy
>>>>
>>>>                                       Dinesh Guleria <din.gulu.er
>>>>         <http://din.gulu.er>
>>>>                  <http://din.gulu.er>
>>>>                                       <http://din.gulu.er>@gmail.com
>>>>         <http://gmail.com>
>>>>                  <http://gmail.com> <http://gmail.com>>
>>>>
>>>>
>>>>                                       wrote:
>>>>
>>>>                                           Hi,
>>>>
>>>>                                           As per Readme file
>>>> libwebsocket
>>>>                  requires openssl
>>>>                                           installes.
>>>>
>>>>                                           openssl is here :---
>>>>                                           *openssl: /usr/bin/openssl
>>>>                  /usr/bin/X11/openssl
>>>>
>>>>           /usr/share/man/man1/openssl.__**__1ssl.gz*
>>>>
>>>>
>>>>
>>>>
>>>>                                           But i am not able to find the
>>>>         -- open
>>>>                  ssl header
>>>>                                           folder in ---
>>>>                                           /usr/lib
>>>>                                           /usr/local/lib
>>>>
>>>>                                           This means that openssl is not
>>>>                  installed ? Then
>>>>                                           how come openssl executable is
>>>>         there in --
>>>>                                           /usr/bin ?
>>>>
>>>>                                           Please suggest what shall i
>>>>         do. Install
>>>>                  openssh
>>>>                                           again
>>>>
>>>>                                           //Din
>>>>
>>>>                                           On Wed, Apr 24, 2013 at 12:14
>>>> PM,
>>>>                  Dinesh Guleria
>>>>                                           <din.gulu.er at gmail.com
>>>>         <mailto:din.gulu.er at gmail.com>
>>>>                  <mailto:din.gulu.er at gmail.com
>>>>         <mailto:din.gulu.er at gmail.com>**>
>>>>                                           <mailto:din.gulu.er at gmail.com
>>>>         <mailto:din.gulu.er at gmail.com>
>>>>
>>>>                  <mailto:din.gulu.er at gmail.com
>>>>         <mailto:din.gulu.er at gmail.com>**>__>__> wrote:
>>>>
>>>>                                               Hi,
>>>>
>>>>                                               I am getting following
>>>>         error when i
>>>>                  build
>>>>                                               latest libwebsocket at the
>>>>         time of,
>>>>                  cmake ...
>>>>
>>>>                                               But openssl is installed
>>>> here
>>>>                                               *whereis openssl*
>>>>
>>>>                                               openssl: /usr/bin/openssl
>>>>                                               /usr/bin/X11/openssl
>>>>
>>>>           /usr/share/man/man1/openssl.__**__1ssl.gz
>>>>
>>>>
>>>>
>>>>                                               What is openssl root
>>>> folder ?
>>>>
>>>>                  ==============================**____===== Error
>>>>
>>>>
>>>>                                               ================
>>>>
>>>>
>>>>                                               -- Looking for 4 include
>>>> files
>>>>                  stdlib.h,
>>>>                                               ..., float.h - found
>>>>                                               -- Found ZLIB:
>>>>
>>>>                  /usr/lib/arm-linux-gnueabihf/_**___libz.so (found
>>>>
>>>>
>>>>                                               version "1.2.7")
>>>>                                               ZLib include dirs:
>>>>         /usr/include
>>>>                                               ZLib libraries:
>>>>
>>>>           /usr/lib/arm-linux-gnueabihf/_**___libz.so
>>>>
>>>>
>>>>                                               Compiling with SSL support
>>>>                                               CMake Error at
>>>>
>>>>
>>>>         /usr/local/share/cmake-2.8/___**_Modules/____**
>>>> FindPackageHandleStandardArgs.**____cmake:97
>>>>
>>>>
>>>>                                               (message):
>>>>                                                  Could NOT find OpenSSL,
>>>>         try to
>>>>                  set the
>>>>                                               path to OpenSSL root
>>>>         folder in the
>>>>                                                  system variable
>>>>         OPENSSL_ROOT_DIR
>>>>                                               (missing:
>>>> OPENSSL_LIBRARIES
>>>>                                                  OPENSSL_INCLUDE_DIR)
>>>>                                               Call Stack (most recent
>>>>         call first):
>>>>
>>>>
>>>>
>>>>         /usr/local/share/cmake-2.8/___**_Modules/____**
>>>> FindPackageHandleStandardArgs.**____cmake:291
>>>>                                               (_FPHSA_FAILURE_MESSAGE)
>>>>
>>>>
>>>>
>>>>         /usr/local/share/cmake-2.8/___**_Modules/FindOpenSSL.cmake:313
>>>>
>>>>           (find_package_handle_standard_**____args)
>>>>
>>>>
>>>>                                                  CMakeLists.txt:436
>>>>         (find_package)
>>>>
>>>>
>>>>                                               -- Configuring incomplete,
>>>>         errors
>>>>                  occurred!
>>>>
>>>>
>>>>                  ==============================**____=========
>>>>                                               openssl
>>>>         ========================
>>>>
>>>>
>>>>
>>>>         ignite at ignite:~/sbox2/rootfs/_**___rfs-raspbian_2/home/pi/____*
>>>> *libwebsockets/build$
>>>>
>>>>
>>>>                                               *whereis openssl*
>>>>
>>>>                                               openssl: /usr/bin/openssl
>>>>                                               /usr/bin/X11/openssl
>>>>
>>>>           /usr/share/man/man1/openssl.__**__1ssl.gz
>>>>
>>>>
>>>>                                               Please suggest.
>>>>
>>>>                                               //Regards,
>>>>                                               Din
>>>>
>>>>
>>>>
>>>>
>>>>         ------------------------------**____--------------------------*
>>>> *--__--__------------
>>>>
>>>>                                           Libwebsockets mailing list
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>                  Libwebsockets at ml.__libwebsocke**__ts.org<http://libwebsocke__ts.org>
>>>>         <http://libwebsockets.org>
>>>>                  <mailto:Libwebsockets at ml.__lib**websockets.org<http://libwebsockets.org>
>>>>         <mailto:Libwebsockets at ml.**libwebsockets.org<Libwebsockets at ml.libwebsockets.org>
>>>> >>
>>>>                    <mailto:Libwebsockets at ml.
>>>>         <mailto:Libwebsockets at ml.>__li**b__websockets.org<http://lib__websockets.org>
>>>>         <http://libwebsockets.org>
>>>>                  <mailto:Libwebsockets at ml.__lib**websockets.org<http://libwebsockets.org>
>>>>         <mailto:Libwebsockets at ml.**libwebsockets.org<Libwebsockets at ml.libwebsockets.org>
>>>> >>>
>>>>         http://ml.libwebsockets.org/__**__mailman/listinfo/**
>>>> libwebsockets<http://ml.libwebsockets.org/____mailman/listinfo/libwebsockets>
>>>>         <http://ml.libwebsockets.org/_**_mailman/listinfo/**
>>>> libwebsockets<http://ml.libwebsockets.org/__mailman/listinfo/libwebsockets>
>>>> >
>>>>
>>>>         <http://ml.libwebsockets.org/_**_mailman/listinfo/**
>>>> libwebsockets<http://ml.libwebsockets.org/__mailman/listinfo/libwebsockets>
>>>>         <http://ml.libwebsockets.org/**mailman/listinfo/libwebsockets<http://ml.libwebsockets.org/mailman/listinfo/libwebsockets>
>>>> **>__>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>                  ______________________________**_____________________
>>>>
>>>>                  Libwebsockets mailing list
>>>>                  Libwebsockets at ml.__libwebsocke**__ts.org<http://libwebsocke__ts.org>
>>>>         <http://libwebsockets.org>
>>>>                  <mailto:Libwebsockets at ml.__lib**websockets.org<http://libwebsockets.org>
>>>>         <mailto:Libwebsockets at ml.**libwebsockets.org<Libwebsockets at ml.libwebsockets.org>
>>>> >>
>>>>         http://ml.libwebsockets.org/__**__mailman/listinfo/**
>>>> libwebsockets<http://ml.libwebsockets.org/____mailman/listinfo/libwebsockets>
>>>>         <http://ml.libwebsockets.org/_**_mailman/listinfo/**
>>>> libwebsockets<http://ml.libwebsockets.org/__mailman/listinfo/libwebsockets>
>>>> >
>>>>
>>>>         <http://ml.libwebsockets.org/_**_mailman/listinfo/**
>>>> libwebsockets<http://ml.libwebsockets.org/__mailman/listinfo/libwebsockets>
>>>>         <http://ml.libwebsockets.org/**mailman/listinfo/libwebsockets<http://ml.libwebsockets.org/mailman/listinfo/libwebsockets>
>>>> **>__>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://libwebsockets.org/pipermail/libwebsockets/attachments/20130427/a6f23995/attachment-0001.html>


More information about the Libwebsockets mailing list