Skip to content
New issue

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

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

Already on GitHub? # to your account

Installation failure with bake #104

Open
ytxing opened this issue Mar 18, 2020 · 8 comments
Open

Installation failure with bake #104

ytxing opened this issue Mar 18, 2020 · 8 comments

Comments

@ytxing
Copy link

ytxing commented Mar 18, 2020

  • ns3 version : 3-dev Mar 18th
  • DCE version : dce-1.10
  • Operating system/version (lsb_release -a): ubuntu 16.04
  • Libc version (ldd -v): 2.23
  • compiler version : 5.4.0

Description of the problem

I am trying to install ns-3-dce with the guidance of the manual. Successfully run
bake.py configure -e dce-ns3-dev
bake.py check
bake.py show
bake.py download
but error happened when running
bake.py build -vvv.
Got the out put like this

>> Building net-next-nuse-4.4.0 - 
 mkdir /root/bake/source/net-next-nuse-4.4.0 dir=/root/bake/source/net-next-nuse-4.4.0
mkdir: cannot create directory ‘/root/bake/source/net-next-nuse-4.4.0’: File exists
 make defconfig ARCH=lib dir=/root/bake/source/net-next-nuse-4.4.0
make[1]: Nothing to be done for '.config'.
  HOSTCC  scripts/kconfig/conf.o
  HOSTCC  scripts/kconfig/zconf.tab.o
  HOSTLD  scripts/kconfig/conf
scripts/kconfig/conf  --defconfig arch/lib/Kconfig
#
# configuration written to .config
#
 make library ARCH=lib dir=/root/bake/source/net-next-nuse-4.4.0
  OBJS-MK   arch/lib/objs.mk
make[2]: Nothing to be done for '.config'.
scripts/kconfig/conf  --silentoldconfig arch/lib/Kconfig
  CHK     include/config/kernel.release
  CHK     include/generated/utsrelease.h
  CHK     include/generated/uapi/linux/version.h
  CHK     include/generated/compile.h
  CHK     include/generated/timeconst.h
  LIB     liblinux-4.4.0.so
  CC       rump/lib/librumpuser/rumpuser_sp.o
In file included from rump/lib/librumpuser/rumpuser_port.h:70:0,
                 from rump/lib/librumpuser/rumpuser_sp.c:37:
./rump/sys/sys/cdefs.h:58:27: fatal error: machine/cdefs.h: No such file or directory
compilation terminated.
Makefile.rump:79: recipe for target 'rump/lib/librumpuser/rumpuser_sp.o' failed
make[2]: *** [rump/lib/librumpuser/rumpuser_sp.o] Error 1
Makefile:88: recipe for target 'librumpserver.so' failed
make[1]: *** [librumpserver.so] Error 2
arch/lib/Makefile:204: recipe for target 'arch/lib/tools' failed
make: *** [arch/lib/tools] Error 2
()
 >> Building net-next-nuse-4.4.0 - Problem

Then I try to do make defconfig OPT=yes ARCH=sim and make library OPT=yes ARCH=sim in the net-next-nuse-4.4.0 directory, but only got

Makefile:524: arch/sim/Makefile: No such file or directory
make: *** No rule to make target 'arch/sim/Makefile'.  Stop.

ands

Makefile:606: arch/sim/Makefile: No such file or directory
make: *** No rule to make target 'arch/sim/Makefile'.  Stop.

I don't know why it goes like this and HELP PLZ.

@tomhenderson
Copy link
Collaborator

What architecture are you on (what is the result of 'uname -i')?

It seems to be a libc issue; perhaps make sure that both 'libc6-dev-i386' and 'libc6-dev-amd64' packages are installed, and try again?

@teto
Copy link
Member

teto commented Mar 21, 2020

I had the same issue while trying to package net-next-sim / libos.
nixos has a tool that indexes installed filenames (akin to apt-file but with their disposition once installed) and it seems on linux there is no machine/cdefs.h (or maybe on older libcs ?). Looks like a bsd file. liblinux.so is already built by the time I have this error: I wonder if/how we can disable building the rump thingy @thehajime ?

@rohitnitk
Copy link

Hello, It seems that even Ubuntu 16 is packed with new libraries and gcc (though may not be latest), because 3-4 months ago I was trying hard to install dce in Ubuntu 16, but go similar errors. Then I was able to install dce in Vmware Ubuntu 16, and it worked.

@ytxing
Copy link
Author

ytxing commented Mar 22, 2020

I had the same issue while trying to package net-next-sim / libos.
nixos has a tool that indexes installed filenames (akin to apt-file but with their disposition once installed) and it seems on linux there is no machine/cdefs.h (or maybe on older libcs ?). Looks like a bsd file. liblinux.so is already built by the time I have this error: I wonder if/how we can disable building the rump thingy @thehajime ?

Yep the file liblinux.so is already there. Is it usable?

@ytxing
Copy link
Author

ytxing commented Mar 22, 2020

What architecture are you on (what is the result of 'uname -i')?

