Re: [Bacula-users] Compilation Errors of Bacula 9.6.3 S3 module on Debian10.

2020-06-11 Thread Kern Sibbald

Hello,

I recommend that you try with Bacula version 9.6.4, because I have 
recently built and tested the s3 driver.  It does require an updated 
libs3 (see release notes) and to build the libs3 I seem to recall that 
you need to install curl-dev and some other dev library.  It should tell 
you during the build.


Best regards,

Kern

On 5/30/20 7:31 PM, r0...@nxlplyx.com wrote:

Hi,

I have given up trying to get the S3 module to compile  on Ubuntu
20.04.   No suggestions have worked thus far.

I switched operating systems and am trying to compile the S3 module on
Debian 10.

The missing curl.h error disappeared I was getting in Ubuntu.

Unfortunately the following now occurs.  Does anyone have any suggestions?

---

$ make deb
build/obj/request.do: Compiling dynamic object
src/request.c: In function ‘request_curl_code_to_status’:
src/request.c:1709:5: error: duplicate case value
  case CURLE_SSL_CACERT:
  ^~~~
src/request.c:1705:5: note: previously used here
  case CURLE_PEER_FAILED_VERIFICATION:
  ^~~~
src/request.c: In function ‘sort_and_urlencode_query_string’:
src/request.c:865:9: error: ‘strncat’ specified bound 1 equals source
length [-Werror=stringop-overflow=]
  strncat(result, "&", 1);
  ^~~
cc1: all warnings being treated as errors
make: *** [GNUmakefile:223: build/obj/request.do] Error 1

---

Al.







___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users



___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


Re: [Bacula-users] Compilation Errors of Bacula 9.6.3 S3 module on Debian10.

2020-06-01 Thread Sven Hartge
r0...@nxlplyx.com  wrote:
> Thank you.  The patches have now solved the both the duplicate case
> statements and the strncat errors.

> HOWEVER,  I am now getting a missing stddef.h error.

> It is looking for it in a gcc 9 installation.   But Debian 10 does not
> have gcc 9 installed, it has only gcc 8 installed.

> stddef.h DOES exist in '/usr/lib/gcc/x86_64-linux-gnu/8/include/stddef.h'

> Might there be a patch for this? 

I can not reproduce this problem on a Debian 10 system.

Maybe your system isn't as clean as you think it is?

> -

> $ patch request.c < support-newer-curl.patch
> patching file request.c

> $ patch request.c < fix-buffer-sizes.patch
> patching file request.c

> $ make deb
> make: *** No rule to make target
> '/usr/lib/gcc/x86_64-linux-gnu/9/include/stddef.h', needed by
> 'build/obj/acl.do'.  Stop.

> -


Please do a 

 make VERBOSE=1 clean

and then retry with 

 make VERBOSE=1 deb

Grüße,
Sven.

-- 
Sigmentation fault. Core dumped.



___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


Re: [Bacula-users] Compilation Errors of Bacula 9.6.3 S3 module on Debian10.

2020-06-01 Thread r0...@nxlplyx.com
Hi Sven,

Thank you.  The patches have now solved the both the duplicate case
statements and the strncat errors.

HOWEVER,  I am now getting a missing stddef.h error.

It is looking for it in a gcc 9 installation.   But Debian 10 does not
have gcc 9 installed, it has only gcc 8 installed.

stddef.h DOES exist in '/usr/lib/gcc/x86_64-linux-gnu/8/include/stddef.h'

Might there be a patch for this? 

-

$ patch request.c < support-newer-curl.patch
patching file request.c

$ patch request.c < fix-buffer-sizes.patch
patching file request.c

$ make deb
make: *** No rule to make target
'/usr/lib/gcc/x86_64-linux-gnu/9/include/stddef.h', needed by
'build/obj/acl.do'.  Stop.

-

Al

On 5/31/20 8:29 AM, Sven Hartge wrote:

Problem with that is the very very poor code quality of libs3 (which I
have lameted quite often) and newer compilers now warn or error out when
encountering those problems.

I hava another patch at
https://salsa.debian.org/hartge/libs3/-/raw/master/debian/patches/fix-buffer-sizes.patch,
please try if this fixes or at least works around those problems.

Note: no guarantee is made by me that this creates a working or even
safe and secure library.

Grüße,
Sven.





___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


Re: [Bacula-users] Compilation Errors of Bacula 9.6.3 S3 module on Debian10.

2020-05-31 Thread Sven Hartge
On 31.05.20 14:06, r0...@nxlplyx.com wrote:

