Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change the minimum version of automake to 1.13 and autoconf to 2.67 #870

Merged
merged 1 commit into from
Aug 9, 2019

Conversation

ygj6
Copy link
Member

@ygj6 ygj6 commented Aug 8, 2019

When I run make check via automake with a version of 1.12.6 or lower, I got this error:

/bin/sh: line 9: ./test_runner_epoll: No such file or directory
FAIL: test_runner_epoll
/bin/sh: line 9: ./test_runner_select: No such file or directory
FAIL: test_runner_select
/bin/sh: line 9: ./test_runner_kqueue: No such file or directory
FAIL: test_runner_kqueue
/bin/sh: line 9: ./test_runner_evport: No such file or directory
FAIL: test_runner_evport
/bin/sh: line 9: ./test_runner_devpoll: No such file or directory
FAIL: test_runner_devpoll
/bin/sh: line 9: ./test_runner_poll: No such file or directory
FAIL: test_runner_poll
/bin/sh: line 9: ./test_runner_win32: No such file or directory
FAIL: test_runner_win32
/bin/sh: line 9: ./test_runner_timerfd: No such file or directory
FAIL: test_runner_timerfd
/bin/sh: line 9: ./test_runner_changelist: No such file or directory
FAIL: test_runner_changelist
/bin/sh: line 9: ./test_runner_timerfd_changelist: No such file or directory
FAIL: test_runner_timerfd_changelist

Open the Makefile generated by command ./autogen.sh && ./configure
I can see the errors are caused by this line:

if $(TESTS_ENVIRONMENT) $${dir}$$tst $(AM_TESTS_FD_REDIRECT); then

$${dir}$$tst will expand to ./test_runner_epoll, but test_runner_epoll is only a target in test/include.am,
not a file, so it print:

/bin/sh: line 9: ./test_runner_epoll: No such file or directory.

It seems like a bug in automake 1.12.6.
The errors will disappear if I simply upgrade automake to 1.13, and upgrade autoconf to 2.65
(2.65 is the lowest version dependent by automake-1.13).

When I build with automake-1.13 and autoconf-2.66, I got another error:

configure.ac:667: error: AC_CHECK_SIZEOF: requires literal arguments

The code in configure.ac line 667 is :

AC_CHECK_SIZEOF(void *)

It is a bug in autoconf-2.66 :
http://gnu-autoconf.7623.n7.nabble.com/AC-CHECK-SIZEOF-int-is-error-in-autoconf-2-66-td13537.html

Finally, everything works fine when using automake-1.13 and autoconf-2.67.
Refs: #858

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.03%) to 81.502% when pulling 610e6f9 on ygj6:autoconf into f05ba67 on libevent:master.

Copy link

@Omega-Ariston Omega-Ariston left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

very observant 👍

When I run make check via automake with a version of 1.12.6 or lower, I got this error:

    /bin/sh: line 9: ./test_runner_epoll: No such file or directory
    FAIL: test_runner_epoll
    /bin/sh: line 9: ./test_runner_select: No such file or directory
    FAIL: test_runner_select
    /bin/sh: line 9: ./test_runner_kqueue: No such file or directory
    FAIL: test_runner_kqueue
    /bin/sh: line 9: ./test_runner_evport: No such file or directory
    FAIL: test_runner_evport
    /bin/sh: line 9: ./test_runner_devpoll: No such file or directory
    FAIL: test_runner_devpoll
    /bin/sh: line 9: ./test_runner_poll: No such file or directory
    FAIL: test_runner_poll
    /bin/sh: line 9: ./test_runner_win32: No such file or directory
    FAIL: test_runner_win32
    /bin/sh: line 9: ./test_runner_timerfd: No such file or directory
    FAIL: test_runner_timerfd
    /bin/sh: line 9: ./test_runner_changelist: No such file or directory
    FAIL: test_runner_changelist
    /bin/sh: line 9: ./test_runner_timerfd_changelist: No such file or directory
    FAIL: test_runner_timerfd_changelist

Open the Makefile generated by command ./autogen.sh && ./configure
I can see the errors are caused by this line:

    if $(TESTS_ENVIRONMENT) $${dir}$$tst $(AM_TESTS_FD_REDIRECT); then

$${dir}$$tst will expand to ./test_runner_epoll, but test_runner_epoll is only a target in test/include.am,
not a file, so it print:

    /bin/sh: line 9: ./test_runner_epoll: No such file or directory.

It seems like a bug in automake 1.12.6.
The errors will disappear if I simply upgrade automake to 1.13, and upgrade autoconf to 2.65
(2.65 is the lowest version dependent by automake-1.13).

When I build with automake-1.13 and autoconf-2.66, I got another error:

    configure.ac:667: error: AC_CHECK_SIZEOF: requires literal arguments

The code in configure.ac line 667 is :

    AC_CHECK_SIZEOF(void *)

It is a bug in autoconf-2.66 :
http://gnu-autoconf.7623.n7.nabble.com/AC-CHECK-SIZEOF-int-is-error-in-autoconf-2-66-td13537.html

Finally, everything works fine when using automake-1.13 and autoconf-2.67.
Refs: libevent#858
@azat azat merged commit 3f09e92 into libevent:master Aug 9, 2019
@azat
Copy link
Member

azat commented Aug 9, 2019

Applied, thanks again for all the details!

@ygj6
Copy link
Member Author

ygj6 commented Aug 30, 2019

Upgrading autoconf can lead to redundant code, such as unnecessary macro checks.
Also, some macros are not recommended because they are obsolete.
I'm not sure if it's necessary to fix them since the original code can be built smoothly.

I still write this patch : ygj6@b2d119d
I would be happy if someone needs it.

@azat
Copy link
Member

azat commented Sep 2, 2019 via email

azat pushed a commit that referenced this pull request Sep 2, 2019
- AC_PROG_SED
- AC_USE_SYSTEM_EXTENSIONS
- AC_TRY_COMPILE -> AC_COMPILE_IFELSE
- AC_TRY_RUN -> AC_RUN_IFELSE
...

Also use:
- AC_CONFIG_AUX_DIR

Refs: #870
Fixes: 3f09e92 ("Change the minimum version of automake to 1.13 and autoconf to 2.67")
azat pushed a commit to azat/libevent that referenced this pull request Jun 28, 2020
- AC_PROG_SED
- AC_USE_SYSTEM_EXTENSIONS
- AC_TRY_COMPILE -> AC_COMPILE_IFELSE
- AC_TRY_RUN -> AC_RUN_IFELSE
...

Also use:
- AC_CONFIG_AUX_DIR

Refs: libevent#870
Fixes: 3f09e92 ("Change the minimum version of automake to 1.13 and autoconf to 2.67")
(cherry picked from commit 13b8fc3)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

None yet

4 participants