Re: Error While deviceatlas 3.2.2 and haproxy 2.9.6 make from source

2024-05-06 Thread Mahendra Patil
any update when we can get  3.2.3 release

On Wed, Apr 3, 2024 at 10:51 AM David CARLIER  wrote:

> Hi all,
>
> Thanks for your report. This is a known issue the 3.2.3 release is
> scheduled within this month.
>
> Regards.
>
> On Wed, 3 Apr 2024 at 04:38, Willy Tarreau  wrote:
>
>> Hello,
>>
>> On Wed, Apr 03, 2024 at 05:21:03AM +0530, Mahendra Patil wrote:
>> > /opt/deviceatlas/Src//dac.c: In function ātoverdecā:
>> > /opt/deviceatlas/Src//dac.c:714:13: warning: implicit declaration of
>> > function ā__builtin_sadd_overflowā [-Wimplicit-function-declaration]
>> >  if (DATLAS_A_OFLOW(cur * 10, decrm, )) {
>> (...)
>> > /opt/deviceatlas/Src//dac.o: In function `toverdec':
>> > /opt/deviceatlas/Src//dac.c:714: undefined reference to
>> > `__builtin_sadd_overflow'
>> > collect2: error: ld returned 1 exit status
>> > make: *** [haproxy] Error 1
>>
>> From what I'm seeing, __builtin_sadd_overflow() first appeared in gcc-5,
>> so you don't have it on your system, which seems to be RHEL 7 or CentOS 7
>> based on the compiler version (gcc 4.8.5).
>>
>> I don't know how important is the use of this builtin for Device Atlas,
>> I'll let David check. As a hack you could verify that it builds when you
>> change it to:
>>
>> if ((r = cur*10 + decrm), 0) {
>>
>> But be careful that removing this overflow check might introduce a
>> vulnerability, so if this builds, please do not deploy such code without
>> David's approval.
>>
>> Another approach could be to build gcc-5.5 on your distro. It's not that
>> hard but might not be what you were expecting to do. There are various
>> howtos on the net, such as here:
>>
>>   https://gist.github.com/tyleransom/2c96f53a828831567218eeb7edc2b1e7
>>
>> Though this one will replace the default compiler in your path, and you
>> may likely want to add "--program-suffix=-5.5" to the configure (and
>> replace 5.4 with 5.5 everywhere) so that you can then pass "CC=gcc-5.5"
>> to haproxy's "make" command line.
>>
>> Hoping this helps,
>> Willy
>>
>

-- 



Error While deviceatlas 3.2.2 and haproxy 2.9.6 make from source

2024-04-02 Thread Mahendra Patil
We are planning to upgrade to *deviceatlas-enterprise-c-3.2.2.zip* and
*haproxy-2.9.6.tar.gz*

We follow the below steps , But got Error while haproxy make , highlighted
in Red color below


[root@govinda opt]# unzip deviceatlas-enterprise-c-3.2.2.zip

[root@govinda opt]# mv deviceatlas-enterprise-c-3.2.2  deviceatlas

[root@govinda opt]# cd /opt/deviceatlas/Src/

[root@govinda Src]# cmake . -DCMAKE_INSTALL_PREFIX=/opt/deviceatlas
-- 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/Src


[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
[ 66%] Building C object CMakeFiles/da.dir/dadwcom.c.o
[ 73%] Building C object CMakeFiles/da.dir/dadwcurl.c.o
[ 80%] Building C object CMakeFiles/da.dir/dadwarc.c.o
[ 86%] Building C object CMakeFiles/da.dir/dasch.c.o
[ 93%] Building CXX object CMakeFiles/da.dir/dacache.cpp.o
[100%] Building C object CMakeFiles/da.dir/Os/daunix.c.o
Linking CXX shared library libda.so
[100%] Built target da







[root@govinda opt]# tar -zxvf haproxy-2.9.6.tar.gz

[root@govinda opt]# cd haproxy-2.9.6

[root@govinda haproxy-2.9.6]# make TARGET=linux-glibc USE_PCRE=1
USE_OPENSSL=1 USE_ZLIB=1 USE_DEVICEATLAS=1
DEVICEATLAS_SRC=/opt/deviceatlas/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: In function âtoverdecâ:
/opt/deviceatlas/Src//dac.c:714:13: warning: implicit declaration of
function â__builtin_sadd_overflowâ [-Wimplicit-function-declaration]
 if (DATLAS_A_OFLOW(cur * 10, decrm, )) {
 ^
/opt/deviceatlas/Src//dac.c: In function âda_searchv_allocâ:
/opt/deviceatlas/Src//dac.c:5843:12:  warning:   missing braces around
initializer [-Wmissing-braces]
 struct da_lkp_handler ch = {0};
^
/opt/deviceatlas/Src//dac.c:5843:12:  warning: (near initialization for
âch.evidâ) [-Wmissing-braces]
/opt/deviceatlas/Src//dac.c: In function âda_searchid_allocâ:
/opt/deviceatlas/Src//dac.c:6102:9:  warning:  missing braces around
initializer [-Wmissing-braces]
 da_evidence_t ev[2] = {0};
 ^
/opt/deviceatlas/Src//dac.c:6102:9:  warning: (near initialization for
âev[0]â) [-Wmissing-braces]
/opt/deviceatlas/Src//dac.c: At top level:
cc1: warning: unrecognized command line option "-Wno-atomic-alignment"
[enabled by default]
cc1: warning: unrecognized command line option 

Re: Error While deviceatlas compile/make from source

2023-10-03 Thread Mahendra Patil
Downloaded all latest and tried but still error

[root@govinda opt]# /opt/haproxy-ssl/sbin/haproxy -f
/opt/haproxy-ssl/conf/haproxy.cfg
[NOTICE]   (28500) : haproxy version is 2.8.3-86e043a
[NOTICE]   (28500) : path to executable is /opt/haproxy-ssl/sbin/haproxy

*[ALERT](28500) : config : deviceatlas : data could not be compiled.*





On Fri, Sep 29, 2023 at 4:44 PM David CARLIER  wrote:

> Hi Mahendra, sorry for late reply but you cam download a JSON from this
> page https://deviceatlas.com/deviceatlas-haproxy-module
>  now they are compatible with the V3 api.
>
> Kind regards.
>
> On Wed, 20 Sept 2023 at 23:50, Mahendra Patil 
> wrote:
>
>> *After installation haproxy not able to start , show below error*
>>
>> [root@govinda opt]# /opt/haproxy-ssl/sbin/haproxy -f
>> /opt/haproxy-ssl/conf/haproxy.cfg
>> [NOTICE]   (42915) : haproxy version is 2.8.3-86e043a
>> [NOTICE]   (42915) : path to executable is /opt/haproxy-ssl/sbin/haproxy
>> [ALERT](42915) : config : deviceatlas :
>> '/opt/deviceatlas/20230802_compact.json' json file is invalid.
>>
>> On Tue, Sep 19, 2023 at 5:36 PM David CARLIER  wrote:
>>
>>> We are almost there, now remains the linkage part to pass.
>>> In your /opt/deviceatlas-enterprise-c-3.2 folder, there should be a
>>> `include` and a `lib` or a `lib64` folder
>>> So for the last command, what needs to be done instead is one of the
>>> following (no need to repeat step 1) :
>>>
>>> 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
>>> DEVICEATLAS_LDFLAGS="-L/opt/deviceatlas-enterprise-c-3.2/lib
>>> -Wl,-rpath,/opt/deviceatlas-enterprise-c-3.2/lib -lda"
>>>
>>> or
>>>
>>> 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/lib64
>>> DEVICEATLAS_LDFLAGS="-L/opt/deviceatlas-enterprise-c-3.2/lib64
>>> -Wl,-rpath,/opt/deviceatlas-enterprise-c-3.2/lib64 -lda"
>>>
>>> The only difference is `lib` vs `lib64`
>>>
>>> Hope it's useful.
>>>
>>> Kindest regards.
>>>
>>>
>>>
>>> On Tue, 19 Sept 2023 at 12:52, Mahendra Patil <
>>> mahendra.pa...@naaptol.com> wrote:
>>>
>>>>
>>>> 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 
>>>> 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 <
>>>>> mahendra.pa...@naaptol.com> wrote:
>>>>>
>>>>>> Thanks for yours prompt reply about deviceatlas-enterprise-c-3.2
>>>>>> error while make
>>>>>> after yours suggestion deviceatlas-enterprise-c

Re: Error While deviceatlas compile/make from source

2023-09-20 Thread Mahendra Patil
*After installation haproxy not able to start , show below error*

[root@govinda opt]# /opt/haproxy-ssl/sbin/haproxy -f
/opt/haproxy-ssl/conf/haproxy.cfg
[NOTICE]   (42915) : haproxy version is 2.8.3-86e043a
[NOTICE]   (42915) : path to executable is /opt/haproxy-ssl/sbin/haproxy
[ALERT](42915) : config : deviceatlas :
'/opt/deviceatlas/20230802_compact.json' json file is invalid.

On Tue, Sep 19, 2023 at 5:36 PM David CARLIER  wrote:

> We are almost there, now remains the linkage part to pass.
> In your /opt/deviceatlas-enterprise-c-3.2 folder, there should be a
> `include` and a `lib` or a `lib64` folder
> So for the last command, what needs to be done instead is one of the
> following (no need to repeat step 1) :
>
> 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
> DEVICEATLAS_LDFLAGS="-L/opt/deviceatlas-enterprise-c-3.2/lib
> -Wl,-rpath,/opt/deviceatlas-enterprise-c-3.2/lib -lda"
>
> or
>
> 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/lib64
> DEVICEATLAS_LDFLAGS="-L/opt/deviceatlas-enterprise-c-3.2/lib64
> -Wl,-rpath,/opt/deviceatlas-enterprise-c-3.2/lib64 -lda"
>
> The only difference is `lib` vs `lib64`
>
> Hope it's useful.
>
> Kindest regards.
>
>
>
> On Tue, 19 Sept 2023 at 12:52, Mahendra Patil 
> wrote:
>
>>
>> 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 
>> 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 <
>>> mahendra.pa...@naaptol.com> 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

Re: Error While deviceatlas compile/make from source

2023-09-19 Thread Mahendra Patil
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  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 
> 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: *** [

Re: Error While deviceatlas compile/make from source

2023-09-18 Thread Mahendra Patil
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  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  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