I'm trying to install a program on Mac terminal, but I've been stuck on this step: "cmake -DCMAKE_BUILD_TYPE=Release .. && make"
This is the error I initially got:
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
GMP_LIBRARY
linked by target "ipknot" in directory /Users/samuellee/Downloads/ipknot-master
LTDL_LIBRARY
linked by target "ipknot" in directory /Users/samuellee/Downloads/ipknot-master
MPFR_LIBRARY
linked by target "ipknot" in directory /Users/samuellee/Downloads/ipknot-master
CMake Warning at CMakeLists.txt:77 (target_link_libraries):
Target "ipknot" requests linking to directory "/usr/local/lib". Targets
may link only to libraries. CMake is dropping the item.
CMake Warning at CMakeLists.txt:77 (target_link_libraries):
Target "ipknot" requests linking to directory
"/Library/gurobi1001/macos_universal01/macos_universal2/lib". Targets may link only to
libraries. CMake is dropping the item.
CMake Warning at CMakeLists.txt:77 (target_link_libraries):
Target "ipknot" requests linking to directory
"/Library/gurobi1001/macos_universal2/lib". Targets may link only to
libraries. CMake is dropping the item.
I found GMP_LIBRARY and MPFR_LIBRARY but I can't find LTDL_LIBRARY anywhere on my laptop nor on the internet. Any help?
P.S. I tried finding it in /usr but nothing came up. I also tried installing libtool (even though my friend said that it should already be installed by default). Nothing came up.
Related
I am trying to build an iOS app that is exposed to a fairly extensive Rust project, but I am having issues with one of the dependencies in the project. The Rust project has a ZMQ dependency, and while I am able to build the project on my Mac, when I try to incorporate the Rust project I get the following error:
error: failed to run custom build command for `zmq-sys v0.8.3`
Caused by:
process didn't exit successfully: `/Users/lisa/company/project/project_detail/target/debug/build/zmq-sys-16dfc88dff84d855/build-script-build` (exit status: 101)
--- stdout
cargo:rerun-if-env-changed=LIBZMQ_NO_PKG_CONFIG
cargo:rerun-if-env-changed=PKG_CONFIG_ALLOW_CROSS_aarch64-apple-ios
cargo:rerun-if-env-changed=PKG_CONFIG_ALLOW_CROSS_aarch64_apple_ios
cargo:rerun-if-env-changed=TARGET_PKG_CONFIG_ALLOW_CROSS
cargo:rerun-if-env-changed=PKG_CONFIG_ALLOW_CROSS
cargo:rerun-if-env-changed=PKG_CONFIG_aarch64-apple-ios
cargo:rerun-if-env-changed=PKG_CONFIG_aarch64_apple_ios
cargo:rerun-if-env-changed=TARGET_PKG_CONFIG
cargo:rerun-if-env-changed=PKG_CONFIG
cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_aarch64-apple-ios
cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_aarch64_apple_ios
cargo:rerun-if-env-changed=TARGET_PKG_CONFIG_SYSROOT_DIR
cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR
--- stderr
thread 'main' panicked at 'Unable to locate libzmq:
pkg-config has not been configured to support cross-compilation.
Install a sysroot for the target platform and configure it via
PKG_CONFIG_SYSROOT_DIR and PKG_CONFIG_PATH, or install a
cross-compiling wrapper for pkg-config and set it via
PKG_CONFIG environment variable.', /Users/lisa/.cargo/registry/src/github.com-1ecc6299db9ec823/zmq-sys-0.8.3/build.rs:31:17
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...
I am trying to build the appropriate library for the iOS and iOS simulator architectures without relying on pkg-config, but if someone can provide useful instructions for configuring pkg-config for cross-compilation, I am not opposed to it, I just don't know how and can't find any up to date resources.
I have cloned the libzmq project from this github: https://github.com/zeromq/libzmq.git, then navigate into libzmq.
Inside libzmq, I run ./autogen.sh followed by ./configure --prefix [directory location] --target "aarch64-apple-ios", then make and make install.
The above procedure without the --target flag is how I got the project to compile on my Mac in the first place, and with the target flag in place make and make install both complete successfully, but when I try to build the project using PROJECT_DIR="${PWD}/ProjectName" ./ProjectName/build-rust.sh,
I get the previously posted error.
I am following the Swift-Bridge Book (https://chinedufn.github.io/swift-bridge/building/xcode-and-cargo/index.html) to try to load the Rust libraries into Xcode.
One thing to note: In the libzmq git hub, there is a folder called builds/ios/ and inside this folder is what looks to be a build file for all of the iOS archs, but I haven't been able to get the repo to build with that file. I think figuring out how to use the build_ios.sh build file as opposed to the standard build.sh provided might be the answer, but I've tried dropping build_ios.sh where build.sh is, and ./autogen.sh doesn't work, because it complains that it can't find configure.ac, even though this file does exist.
I am trying to run Lightgbm with gpu on Spyder. For installing the library I tried many commands but most have failed.
I tried "pip install lightgbm --install-option=--gpu" in anaconda prompt and got the
error.
The I followed the https://github.com/Microsoft/LightGBM/blob/master/docs/Installation-Guide.rst#build-gpu-version
I installed git, vs 2022, cmake and opencl(Cuda Toolkit)
For boost binaries I copied the boost_1_78_0 file in "C:\Boost".
But the file doesn't contain any "lib64-msvc-14.0"(or similar folder). This is the first problem but it contain libs folder so I gave that path(Hope that's right).
But then I get this error:
CMake Warning:
No source or binary directory provided. Both will be assumed to be the
same as the current working directory, but note that this warning will
become a fatal error in future CMake releases.
"CMake Error: The source directory "C:/Users/User Name/LightGBM/build" does not appear to contain CMakeLists.txt"
Any help is appreciated. Thanks
I succesfully checked-out llvm (v12) project and built llvm+clang invoking:
cmake -DLLVM_ENABLE_PROJECTS="clang;clang-tools-extra" ../llvm
make check-all
After this operation empty clang-tools directory appeared. After calling make clang it remains empty. When I call make clang-tools it does nothing - there is a target with this name because there is no error info about missing target but the command doesn't do nor print anything. On the other hand, when I try make clang-tools-extra it complains that there is no such project despite the fact that I configured it with cmake. So I'm also unable to build clang-tools-extra.
What am I doing wrong?
update:
There is no CMakeFiles directory in llvm/clang/tools which is - I think - unexpected.
Find the list of targets in the output of ninja help or make help or xcodebuild -list or any other generator.
A project's external name can very well be different from the internal target name.
If you want to build everything, just set the install prefix:
cmake -DLLVM_ENABLE_PROJECTS="clang;clang-tools-extra" ../llvm -DCMAKE_INSTALL_PREFIX=../my_install
and run make install
It will do the right thing.
I am trying to install libqi for nao-ros and it gives me error: I already have gtest package but gtest_main is missing.
CMake Error at /home/shruti/d-prefix/share/cmake/qibuild/internal/uselib.cmake:80 (find_package): By not providing "FindGTEST_MAIN.cmake" in CMAKE_MODULE_PATH this project has asked CMake to find a package configuration file provided by "GTEST_MAIN", but CMake did not find one.
Could not find a package configuration file provided by "GTEST_MAIN" with any of the following names:
GTEST_MAINConfig.cmake
gtest_main-config.cmake
Add the installation prefix of "GTEST_MAIN" to CMAKE_PREFIX_PATH or set "GTEST_MAIN_DIR" to a directory containing one of the above files. If "GTEST_MAIN" provides a separate development package or SDK, be sure it has been installed.
Any one knows about it?
I had the same problem when trying to build libqi and fixed it by:
cd /usr/share/cmake-3.0/Modules
ln -s FindGTest.cmake FindGTEST_MAIN.cmake
When using the iOS.cmake toolchain (located here https://code.google.com/p/ios-cmake/) my build folders are changed from Debug and Release to Debug-iphoneos and Release-iphoneos.
This isn't an issue except when I try running the code below:
install(TARGETS ${PROJECT_NAME}
RUNTIME DESTINATION bin COMPONENT development
ARCHIVE DESTINATION lib COMPONENT development
LIBRARY DESTINATION ${MYPROJECT_LIB_SUBDIR} COMPONENT development NAMELINK_SKIP)
install(TARGETS ${PROJECT_NAME}
RUNTIME DESTINATION bin COMPONENT runtime
ARCHIVE DESTINATION lib COMPONENT source
LIBRARY DESTINATION ${MYPROJECT_LIB_SUBDIR} COMPONENT source NAMELINK_SKIP)
This code gives me the following errors:
-- Install configuration: "Release"
-- Install component: "development"
CMake Error at cmake_install.cmake:54 (FILE):
file INSTALL cannot find
"/Users/username/Documents/Projects/MyFramework/src/ios-build/MyProject/Release/libMyProject.a".
-- Install configuration: "Debug"
-- Install component: "development"
CMake Error at cmake_install.cmake:48 (FILE):
file INSTALL cannot find
"/Users/username/Documents/Projects/MyFramework/src/ios-build/MyProject/Debug/libMyProjectd.a".
For some reason the install(targets ...) function is looking for folders named Debug and Release instead of Debug-iphoneos and Release-iphoneos.
So I either need to make sure that install(targets ...) is looking in the correct folders for the archive or I need to prevent iOS.cmake from renaming the Debug and Release folders. Can anyone suggest anything for this?
Edit
Looks like this is an issue with CMake as identified here: http://public.kitware.com/Bug/view.php?id=9117
I tried updating to the latest version of CMake to see if this had been fixed and I'm still getting the same error. I see a patch attached to the bug report but I'm not sure how to apply it or what I can do to fix this issue.
Found a more specific report of this issue here: http://public.kitware.com/Bug/view.php?id=12506
There are a couple of workarounds on that site. However I used the code snippet below instead to create the Release and Debug folders in the same directory without appending the EFFECTIVE_PLATFORM_NAME to them.
if(${IOS})
set_target_properties(${PROJECT_NAME} PROPERTIES ARCHIVE_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}")
endif(${IOS})