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

Compiling from source fails with Makefile:716: %reldir%/dlt_en10mb/Makefile.am: No such file or directory #553

Closed
olignyf opened this issue Mar 22, 2019 · 10 comments
Assignees
Labels

Comments

@olignyf
Copy link

olignyf commented Mar 22, 2019

When I do this on CentOS 7

sudo yum install libpcap-devel autogen
git clone https://github.com/appneta/tcpreplay.git
cd tcpreplay
./autogen.sh
# I get this warning:
# src/tcpedit/Makefile.am:8: warning: compiling '%reldir%/dlt_plugins.c' in subdir requires 'AM_PROG_CC_C_O' in 'configure.ac'
./configure
make

It ends with this error

make[3]: Entering directory `/home/frank/tcpreplay/src/tcpedit'
Makefile:716: %reldir%/dlt_en10mb/Makefile.am: No such file or directory
Makefile:717: %reldir%/dlt_hdlc/Makefile.am: No such file or directory
Makefile:718: %reldir%/dlt_user/Makefile.am: No such file or directory
Makefile:719: %reldir%/dlt_raw/Makefile.am: No such file or directory
Makefile:720: %reldir%/dlt_null/Makefile.am: No such file or directory
Makefile:721: %reldir%/dlt_loop/Makefile.am: No such file or directory
Makefile:722: %reldir%/dlt_linuxsll/Makefile.am: No such file or directory
Makefile:723: %reldir%/dlt_ieee80211/Makefile.am: No such file or directory
Makefile:724: %reldir%/dlt_radiotap/Makefile.am: No such file or directory
Makefile:725: %reldir%/dlt_jnpr_ether/Makefile.am: No such file or directory
Makefile:726: %reldir%/dlt_pppserial/Makefile.am: No such file or directory
make[3]: *** No rule to make target `%reldir%/dlt_pppserial/Makefile.am'.  Stop.
make[3]: Leaving directory `/home/frank/tcpreplay/src/tcpedit'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/frank/tcpreplay/src'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/home/frank/tcpreplay/src'
make: *** [all-recursive] Error 1
[frank@blackberry tcpreplay]$ 
@fklassen
Copy link
Member

You probably had a previous error which suggested that you did not have appropriate maintainer tools installed. Suggest downloading release and not run ./autogen.sh. Just run ./configure.

@olignyf
Copy link
Author

olignyf commented Mar 25, 2019

Thanks fklassen. What would be the maintainer tools you refer to?
In the meantime I will try a release like you suggested.

@fklassen
Copy link
Member

Look at the errors generated by ./autogen.sh and ./configure.

@GabrielGanne
Copy link
Contributor

Hi @olignyf ,

The AM_PROG_CC_C_O macro has been deprecated since automake 1.14 (released 6 years ago) .
However, centos7 packages automake 1.13.4.

The macro is a no-op on automake >= 1.14.
If you could test this and confirm this is the only missing thing, then I suggest adding it back to configure.ac for backward compatibility.

Best regards,

@soulbreak
Copy link

Hello,

I have the same issue. Just running ./configure did not help.
What is the solution ?

@GabrielGanne
Copy link
Contributor

Hi @soulbreak ,

I think that if you patch the root configure.ac file by adding AM_PROG_CC_C_O near AC_PROG_CC (or by replacing it) then you should be fine. However, I have not tested it.

In case it helps you, the commit that introduced this is 63a12ac
This is not a trivial commit, and you probably should not try to revert it even if just for your case, but it may help you understand the change.

Should this fix you issue, please consider sending back the patch you applied.
Otherwise, please describe to me your environment and I will try to reproduce your issue on my side.

Best regards,

@soulbreak
Copy link

I tried without success. Based on your commit I changed this line in configure.ac

152 AC_PROG_INSTALL
153 AC_PROG_LIBTOOL
154 AC_PROG_CC
155 AM_PROG_CC_C_O

156 AC_PROG_CC_STDC
157 AC_PROG_CXX
158 AC_PROG_CPP

Here the end of the configure output
configure.txt
I'm running on RH7.3 (Maipo).

@GabrielGanne
Copy link
Contributor

Hi,

I am guessing that you executed the following:

./autogen.sh  # src/tcpedit/Makefile.am:8: warning: compiling '%reldir%/dlt_plugins.c' in subdir requires 'AM_PROG_CC_C_O' in 'configure.ac'
$ ./configure
$ make
# patch configure.ac
$ make  # make[3]: *** No rule to make target `%reldir%/dlt_pppserial/Makefile.am'.  Stop.

After having patched the autogen.sh file, you need to run it again in order for you to get an updated configure script. Then to run the configure script again to regenerate the Makefile. Then, at last, build.
Doing so should allow you to move further.

If you find this whole autotool system cumbersome, but want to work with tcpreplay from the sources, you may want to download the source distribution (latest available here https://github.com/appneta/tcpreplay/releases/download/v4.3.1/tcpreplay-4.3.1.tar.xz). I have tested it to build on a centos 7.3 without trouble.

Best regards,

GabrielGanne added a commit to GabrielGanne/tcpreplay that referenced this issue Dec 12, 2019
@fklassen fklassen self-assigned this Feb 24, 2021
@fklassen fklassen added the bug label Feb 24, 2021
fklassen added a commit that referenced this issue Mar 14, 2021
Centos 7 uses automake version 1.13.4 wich is unable to generate
proper [include directives](https://www.gnu.org/software/automake/manual/html_node/Include.html).

To build on Cento 7 use [release version](https://github.com/appneta/tcpreplay/releases/latest).
fklassen added a commit that referenced this issue Mar 14, 2021
…pile

Bug #553 Centos 7 disable maintainer compile
@fklassen
Copy link
Member

Addressed issue in PR #643

Centos 7 uses automake version 1.13.4 wich is unable to generate
proper include directives.

To build on Cento 7 use release version.

@resolutedreamer
Copy link

Hello @fklassen I got the error message
require Automake 1.15, but have 1.13.4
Even when I tried to click on the link you provided and download that version on Centos 7.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants