Bug#1067651: mapserver fails to build on armhf in Ubuntu due to implicit declaration of strlcpy

Vladimir Petko vpa1977 at gmail.com
Mon Mar 25 05:31:00 GMT 2024


Hi,

The CMake checks if the function is present in the runtime library
(whether strlcpy() compiles), but the declaration in string.h itself
is guarded by __USE_MISC define.
On armhf in Ubuntu toolchain has -Werror=implicit-function-declaration
flag that causes the build failure.

Best Regards,
 Vladimir.

On Mon, 25 Mar 2024 at 18:27, Sebastiaan Couwenberg <sebastic at xs4all.nl> wrote:
>
> Control: tags -1 upstream moreinfo
>
> On 3/25/24 3:39 AM, Vladimir Petko wrote:
> > In Ubuntu, the attached patch was applied to achieve the following:
> >    * d/rules: define -D_BSD_SOURCE to ensure that strlcpy/strlcat functions
> >      are declared (LP: #2058864).
>
> That seems wrong.
>
> CMakeLists.txt checks for the existence of the function and uses its own
> implementation from mapstring.cpp if not found:
>
>   check_function_exists("strlcat"  HAVE_STRLCAT)
>   check_function_exists("strlcpy"  HAVE_STRLCPY)
>
> The functions are detected as shown in the buildlog:
>
>   -- Looking for strlcat
>   -- Looking for strlcat - found
>   -- Looking for strlcpy
>   -- Looking for strlcpy - found
>
> Why does this only happen on armhf?
>
> Kind Regards,
>
> Bas
>
> --
>   GPG Key ID: 4096R/6750F10AE88D4AF1
> Fingerprint: 8182 DE41 7056 408D 6146  50D1 6750 F10A E88D 4AF1
>



More information about the Pkg-grass-devel mailing list