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

Cannot install mahimahi on Ubuntu 20.04 #161

Open
xindong-usc opened this issue Apr 26, 2023 · 4 comments
Open

Cannot install mahimahi on Ubuntu 20.04 #161

xindong-usc opened this issue Apr 26, 2023 · 4 comments

Comments

@xindong-usc
Copy link

xindong-usc commented Apr 26, 2023

Install from link

lighthouse@VM-8-9-ubuntu:~/park/park/envs/congestion_control$ sudo add-apt-repository ppa:keithw/mahimahi
 Tools for network testing and emulation
 More info: https://launchpad.net/~keithw/+archive/ubuntu/mahimahi
Press [ENTER] to continue or Ctrl-c to cancel adding it.

Hit:1 http://mirrors.tencentyun.com/ubuntu focal InRelease
Hit:2 http://mirrors.tencentyun.com/ubuntu focal-security InRelease
Hit:3 http://mirrors.tencentyun.com/ubuntu focal-updates InRelease
Ign:4 http://ppa.launchpad.net/keithw/mahimahi/ubuntu focal InRelease
Err:5 http://ppa.launchpad.net/keithw/mahimahi/ubuntu focal Release
  404  Not Found [IP: 185.125.190.52 80]
Reading package lists... Done
E: The repository 'http://ppa.launchpad.net/keithw/mahimahi/ubuntu focal Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.

Building from source

lighthouse@VM-8-9-ubuntu:~/park/park/envs/congestion_control/mahimahi$ make
make  all-recursive
make[1]: Entering directory '/home/lighthouse/park/park/envs/congestion_control/mahimahi'
Making all in src
make[2]: Entering directory '/home/lighthouse/park/park/envs/congestion_control/mahimahi/src'
Making all in protobufs
make[3]: Entering directory '/home/lighthouse/park/park/envs/congestion_control/mahimahi/src/protobufs'
make  all-am
make[4]: Entering directory '/home/lighthouse/park/park/envs/congestion_control/mahimahi/src/protobufs'
make[4]: Nothing to be done for 'all-am'.
make[4]: Leaving directory '/home/lighthouse/park/park/envs/congestion_control/mahimahi/src/protobufs'
make[3]: Leaving directory '/home/lighthouse/park/park/envs/congestion_control/mahimahi/src/protobufs'
Making all in util
make[3]: Entering directory '/home/lighthouse/park/park/envs/congestion_control/mahimahi/src/util'
g++ -DHAVE_CONFIG_H -I. -I../..  -std=c++11 -pthread  -pedantic -Wall -Wextra -Weffc++ -Werror -g -O2 -MT netdevice.o -MD -MP -MF .deps/netdevice.Tpo -c -o netdevice.o netdevice.cc
In file included from /usr/include/string.h:495,
                 from /usr/include/c++/9/cstring:42,
                 from util.hh:7,
                 from netdevice.cc:15:
In function ‘char* strncpy(char*, const char*, size_t)’,
    inlined from ‘void interface_ioctl(FileDescriptor&, long unsigned int, const string&, std::function<void(ifreq&)>)’ at netdevice.cc:38:12:
/usr/include/x86_64-linux-gnu/bits/string_fortified.h:106:34: error: ‘char* __builtin_strncpy(char*, const char*, long unsigned int)’ specified bound 16 equals destination size [-Werror=stringop-truncation]
  106 |   return __builtin___strncpy_chk (__dest, __src, __len, __bos (__dest));
      |          ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1plus: all warnings being treated as errors
make[3]: *** [Makefile:452: netdevice.o] Error 1
make[3]: Leaving directory '/home/lighthouse/park/park/envs/congestion_control/mahimahi/src/util'
make[2]: *** [Makefile:378: all-recursive] Error 1
make[2]: Leaving directory '/home/lighthouse/park/park/envs/congestion_control/mahimahi/src'
make[1]: *** [Makefile:424: all-recursive] Error 1
make[1]: Leaving directory '/home/lighthouse/park/park/envs/congestion_control/mahimahi'
make: *** [Makefile:356: all] Error 2
@peppapan
Copy link

Similar problems are often caused by too high a compiler version. You can try to compile with a lower version of GCC.

@thomas-midek
Copy link

Alternatively, this can be "solved" by removing the -Werror flag from the configure.ac file

@Masshiro
Copy link

just run sudo apt-get install mahimahi, it will work.

@Masshiro
Copy link

just run sudo apt-get install mahimahi, it will work.

Or degrade the GCC version to 7.5.0

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

No branches or pull requests

4 participants