Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Module path is broken #308

Open
attozeta opened this issue Aug 20, 2015 · 3 comments
Open

Module path is broken #308

attozeta opened this issue Aug 20, 2015 · 3 comments
Labels

Comments

@attozeta
Copy link
Contributor

The executable (no GUI) can not find any modules. This regression is probably introduced via 776534b.

@attozeta
Copy link
Contributor Author

Fix is to revert 776534b, however there might be other related issues as we still get

ERROR    Do. Aug. 20 21:02:01 2015| Failed to set working directory to  /tmp/dynamind  does not exist

It is also possible to fix the issue by copying the required *.so's to $BUILD/output.

@christianurich
Copy link
Member

QString currentPath = QCoreApplication::applicationDirPath();
QString currentPath = QDir::currentPath();
Are you sure that this 2 functions return the same and it also works when its called dymaind is called from a random path (e.g. when installed)

The idea was that if compiled it returns the output path otherwise the lib folders, I didn't run into issues with the linux installations here.

@attozeta
Copy link
Contributor Author

No they are definitely not the same. However modules did not work otherwise, after a clean build (if executed from $build/output. Obviously it should work if we call dynamind from a random path, but IMHO this should also work if we did not install it.

I think a straight-forward way would be to just have a $DYNAMIND_MODULES env variable that can be used to include third-party modules. Built-In modules (i.e. modules that are in the tree, basic-modules/ *, dynavibe/ *, gdalmodules/ *) are just expected to be in $build/modules and can be savely loaded by determining the executable's path. If this is non-trivial we might wrap it via a script like the following and read out $DYNAMIND_HOME at runtime, something like

$!/bin/bash
export DYNAMIND_HOME=`dirname $0`
$DYNAMIND_HOME/dynamind $@

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants