I have been trying to make a ROOT Class called RooUnfold which miserably fails while building with these errors:
Use ROOT 6.06/08 for macosx64 from /usr/local/Cellar/root6/6.06.08
Making /Users/sudoankit/root/RooUnfold-master/libRooUnfold.rootmap
In file included from /Users/sudoankit/root/RooUnfold-master/tmp/macosx64/RooUnfoldMap_LinkDef.cxx:1:
In file included from /usr/local/Cellar/root6/6.06.08/include/root/TObject.h:31:
In file included from /usr/local/Cellar/root6/6.06.08/include/root/Rtypes.h:37:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/atomic:543:2: error:
<atomic> is not implemented
#error <atomic> is not implemented
^
1 error generated.
make: *** [/Users/sudoankit/root/RooUnfold-master/libRooUnfold.rootmap] Error 1
How do I build it with <atomic> library?
Related
When loading a qt project in mac, I've got the following errors.
In file included from ../../common/monitoring.cpp:1:
../../common/monitoring.h:3:10: fatal error: 'prometheus/exposer.h' file not found
#include <prometheus/exposer.h>
^~~~~~~~~~~~~~~~~~~~~~
modules/ui/common/monitoring.h:3: error: 'prometheus/exposer.h' file not found
In file included from moc_monitoring.cpp:10:
./../../common/monitoring.h:3:10: fatal error: 'prometheus/exposer.h' file not found
#include <prometheus/exposer.h>
^~~~~~~~~~~~~~~~~~~~~~
:-1: error: [monitoring.o] Error 1
modules/ui/common/postgre.h:8: error: 'pqxx/pqxx' file not found
In file included from ../../common/postgre.cpp:1:
../../common/postgre.h:8:10: fatal error: 'pqxx/pqxx' file not found
#include <pqxx/pqxx>
^~~~~~~~~~~
modules/ui/common/fileio.cpp:3: error: 'jsoncpp/json/json.h' file not found
../../common/fileio.cpp:3:10: fatal error: 'jsoncpp/json/json.h' file not found
#include <jsoncpp/json/json.h>
^~~~~~~~~~~~~~~~~~~~~
modules/ui/common/postgre.h:8: error: 'pqxx/pqxx' file not found
In file included from moc_postgre.cpp:10:
./../../common/postgre.h:8:10: fatal error: 'pqxx/pqxx' file not found
#include <pqxx/pqxx>
^~~~~~~~~~~
The libraries have been installed via brew.
In the case of prometheus, I've got this on the pro file for the QT project.
INCLUDEPATH += "/opt/homebrew/Cellar/prometheus-cpp/1.0.1/include/prometheus/"
LIBS += "/opt/homebrew/Cellar/prometheus-cpp/1.0.1/lib/cmake/prometheus-cpp -lprometheus-cpp-pull -lprometheus-cpp-core"
But it still fails. Even when adding other libraries installed too.
It should be
INCLUDEPATH += "/opt/homebrew/Cellar/prometheus-cpp/1.0.1/include
Since the subdirectory prometheus is set in #include <prometheus/exposer.h>.
I am trying to generate a precompiled header in cmake that contains my regularly used standard libs. When I run cmake there is no errors but when I build it says it can't find the headers in cmake_pch.h.
Here is the snippet of my cmake script that adds the precompiled header:
target_precompile_headers(fae-core PRIVATE
<algorithm>
<cstddef>
<fstream>
<string>
<sstream>
<memory>
<chrono>
)
Here is the full output from running the makefile that cmake generates:
Scanning dependencies of target fae-core
[ 6%] Building CXX object core/CMakeFiles/fae-core.dir/cmake_pch.hxx.gch
[ 12%] Building C object core/CMakeFiles/fae-core.dir/cmake_pch.h.gch
In file included from <command-line>:32:
/home/finn/dev/fae/build/core/CMakeFiles/fae-core.dir/cmake_pch.h:4:10: fatal error: algorithm: No such file or directory
4 | #include <algorithm>
| ^~~~~~~~~~~
compilation terminated.
make[2]: *** [core/CMakeFiles/fae-core.dir/build.make:78: core/CMakeFiles/fae-core.dir/cmake_pch.h.gch] Error 1
make[1]: *** [CMakeFiles/Makefile2:136: core/CMakeFiles/fae-core.dir/all] Error 2
make: *** [Makefile:84: all] Error 2
I've only included the section of my cmake code relating to the pch as I was previously just including the libs directly in my src files and everything was working fine so I assume it's purely related to the pch. I'm happy to edit and add the rest of my scripts if it's helpful.
You have added C++ headers to your target_precompile_headers command but also added a C source to your target. This cannot work as the C compiler does not understand how to include C++ standard headers. See the error message:
[ 12%] Building C object core/CMakeFiles/fae-core.dir/cmake_pch.h.gch
Either remove the C++ headers from your target or define separate targets for C and C++ sources.
While compiling C++ SDK I am getting the following error
**
ERROR LOGS
**
fatal error: kaa/gen/EndpointGen.hpp: No such file or directory
[ 1%] Building CXX object kaa/CMakeFiles/kaacpp.dir/impl/event/registration/EndpointRegistrationManager.cpp.o
In file included from /home/vidhi/Projects/Kaa/kaaCppApp/kaa/kaa/channel/ITransportConnectionInfo.hpp:25:0,
from /home/vidhi/Projects/Kaa/kaaCppApp/kaa/kaa/KaaDefaults.hpp:28,
from /home/vidhi/Projects/Kaa/kaaCppApp/kaa/kaa/event/registration/EndpointRegistrationManager.hpp:20,
from /home/vidhi/Projects/Kaa/kaaCppApp/kaa/impl/event/registration/EndpointRegistrationManager.cpp:17:
/home/vidhi/Projects/Kaa/kaaCppApp/kaa/kaa/channel/TransportProtocolId.hpp:22:35: fatal error: kaa/gen/EndpointGen.hpp: No such file or directory
#include "kaa/gen/EndpointGen.hpp"
^
compilation terminated.
make[2]: * [kaa/CMakeFiles/kaacpp.dir/impl/event/registration/EndpointRegistrationManager.cpp.o] Error 1
make[1]: * [kaa/CMakeFiles/kaacpp.dir/all] Error 2
make: *** [all] Error 2
Manually I place EndpointGen.hpp file but again while compiling it's giving the same error for different file. Later I found files inside kaa/CMakeFiles/kaacpp.dir/impl/ were missing.
Could anyone please help me to resolve this issue?
This issue was resolved in v2.0.0 by adding compile-client-cpp option to the maven goals when compiling Kaa.
See the reference for this.
I'm trying to make Boost libs to work with Eclipse Luna (I know it's an old version but I'm tied to work with it).
My system is a Linux Mint 18.1.
I downloaded, unpacked and installed the libraries following this guide.
I ended up with unpacked libraries in my home folder and compiled ones in usr/local/include/boost folder.
Next I added the latter to the LD LIBRARY PATH and resetted the ldconfig.
At this point I copied some code on an empty C++ project.
The header I'm using is "share_ptr.hpp" so I set the #include .
After that I added the include path to the included headers under Project -> Properties -> C/C++ General -> Paths and Symbols.
I added the path /usr/local/include as included directory.
When I build I get the error: "No such file or directory".
If I #include the header with the absolute path, I can find the file but I get another error cause this .hpp file has references to the "relative" path /boost/smart_ptr/share_ptr, so it doesn't find all those headers:
#ifndef BOOST_SMART_PTR_HPP_INCLUDED
#define BOOST_SMART_PTR_HPP_INCLUDED
#include <boost/config.hpp>
#include <boost/scoped_ptr.hpp>
#include <boost/scoped_array.hpp>
#include <boost/shared_ptr.hpp>
#include <boost/shared_array.hpp>
#if !defined(BOOST_NO_MEMBER_TEMPLATES) || defined(BOOST_MSVC6_MEMBER_TEMPLATES)
# include <boost/weak_ptr.hpp>
# include <boost/intrusive_ptr.hpp>
# include <boost/enable_shared_from_this.hpp>
# include <boost/make_shared.hpp>
#endif
#endif // #ifndef BOOST_SMART_PTR_HPP_INCLUDED
Looks like to me that Eclipse can't get the include path correctly.
Another thing that I tried was adding the -L for the linker, but it doesn't work either.
This is what I'm including:
#include <vector>
#include <boost/shared_ptr.hpp>
Could you help me to understand what it's going on ?
Adding informations:
CODE:
#include <boost/lambda/lambda.hpp>
#include <iostream>
#include <iterator>
#include <algorithm>
int main()
{
using namespace boost::lambda;
typedef std::istream_iterator<int> in;
std::for_each(
in(std::cin), in(), std::cout << (_1 * 3) << " " );
}
CONSOLE:
08:13:11 **** Incremental Build of configuration Build (GNU) for project TESTCODE ****
make all
make all-recursive
make[1]: Entering directory '/home/daniele/workspace/TESTCODE'
Making all in src
make[2]: Entering directory '/home/daniele/workspace/TESTCODE/src'
arm-poky-linux-gnueabi-g++ -march=armv7ve -mfpu=neon -mfloat-abi=hard -mcpu=cortex-a7 --sysroot=/opt/fsl-imx-fb/4.1.15-2.0.1/sysroots/cortexa7hf-neon-poky-linux-gnueabi -DHAVE_CONFIG_H -I. -I.. --sysroot=/opt/fsl-imx-fb/4.1.15-2.0.1/sysroots/cortexa7hf-neon-poky-linux-gnueabi -g -O0 --sysroot=/opt/fsl-imx-fb/4.1.15-2.0.1/sysroots/cortexa7hf-neon-poky-linux-gnueabi -MT TESTCODE.o -MD -MP -MF .deps/TESTCODE.Tpo -c -o TESTCODE.o TESTCODE.cpp
TESTCODE.cpp:11:35: fatal error: boost/lambda/lambda.hpp: No such file or directory
compilation terminated.
make[2]: *** [TESTCODE.o] Error 1
Makefile:398: recipe for target 'TESTCODE.o' failed
make[1]: *** [all-recursive] Error 1
make[2]: Leaving directory '/home/daniele/workspace/TESTCODE/src'
make: *** [all] Error 2
Makefile:403: recipe for target 'all-recursive' failed
make[1]: Leaving directory '/home/daniele/workspace/TESTCODE'
Makefile:335: recipe for target 'all' failed
08:13:11 Build Finished (took 84ms)
ERRORS:
Description Resource Path Location Type fatal error:
boost/lambda/lambda.hpp: No such file or
directory TESTCODE.cpp /TESTCODE/src line 11 C/C++ Problem make: *
[all] Error 2 TESTCODE C/C++ Problem make1: * [all-recursive]
Error 1 TESTCODE C/C++ Problem make[2]: *** [TESTCODE.o] Error
1 TESTCODE C/C++ Problem recipe for target 'all-recursive'
failed Makefile /TESTCODE line 403 C/C++ Problem recipe for target
'all' failed Makefile /TESTCODE line 335 C/C++ Problem recipe for
target 'TESTCODE.o' failed Makefile /TESTCODE line 398 C/C++ Problem
I create a simple main function and above it, I include armadillo library.
#include <armadillo>
I compiled it using g++ (version of GCC is 5.3) and under cygwin 64bit on windowse 8. I turned on c++11 option and added -larmadillo for linking to armadillo library.
Once I compile the code, I receive such horrible error. The same code runs absolutely fine on windowse XP 32 bit.
usr/include/armadillo_bits/compiler_setup.hpp:73:88: note: #pragma message: WAR
NING: #define ARMA_DONT_USE_CXX11 before #include <armadillo>
#pragma message ("WARNING: #define ARMA_DONT_USE_CXX11 before #include <arm
adillo>")
^
In file included from /usr/include/armadillo:310:0,
from main.cpp:1:
/usr/include/armadillo_bits/arma_cmath.hpp: In function 'float arma::arma_log1p(
float)':
/usr/include/armadillo_bits/arma_cmath.hpp:270:12: error: 'log1p' is not a membe
r of 'std'
return std::log1p(x);
^
compilation terminated due to -Wfatal-errors.
Makefile:110: recipe for target 'main.o' failed
make: *** [main.o] Error 1