diff --git a/README.md b/README.md index 410167e5..7bc8d0d0 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ We've provided two scripts to install required dependencies, and configure your From the `openNetVM` folder, run the following two commands: ```text -./scripts/install.sh +sudo ./scripts/install.sh ``` ```text diff --git a/examples/meson.build b/examples/meson.build index bcbe57f1..40e4e632 100644 --- a/examples/meson.build +++ b/examples/meson.build @@ -37,7 +37,7 @@ foreach example : onvm_examples name, sources, include_directories: includes, - dependencies: [onvm_dpdk_shared_dep, onvm_nflib_dep], + dependencies: [onvm_dpdk_dep, onvm_nflib_dep], install: true, install_tag: 'onvm', install_dir: onvm_output_dir + '/nf/' + example diff --git a/meson.build b/meson.build index 17ab89dc..e7aa1370 100644 --- a/meson.build +++ b/meson.build @@ -1,4 +1,5 @@ project('openNetVM', 'c') + add_global_arguments('-msse4', language : 'c') cc = meson.get_compiler('c') @@ -11,14 +12,13 @@ onvm_output_dir = meson.current_source_dir() + '/bin' onvm_mgr_app_name = 'onvm_mgr' # DPDK dependencies -onvm_dpdk = subproject('dpdk') -onvm_dpdk_dep = onvm_dpdk.get_variable('dpdk_static_lib_deps') -onvm_dpdk_shared_dep = onvm_dpdk.get_variable('dpdk_shared_lib_deps') +onvm_dpdk_dep = dependency('libdpdk') # ONVM dependencies onvm_nflib_dep = [] onvm_math_dep = cc.find_library('m') onvm_thread_dep = dependency('threads') +onvm_systemd_dep = cc.find_library('systemd') # Include directories to be used when building components and examples onvm_includes = include_directories('onvm/', diff --git a/onvm/lib/meson.build b/onvm/lib/meson.build index 9dcea39a..f09d96b3 100644 --- a/onvm/lib/meson.build +++ b/onvm/lib/meson.build @@ -7,8 +7,7 @@ libonvmhelper = library( sources, include_directories : libonvmhelper_includes, install: true, - install_tag: 'onvm', - install_dir: onvm_output_dir + '/lib' + install_tag: 'onvm' ) libonvmhelper_dep = declare_dependency( diff --git a/onvm/onvm_mgr/meson.build b/onvm/onvm_mgr/meson.build index 4d363b40..dd15464c 100644 --- a/onvm/onvm_mgr/meson.build +++ b/onvm/onvm_mgr/meson.build @@ -12,7 +12,7 @@ onvm_mgr_include = include_directories('.') executable(onvm_mgr_app_name, sources, include_directories: [onvm_mgr_include, onvm_includes], - dependencies: [onvm_dpdk_shared_dep, onvm_thread_dep, libonvm_dep, libonvmhelper_dep, onvm_math_dep], + dependencies: [onvm_dpdk_dep, onvm_thread_dep, libonvm_dep, libonvmhelper_dep, onvm_math_dep], install: true, install_tag: 'onvm', install_dir: onvm_output_dir, diff --git a/onvm/onvm_nflib/meson.build b/onvm/onvm_nflib/meson.build index ec6e7c38..e0154ac4 100644 --- a/onvm/onvm_nflib/meson.build +++ b/onvm/onvm_nflib/meson.build @@ -13,7 +13,7 @@ sources = files( libonvm_includes = include_directories('.') libonvm_deps = [ - onvm_dpdk_shared_dep, + onvm_dpdk_dep, onvm_thread_dep, libonvmhelper_dep ] @@ -23,9 +23,9 @@ libonvm = library( sources, include_directories : libonvm_includes, dependencies : libonvm_deps, + pic: true, install: true, - install_tag: 'onvm', - install_dir: onvm_output_dir + '/lib') + install_tag: 'onvm') libonvm_dep = declare_dependency( link_with: libonvm, diff --git a/scripts/install.sh b/scripts/install.sh index da1398bf..a55ab592 100755 --- a/scripts/install.sh +++ b/scripts/install.sh @@ -48,7 +48,8 @@ packages=("build-essential" \ "ninja-build" \ "pkg-config" \ "libnuma-dev" \ - "libpcap-dev") + "libpcap-dev" \ + "libsystemd-dev") install_packages=true pypackages=("meson" \ @@ -81,7 +82,7 @@ echo "- Installing required packages" if [ "$install_packages" = true ]; then echo " - installing: $required" sudo apt-get update - sudo apt-get install $required + sudo apt-get install $required -y else echo " - skipping due to --noinstall flag" fi @@ -110,4 +111,14 @@ pip3 install $pyrequired # Build the dpdk-kmods uio kernel module echo "- Building the dpdk-kmods uio kernel module" cd subprojects/dpdk-kmods/linux/igb_uio -make \ No newline at end of file +make +cd - + +# (5) +# Install dpdk +echo "- Installing dpdk" +cd subprojects/dpdk +meson build +ninja -C build +ninja -C build install +sudo ldconfig