> Unfortunately there are now four(4) new errors, all appearing to be
> related to the strncat function.
> 
> I don't suppose there is a patch for this?
> 
> -
> 
> $ make deb
> build/obj/request.do: Compiling dynamic object
> src/request.c: In function ‘sort_and_urlencode_query_string’:
> src/request.c:865:9: error: ‘strncat’ specified bound 1 equals source
> length [-Werror=stringop-overflow=]
>  strncat(result, "&", 1);
>  ^~~
> In function ‘sort_and_urlencode_query_string.constprop’,
>     inlined from ‘canonicalize_query_string’ at src/request.c:884:9,
>     inlined from ‘setup_request.part.2’ at src/request.c:1519:5,
>     inlined from ‘setup_request’ at src/request.c:1477:17:
> src/request.c:822:5: error: ‘strncpy’ specified bound depends on the
> length of the source argument [-Werror=stringop-overflow=]
>  strncpy(tokenized, queryString, strlen(queryString) + 1);
>  ^~~~
> src/request.c: In function ‘setup_request’:
> src/request.c:822:37: note: length computed here
>  strncpy(tokenized, queryString, strlen(queryString) + 1);
>  ^~~
> In function ‘sort_and_urlencode_query_string.constprop’,
>     inlined from ‘canonicalize_query_string’ at src/request.c:884:9,
>     inlined from ‘setup_request.part.2’ at src/request.c:1519:5,
>     inlined from ‘setup_request’ at src/request.c:1477:17:
> src/request.c:863:13: error: ‘strncat’ output truncated before
> terminating nul copying as many bytes from a string as its length
> [-Werror=stringop-truncation]
>  strncat(result, appendage, strlen(appendage));
>  ^
> cc1: all warnings being treated as errors
> make: *** [GNUmakefile:223: build/obj/request.do] Error 1

Problem with that is the very very poor code quality of libs3 (which I
have lameted quite often) and newer compilers now warn or error out when
encountering those problems.

I hava another patch at
https://salsa.debian.org/hartge/libs3/-/raw/master/debian/patches/fix-buffer-sizes.patch,
please try if this fixes or at least works around those problems.

Note: no guarantee is made by me that this creates a working or even
safe and secure library.

Grüße,
Sven.





signature.asc
Description: OpenPGP digital signature
___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


Re: [Bacula-users] Compilation Errors of Bacula 9.6.3 S3 module on Debian10.

2020-05-31 Thread r0...@nxlplyx.com
HI Sven,

Thank you. The duplicate case statement problem was eliminated with that
patch.

Unfortunately there are now four(4) new errors, all appearing to be
related to the strncat function.

I don't suppose there is a patch for this?

-

$ make deb
build/obj/request.do: Compiling dynamic object
src/request.c: In function ‘sort_and_urlencode_query_string’:
src/request.c:865:9: error: ‘strncat’ specified bound 1 equals source
length [-Werror=stringop-overflow=]
 strncat(result, "&", 1);
 ^~~
In function ‘sort_and_urlencode_query_string.constprop’,
    inlined from ‘canonicalize_query_string’ at src/request.c:884:9,
    inlined from ‘setup_request.part.2’ at src/request.c:1519:5,
    inlined from ‘setup_request’ at src/request.c:1477:17:
src/request.c:822:5: error: ‘strncpy’ specified bound depends on the
length of the source argument [-Werror=stringop-overflow=]
 strncpy(tokenized, queryString, strlen(queryString) + 1);
 ^~~~
src/request.c: In function ‘setup_request’:
src/request.c:822:37: note: length computed here
 strncpy(tokenized, queryString, strlen(queryString) + 1);
 ^~~
In function ‘sort_and_urlencode_query_string.constprop’,
    inlined from ‘canonicalize_query_string’ at src/request.c:884:9,
    inlined from ‘setup_request.part.2’ at src/request.c:1519:5,
    inlined from ‘setup_request’ at src/request.c:1477:17:
src/request.c:863:13: error: ‘strncat’ output truncated before
terminating nul copying as many bytes from a string as its length
[-Werror=stringop-truncation]
 strncat(result, appendage, strlen(appendage));
 ^
cc1: all warnings being treated as errors
make: *** [GNUmakefile:223: build/obj/request.do] Error 1

-

Regards,

Al



On 5/31/20 4:04 AM, Sven Hartge wrote:
> On 31.05.20 02:00, r0...@nxlplyx.com wrote:
>
>> I am trying to compile the S3 module for Bacula 9.6.3 on a new install of 
>> Debian 10.
>>
>> That would be the source file:   'libs3-20181010.tar.gz'
>>
>> I unzip it, it extracts to its own directory. I cd to the directory, and
>> follow the instructions which say to type: 'make deb'.
> That version will not compile on any system with curl>7.62.
>
> You need the following patch to fix that problem:
>
> https://salsa.debian.org/hartge/libs3/-/raw/master/debian/patches/support-newer-curl.patch
>
>
> Grüße,
> Sven.
>
>


___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


Re: [Bacula-users] Compilation Errors of Bacula 9.6.3 S3 module on Debian10.

2020-05-31 Thread Sven Hartge
On 31.05.20 02:00, r0...@nxlplyx.com wrote:

> I am trying to compile the S3 module for Bacula 9.6.3 on a new install of 
> Debian 10.
> 
> That would be the source file:   'libs3-20181010.tar.gz'
> 
> I unzip it, it extracts to its own directory. I cd to the directory, and
> follow the instructions which say to type: 'make deb'.

That version will not compile on any system with curl>7.62.

You need the following patch to fix that problem:

https://salsa.debian.org/hartge/libs3/-/raw/master/debian/patches/support-newer-curl.patch


