[Freemint-list] Bug in Vincent's bash 4.3.27

Vincent Rivière vincent.riviere at freesbee.fr
Thu Jun 15 12:53:25 MSD 2017


On 15/06/2017 at 01:58, Miro Kropáček wrote:
> I've been doing some experiments with clean setup and to my surprise,
> compilation of m4-1.4.18 failed as early as I typed 'make' (on parsing
> rules in Makefile).

I wonder what is the real problem...
Typically similar issue can happen if the Makefile uses CR/LF instead of LF.

> Replacing /bin/sh with Vincent's bash -- failing again.

I also have a doubt regarding to that bash. In some setups (BIOS 
console?), when I type ^C to break, a bogus character appears. For sure, 
this didn't happen in older versions.

> Thanks to git it was rather easy to verify whether it's related to
> mintlib (it is not) so that leaves some ./configure assumption which
> went wrong in bash itself during cross compilation.

Note for readers: for sure cross-compilers are as good as native 
compilers. There is no doubt regarding to that. Resulting binaries 
should even be strictly identical.

But indeed, configure scripts are used to detect the right compilation 
options, and the right values can't always be guessed in a 
cross-compilation environment. This is why I often tweak the configure 
command lines when cross-compiling.

My older technique was to add variables on the configure command-line:
http://vincent.riviere.free.fr/soft/m68k-atari-mint/archives/mint/coreutils/coreutils-8.21-mint-20131205-bin-mint-howto.txt

configure ... ac_cv_func_malloc_0_nonnull=yes 
ac_cv_func_calloc_0_nonnull=yes

My newer technique is to pre-fill the config.cache file:
http://vincent.riviere.free.fr/soft/m68k-atari-mint/archives/mint/tar/tar-1.28-bin-mint-howto.txt

cat <<EOF >config.cache
gl_cv_struct_dirent_d_ino=yes
EOF

Anyway, both techniques are equally good.

Ideally, one should compile a package natively, compare the resulting 
config.cache with the cross-compiled one, and fix any difference by 
hardcoding variables when cross-compiling, as shown above.

Anyway, regarding to MiKRO's original issue, it is unclear if you say:
- your bash cross-compilation is good while my one is bad
- or bash cross-compilation is bad, while native compilation is good

Also, I always cross-compile MiNT binaries from Cygwin. In case there is 
something wrong in configure scripts, the resulting binaries may differ 
if they are built with i.e. Linux. The only way to be sure is to compare 
config.cache files.

But before concluding anything, the real problem must be investigated.

-- 
Vincent Rivière


More information about the Freemint-list mailing list