1)
cd /opt/deviceatlas-enterprise-c-3.2
cmake . -DCMAKE_INSTALL_PREFIX=/opt/deviceatlas-enterprise-c-3.2
-DCMAKE_C_FLAGS="-std=gnu99"
make
make install

2)
cd haproxy-2.8.3
make TARGET=linux-glibc USE_PCRE=1 USE_OPENSSL=1 USE_ZLIB=1
USE_DEVICEATLAS=1 DEVICEATLAS_INC=/opt/deviceatlas-enterprise-c-3.2/include
DEVICEATLAS_LIB=/opt/deviceatlas-enterprise-c-3.2/lib

LD      haproxy
/usr/bin/ld: cannot find -lda
collect2: error: ld returned 1 exit status
make: *** [haproxy] Error 1





On Tue, Sep 19, 2023 at 10:19 AM David CARLIER <[email protected]> wrote:

> Hi,
>
> Since you build the DeviceAtlas library from cmake prior, the following
> steps are more appropriate :
> 1/ Inside the deviceatlas-enterprise-c-3.2 folder
> cmake . -DCMAKE_INSTALL_PREFIX=/opt/deviceatlas-enterprise-c-3.2
> -DCMAKE_C_FLAGS="-std=gnu99"
> make
> make install
>
> 2/ Inside the haproxy-2.8.3 folder
>
> make TARGET=linux-glibc USE_PCRE=1 USE_OPENSSL=1 USE_ZLIB=1
> USE_DEVICEATLAS=1 DEVICEATLAS_INC=/opt/deviceatlas-enterprise-c-3.2/include
> DEVICEATLAS_LIB=/opt/deviceatlas-enterprise-c-3.2/lib
>
> Let me know if you have any further question.
>
> On Tue, 19 Sept 2023 at 00:02, Mahendra Patil <[email protected]>
> wrote:
>
>> Thanks for yours prompt reply about deviceatlas-enterprise-c-3.2  error
>> while make
>> after yours suggestion deviceatlas-enterprise-c-3.2 *make *works fine
>>
>> But while using with haproxy-2.8.3 version gives following error
>>
>> [root@govinda opt]# cd haproxy-2.8.3
>> [root@govinda haproxy-2.8.3]# make TARGET=linux-glibc USE_PCRE=1
>> USE_OPENSSL=1 USE_ZLIB=1 USE_DEVICEATLAS=1
>> DEVICEATLAS_SRC=/opt/deviceatlas-enterprise-c-3.2/Src/
>>   CC      src/ev_poll.o
>>   CC      src/ev_epoll.o
>>   CC      src/cpuset.o
>>   CC      src/ssl_sock.o
>>   CC      src/ssl_ckch.o
>>   CC      src/ssl_sample.o
>>   CC      src/ssl_crtlist.o
>>   CC      src/cfgparse-ssl.o
>>   CC      src/ssl_utils.o
>>   CC      src/jwt.o
>>   CC      src/ssl_ocsp.o
>>   CC      /opt/deviceatlas/Src//Os/daunix.o
>>   CC      /opt/deviceatlas/Src//dadwcom.o
>>   CC      /opt/deviceatlas/Src//dasch.o
>>   CC      /opt/deviceatlas/Src//json.o
>>   CC      /opt/deviceatlas/Src//dac.o
>> /opt/deviceatlas/Src//dac.c:1033:0: warning: ignoring #pragma optimize
>>  [-Wunknown-pragmas]
>>  #pragma optimize("Ofast")
>>  ^
>> /opt/deviceatlas/Src//dac.c:1041:0: warning: ignoring #pragma optimize
>>  [-Wunknown-pragmas]
>>  #pragma optimize("Ofast")
>>  ^
>> /opt/deviceatlas/Src//dac.c:1049:0: warning: ignoring #pragma optimize
>>  [-Wunknown-pragmas]
>>  #pragma optimize("Ofast")
>>  ^
>> /opt/deviceatlas/Src//dac.c:1057:0: warning: ignoring #pragma optimize
>>  [-Wunknown-pragmas]
>>  #pragma optimize("Ofast")
>>  ^
>> /opt/deviceatlas/Src//dac.c:1065:0: warning: ignoring #pragma optimize
>>  [-Wunknown-pragmas]
>>  #pragma optimize("Ofast")
>>  ^
>> /opt/deviceatlas/Src//dac.c:1076:0: warning: ignoring #pragma optimize
>>  [-Wunknown-pragmas]
>>  #pragma optimize("Ofast")
>>  ^
>> /opt/deviceatlas/Src//dac.c: In function ârun_san_evidenceâ:
>> /opt/deviceatlas/Src//dac.c:1404:23: warning: unused variable âeâ
>> [-Wunused-variable]
>>              char *o, *e, *optr, *ptr;
>>                        ^
>> /opt/deviceatlas/Src//dac.c:1393:22: warning: unused variable âeâ
>> [-Wunused-variable]
>>          char *text, *e;
>>                       ^
>> /opt/deviceatlas/Src//dac.c: In function ârun_props_rulesâ:
>> /opt/deviceatlas/Src//dac.c:2143:24: warning: missing braces around
>> initializer [-Wmissing-braces]
>>                  struct da_lkp_handler tmpch = {0};
>>                         ^
>> /opt/deviceatlas/Src//dac.c:2143:24: warning: (near initialization for
>> âtmpch.evidâ) [-Wmissing-braces]
>> /opt/deviceatlas/Src//dac.c:1984:19: warning: unused variable âeâ
>> [-Wunused-variable]
>>          char *o, *e, *ptr, *optr;
>>                    ^
>> /opt/deviceatlas/Src//dac.c:1983:38: warning: unused variable âedâ
>> [-Wunused-variable]
>>          char *tmpkp, *tmpvp, *sptr, *ed;
>>                                       ^
>> /opt/deviceatlas/Src//dac.c: In function ârun_dyn_rulesâ:
>> /opt/deviceatlas/Src//dac.c:2192:13: error: âforâ loop initial
>> declarations are only allowed in C99 mode
>>              for (size_t gt = 0; gt < result->fl[lvl]->yszcount; gt ++) {
>>              ^
>> compilation terminated due to -Wfatal-errors.
>> make: *** [/opt/deviceatlas/Src//dac.o] Error 1
>>
>>
>> Additionally haproxy-2.8.3 version we check
>> with deviceatlas-enterprise-c-2.4.1 version no issue observe , So let us
>> know is there any concern with deviceatlas-enterprise-c-3.2 version
>>
>> --mahen
>>
>> On Mon, Sep 18, 2023 at 11:22 PM David CARLIER <[email protected]>
>> wrote:
>>
>>> Hi and thanks for your report.
>>>
>>> Would the following works for you (recommended to work a
>>> fresh extracted directory) ?
>>>
>>> `cmake . -DCMAKE_INSTALL_PREFIX=/opt/deviceatlas-enterprise-c-3.2
>>> -DCMAKE_C_FLAGS="-std=gnu99"`
>>>
>>>
>>> On Mon, 18 Sept 2023 at 18:45, Amol Arote <[email protected]>
>>> wrote:
>>>
>>>> Dear Team,
>>>>
>>>> We are trying to upgrade/install deviceatlas-enterprise-c-3.2 , but
>>>> while compiling deviceatlas its showing some error.
>>>> Below are the steps which we performed and occured error for the same.
>>>>
>>>> *Device Atlas Version :* deviceatlas-enterprise-c-3.2
>>>>
>>>> [root@govinda opt]# cd /opt/deviceatlas-enterprise-c-3.2/Src/
>>>> [root@govinda Src]# cmake .
>>>> -DCMAKE_INSTALL_PREFIX=/opt/deviceatlas-enterprise-c-3.2
>>>> -- The C compiler identification is GNU 4.8.5
>>>> -- The CXX compiler identification is GNU 4.8.5
>>>> -- Check for working C compiler: /usr/bin/cc
>>>> -- Check for working C compiler: /usr/bin/cc -- works
>>>> -- Detecting C compiler ABI info
>>>> -- Detecting C compiler ABI info - done
>>>> -- Check for working CXX compiler: /usr/bin/c++
>>>> -- Check for working CXX compiler: /usr/bin/c++ -- works
>>>> -- Detecting CXX compiler ABI info
>>>> -- Detecting CXX compiler ABI info - done
>>>> -- Found CURL: /usr/lib64/libcurl.so (found version "7.29.0")
>>>> -- Found ZLIB: /usr/lib64/libz.so (found version "1.2.7")
>>>> -- Performing Test HAVE_BUILTIN__BOOL
>>>> -- Performing Test HAVE_BUILTIN__BOOL - Success
>>>> -- Found OpenSSL: /usr/lib64/libssl.so;/usr/lib64/libcrypto.so (found
>>>> version "1.0.2k")
>>>> -- Found OpenSSL MD5
>>>> -- Performing Test HAS_CURLSSLSET
>>>> -- Performing Test HAS_CURLSSLSET - Failed
>>>> -- Could NOT find ZIP
>>>> -- Performing Test HAS_STD_ATOMICS
>>>> -- Performing Test HAS_STD_ATOMICS - Failed
>>>> -- Performing Test HAS_BUILTIN_ATOMICS
>>>> -- Performing Test HAS_BUILTIN_ATOMICS - Success
>>>> -- Performing Test HAS_ATTR_COLD
>>>> -- Performing Test HAS_ATTR_COLD - Success
>>>> -- Performing Test HAS_ATTR_ALLOC
>>>> -- Performing Test HAS_ATTR_ALLOC - Failed
>>>> -- Performing Test HAS_ATTR_NOSANITIZE
>>>> -- Performing Test HAS_ATTR_NOSANITIZE - Success
>>>> -- Performing Test HAS_BUILTIN_EXPECT
>>>> -- Performing Test HAS_BUILTIN_EXPECT - Success
>>>> -- Performing Test HAS_WIN32_ATOMICS
>>>> -- Performing Test HAS_WIN32_ATOMICS - Failed
>>>> -- Performing Test HAS_WIN32_ATTR_ALLOC
>>>> -- Performing Test HAS_WIN32_ATTR_ALLOC - Failed
>>>> -- Performing Test HAS_WIN32_UNUSED
>>>> -- Performing Test HAS_WIN32_UNUSED - Failed
>>>> --  version
>>>> -- Configuring done
>>>> -- Generating done
>>>> -- Build files have been written to:
>>>> /opt/deviceatlas-enterprise-c-3.2/Src
>>>>
>>>> [image: image.png]
>>>>
>>>>
>>>> [root@govinda Src]# make
>>>> Scanning dependencies of target ci
>>>> [  6%] Building C object CMakeFiles/ci.dir/ci.c.o
>>>> [ 13%] Building C object CMakeFiles/ci.dir/dadwcom.c.o
>>>> [ 20%] Building C object CMakeFiles/ci.dir/dadwcurl.c.o
>>>> [ 26%] Building C object CMakeFiles/ci.dir/dadwarc.c.o
>>>> [ 33%] Building C object CMakeFiles/ci.dir/cisch.c.o
>>>> [ 40%] Building C object CMakeFiles/ci.dir/Os/ciunix.c.o
>>>> Linking C shared library libci.so
>>>> [ 40%] Built target ci
>>>> Scanning dependencies of target da
>>>> [ 46%] Building C object CMakeFiles/da.dir/Arch/amd64.c.o
>>>> [ 53%] Building C object CMakeFiles/da.dir/json.c.o
>>>> [ 60%] Building C object CMakeFiles/da.dir/dac.c.o
>>>> /opt/deviceatlas-enterprise-c-3.2/Src/dac.c: In function
>>>> ârun_dyn_rulesâ:
>>>> /opt/deviceatlas-enterprise-c-3.2/Src/dac.c:2192:13: error: âforâ loop
>>>> initial declarations are only allowed in C99 mode
>>>>              for (size_t gt = 0; gt < result->fl[lvl]->yszcount; gt ++)
>>>> {
>>>>              ^
>>>> /opt/deviceatlas-enterprise-c-3.2/Src/dac.c:2192:13: note: use option
>>>> -std=c99 or -std=gnu99 to compile your code
>>>> make[2]: *** [CMakeFiles/da.dir/dac.c.o] Error 1
>>>> make[1]: *** [CMakeFiles/da.dir/all] Error 2
>>>> make: *** [all] Error 2
>>>> [root@govinda Src]#
>>>>
>>>> [image: image.png]
>>>>
>>>> Regards,
>>>>
>>>>
>>>>
>>>> Amol Arote
>>>>
>>>> Senior IT Manager
>>>>
>>>>
>>>>
>>>> *Mobile*: 9773868585 | 8097988585
>>>>
>>>> *Phone:*  (022) 61934700 Ext 444
>>>>
>>>> *Email:* [email protected]
>>>>
>>>> *Web:* *https://www.naaptol.com <https://www.naaptol.com>*
>>>>
>>>>
>>>>
>>>>
>>

-- 

Reply via email to