Grüße,
Sven.



signature.asc
Description: OpenPGP digital signature
___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


Re: [Bacula-users] Compilation Errors of Bacula 9.6.3 S3 module on Debian10.

2020-05-31 Thread Davide Franco
Hello,

I haven’t had any major issue compiling libs3 on both Debian 10 and Ubuntu
20.04.

There’s some curl and OpenSSL dev packages dependency you need installed in
order to build libs3.

It should be documented somewhere, I’ll make sure that’s the case.

Best,

Davide

On Sun, 31 May 2020 at 04:41, r0...@nxlplyx.com  wrote:

> Hi Sven,
>
> I am trying to compile the S3 module for Bacula 9.6.3 on a new install of 
> Debian 10.
>
> That would be the source file:   'libs3-20181010.tar.gz'
>
> I unzip it, it extracts to its own directory. I cd to the directory, and
> follow the instructions which say to type: 'make deb'.
>
> Is that what you wanted to know?
>
> Al
>
>
>
>
> ---
> $ make deb
> build/obj/request.do: Compiling dynamic object
> src/request.c: In function ‘request_curl_code_to_status’:
> src/request.c:1709:5: error: duplicate case value
>  case CURLE_SSL_CACERT:
>  ^~~~
> src/request.c:1705:5: note: previously used here
>  case CURLE_PEER_FAILED_VERIFICATION:
>  ^~~~
> src/request.c: In function ‘sort_and_urlencode_query_string’:
> src/request.c:865:9: error: ‘strncat’ specified bound 1 equals source
> length [-Werror=stringop-overflow=]
>  strncat(result, "&", 1);
>  ^~~
> cc1: all warnings being treated as errors
> make: *** [GNUmakefile:223: build/obj/request.do] Error 1
> ---
>
> If you could describe in a more complete manner what exactly you do, we
> might be able to better follow and help.
>
> For example it is totally unclear to me what sources you are trying to
> compile and what you did in what environment when you where doing it.
>
> Grüße,
> Sven.
> (Please don't Cc: me on mails.)
>
> ___
> Bacula-users mailing list
> Bacula-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/bacula-users
>
___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


Re: [Bacula-users] Compilation Errors of Bacula 9.6.3 S3 module on Debian10.

2020-05-30 Thread r0...@nxlplyx.com
Hi Sven,

I am trying to compile the S3 module for Bacula 9.6.3 on a new install of 
Debian 10.

That would be the source file:   'libs3-20181010.tar.gz'

I unzip it, it extracts to its own directory. I cd to the directory, and
follow the instructions which say to type: 'make deb'.

Is that what you wanted to know?

Al



>> ---
>> $ make deb
>> build/obj/request.do: Compiling dynamic object
>> src/request.c: In function ‘request_curl_code_to_status’:
>> src/request.c:1709:5: error: duplicate case value
>>  case CURLE_SSL_CACERT:
>>  ^~~~
>> src/request.c:1705:5: note: previously used here
>>  case CURLE_PEER_FAILED_VERIFICATION:
>>  ^~~~
>> src/request.c: In function ‘sort_and_urlencode_query_string’:
>> src/request.c:865:9: error: ‘strncat’ specified bound 1 equals source
>> length [-Werror=stringop-overflow=]
>>  strncat(result, "&", 1);
>>  ^~~
>> cc1: all warnings being treated as errors
>> make: *** [GNUmakefile:223: build/obj/request.do] Error 1
>> ---
> If you could describe in a more complete manner what exactly you do, we
> might be able to better follow and help.
>
> For example it is totally unclear to me what sources you are trying to
> compile and what you did in what environment when you where doing it.
>
> Grüße,
> Sven.
> (Please don't Cc: me on mails.)
___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


Re: [Bacula-users] Compilation Errors of Bacula 9.6.3 S3 module on Debian10.

2020-05-30 Thread Sven Hartge
(Please don't Cc: me on mails.)

On 30.05.20 19:31, r0...@nxlplyx.com wrote:

> ---
> $ make deb
> build/obj/request.do: Compiling dynamic object
> src/request.c: In function ‘request_curl_code_to_status’:
> src/request.c:1709:5: error: duplicate case value
>  case CURLE_SSL_CACERT:
>  ^~~~
> src/request.c:1705:5: note: previously used here
>  case CURLE_PEER_FAILED_VERIFICATION:
>  ^~~~
> src/request.c: In function ‘sort_and_urlencode_query_string’:
> src/request.c:865:9: error: ‘strncat’ specified bound 1 equals source
> length [-Werror=stringop-overflow=]
>  strncat(result, "&", 1);
>  ^~~
> cc1: all warnings being treated as errors
> make: *** [GNUmakefile:223: build/obj/request.do] Error 1
> ---

If you could describe in a more complete manner what exactly you do, we
might be able to better follow and help.

For example it is totally unclear to me what sources you are trying to
compile and what you did in what environment when you where doing it.

Grüße,
Sven.
(Please don't Cc: me on mails.)



signature.asc
Description: OpenPGP digital signature
___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users