I want to custom libdir to bindir. by default prefix is root. so sub-dir (bin, lib, include, share) will inside prefix. after i custom it. i got this error. like i wrong to use --libdir command. but it tells to put absolute path.
58P01: could not open directory "C:postgresql-14.uilin":
./configure --prefix="c:/postgresql/build" --libdir="c:/postgresql/build/bin"
make
make install
Related
I am building a flutter plugin which calls native functions from lib.dll file and everything works as expected in my computer.
But I use relative path to link that lib such as
E:/_Projects/mahesabu/client/packages/server/windows/lib.dll
Now I want to move the build process in CI/CD which I believe using relative path such as
./lib.dll would be very easy.
Of cource I am new to cmake configuration. And in one comment it is written
List of absolute paths to libraries that should be bundled with the plugin
I wonder how can I use relative path there, because if I try build fails. The following is CMakeLists.txt
cmake_minimum_required(VERSION 3.14)
set(PROJECT_NAME "server")
project(${PROJECT_NAME} LANGUAGES CXX)
# This value is used when generating builds using this plugin, so it must
# not be changed
set(PLUGIN_NAME "server_plugin")
add_library(${PLUGIN_NAME} SHARED
"server_plugin.cpp"
)
apply_standard_settings(${PLUGIN_NAME})
set_target_properties(${PLUGIN_NAME} PROPERTIES
CXX_VISIBILITY_PRESET hidden)
target_compile_definitions(${PLUGIN_NAME} PRIVATE FLUTTER_PLUGIN_IMPL)
target_include_directories(${PLUGIN_NAME} INTERFACE
"${CMAKE_CURRENT_SOURCE_DIR}/include")
target_link_libraries(${PLUGIN_NAME} PRIVATE flutter flutter_wrapper_plugin)
# List of absolute paths to libraries that should be bundled with the plugin
set(server_bundled_libraries
""
"E:/_Projects/mahesabu/client/packages/server/windows/lib.dll" #USE RELATIVE PATH HERE
PARENT_SCOPE
)
Any help will be appreciated.
Just use:
set(server_bundled_libraries "${CMAKE_CURRENT_SOURCE_DIR}/lib.dll" PARENT_SCOPE)
The CMAKE_CURRENT_SOURCE_DIR variable will expand to current source directory as tracked by add_subdirectory. This is usually, but not always, the directory in which the present CMakeLists.txt resides. Presumably, this is E:/_Projects/mahesabu/client/packages/server/windows on your computer (given your remark that you expect ./lib.dll to work), but will be somewhere else on CI or elsewhere.
In the bitbake manual (https://www.yoctoproject.org/docs/1.6/bitbake-user-manual/bitbake-user-manual.html) it says:
3.3.1. Locating Include and Class Files
BitBake uses the BBPATH variable to locate needed include and class files. The BBPATH variable is analogous to the environment variable PATH.
3.3.3. include Directive
BitBake understands the include directive. This directive causes BitBake to parse whatever file you specify, and to insert that file at that location. The directive is much like its equivalent in Make except that if the path specified on the include line is a relative path, BitBake locates the first file it can find within BBPATH.
As an example, suppose you needed a recipe to include some self-test definitions:
include test_defs.inc
However, I see many openembedded-core recipes that include files that seem to be relative to the file they are being included from rather than being in a directory in BBPATH, i.e.
Assume we have this directory structure:
mything.bb
mything.inc
include/mything.inc
And mything.bb contains:
require mything.inc
require include/mything2.inc
However, these files are not in the BBPATH. I run bitbake -e mything.bb and BBPATH clearly does not contain the directory containing mything.inc or include/mything2.inc.
So the question is, is it true that include/require directives first search for the file relative to the file the directive appears in? Then and the falls back to searching for it in the BBPATH? If so, is this feature just missing from the bitbake user manual documentation?
I'm trying to build my OwnCloud client. I'm using "Generic Build Instructions" from this link - https://doc.owncloud.org/desktop/2.5/building.html.
I'm stuck at 3 step with an error:
Could NOT find Qt5Keychain (missing: QTKEYCHAIN_LIBRARY)
I downloaded Qtkeychain and compiled it using this link - https://github.com/frankosterfeld/qtkeychain/wiki.
Everything is in my C disk. PATHS are set correctly. Can someone tell me what am missing here.
Adding PATH photo:
Adding a photo to be clear what am talking about:
How did you compile qtkeychain?
With the environment variable %QTDIR% set correctly, e.g. C:\Qt\Qt5.6.0\5.6\msvc2015, you should be able to compile qtkeychain
cmake -G "MinGW Makefiles" .
mingw32-make
and get a 32bit file named "libqt5keychain.dll.a".
You can then add the directory containing this file to your Windows path environment variable. This should work (it does for Nextcloud, at least).
I am trying to modify the install dir in qbs. I tried every possibility, which came in my mind.
I would like to install to the location of an env var...
but qbs always installs into a subdir in the dir where it was stated in (e.g. qtc_Desktop__0e446cd2-debug)
I tried combinations of:
qbs.install: true
qbs.installDir: project.defaultLibInstallDir
qbs.installPrefix: project.defaultLibInstallPrefix
qbs.installRoot: project.defaultInstallRoot
I really like qbs, but can't figure out how the install should be used correctly.
I would appreciate an example, how an install to different system paths work (e.g. /usr/local/bin and /usr/local/include)
Update:
DynamicLibrary {
name: "software"
files: ["src/*.cpp", "src/*.hpp"]
Depends { name: "cpp" }
Group {
fileTagsFilter: product.type
qbs.install: true
qbs.installDir: "lib"
qbs.installPrefix: "/home/userName/someDir"
}
}
The install properties in qbs are documented here:
I'll also give a few examples of each and how you might use it:
qbs.installDir: Relative to qbs.installPrefix. This might typically be something like "bin" or "lib" or "share" in your install Groups, depending on the content that Group is installing.
qbs.installPrefix: The prefix on the target system at which your tree is installed. This might be something like "/usr" or "/usr/local".
qbs.installRoot: This is an external property which is prepended to all installation paths in your project. You do not set it within your project, only on the qbs command line. It defaults to a temporary location within your build directory. For example, if you set qbs.installPrefix to "/usr" and actually want your file tree to get installed there, you'll set qbs.installRoot to "/". Otherwise, your entire installation tree gets rooted within the qbs.installRoot. For example, if you were using qbs to build a Debian or RPM package, you'd set qbs.installRoot to the location of the temporary root used by the build process.
First I have installed all the dependent packages including atk 2.18.
Then, I have added them to path.
# echo $LD_LIBRARY_PATH
/opt/gtk_+3.12-RHEL6/dependencies/at-spi2-atk/lib:/opt/gtk_+3.12-RHEL6/dependencies/gobject-introspection/lib:/opt/gtk_+3.12-RHEL6/dependencies/pango/lib:/opt/gtk_+3.12-RHEL6/dependencies/harfbuzz/lib:/opt/gtk_+3.12-RHEL6/dependencies/freetype/lib:/opt/gtk_+3.12-RHEL6/dependencies/icu4c/lib:/opt/gtk_+3.12-RHEL6/dependencies/cairo/lib:/opt/gtk_+3.12-RHEL6/dependencies/fontconfig/lib:/opt/gtk_+3.12-RHEL6/dependencies/libpng/lib:/opt/gtk_+3.12-RHEL6/dependencies/pixman/lib:/opt/gtk_+3.12-RHEL6/dependencies/atk/lib:/opt/gtk_+3.12-RHEL6/dependencies/gdk-pixbuf/lib:/opt/gtk_+3.12-RHEL6/dependencies/GLib/lib:
# echo $PATH
/opt/gtk_+3.12-RHEL6/dependencies/gobject-introspection/bin:/opt/gtk_+3.12-RHEL6/dependencies/pango/bin:/opt/gtk_+3.12-RHEL6/dependencies/harfbuzz/bin:/opt/gtk_+3.12-RHEL6/dependencies/freetype/bin:/opt/gtk_+3.12-RHEL6/dependencies/which/bin:/opt/gtk_+3.12-RHEL6/dependencies/icu4c/sbin:/opt/gtk_+3.12-RHEL6/dependencies/icu4c/bin:/opt/gtk_+3.12-RHEL6/dependencies/cairo/bin:/opt/gtk_+3.12-RHEL6/dependencies/fontconfig/bin:/opt/gtk_+3.12-RHEL6/dependencies/libpng/bin:/opt/gtk_+3.12-RHEL6/dependencies/gdk-pixbuf/bin:/opt/gtk_+3.12-RHEL6/dependencies/GLib/bin:/opt/python_2_7_11/bin:/usr/lib64/qt-3.3/bin:/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin
# echo $PKG_CONFIG_PATH
/opt/gtk_+3.12-RHEL6/dependencies/at-spi2-atk/lib/pkgconfig:/opt/gtk_+3.12-RHEL6/dependencies/gobject-introspection/lib/pkgconfig:/opt/gtk_+3.12-RHEL6/dependencies/pango/lib/pkgconfig:/opt/gtk_+3.12-RHEL6/dependencies/harfbuzz/lib/pkgconfig:/opt/gtk_+3.12-RHEL6/dependencies/freetype/lib/pkgconfig:/opt/gtk_+3.12-RHEL6/dependencies/icu4c/lib/pkgconfig:/opt/gtk_+3.12-RHEL6/dependencies/cairo/lib/pkgconfig:/opt/gtk_+3.12-RHEL6/dependencies/fontconfig/lib/pkgconfig:/opt/gtk_+3.12-RHEL6/dependencies/libpng/lib/pkgconfig:/opt/gtk_+3.12-RHEL6/dependencies/pixman/lib/pkgconfig:/opt/gtk_+3.12-RHEL6/dependencies/atk/lib/pkgconfig:/opt/gtk_+3.12-RHEL6/dependencies/gdk-pixbuf/lib/pkgconfig:/opt/gtk_+3.12-RHEL6/dependencies/GLib/lib/pkgconfig:/opt/gtk_+3.12-RHEL6/dependencies
But, when I try to run ./configure, I am getting the following error:
checking for ATK... no
configure: error: Package requirements (atk atk-bridge-2.0) were not met:
No package 'atk-bridge-2.0' found
Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.
Alternatively, you may set the environment variables ATK_CFLAGS
and ATK_LIBS to avoid the need to call pkg-config.
atk 2.18 is cleary added in the PKG_CONFIG_PATH and also LD_LIBRARY_PATH.
So, I though atk-bridge-2.0 is separate and found the packag: at-spi2-atk and at-spi2-core. But, no atk-bridge-2.0 is installed.
Please help.
The atk-bridge-2.0 API is provided by at-spi2-atk, not by ATK.
Your build environment is fairly broken, and it seems you're installing each component into its own prefix. You shouldn't. Create a temporary build root, and add that to $PATH, $PKG_CONFIG_PATH, $LD_LIBRARY_PATH, and $XDG_DATA_DIRS. Then, use the same prefix for every component.
You should look at how jhbuild works.