Partial fixes for shadow
parent
3f868f2cdf
commit
7d39f84ef3
|
@ -108,6 +108,9 @@ endif(WITH_SHELLHOOKS)
|
|||
|
||||
add_compile_options(${OPTIMIZE_FLAGS} ${CRYPTO_FLAGS})
|
||||
|
||||
# Always build PIC
|
||||
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
|
||||
|
||||
set(ABSEIL_DIR vendor/abseil-cpp)
|
||||
|
||||
add_subdirectory(vendor/gtest)
|
||||
|
@ -117,9 +120,6 @@ add_subdirectory(vendor/cxxopts)
|
|||
add_subdirectory(vendor/nlohmann)
|
||||
include_directories(SYSTEM vendor/cxxopts/include)
|
||||
|
||||
# Always build PIC
|
||||
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
|
||||
|
||||
if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
||||
add_compile_options(-Wno-unknown-warning-option)
|
||||
endif()
|
||||
|
|
9
Makefile
9
Makefile
|
@ -13,7 +13,8 @@ CXX ?= c++
|
|||
|
||||
BUILD_TYPE ?= Debug
|
||||
|
||||
PYTHON ?= python3
|
||||
PYTHON ?= python
|
||||
PYTHON3 ?= python3
|
||||
|
||||
SETCAP ?= which setcap && setcap cap_net_admin,cap_net_bind_service=+eip
|
||||
|
||||
|
@ -165,7 +166,7 @@ shadow-build: shadow-configure
|
|||
$(MAKE) -C $(BUILD_ROOT)
|
||||
|
||||
shadow-run: shadow-build
|
||||
$(PYTHON) $(REPO)/contrib/shadow/genconf.py $(SHADOW_CONFIG)
|
||||
$(PYTHON3) $(REPO)/contrib/shadow/genconf.py $(SHADOW_CONFIG)
|
||||
cp $(SHADOW_PLUGIN) $(REPO)/libshadow-plugin-lokinet.so
|
||||
$(SHADOW_BIN) $(SHADOW_OPTS) $(SHADOW_CONFIG) | $(SHADOW_PARSE)
|
||||
|
||||
|
@ -187,7 +188,7 @@ testnet-build: testnet-configure
|
|||
testnet:
|
||||
cp $(EXE) $(TESTNET_EXE)
|
||||
mkdir -p $(TESTNET_ROOT)
|
||||
$(PYTHON) $(REPO)/contrib/testnet/genconf.py --bin=$(TESTNET_EXE) --svc=$(TESTNET_SERVERS) --clients=$(TESTNET_CLIENTS) --dir=$(TESTNET_ROOT) --out $(TESTNET_CONF) --ifname=$(TESTNET_IFNAME) --baseport=$(TESTNET_BASEPORT) --ip=$(TESTNET_IP) --netid=$(TESTNET_NETID)
|
||||
$(PYTHON3) $(REPO)/contrib/testnet/genconf.py --bin=$(TESTNET_EXE) --svc=$(TESTNET_SERVERS) --clients=$(TESTNET_CLIENTS) --dir=$(TESTNET_ROOT) --out $(TESTNET_CONF) --ifname=$(TESTNET_IFNAME) --baseport=$(TESTNET_BASEPORT) --ip=$(TESTNET_IP) --netid=$(TESTNET_NETID)
|
||||
LLARP_DEBUG=$(TESTNET_DEBUG) supervisord -n -d $(TESTNET_ROOT) -l $(TESTNET_LOG) -c $(TESTNET_CONF)
|
||||
|
||||
$(TEST_EXE): debug
|
||||
|
@ -279,7 +280,7 @@ docker-kubernetes:
|
|||
docker build -f docker/loki-svc-kubernetes.Dockerfile .
|
||||
|
||||
install-pylokinet:
|
||||
cd $(REPO)/contrib/py/pylokinet && $(PYTHON) setup.py install
|
||||
cd $(REPO)/contrib/py/pylokinet && $(PYTHON3) setup.py install
|
||||
|
||||
kubernetes-install: install install-pylokinet
|
||||
|
||||
|
|
|
@ -14,5 +14,5 @@ include_directories(${CMAKE_MODULE_PATH})
|
|||
include(ShadowTools)
|
||||
add_compile_options(-fno-inline -fno-strict-aliasing )
|
||||
add_definitions(-DTESTNET=1)
|
||||
add_definitions(-DSHADOW_TESTNET)
|
||||
add_definitions(-DLOKINET_SHADOW)
|
||||
include_directories(${SHADOW_ROOT}/include)
|
||||
|
|
|
@ -13,7 +13,7 @@ def getSetting(s, name, fallback): return name in s and s[name] or fallback
|
|||
shadowRoot = getSetting(os.environ, "SHADOW_ROOT",
|
||||
os.path.join(os.environ['HOME'], '.shadow'))
|
||||
|
||||
libpath = 'libshadow-plugin-lokinet-shared.so'
|
||||
libpath = 'libshadow-plugin-lokinet.so'
|
||||
|
||||
|
||||
def nodeconf(conf, baseDir, name, ifname=None, port=None):
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#ifdef SHADOW_TESTNET
|
||||
#ifdef LOKINET_SHADOW
|
||||
#include <llarp.h>
|
||||
|
||||
/** insert shadow test network specific code here */
|
||||
|
|
|
@ -184,7 +184,11 @@ int GetCPU() {
|
|||
// global constructors.
|
||||
static class VDSOInitHelper {
|
||||
public:
|
||||
VDSOInitHelper() { VDSOSupport::Init(); }
|
||||
VDSOInitHelper() {
|
||||
#ifndef LOKINET_SHADOW
|
||||
VDSOSupport::Init();
|
||||
#endif
|
||||
}
|
||||
} vdso_init_helper;
|
||||
|
||||
} // namespace debugging_internal
|
||||
|
|
Loading…
Reference in New Issue