mirror of
https://git.rwth-aachen.de/acs/public/villas/node/
synced 2025-03-09 00:00:00 +01:00
opal: small fixes
This commit is contained in:
parent
bf8e74c23c
commit
c2fe89e385
3 changed files with 40 additions and 23 deletions
|
@ -20,10 +20,12 @@
|
|||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
###################################################################################
|
||||
|
||||
set(OPAL_PREFIX /usr/opalrt/common)
|
||||
|
||||
find_path(OPAL_INCLUDE_DIR
|
||||
NAMES AsyncApi.h
|
||||
HINTS
|
||||
/usr/opalrt/common/include_target/
|
||||
${OPAL_PREFIX}/include_target/
|
||||
${PROJECT_SOURCE_DIR}/libopal/include/opal/
|
||||
|
||||
)
|
||||
|
@ -31,37 +33,37 @@ find_path(OPAL_INCLUDE_DIR
|
|||
find_library(OPAL_LIBRARY
|
||||
NAMES OpalAsyncApiCore
|
||||
HINTS
|
||||
/usr/opalrt/common/lib/
|
||||
${OPAL_PREFIX}/lib/
|
||||
${PROJECT_SOURCE_DIR}/libopal/
|
||||
)
|
||||
|
||||
find_library(OPAL_LIBRARY_IRC
|
||||
NAMES irc
|
||||
HINTS
|
||||
/usr/opalrt/common/lib/
|
||||
${OPAL_PREFIX}/lib/
|
||||
${PROJECT_SOURCE_DIR}/libopal/
|
||||
)
|
||||
|
||||
find_library(OPAL_LIBRARY_OPAL_UTILS
|
||||
find_library(OPAL_LIBRARY_UTILS
|
||||
NAMES OpalUtils
|
||||
HINTS
|
||||
/usr/opalrt/common/lib/redhawk/
|
||||
${OPAL_PREFIX}/lib/redhawk/
|
||||
${OPAL_PREFIX}/lib/redhawk64/
|
||||
${PROJECT_SOURCE_DIR}/libopal/
|
||||
)
|
||||
|
||||
find_library(OPAL_LIBRARY_OPAL_CORE
|
||||
find_library(OPAL_LIBRARY_CORE
|
||||
NAMES OpalCore
|
||||
HINTS
|
||||
/usr/opalrt/common/lib/redhawk/
|
||||
${OPAL_PREFIX}/lib/redhawk/
|
||||
${OPAL_PREFIX}/lib/redhawk64/
|
||||
${PROJECT_SOURCE_DIR}/libopal/
|
||||
)
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(Opal DEFAULT_MSG OPAL_LIBRARY OPAL_INCLUDE_DIR)
|
||||
find_package_handle_standard_args(Opal DEFAULT_MSG OPAL_LIBRARY OPAL_LIBRARY_UTILS OPAL_LIBRARY_CORE OPAL_LIBRARY_IRC OPAL_INCLUDE_DIR)
|
||||
|
||||
get_filename_component(OPAL_LIBRARY_DIR ${OPAL_LIBRARY} DIRECTORY)
|
||||
mark_as_advanced(OPAL_INCLUDE_DIR OPAL_LIBRARY)
|
||||
|
||||
mark_as_advanced(OPAL_INCLUDE_DIR OPAL_LIBRARY_DIR OPAL_LIBRARY)
|
||||
|
||||
set(OPAL_LIBRARIES ${OPAL_LIBRARY} ${OPAL_LIBRARY_OPALUTILS} ${OPAL_LIBRARY_OPALCORE} ${OPAL_LIBRARY_IRC} $ENV{OPAL_LIBPATH} $ENV{OPAL_LIBS})
|
||||
set(OPAL_LIBRARIES ${OPAL_LIBRARY} ${OPAL_LIBRARY_UTILS} ${OPAL_LIBRARY_CORE} ${OPAL_LIBRARY_IRC} $ENV{OPAL_LIBPATH} $ENV{OPAL_LIBS})
|
||||
set(OPAL_INCLUDE_DIRS ${OPAL_INCLUDE_DIR})
|
||||
|
|
|
@ -59,6 +59,9 @@ static pthread_mutex_t lock; /** Big Global Lock for libOpalAsync API */
|
|||
using namespace villas;
|
||||
using namespace villas::utils;
|
||||
|
||||
/** A bunch of symbols which are used by the libOpal libraries
|
||||
* and undefined by GCC. We replace them by GCC variants here.
|
||||
*/
|
||||
extern "C" {
|
||||
int __xstat(int ver, const char * path, struct stat * stat_buf)
|
||||
{
|
||||
|
@ -93,10 +96,18 @@ extern "C" {
|
|||
{
|
||||
return memcmp(s1, s2, n);
|
||||
}
|
||||
|
||||
void * _intel_fast_memmove(void *s1, const void *s2, size_t n)
|
||||
{
|
||||
return memmove(s1, s2, n);
|
||||
}
|
||||
}
|
||||
|
||||
int opal_register_region(int argc, char *argv[])
|
||||
{
|
||||
if (argc != 4)
|
||||
return -1;
|
||||
|
||||
asyncShmemName = argv[1];
|
||||
asyncShmemSize = atoi(argv[2]);
|
||||
printShmemName = argv[3];
|
||||
|
@ -108,10 +119,6 @@ int opal_type_start(villas::node::SuperNode *sn)
|
|||
{
|
||||
int err, noRecvIcons, noSendIcons;
|
||||
|
||||
/* @todo Port to C++
|
||||
if (sn->cli.argc != 4)
|
||||
return -1; */
|
||||
|
||||
pthread_mutex_init(&lock, nullptr);
|
||||
|
||||
/* Enable the OpalPrint function. This prints to the OpalDisplay. */
|
||||
|
|
|
@ -60,12 +60,18 @@ if ! pkg-config "jansson >= 2.7" && \
|
|||
fi
|
||||
|
||||
# Build & Install Lua
|
||||
if ! ( pkg-config "lua >= 5.1" || pkg-config "lua54" || pkg-config "lua53" || pkg-config "lua52" || pkg-config "lua51" ) && \
|
||||
[ -z "${SKIP_LUA}" ]; then
|
||||
if ! ( pkg-config "lua >= 5.1" || \
|
||||
pkg-config "lua54" || \
|
||||
pkg-config "lua53" || \
|
||||
pkg-config "lua52" || \
|
||||
pkg-config "lua51" || \
|
||||
[ -n "${RTLAB_ROOT}" -a -f "/usr/local/include/lua.h" ] \
|
||||
) && [ -z "${SKIP_LUA}" ]; then
|
||||
wget http://www.lua.org/ftp/lua-5.3.6.tar.gz -O - | tar -xz
|
||||
pushd lua-5.3.6
|
||||
if [ -z "${PACKAGE}" ]; then
|
||||
make ${MAKE_OPTS} MYCFLAGS=-fPIC linux install
|
||||
make ${MAKE_OPTS} MYCFLAGS=-fPIC linux
|
||||
make ${MAKE_OPTS} MYCFLAGS=-fPIC install
|
||||
fi
|
||||
popd
|
||||
fi
|
||||
|
@ -154,8 +160,9 @@ if ! pkg-config "rdkafka >= 1.5.0" && \
|
|||
fi
|
||||
|
||||
# Build & Install Graphviz
|
||||
if ! ( pkg-config "libcgraph >= 2.30" && pkg-config "libgvc >= 2.30" ) && \
|
||||
[ -z "${SKIP_RDKAFKA}" ]; then
|
||||
if ! ( pkg-config "libcgraph >= 2.30" && \
|
||||
pkg-config "libgvc >= 2.30" \
|
||||
) && [ -z "${SKIP_RDKAFKA}" ]; then
|
||||
git clone --branch 2.49.0 --depth 1 https://gitlab.com/graphviz/graphviz.git
|
||||
mkdir -p graphviz/build
|
||||
pushd graphviz/build
|
||||
|
@ -182,8 +189,9 @@ if ! pkg-config "libuldaq >= 1.2.0" && \
|
|||
fi
|
||||
|
||||
# Build & Install libnl3
|
||||
if ! pkg-config "libuldaq >= 3.2.25" && \
|
||||
[ -z "${SKIP_ULDAQ}" ]; then
|
||||
if ! ( pkg-config "libnl-3.0 >= 3.2.25" && \
|
||||
pkg-config "libnl-route-3.0 >= 3.2.25" \
|
||||
) && [ -z "${SKIP_ULDAQ}" ]; then
|
||||
git clone --branch libnl3_5_0 --depth 1 https://github.com/thom311/libnl
|
||||
pushd libnl
|
||||
autoreconf -i
|
||||
|
|
Loading…
Add table
Reference in a new issue