usnistgov / ndn-dpdk

NDN-DPDK: High-Speed Named Data Networking Forwarder
https://www.nist.gov/publications/ndn-dpdk-ndn-forwarding-100-gbps-commodity-hardware
Other
131 stars 26 forks source link

Install fail with "mk/update-list.sh dirname: miss operand" #65

Closed suitgo closed 2 years ago

suitgo commented 2 years ago

When compile with command make I got faild, the info is bellow:

~$ make NDNDPDK_MK_RELEASE=1
mk/update-list.sh
dirname: miss operand
Please try "dirname --help" get more information
make: *** [Makefile:12:csrc/meson.build] Error 123

And I checked that this was failed when run

git grep -l '^import "C"$' '**/*.go' | xargs dirname | sort -u | sed "s|.*|'\0'|" | paste -sd,

Is there any other tools I missed?

My git version is:

~$ git --version
git version 2.34.1

My system is Ubuntu 22.04 amd64

yoursunny commented 2 years ago

What's the output of this command?

git grep -l '^import "C"$' '**/*.go'
suitgo commented 2 years ago

Nothing will show with this command:

~$ git grep -l '^import "C"$' '**/*.go'

if only with '^import "C"$' will show one line:

~$ git grep -l '^import "C"$'
mk/cgoflags.sh

if only with '**/*.go' will show all the files:

~$ git grep -l '**/*.go'
.dockerignore
.github/workflows/build.yml
.gitignore
Dockerfile
LICENSE.md
Makefile
README.md
app/fetch/README.md
app/fetch/fetcher.go
app/fetch/fetchtest/fetcher_test.go
app/fetch/fetchtest/helper.go
app/fetch/fetchtest/logic_ctest.go
mk/cgoflags.sh
...
yoursunny commented 2 years ago

I cannot reproduce on a clean system.

$ docker run -it --rm ubuntu:jammy

root@aeafa78113b8:/# apt update && apt install git

root@aeafa78113b8:/# git clone https://github.com/usnistgov/ndn-dpdk.git

root@aeafa78113b8:/# cd ndn-dpdk/

root@aeafa78113b8:/ndn-dpdk# git grep -l '^import "C"$' '**/*.go'
app/fetch/fetcher.go
app/fetch/fetchtest/logic_ctest.go
app/fetch/fetchtest/tcpcubic_ctest.go
app/fetch/fetchtest/window_ctest.go
app/fetch/logic.go
app/fetch/task.go
app/fetch/worker.go
app/fileserver/worker.go

Maybe something is wrong with your git config or git clone?

Do you have an unusual filesystem? NFS, WSL, FAT32, NTFS, Vagrant shared folder, Rclone mount, etc.

suitgo commented 2 years ago

I have checked with Ubuntu and windows, they are the same. If my git configuration was not correctly configed, Is there any way without using the shell "update-list.sh" ?

yoursunny commented 2 years ago

I have checked with Ubuntu and windows

Does this mean the NDN-DPDK codebase checkout is on a Windows filesystem or in Windows Subsystem for Linux container?

suitgo commented 2 years ago

I have checked with Ubuntu and windows

Does this mean the NDN-DPDK codebase checkout is on a Windows filesystem or in Windows Subsystem for Linux container?

windows is physical machine. Linux is VM.

yoursunny commented 2 years ago

NDN-DPDK service will not work on Windows or WSL, even if you manage to compile it. You need to use a Linux machine, or at least a full virtual machine (VirtualBox, VMware, Hyper-V, etc; not WSL container).

NDN-DPDK codebase checkout needs to reside on a Linux filesystem that preserves Unix permission bits. It cannot be on Windows filesystem, NFS, VM shared folder, etc.

suitgo commented 2 years ago

NDN-DPDK service will not work on Windows or WSL, even if you manage to compile it. You need to use a Linux machine, or at least a full virtual machine (VirtualBox, VMware, Hyper-V, etc; not WSL container).

NDN-DPDK codebase checkout needs to reside on a Linux filesystem that preserves Unix permission bits. It cannot be on Windows filesystem, NFS, VM shared folder, etc.

Is there any way without using git to clone If I only download the code with zip ? My Linux is full virtual machine(VMware), but can nont connect with github, So I git clone the code in windows system and then copy to Linux.

yoursunny commented 2 years ago

My Linux is full virtual machine(VMware)

That should work, as long as the git repository is on Linux filesystem (such as ext4, xfs, btrfs).

can nont connect with github,

Why?

I git clone the code in windows system and then copy to Linux.

It will not work because checking out the codebase on a Windows filesystem means you have lost the Unix permission bits.

suitgo commented 2 years ago

can nont connect with github,

Why?

Our some machine has no right to connect the public net.

suitgo commented 2 years ago

Thanks a lot for helping. I have cloned with another Linux system and then copy to the target system. And I also suggest for supporting a way with offline system ex.

yoursunny commented 2 years ago

Our some machine has no right to connect the public net.

If you don't have Internet at all, you won't be able to build NDN-DPDK on this machine. Apart from the initial clone, the Go compiler needs to download Go modules, and PNPM needs to download Node.js packages.

To install NDN-DPDK on a target machine without Internet:

  1. On a server with Internet access, build a NDN-DPDK Docker image (see instructions in docs/Docker.md). If the CPU model differs, you need to set --arch flag to match the CPU model on the target machine.
  2. Run docker save to export the container image to a tarball, copy to the target machine, run docker load to import the tarball.
  3. You can then run NDN-DPDK Docker container on the target machine.