Mailing List Archive

Linux, configure.ac: automake 1.16, AC_SYS_LARGEFILE
Hello.

It about two different problems but in one file.

1. automake 1.16

ClamAV isn't built if autoreconf was used. AC_CONFIG_AUX_DIR([config])
should be placed after AC_INIT before all other.

2. AC_SYS_LARGEFILE.

It is needed for i586. What do you think about to add it globally?
There's the one problem: glibc version check is needed.

For example glibc 2.17 contains (in include/fts.h):

#ifdef __USE_FILE_OFFSET64
# error "<fts.h> cannot be used with -D_FILE_OFFSET_BITS==64"
#endif

I don't know when it was removed but glibc 2.23 isn't contains it
and AC_SYS_LARGEFILE works.

--
Regards,
Sergey
_______________________________________________

clamav-devel mailing list
clamav-devel@lists.clamav.net
https://lists.clamav.net/mailman/listinfo/clamav-devel

Please submit your patches to our Bugzilla: http://bugzilla.clamav.net

Help us build a comprehensive ClamAV guide:
https://github.com/vrtadmin/clamav-faq

http://www.clamav.net/contact.html#ml
Re: Linux, configure.ac: automake 1.16, AC_SYS_LARGEFILE [ In reply to ]
Hi Sergey,

Sorry for the delay in responding.

> 1. automake 1.16
>
> ClamAV isn't built if autoreconf was used. AC_CONFIG_AUX_DIR([config])
> should be placed after AC_INIT before all other.

Do you suggest this?