It seems to be a libc issue; perhaps make sure that both 'libc6-dev-i386' and 'libc6-dev-amd64' packages are installed, and try again?

uname -r and I get
4.4.0-93-generic
x86_64 ( -i )
'libc6-dev-i386' is installed successfully but 'libc6-dev-amd64' is not. It seems like that amd64 is not avaliable for my machine.
Still get the same information as above.

@ytxing ytxing closed this as completed Mar 22, 2020
@ytxing ytxing reopened this Mar 22, 2020
@tomhenderson
Copy link
Collaborator

There are a few things I'd like to suggest based on reading your console output.

  1. It appears that you tried to configure dce-ns3-dev only, but your build is failing on net-next-nuse-4.4.0. The latter is not part of dce-ns3-dev, it is part of dce-linux-dev. If you have been reconfiguring, your bakefile.xml might be munged. I recommend that you delete these files and directories: build, source, and bakefile.xml, and start over.
  2. Check that you have the file it is complaining about: /usr/include/x86_64-linux-gnu/sys/cdefs.h
  3. Also, it looks like you are building as root (in /root); I don't know whether this will affect your environment paths as opposed to building as an unprivileged user. There is no need to build DCE as root; I suggest that you try as an unprivileged user.

I have successfully done this on my Ubuntu 16.04 machine this morning:

$ bake.py configure -e net-next-nuse-4.4.0
$ bake.py download
$ bake.py build

If I try with the dce-ns3-dev target, it will eventually fail to build ns-3-dce (due to a separate issue) but it will not fail as you describe above.

@ytxing
Copy link
Author

ytxing commented Mar 24, 2020

Hi! Thanks for advice!

I get another question here (or should I open an issue somewhere else):
There are several examples in the dce code such as dce-mptcp-lte-wifi.cc and I want to run them.
What am I supposed to do? Like should I use dce-linux-dev and change the edition of net-next-nuse because there is an mptcp-trunk-libos branch?

The wiki seems to help but I don't know how it can work with ns3-dce instead of being used alone.

Have a nice day.

@ytxing
Copy link
Author

ytxing commented Mar 28, 2020

Hi,

Actually I am trying to build DCE1.10+NS3.30+mptcp_trunk_libos.
When building mptcp_trunk_libos I got the same problem here:

  CC       rump/lib/librumpuser/rumpuser_sp.o
In file included from rump/lib/librumpuser/rumpuser_port.h:70:0,
                 from rump/lib/librumpuser/rumpuser_sp.c:37:
./rump/sys/sys/cdefs.h:58:27: fatal error: machine/cdefs.h: No such file or directory
compilation terminated.
Makefile.rump:79: recipe for target 'rump/lib/librumpuser/rumpuser_sp.o' failed
make[2]: *** [rump/lib/librumpuser/rumpuser_sp.o] Error 1
Makefile:88: recipe for target 'librumpserver.so' failed
make[1]: *** [librumpserver.so] Error 2
arch/lib/Makefile:193: recipe for target 'arch/lib/tools' failed
make: *** [arch/lib/tools] Error 2

libc6-dev-i386 and libc are installed but machine/cdefs.h is nowhere to find.

./home/ytxing/mptcp_libos/arch/lib/tools/rump/sys/arch/evbmips/include/cdefs.h
./home/ytxing/mptcp_libos/arch/lib/tools/rump/sys/arch/evbarm/include/cdefs.h
./home/ytxing/mptcp_libos/arch/lib/tools/rump/sys/arch/evbarm64/include/cdefs.h
./home/ytxing/mptcp_libos/arch/lib/tools/rump/sys/arch/powerpc/include/cdefs.h
./home/ytxing/mptcp_libos/arch/lib/tools/rump/sys/arch/sparc/include/cdefs.h
./home/ytxing/mptcp_libos/arch/lib/tools/rump/sys/arch/evbppc/include/cdefs.h
./home/ytxing/mptcp_libos/arch/lib/tools/rump/sys/arch/amd64/include/cdefs.h
./home/ytxing/mptcp_libos/arch/lib/tools/rump/sys/arch/sparc64/include/cdefs.h
./home/ytxing/mptcp_libos/arch/lib/tools/rump/sys/arch/i386/include/cdefs.h
./home/ytxing/mptcp_libos/arch/lib/tools/rump/sys/arch/arm/include/cdefs.h
./home/ytxing/mptcp_libos/arch/lib/tools/rump/sys/arch/mips/include/cdefs.h
./home/ytxing/mptcp_libos/arch/lib/tools/rump/sys/arch/aarch64/include/cdefs.h
./home/ytxing/mptcp_libos/arch/lib/tools/rump/sys/sys/cdefs.h
./usr/include/sys/cdefs.h
./usr/include/x86_64-linux-gnu/sys/cdefs.h

Here are all the cdefs.h in my ubuntu 16.04 but none of them seems to be right.
Is there any chance I can build this? Maybe a suggested lower version ubuntu system?
Again, HELP PLZ :0

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

No branches or pull requests

4 participants