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

run_dev_env: should support CMake Modules and pkg-config #2678

markus2330 opened this issue May 8, 2019 · 0 comments


None yet
1 participant
Copy link

commented May 8, 2019

Steps to Reproduce the Problem

cd ~build
. ~e/scripts/run_dev_env 
cd ~e/examples/codegen/econf/pkgconfig

Expected Result

That it compiles because run_dev_env should use Elektra from the build directory and not the installed Elektra.

Actual Result

The installed Elektra is used:

kdb gen -F ni=../spec.ini elektra spec/sw/example/econf/#0/current genelektra
gcc ../src/application.c genelektra.c -std=c99 `pkg-config --cflags --libs elektra-codegen` -I. -o application -Wl,-rpath `pkg-config --variable=libdir elektra-codegen`
Package elektra-codegen was not found in the pkg-config search path.
Perhaps you should add the directory containing `elektra-codegen.pc'
to the PKG_CONFIG_PATH environment variable
Package 'elektra-codegen', required by 'world', not found
In file included from ../src/application.c:9:0:
./genelektra.h:20:21: fatal error: elektra.h: file not found
 #include <elektra.h>
compilation terminated.
In file included from genelektra.c:13:0:
genelektra.h:20:21: fatal error: elektra.h: file not found
 #include <elektra.h>
compilation terminated.
Makefile:4: „application“ failed
make: *** [application] error 1

System Information

  • Elektra Version: master

Implementation Hint

It might be enough to set PKG_CONFIG_PATH and CMAKE_MODULE_PATH to some folder in the build directory (and maybe also source dir).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.