diff --git a/configure.ac b/configure.ac
index b333e3eb2..fbb62526c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -23,13 +23,13 @@ AC_PREREQ([2.59])
dnl For a release change [devel] to the real version [0.xy]
dnl also change VERSION below
AC_INIT([ClamAV], [0.102.0-devel], [https://bugzilla.clamav.net/], [clamav], [https://www.clamav.net/])
+AC_CONFIG_AUX_DIR([config])

dnl enable C++
AC_PROG_CXX()

AH_BOTTOM([#include "platform.h"])
dnl put configure auxiliary into config
-AC_CONFIG_AUX_DIR([config])
AC_CONFIG_HEADERS([clamav-config.h libclammspack/config.h:libclammspack/config.h.in])

dnl safety check, this used to be a parameter to AC_INIT

> 2. AC_SYS_LARGEFILE.
>
> It is needed for i586. What do you think about to add it globally?
> There's the one problem: glibc version check is needed.
>
> For example glibc 2.17 contains (in include/fts.h):
>
> #ifdef __USE_FILE_OFFSET64
> # error "<fts.h> cannot be used with -D_FILE_OFFSET_BITS==64"
> #endif
>
> I don't know when it was removed but glibc 2.23 isn't contains it
> and AC_SYS_LARGEFILE works.

I don't have any complaint about setting it AC_SYS_LARGEFILE globally, rather than just in the system-installed libmspack condition we have right now. You're quite right about requiring the glibc version check in configure.ac. From https://sourceware.org/glibc/wiki/Release, it appears that RHEL 6, RHEL 7 still use glibc 2.17 or older. Did you validate if glibc 2.18 allows AC_SYS_LARGEFILE?

-Micah


_______________________________________________

clamav-devel mailing list
clamav-devel@lists.clamav.net
https://lists.clamav.net/mailman/listinfo/clamav-devel

Please submit your patches to our Bugzilla: http://bugzilla.clamav.net

Help us build a comprehensive ClamAV guide:
https://github.com/vrtadmin/clamav-faq

http://www.clamav.net/contact.html#ml
Re: Linux, configure.ac: automake 1.16, AC_SYS_LARGEFILE [ In reply to ]
On Friday 26 April 2019, Micah Snyder (micasnyd) wrote:

> > 1. automake 1.16
> >
> > ClamAV isn't built if autoreconf was used. AC_CONFIG_AUX_DIR([config])
> > should be placed after AC_INIT before all other.
>
> Do you suggest this?
>
> diff --git a/configure.ac b/configure.ac
> index b333e3eb2..fbb62526c 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -23,13 +23,13 @@ AC_PREREQ([2.59])
> dnl For a release change [devel] to the real version [0.xy]
> dnl also change VERSION below
> AC_INIT([ClamAV], [0.102.0-devel], [https://bugzilla.clamav.net/], [clamav], [https://www.clamav.net/])
> +AC_CONFIG_AUX_DIR([config])
>
> dnl enable C++
> AC_PROG_CXX()
>
> AH_BOTTOM([#include "platform.h"])
> dnl put configure auxiliary into config
> -AC_CONFIG_AUX_DIR([config])
> AC_CONFIG_HEADERS([clamav-config.h libclammspack/config.h:libclammspack/config.h.in])
>
> dnl safety check, this used to be a parameter to AC_INIT

Yes. And with comment "dnl put configure auxiliary into config"

--
Regards,
Sergey
_______________________________________________

clamav-devel mailing list
clamav-devel@lists.clamav.net
https://lists.clamav.net/mailman/listinfo/clamav-devel

Please submit your patches to our Bugzilla: http://bugzilla.clamav.net

Help us build a comprehensive ClamAV guide:
https://github.com/vrtadmin/clamav-faq

http://www.clamav.net/contact.html#ml
Re: Linux, configure.ac: automake 1.16, AC_SYS_LARGEFILE [ In reply to ]
On Friday 26 April 2019, Micah Snyder (micasnyd) wrote:

>  Did you validate if glibc 2.18 allows AC_SYS_LARGEFILE?

I look to "glibc-2.18-11.fc20.src.rpm" now and I see what
2.18 isn't support FILE_OFFSET64 too.

--
Regards,
Sergey
_______________________________________________

clamav-devel mailing list
clamav-devel@lists.clamav.net
https://lists.clamav.net/mailman/listinfo/clamav-devel

Please submit your patches to our Bugzilla: http://bugzilla.clamav.net

Help us build a comprehensive ClamAV guide:
https://github.com/vrtadmin/clamav-faq

http://www.clamav.net/contact.html#ml
Re: Linux, configure.ac: automake 1.16, AC_SYS_LARGEFILE [ In reply to ]
Sergey,

I realize it's a bit of a delay since we talked about it, but we just merged the change you recommended:
https://github.com/Cisco-Talos/clamav-devel/commit/c72b1839a6b32827ba4fb18fd245f646b2c930e9

-Micah

?On 5/8/19, 11:37 AM, "clamav-devel on behalf of Sergey" <clamav-devel-bounces@lists.clamav.net on behalf of a_s_y@sama.ru> wrote:

On Friday 26 April 2019, Micah Snyder (micasnyd) wrote:

> > 1. automake 1.16
> >
> > ClamAV isn't built if autoreconf was used. AC_CONFIG_AUX_DIR([config])
> > should be placed after AC_INIT before all other.
>
> Do you suggest this?
>
> diff --git a/configure.ac b/configure.ac
> index b333e3eb2..fbb62526c 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -23,13 +23,13 @@ AC_PREREQ([2.59])
> dnl For a release change [devel] to the real version [0.xy]
> dnl also change VERSION below
> AC_INIT([ClamAV], [0.102.0-devel], [https://bugzilla.clamav.net/], [clamav], [https://www.clamav.net/])
> +AC_CONFIG_AUX_DIR([config])
>
> dnl enable C++
> AC_PROG_CXX()
>
> AH_BOTTOM([#include "platform.h"])
> dnl put configure auxiliary into config
> -AC_CONFIG_AUX_DIR([config])
> AC_CONFIG_HEADERS([clamav-config.h libclammspack/config.h:libclammspack/config.h.in])
>
> dnl safety check, this used to be a parameter to AC_INIT

Yes. And with comment "dnl put configure auxiliary into config"

--
Regards,
Sergey
_______________________________________________

clamav-devel mailing list
clamav-devel@lists.clamav.net
https://lists.clamav.net/mailman/listinfo/clamav-devel

Please submit your patches to our Bugzilla: http://bugzilla.clamav.net

Help us build a comprehensive ClamAV guide:
https://github.com/vrtadmin/clamav-faq

http://www.clamav.net/contact.html#ml


_______________________________________________

clamav-devel mailing list
clamav-devel@lists.clamav.net
https://lists.clamav.net/mailman/listinfo/clamav-devel

Please submit your patches to our Bugzilla: http://bugzilla.clamav.net

Help us build a comprehensive ClamAV guide:
https://github.com/vrtadmin/clamav-faq

http://www.clamav.net/contact.html#ml
Re: Linux, configure.ac: automake 1.16, AC_SYS_LARGEFILE [ In reply to ]
On Friday 26 April 2019, Micah Snyder (micasnyd) wrote:

> ?> I don't know when it was removed but glibc 2.23 isn't contains it
> ?> and AC_SYS_LARGEFILE works.
>
> I don't have any complaint about setting it AC_SYS_LARGEFILE globally,
> rather than just in the system-installed libmspack condition we have
> right now. ?You're quite right about requiring the glibc version check
> in configure.ac.

I found interesting example in configure.ac of elfutils
https://sourceware.org/elfutils/

dnl This test must come as early as possible after the compiler configuration
dnl tests, because the choice of the file model can (in principle) affect
dnl whether functions and headers are available, whether they work, etc.
AC_SYS_LARGEFILE

dnl Older glibc had a broken fts that didn't work with Large File Systems.
dnl We want the version that can handler LFS, but include workaround if we
dnl get a bad one. Add define to CFLAGS (not AC_DEFINE it) since we need to
dnl check it before including config.h (which might define _FILE_OFFSET_BITS).
AC_CACHE_CHECK([whether fts.h is bad when included (with LFS)], ac_cv_bad_fts,
[AC_COMPILE_IFELSE([AC_LANG_SOURCE([[#include <fts.h>]])],
ac_cv_bad_fts=no, ac_cv_bad_fts=yes)])
AS_IF([test "x$ac_cv_bad_fts" = "xyes"], [CFLAGS="$CFLAGS -DBAD_FTS=1"])

--
Regards, Sergey
_______________________________________________

clamav-devel mailing list
clamav-devel@lists.clamav.net
https://lists.clamav.net/mailman/listinfo/clamav-devel

Please submit your patches to our Github: https://github.com/Cisco-Talos/clamav-devel/pulls

Help us build a comprehensive ClamAV guide:
https://github.com/vrtadmin/clamav-faq

http://www.clamav.net/contact.html#ml