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

2024-05-06 Thread David CARLIER
hi and sorry for the long reply.

I will let you know once it is officially release, it needs to pass our QA
test still.

Kind regards.

On Mon, 6 May 2024 at 22:52, Mahendra Patil 
wrote:

> 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
>>>
>>
>


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
>>
>

-- 



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

2024-04-02 Thread Willy Tarreau
On Wed, Apr 03, 2024 at 06:21:22AM +0100, David CARLIER wrote:
> Hi all,
> 
> Thanks for your report. This is a known issue the 3.2.3 release is
> scheduled within this month.

Even better :-)

Thanks David!
Willy



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

2024-04-02 Thread David CARLIER
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
>


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

2024-04-02 Thread Willy Tarreau
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