Re: logic in m4/strtoimax.m4 inverted

2022-10-04 Thread Emanuel Haupt
Chet Ramey  wrote:
> On 10/1/22 6:38 AM, Emanuel Haupt wrote:
> > Static build of 5.2 fails to build on FreeBSD 13.1-RELEASE (amd64).
> > 
> > The logic in m4/strtoimax.m4 is inverted. The following patch
> > replaces strtoimax() if and only if it is present and functional.
> 
> Thanks for the report. You're right, of course.
> 
> I wonder why it fails to link, though. FreeBSD must have another
> function (probably strtoll) that bash uses defined in that same
> source file. Otherwise, wouldn't static linking skip the libc
> definition?

FreeBSD has both:
https://www.freebsd.org/cgi/man.cgi?query=strtoimax&apropos=0&sektion=3&manpath=FreeBSD+13.1-RELEASE&arch=default&format=html

Here is what's happening without the patch.

Full sandboxed build log:
https://people.freebsd.org/~ehaupt/buildlogs/bash-strtoimax/bash-static-5.2_3.log

config.log:
https://people.freebsd.org/~ehaupt/buildlogs/bash-strtoimax/config.log



Re: logic in m4/strtoimax.m4 inverted

2022-10-04 Thread Chet Ramey

On 10/4/22 3:24 AM, Emanuel Haupt wrote:


I wonder why it fails to link, though. FreeBSD must have another
function (probably strtoll) that bash uses defined in that same
source file. Otherwise, wouldn't static linking skip the libc
definition?


FreeBSD has both:
https://www.freebsd.org/cgi/man.cgi?query=strtoimax&apropos=0&sektion=3&manpath=FreeBSD+13.1-RELEASE&arch=default&format=html


OK, it's not really important. What I'm guessing is that some other
function in FreeBSD's libc calls strtoimax_l(), which causes that source
file to be linked in, which pulls in the FreeBSD strtoimax() definition,
which causes a multiply-defined symbol error.

--
``The lyf so short, the craft so long to lerne.'' - Chaucer
 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/




Re: getconf.c breaks --disable-nls

2022-10-04 Thread Chet Ramey

On 10/3/22 8:41 AM, ad...@adamw.org wrote:


Bash Version: 5.2
Patch Level: 0
Release Status: release

Description:
   examples/loadables/getconf.c includes libintl.h directly, which breaks
--disable-nls when libintl is not installed in the build environment.


Thanks for the report.

--
``The lyf so short, the craft so long to lerne.'' - Chaucer
 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/