Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.
This repository was archived by the owner on Nov 15, 2023. It is now read-only.

Makefile searches for wrong oslrd plugin version - CentOS 7 #24

Open
@marchaase

Description

@marchaase
$ cat /etc/redhat-release
CentOS Linux release 7.7.1908 (Core)

Installing olsrd from source olsrd-0.9.0.3.tar.bz2 (http://www.olsr.org/mediawiki/index.php/Releases) on my system installs the binary and plugins to /usr/local instead of /usr

$ which olsrd
/usr/local/sbin/olsrd

the tutorial Makefile/rules.mk uses find to find the txtinfo plugin location, but it searches /usr/lib* so on my system it does not find it:

$ sudo find /usr/lib* -name "olsrd_txtinfo.so*" | wc -l
0

so on my system all of the routingN.conf plugin files have a bad stanza because the sed line replaces OLSRTXTINFO with an empty string. Making the routing config files look like:

LoadPlugin ""
{
PlParam "accept" "0.0.0.0"
}

Took a bit of debugging to figure out. Noticed olsrd wasn't running inside of the NEM containers and I had to manually run olsrd with debug mode to see a cryptic error:

$ sudo olsrd -f routing1.conf -d 2
...snip...
---------- LOADING LIBRARY  ----------
Checking plugin interface version: FAILED: "/usr/local/sbin/olsrd: undefined symbol: olsrd_plugin_interface_version"
---------- LIBRARY  FAILED ----------

This was indicative of olsrd trying to load the "" plugin and not being able to grab it's plugin interface version.

I was unable to figure out with the olsrd Makefile how to get it to install to a different location. I normally would use a ./configure script to change the prefix, but I couldn't see any easy way in olsrd's Makefile.

if I change the Makefile to remove the /lib* I can find it:

$ find /usr -name "olsrd_txtinfo.so*" | wc -l
1

My current solution was to modify the rules.mk to find the correct location of the txtinfo plugin:

diff --git a/rules.mk b/rules.mk
index 7ba97f9..4020d67 100644
--- a/rules.mk
+++ b/rules.mk
@@ -52,7 +52,7 @@ edit= sed -e 's|@NEMID[@]|$*|g' \
           -e 's|@NEMXML[@]|$(NEM_XML)|g ' \
           -e 's|@TOPDIR[@]|$(shell dirname $$(pwd))|g' \
           -e 's|@OLSRTXTINFO[@]|$(shell basename \
-                 $$(find /usr/lib* -name "olsrd_txtinfo.so*" -print 2> /dev/null))|g' \
+                 $$(find /usr -name "olsrd_txtinfo.so*" -print 2> /dev/null))|g' \
           -e 's|@NODECOUNT[@]|$(shell if [ -n "$(NODE_COUNT)" ]; \
                                       then \
                                         echo $(NODE_COUNT); \

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions