i tried to install tiramisu compiler
and once trying install it's sub-modules ( (ISL, LLVM and Halide) by using this command
dina#dina-VBox:~/tiramisu$ ./utils/scripts/install_submodules.sh ./
i get the error
Done installing isl
#### Installing LLVM ####
cd .//3rdParty/llvm
.//utils/scripts/functions.sh: line 6: cd: .//3rdParty/llvm: No such file or directory
and to fix it i used the command shared on the answer here
./utils/scripts/install_submodules.sh $PWD
it worked better then the first one i reached 95% of the installation however it stop here with this error
Linking CXX shared library ../../lib/libLTO.so undefiened refernece to target
Here is the detail of the error
[ 95%] Linking CXX executable ../../bin/opt
[ 95%] Linking CXX shared library ../../lib/libLTO.so
../../lib/libLLVMX86AsmParser.a(X86AsmParser.cpp.o): In function `llvm::RegisterMCAsmParser<(anonymous namespace)::X86AsmParser>::Allocator(llvm::MCSubtargetInfo const&, llvm::MCAsmParser&, llvm::MCInstrInfo const&, llvm::MCTargetOptions const&)':
X86AsmParser.cpp:(.text._ZN4llvm19RegisterMCAsmParserIN12_GLOBAL__N_112X86AsmParserEE9AllocatorERKNS_15MCSubtargetInfoERNS_11MCAsmParserERKNS_11MCInstrInfoERKNS_15MCTargetOptionsE+0x164): undefined reference to `llvm::CreateX86AsmInstrumentation(llvm::MCTargetOptions const&, llvm::MCContext const&, llvm::MCSubtargetInfo const*&)'
CMakeFiles/llvm-mc.dir/llvm-mc.cpp.o: In function `main':
llvm-mc.cpp:(.text.startup.main+0xe4): undefined reference to `LLVMInitializeX86Disassembler'
../../lib/libLLVMX86Desc.a(X86MCTargetDesc.cpp.o): In function `LLVMInitializeX86TargetMC':
X86MCTargetDesc.cpp:(.text.LLVMInitializeX86TargetMC+0xc7): undefined reference to `llvm::createX86_32AsmBackend(llvm::Target const&, llvm::MCRegisterInfo const&, llvm::Triple const&, llvm::StringRef, llvm::MCTargetOptions const&)'
...
...
../../lib/libLLVMAArch64CodeGen.a(AArch64TargetObjectFile.cpp.o):(.data.rel.ro._ZTVN4llvm29AArch64_MachoTargetObjectFileE[_ZTVN4llvm29AArch64_MachoTargetObjectFileE]+0xa0): undefined reference to `llvm::TargetLoweringObjectFileMachO::SelectSectionForGlobal(llvm::GlobalObject const*, llvm::SectionKind, llvm::TargetMachine const&) const'
collect2: error: ld returned 1 exit status
tools/opt/CMakeFiles/opt.dir/build.make:349: recipe for target 'bin/opt' failed
make[2]: *** [bin/opt] Error 1
CMakeFiles/Makefile2:44345: recipe for target 'tools/opt/CMakeFiles/opt.dir/all' failed
make[1]: *** [tools/opt/CMakeFiles/opt.dir/all] Error 2
Makefile:151: recipe for target 'all' failed
make: *** [all] Error 2
dina#dina-VBox:~/tiramisu$ ^C
I do not know what should i do to fix this new error can someone help please.
I have not been able to fix the problem on it's self but i have changed the way of installing tiramisu.
I did pay attention to that and i do want to pay your attention to too that may serve your time and success your installation.
Never ever install tiramisu on virtual box cause tiramisu require a bit high performance machine i mean at least 6G of RAM once compiling it consume >= 6GRAM.
Means it's better to have partition or Linux system directly.
You may find issues from version to version means some succeed to install it in 18.04 where some in 16 where some in 14. So if you fail in version never give up try another version better then still paralyzed.
It better to not lunch anything in parallel once installing tiramisu.
You need to have a good network to clone tiramisu sub-modules and tiramisu on itself with a network of 35kb/s it may took 24h to get clone all stuff.
Respect the all the tips listed to install tiramisu to avoid have trouble ex if it's said you should CMake 5.0 version do it because they have tested in this version and they insure that work nothing grantee that in 6 version it will work so be careful.
If you scattered things in the way that you could not fix issues. It's better to clean up everything and restart from "0".
Be patient : Installing tiramisu is a bit heavy task so be Broad-minded and Zen.
it took me one month to be able to install tiramisu i had many issues. But once i install it in a partition and doing the steps show above carefully i have been finally to install successfully.
Best of luck :).
Related
I am trying to develop a program that communicates with a PCSC USB reader using Conan and CMake with the LibLogicalAccess library. I followed the instructions of building and installing the library which seemed to have gone fine. I created a small simple console project with a "main.cpp" file. Following the C++ guide on the wiki of the library I tried to call a function from the library which resulted in a "Undefined reference to function. I know there are a lot of topics covering this but I have read as many as I could but could not seem to find the right solution.
I don't have much experience with Ubuntu/CMake/Conan/C++ so it might as well be a very simple fix.
OS: Kubuntu 18.04
Lang: C++
Related software: LibLogicalAccess
2.2.1,
CMake 3.17.1,
Conan 1.25.0
main.cpp
#include <iostream>
#include <logicalaccess/dynlibrary/librarymanager.hpp>
#include <logicalaccess/readerproviders/readerconfiguration.hpp>
#include <logicalaccess/cards/chip.hpp>
int main()
{
std::cout << "Program started\n";
// Reader configuration object to store reader provider and reader unit selection.
std::shared_ptr<logicalaccess::ReaderConfiguration> readerConfig(new logicalaccess::ReaderConfiguration());
// Set PCSC ReaderProvider by calling the Library Manager which will load the function from the corresponding plug-in
readerConfig->setReaderProvider(logicalaccess::LibraryManager::getInstance()->getReaderProvider("PCSC"));
std::cout << "after..\n";
}
CMakeLists.txt
cmake_minimum_required(VERSION 3.16)
project(project)
include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake)
conan_basic_setup(TARGETS)
set(CMAKE_CXX_FLAGS "-I /usr/include/PCSC")
add_executable(project main.cpp)
target_link_libraries(project PUBLIC CONAN_PKG::LogicalAccess)
When I try to build the program using cmake --build . this is the output:
[100%] Linking CXX executable bin/project
CMakeFiles/project.dir/main.cpp.o: In function `main':
main.cpp:(.text+0x140): undefined reference to `logicalaccess::LibraryManager::getReaderProvider(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
collect2: error: ld returned 1 exit status
CMakeFiles/project.dir/build.make:191: recipe for target 'bin/project' failed
make[2]: *** [bin/project] Error 1
CMakeFiles/Makefile2:95: recipe for target 'CMakeFiles/project.dir/all' failed
make[1]: *** [CMakeFiles/project.dir/all] Error 2
Makefile:103: recipe for target 'all' failed
make: *** [all] Error 2
The weird part is that the first line of code: std::shared_ptr<logicalaccess::ReaderConfiguration> readerConfig(...) works fine and the second line of code gives an undefined reference.
I have tried other functions in the same file which give the same result. The file compiles and runs fine when I remove the last "setReaderProvider" line of code. Also tried a lot of different little adjustments regarding the conanfile.txt and CMakeLists.txt.
Your error says:
main.cpp:(.text+0x140): undefined reference to `logicalaccess::LibraryManager::getReaderProvider(std::__cxx11::basic_string, std::allocator > const&)'
It occurs because your CMake is using libstdc++11 to link, however, Conan is configured to use libstdc++ due backward compatibility.
You need to update your default libcxx:
conan profile update settings.compiler.libcxx=libstdc++11 default
Please, read this section in Conan docs How to Manage GCC ABI to get more information.
Also, it's explained on step 5 of Getting Started.
Now when building again, you will need that your local packages won't be available, because it's a new package, using different settings, so you will need to install, or build from sources. The link to libstdc++11 is automatically managed by Conan, it passes the definitions to CMake.
Regards!
I'm trying to install NaoQI C++ SDK on Linux 18.04.1 (VirtualBox). I followed this installation instruction: http://doc.aldebaran.com/2-1/dev/cpp/install_guide.html
My problem is in Part E. Step.3, when I'm trying to run "qibuild make"
I get this error while I'm trying to build the helloworld example:
CMakeFiles/testhelloworld.dir/testhelloworld.cpp.o: In function
main':
/home/nounou/Documents/SDKfolder/naoqi-sdk/doc/dev/cpp/examples/core/helloworld/testhelloworld.cpp:35:
undefined reference to
AL::ALBroker::createBroker(std::__cxx11::basic_string, std::allocator > const&,
std::__cxx11::basic_string,
std::allocator > const&, int, std::__cxx11::basic_string, std::allocator > const&, int, int,
std::__cxx11::basic_string,
std::allocator >, bool)'
/home/nounou/Documents/SDKfolder/naoqi-sdk/doc/dev/cpp/examples/core/helloworld/testhelloworld.cpp:38:
undefined reference to
AL::ALProxy::ALProxy(boost::shared_ptr<AL::ALBroker>,
std::__cxx11::basic_string<char, std::char_traits<char>,
std::allocator<char> > const&, int, int)'
CMakeFiles/testhelloworld.dir/testhelloworld.cpp.o: In function
qi::log::LogStream::~LogStream()':
....
CMakeFiles/testhelloworld.dir/build.make:113: recipe for target
'sdk/bin/testhelloworld' failed make[2]: * [sdk/bin/testhelloworld]
Error 1 CMakeFiles/Makefile2:67: recipe for target
'CMakeFiles/testhelloworld.dir/all' failed make[1]: *
[CMakeFiles/testhelloworld.dir/all] Error 2 Makefile:129: recipe for
target 'all' failed make: *** [all] Error 2
[ERROR]: BuildFailed Error occurred when building project hello world
Please, help me if you have any idea about what the problem is. Thank you!
I had the same problem with Fedora 29... After some hours of search I found that adding set(CMAKE_CXX_FLAGS "-D_GLIBCXX_USE_CXX11_ABI=0") to the CMakeLists.txt file fixed the problem.
I found the solution here:
gcc using c++11 standard even though 98 explicitly specified
Most probably you have an ABI incompatibility issue, due to the transition to C++11. You are using Ubuntu 18.04, which compilers are configured to link with modern C++ libraries, but the toolchain is compiled with former ABIs, and does not enforce compiler flags to ensure compatibility.
To workaround this, either:
Set compiler flags to make sure you don't link against C++11 libraries (if someone knows them, please share).
Compile for the robot instead of your machine, by using the cross-toolchain instead of the Linux toolchain.
Use Ubuntu 12.04, as told in the installation guide.
By the way, in the C++ installation guide, subsection E.4, it says to compile the example under core/sayhelloworld. Here you compiled the example under core/helloworld.
I'm trying to install a modified version of caffe as part of the installation of this library: https://github.com/wasidennis/ObjectFlow/tree/master/caffe-cedn-dev
I'm on ubuntu 14.04 and am using a cmake install as listed on the caffe website.
I've installed matlab & have the mex file in the path.
after cmake .. I do a make all and get this error:
Linking CXX executable caffe
../lib/libcaffe.a(io.cpp.o): In function `caffe::ReadImageToDatum(std::string const&, int, int, int, bool, caffe::Datum*)':
io.cpp:(.text+0x67d): undefined reference to `cv::imread(cv::String const&, int)'
../lib/libcaffe.a(window_data_layer.cpp.o): In function `caffe::WindowDataLayer<float>::InternalThreadEntry()':
window_data_layer.cpp:(.text._ZN5caffe15WindowDataLayerIfE19InternalThreadEntryEv[_ZN5caffe15WindowDataLayerIfE19InternalThreadEntryEv]+0x44b): undefined reference to `cv::imread(cv::String const&, int)'
../lib/libcaffe.a(window_data_layer.cpp.o): In function `caffe::WindowDataLayer<double>::InternalThreadEntry()':
window_data_layer.cpp:(.text._ZN5caffe15WindowDataLayerIdE19InternalThreadEntryEv[_ZN5caffe15WindowDataLayerIdE19InternalThreadEntryEv]+0x446): undefined reference to `cv::imread(cv::String const&, int)'
collect2: error: ld returned 1 exit status
make[2]: *** [tools/caffe] Error 1
make[1]: *** [tools/CMakeFiles/caffe.bin.dir/all] Error 2
make: *** [all] Error 2
Following https://github.com/BVLC/caffe/issues/1276 I looked at the output of pkg-config --cvflags opencv which is -I/usr/local/include/opencv -I/usr/local/include
This is the same location as the headers of my OpenCV installation are installed. (I'm not sure of the causal relationship on that.) Both OpenCV 3.1 and 2.4 go to those files - I tried installing both and to switch between them I just move the opencv and opencv2 header folders to a tmp folder while I use the other opencv. I think this might be the source of the error, as I don't know how to tell which version of OpenCV my program is using for sure.
More specifically I have done is:
I added opencv_imgcodecs to the Makefile
installed opencv via apt-get
uninstalled opencv via apt-get remove
installed a version of opencv that I don't remember the version
installed 3.1 & 2.4 from src & switched out the header folders as stated above.
Deleted a version of opencv src & header folders that I didn't know how to see what version it was.
From when I started checking, python import cv2 went from version 3.1 to now 3.2-dev.
I am try to compile a software (SuperCollider) on Fedora 22 but I run into a problem:
libsupernova.a(server.cpp.o): In function `std::atomic<boost::lockfree::detail::tagged_index>::is_lock_free() const':
/usr/include/c++/5.1.1/atomic:212: undefined reference to `__atomic_is_lock_free'
collect2: error: ld returned 1 exit status
server/supernova/CMakeFiles/supernova.dir/build.make:96: recipe for target 'server/supernova/supernova' failed
make[2]: *** [server/supernova/supernova] Error 1
CMakeFiles/Makefile2:3383: recipe for target 'server/supernova/CMakeFiles/supernova.dir/all' failed
make[1]: *** [server/supernova/CMakeFiles/supernova.dir/all] Error 2
Makefile:146: recipe for target 'all' failed
make: *** [all] Error 2
It seems to me that this is a problem with libatomic. Is it possible that gcc does not link to libatomic?
Does someone have any idea on how to solve this problem?
Another idea would be to try to install -latomic, but I cannot find information about.
Instead I already installed libatomic. I don't know if they are the same.
i ran into the same issue, and yes you do need to link libatomic. the way to do this is to add to the line: set(CMAKE_CXX_LINK_FLAGS "${CMAKE_CXX_LINK_FLAGS} -latomic") to the top level CMakeLists.txt file before running cmake.
the full flow might look like this:
git clone https://github.com/supercollider/supercollider.git
cd supercollider
add set(CMAKE_CXX_LINK_FLAGS "${CMAKE_CXX_LINK_FLAGS} -latomic") to top level CMakeLists.txt
run ccmake . to configure the install
mkdir _build ; cd _build
cmake ..
make && <sudo> make install
you may or may not need sudo depending on where you have decided to install supercollider.
It seems to me that this is a problem with libatomic. Is it possible that gcc does not link to libatomic?
It only links to libatomic if you tell it to.
Does someone have any idea on how to solve this problem?
Link to libatomic.
Another idea would be to try to install -latomic, but I cannot find information about. Instead I already installed libatomic. I don't know if they are the same.
You can't "install -latomic" because -latomic is the compiler/linker option that says to link to libatomic, and you can't "install a linker option" because it's an option to a program, not a package.
You install libatomic, then you link to it with -latomic
(Aside: I hope to fix GCC so that you won't need to use -latomic explicitly for simple cases, only more complex ones, see https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65913)
I'm trying to install opencv to my Ubuntu 14.04 machine using the documentation provided in
http://docs.opencv.org/doc/tutorials/introduction/linux_install/linux_install.html#linux-installation
However, during the compilation process I get the following error.
Linking CXX shared library ../../lib/libopencv_videoio.so
/usr/bin/ld: /usr/local/lib/libavcodec.a(avpacket.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC
/usr/local/lib/libavcodec.a: error adding symbols: Bad value
collect2: error: ld returned 1 exit status
make[2]: *** [lib/libopencv_videoio.so.3.0.0] Error 1
make[1]: *** [modules/videoio/CMakeFiles/opencv_videoio.dir/all] Error 2
make: *** [all] Error 2
I noticed a few posts mentioning similar errors and some solutions suggest removing the libavcodec.a from /usr/local/lib/. I'd like not to do that as I need ffmpeg libraries in the machine as well.
Could someone please help me to resolve this issue?.
Thanks
I got it to work (for installing ffmpeg) by simply reinstalling the whole thing from the beginning with all instances of $ ./configure replaced by $ ./configure --enable-shared (first make sure to delete all the folders and files including the .so files from the previous attempt).
Apparently this works because https://stackoverflow.com/a/13812368/10593190.
And this matches with #camino's comment on https://stackoverflow.com/a/19365454/10593190 and XavierStuvw's answer.
Just run these 2 lines in your terminal/environment:
pip install opencv-python==3.4.5.20
pip install opencv-contrib-python==3.4.5.20