diff --git a/cmake/Go.cmake b/cmake/Go.cmake deleted file mode 100644 index f1c95de33..000000000 --- a/cmake/Go.cmake +++ /dev/null @@ -1,28 +0,0 @@ -if (CMAKE_HOST_SYSTEM_PROCESSOR STREQUAL "x86_64") - set(GO_DOWNLOAD_ARCH "amd64") - set(GO_DOWNLOAD_HASH "980e65a863377e69fd9b67df9d8395fd8e93858e7a24c9f55803421e453f4f99") -elseif(CMAKE_HOST_SYSTEM_PROCESSOR STREQUAL "aarch64") - set(GO_DOWNLOAD_ARCH "arm64") - set(GO_DOWNLOAD_HASH "57a9171682e297df1a5bd287be056ed0280195ad079af90af16dcad4f64710cb") -elseif(CMAKE_HOST_SYSTEM_PROCESSOR STREQUAL "armv7l") - set(GO_DOWNLOAD_ARCH "armv6l") - set(GO_DOWNLOAD_HASH "3287ca2fe6819fa87af95182d5942bf4fa565aff8f145812c6c70c0466ce25ae") -endif() - -FetchContent_Declare( - go - URL https://go.dev/dl/go1.17.8.linux-${GO_DOWNLOAD_ARCH}.tar.gz - URL_HASH SHA256=${GO_DOWNLOAD_HASH} -) - -message(STATUS "Downloading Go toolchain for linux/${GO_DOWNLOAD_ARCH}") -FetchContent_MakeAvailable(go) - -find_program(GO - NAMES go - NO_DEFAULT_PATH - PATHS - ${CMAKE_CURRENT_BINARY_DIR}/_deps/go-src/bin - ${go_SOURCE_DIR} -) - diff --git a/include/villas/nodes/go.h b/include/villas/nodes/go.h deleted file mode 100644 index d0dbc0544..000000000 --- a/include/villas/nodes/go.h +++ /dev/null @@ -1,20 +0,0 @@ -/** Node-type implemeted in Go language - * - * @file - * @author Steffen Vogel - * @copyright 2014-2022, Institute for Automation of Complex Power Systems, EONERC - * @license Apache 2.0 - *********************************************************************************/ - -#pragma once - -typedef void *_go_plugin; -typedef void *_go_plugin_list; -typedef void *_go_logger; - -typedef void (*_go_register_node_factory_cb)(_go_plugin_list pl, char *name, char *desc, int flags); -typedef void (*_go_logger_log_cb)(_go_logger l, int level, char *msg); - -_go_logger * _go_logger_get(char *name); - -void _go_logger_log(_go_logger *l, int level, char *msg); diff --git a/include/villas/nodes/go.hpp b/include/villas/nodes/go.hpp deleted file mode 100644 index a9d8e6195..000000000 --- a/include/villas/nodes/go.hpp +++ /dev/null @@ -1,127 +0,0 @@ -/** Node-type implemeted in Go language - * - * @file - * @author Steffen Vogel - * @copyright 2014-2022, Institute for Automation of Complex Power Systems, EONERC - * @license Apache 2.0 - *********************************************************************************/ - -#pragma once - -#include - -namespace villas { -namespace node { - -/* Forward declarations */ -struct Sample; -class Format; -class GoNodeFactory; - -class GoNode : public Node { - - friend GoNodeFactory; - -protected: - uintptr_t node; // runtime/cgo.Handle - - std::string _details; - - Format *formatter; - - virtual - int _read(struct Sample * smps[], unsigned cnt); - - virtual - int _write(struct Sample * smps[], unsigned cnt); - -public: - GoNode(uintptr_t n); - - virtual - ~GoNode(); - - virtual - int parse(json_t *json); - - virtual - std::vector getPollFDs(); - - virtual - std::vector getNetemFDs(); - - virtual - const std::string & getDetails(); - - virtual - int prepare(); - - virtual - int check(); - - virtual - int start(); - - virtual - int stop(); - - virtual - int pause(); - - virtual - int resume(); - - virtual - int restart(); - - virtual - int reverse(); -}; - -class GoNodeFactory : public NodeFactory { - -protected: - std::string name; - std::string description; - int flags; - -public: - GoNodeFactory(char *n, char *d, int f = 0) : - NodeFactory(), - name(n), - description(d), - flags(f) - { } - - virtual - Node * make(); - - virtual - std::string getName() const - { - return name; - } - - virtual - std::string getDescription() const - { - return description; - } - - virtual - int getFlags() const - { - return flags; - } -}; - -class GoPluginRegistry : public plugin::SubRegistry { - -public: - GoPluginRegistry(); - - plugin::List<> lookup(); -}; - -} /* namespace node */ -} /* namespace villas */ diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt index 7d4a28c5f..e9798795f 100644 --- a/lib/CMakeLists.txt +++ b/lib/CMakeLists.txt @@ -134,11 +134,6 @@ target_include_directories(villas PUBLIC ${INCLUDE_DIRS}) target_link_libraries(villas PUBLIC ${LIBRARIES}) target_link_libraries(villas PRIVATE -Wl,--whole-archive ${WHOLE_ARCHIVES} -Wl,--no-whole-archive) -# We need to link with -Bsymbolic in order to use link libvillas -# with Go code (Cgo) -# See also: https://stackoverflow.com/a/67299849 -# target_link_options(villas PUBLIC "-Wl,-Bsymbolic") - set_target_properties(villas PROPERTIES VERSION ${CMAKE_PROJECT_VERSION} SOVERSION 1