I'm trying to install openalpr on MacOSX El Capitan 10.11.6
and when I tried to run 'make' command, it goes smoothly until it reaches 55% which it generates following errors. Here are the steps that I followed (https://github.com/openalpr/openalpr/wiki/Compilation-instructions-(OS-X))
error output image
The remaining outputs are:
In file included from /Users/Anonymous/openalpr/src/daemon.cpp:8:
In file included from
/Users/Anonymous/openalpr/src/video/logging_videobuffer.h:5:
In file included from /usr/local/include/log4cplus/logger.h:36:
In file included from
/usr/local/include/log4cplus/spi/appenderattachable.h:33:
In file included from /usr/local/include/log4cplus/appender.h:36:
/usr/local/include/log4cplus/helpers/pointer.h:134:21: error: cannot
initialize object parameter of type 'const
log4cplus::helpers::SharedObject' with an expression of type
'log4cplus::spi::Filter'
pointee->removeReference();
^~~~~~~
/usr/local/include/log4cplus/helpers/pointer.h:152:17: note: in
instantiation of member function
'log4cplus::helpers::SharedObjectPtr<log4cplus::spi::Filter>::~SharedObjectPtr' requested here
SharedObjectPtr<T> (rhs).swap (*this);
^
/usr/local/include/log4cplus/helpers/pointer.h:147:30: note: in instantiation of member function 'log4cplus::helpers::SharedObjectPtr<log4cplus::spi::Filter>::operator=' requested here
return this->operator = (rhs.pointee);
^
/usr/local/include/log4cplus/appender.h:211:62: note: in instantiation of member function
'log4cplus::helpers::SharedObjectPtr<log4cplus::spi::Filter>::operator=' requested here
void setFilter(log4cplus::spi::FilterPtr f) { filter = f; }
^
1 warning and 7 errors generated.
make[2]: *** [CMakeFiles/alprd.dir/daemon.cpp.o] Error 1
make[1]: *** [CMakeFiles/alprd.dir/all] Error 2
make: *** [all] Error 2`
I believe you're missing the atomic library. You can find it here. Place it alongside all the other c++ include files in your system.
Related
I have an issue running a clion project stepik file. The following error keeps showing up. I have a compiler and I can run other codes, but some doesn't work.
In file included from /home/gergoszabo/CLionProjects/Prog2_08/test-framework/googletest-src/googletest/src/gtest-all.cc:42:
/home/gergoszabo/CLionProjects/Prog2_08/test-framework/googletest-src/googletest/src/gtest-death-test.cc: In function ‘bool testing::internal::StackGrowsDown()’:
/home/gergoszabo/CLionProjects/Prog2_08/test-framework/googletest-src/googletest/src/gtest-death-test.cc:1224:24: error: ‘dummy’ may be used uninitialized [-Werror=maybe-uninitialized]
1224 | StackLowerThanAddress(&dummy, &result);
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
/home/gergoszabo/CLionProjects/Prog2_08/test-framework/googletest-src/googletest/src/gtest-death-test.cc:1214:13: note: by argument 1 of type ‘const void*’ to ‘void testing::internal::StackLowerThanAddress(const void*, bool*)’ declared here
1214 | static void StackLowerThanAddress(const void* ptr, bool* result) {
| ^~~~~~~~~~~~~~~~~~~~~
/home/gergoszabo/CLionProjects/Prog2_08/test-framework/googletest-src/googletest/src/gtest-death-test.cc:1222:7: note: ‘dummy’ declared here
1222 | int dummy;
| ^~~~~
cc1plus: all warnings being treated as errors
gmake[3]: *** [../test-framework/googletest-build/googlemock/gtest/CMakeFiles/gtest.dir/build.make:72: ../test-framework/googletest-build/googlemock/gtest/CMakeFiles/gtest.dir/src/gtest-all.cc.o] Error 1
gmake[2]: *** [CMakeFiles/Makefile2:587: ../test-framework/googletest-build/googlemock/gtest/CMakeFiles/gtest.dir/all] Error 2
gmake[1]: *** [CMakeFiles/Makefile2:1394: lesson1/labbeli/CMakeFiles/global-lesson1-labbeli-test.dir/rule] Error 2
gmake: *** [Makefile:598: global-lesson1-labbeli-test] Error 2
This problem is not in your own project, but in a library it seems to be using: GoogleTest.
The version of GoogleTest you're using currently has a problem when compiled with GCC 11. GCC gives off this warning (for various complex reasons). GoogleTest has configured that any warnings the compiler gives should be treated as errors. And so GCC will stop compiling when it encounters that warning.
It's not your mistake, but up to GoogleTest to fix. A fix has been made and merged here: https://github.com/google/googletest/pull/3024
Updating GoogleTest to use version 1.11.0 or newer should resolve the problem.
I am trying to install a package called Siconos, which uses python and its libraries, and also C++ and other libraries such as oce and occ.
It is installed correctly but when I run a C++ code using Siconos it is giving me the follwoing Boost error,
|===========================================================|
| Siconos software, version 4.4.0 - Copyright 2021 INRIA |
| |
| Free software under Apache 2.0 License. |
|===========================================================|
[ Generate CMakeLists.txt file in /scratch/rsayoud/Documents/siconos-tutorials/examples/mechanics/BouncingBall/.siconos ]
[------------------- Configure project (cmake) --------------------]
-- Boost version: 1.65.1
-- Configuring done
-- Generating done
-- Build files have been written to: /scratch/rsayoud/Documents/siconos-tutorials/examples/mechanics/BouncingBall/.siconos
[---------------------- Build project (make) ----------------------]
[ 33%] Built target BallPlugin
Scanning dependencies of target BouncingBallTS
[ 50%] Building CXX object CMakeFiles/BouncingBallTS.dir/scratch/rsayoud/Documents/siconos-tutorials/examples/mechanics/BouncingBall/BouncingBallTS.cpp.o
/scratch/rsayoud/Documents/siconos-tutorials/examples/mechanics/BouncingBall/BouncingBallTS.cpp: In function ‘int main(int, char**)’:
/scratch/rsayoud/Documents/siconos-tutorials/examples/mechanics/BouncingBall/BouncingBallTS.cpp:147:12: error: ‘progress_display’ is not a member of ‘boost’
boost::progress_display show_progress(N);
^~~~~~~~~~~~~~~~
/scratch/rsayoud/Documents/siconos-tutorials/examples/mechanics/BouncingBall/BouncingBallTS.cpp:149:12: error: ‘timer’ is not a member of ‘boost’
boost::timer time;
^~~~~
/scratch/rsayoud/Documents/siconos-tutorials/examples/mechanics/BouncingBall/BouncingBallTS.cpp:150:10: error: request for member ‘restart’ in ‘time’, which is of non-class type ‘time_t(time_t*) noexcept {aka long int(long int*) noexcept}’
time.restart();
^~~~~~~
/scratch/rsayoud/Documents/siconos-tutorials/examples/mechanics/BouncingBall/BouncingBallTS.cpp:162:9: error: ‘show_progress’ was not declared in this scope
++show_progress;
^~~~~~~~~~~~~
/scratch/rsayoud/Documents/siconos-tutorials/examples/mechanics/BouncingBall/BouncingBallTS.cpp:167:41: error: request for member ‘elapsed’ in ‘time’, which is of non-class type ‘time_t(time_t*) noexcept {aka long int(long int*) noexcept}’
cout << "Computation Time " << time.elapsed() << endl;
^~~~~~~
/scratch/rsayoud/Documents/siconos-tutorials/examples/mechanics/BouncingBall/BouncingBallTS.cpp:180:10: error: ‘SiconosException’ does not name a type; did you mean ‘SiconosVector’?
catch (SiconosException& e)
^~~~~~~~~~~~~~~~
SiconosVector
/scratch/rsayoud/Documents/siconos-tutorials/examples/mechanics/BouncingBall/BouncingBallTS.cpp:182:13: error: ‘e’ was not declared in this scope
cerr << e.report() << endl;
^
CMakeFiles/BouncingBallTS.dir/build.make:62: recipe for target 'CMakeFiles/BouncingBallTS.dir/scratch/rsayoud/Documents/siconos-tutorials/examples/mechanics/BouncingBall/BouncingBallTS.cpp.o' failed
make[2]: *** [CMakeFiles/BouncingBallTS.dir/scratch/rsayoud/Documents/siconos-tutorials/examples/mechanics/BouncingBall/BouncingBallTS.cpp.o] Error 1
CMakeFiles/Makefile2:104: recipe for target 'CMakeFiles/BouncingBallTS.dir/all' failed
make[1]: *** [CMakeFiles/BouncingBallTS.dir/all] Error 2
Makefile:129: recipe for target 'all' failed
make: *** [all] Error 2
Traceback (most recent call last):
File "/usr/local/bin/siconos", line 826, in <module>
main()
File "/usr/local/bin/siconos", line 151, in main
build_project(args)
File "/usr/local/bin/siconos", line 768, in build_project
run_command(cmake_build_command, args.quiet)
File "/usr/local/bin/siconos", line 799, in run_command
subprocess.run(command, check=True, **extra_args)
File "/usr/lib/python3.6/subprocess.py", line 438, in run
output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['cmake', '--build', '/scratch/rsayoud/Documents/siconos-tutorials/examples/mechanics/BouncingBall/.siconos', '--target', 'install', '--']' returned non-zero exit status 2.
Any suggestions ?
It's most likely missing the necessary #include file.
Boost files and others may include other files, but are unspecified as to what else they include (commonly referred to as "dragging in"). This means that if you forget to #include something, it might work anyway because it was nested inside another header. But after an update, or under a different configuration, that no longer works because the internal include files have changed.
You should check the Boost docs for the correct include file for that symbol, and add it to the top of whichever file contains the error. This may be necessary for several files.
i'm trying to use microsoft SEAL library for homomorphic encryption and following the steps from the below link https://github.com/cyberweapons/SEAL/blob/master/INSTALL.txt
when i use command cmake .
terminal shows below result
-- SEAL detected (version 2.3.1)
-- SEAL build type: Release
-- SEAL debug mode: OFF
-- SEAL using Microsoft GSL: OFF
-- Configuring done
-- Generating done
-- Build files have been written to: /home/ravindra/Desktop/../../MiSEAL/SEAL/SEALExamples
after that when i give make command it should generate a file main.cpp.o instead it is giving the following errors.
[ 50%] Building CXX object CMakeFiles/sealexamples.dir/main.cpp.o
In file included from /usr/local/include/seal/util/mempool.h:12:0,
from /usr/local/include/seal/memorypoolhandle.h:6,
from /usr/local/include/seal/biguint.h:6,
from /usr/local/include/seal/bigpoly.h:9,
from /usr/local/include/seal/seal.h:3,
from /home/ravindra/Desktop/SakhaProjects/S20_AI/MiSEAL/SEAL/SEALExamples/main.cpp:12:
/usr/local/include/seal/util/locks.h:12:45: error: ‘shared_mutex’ is not a member of ‘std’
using ReaderLock = std::shared_lock<std::shared_mutex>;
^~~
/usr/local/include/seal/util/locks.h:12:45: error: ‘shared_mutex’ is not a member of ‘std’
/usr/local/include/seal/util/locks.h:12:62: error: template argument 1 is invalid
using ReaderLock = std::shared_lock<std::shared_mutex>;
^
/usr/local/include/seal/util/locks.h:14:45: error: ‘shared_mutex’ is not a member of ‘std’
using WriterLock = std::unique_lock<std::shared_mutex>;
^~~
/usr/local/include/seal/util/locks.h:14:45: error: ‘shared_mutex’ is not a member of ‘std’
/usr/local/include/seal/util/locks.h:14:62: error: template argument 1 is invalid
using WriterLock = std::unique_lock<std::shared_mutex>;
^
/usr/local/include/seal/util/locks.h:21:20: error: ‘ReaderLock’ does not name a type
inline ReaderLock acquire_read()
^~~~~~~~~~
/usr/local/include/seal/util/locks.h:26:20: error: ‘WriterLock’ does not name a type
inline WriterLock acquire_write()
^~~~~~~~~~
/usr/local/include/seal/util/locks.h:31:20: error: ‘ReaderLock’ does not name a type
inline ReaderLock try_acquire_read()
^~~~~~~~~~
/usr/local/include/seal/util/locks.h:36:20: error: ‘WriterLock’ does not name a type
inline WriterLock try_acquire_write()
^~~~~~~~~~
/usr/local/include/seal/util/locks.h:46:18: error: ‘shared_mutex’ in namespace ‘std’ does not name a type
std::shared_mutex rw_lock_mutex_;
^~~~~~~~~~~~
In file included from /usr/local/include/seal/memorypoolhandle.h:6:0,
from /usr/local/include/seal/biguint.h:6,
from /usr/local/include/seal/bigpoly.h:9,
from /usr/local/include/seal/seal.h:3,
from /home/ravindra/Desktop/SakhaProjects/S20_AI/MiSEAL/SEAL/SEALExamples/main.cpp:12:
/usr/local/include/seal/util/mempool.h: In member function ‘virtual int64_t seal::util::MemoryPoolMT::pool_count() const’:
/usr/local/include/seal/util/mempool.h:561:17: error: ‘ReaderLock’ was not declared in this scope
ReaderLock lock(pools_locker_.acquire_read());
^~~~~~~~~~
CMakeFiles/sealexamples.dir/build.make:62: recipe for target 'CMakeFiles/sealexamples.dir/main.cpp.o' failed
make[2]: *** [CMakeFiles/sealexamples.dir/main.cpp.o] Error 1
CMakeFiles/Makefile2:72: recipe for target 'CMakeFiles/sealexamples.dir/all' failed
make[1]: *** [CMakeFiles/sealexamples.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2
i am new to SEAL library also i am a beginner to c++ programming, please someone help me to fix this issues.
Hi i found the solution,
i have included following commands in CMakeLists.txt file continued with the steps
`
# Below is TFHE START
export TFHE_PREFIX=/usr/local
export CPLUS_INCLUDE_PATH=${TFHE_PREFIX}/include:${CPLUS_INCLUDE_PATH}
export C_INCLUDE_PATH=${TFHE_PREFIX}/include:${C_INCLUDE_PATH}
export LIBRARY_PATH=${TFHE_PREFIX}/lib:${LIBRARY_PATH}
export LD_LIBRARY_PATH=${TFHE_PREFIX}/lib:${LD_LIBRARY_PATH}
# Below is TFHE END
`
I am building Qt on RaspberryPi using host desktop following this guide https://wiki.qt.io/Raspberry_Pi_Beginners_Guide.
And when it comes to building Qt with make command i got a strange error:
In file included from ../../include/QtXml/qxml.h:1:0,
from dom/qdom.cpp:54:
../../include/QtXml/../../src/xml/sax/qxml.h:121:5: error: function ‘QXmlAttributes::QXmlAttributes(QXmlAttributes&&)’ defaulted on its first declaration with an exception-specification that differs from the implicit declaration ‘QXmlAttributes::QXmlAttributes(QXmlAttributes&&)’
Makefile:1338: recipe for target '.obj/qdom.o' failed
make[2]: *** [.obj/qdom.o] Error 1
make[2]: Leaving directory '/home/anon/opt/qt5/qtbase/src/xml'
Makefile:295: recipe for target 'sub-xml-make_first' failed
make[1]: *** [sub-xml-make_first] Error 2
make[1]: Leaving directory '/home/anon/opt/qt5/qtbase/src'
Makefile:46: recipe for target 'sub-src-make_first' failed
make: *** [sub-src-make_first] Error 2
Some specification:
Host - Debian Jessie
RPI - Raspbian
What should I do now? Restarting installation from beginning gives nothing.
The first error apparently is resulted from a conflict in the declaration of "QXmlAttributes::QXmlAttributes(QXmlAttributes&&)"
I had the same error : function ‘QXmlAttributes::QXmlAttributes(QXmlAttributes&&)’ defaulted on its first declaration with an exception-specification that differs from the implicit declaration ‘QXmlAttributes::QXmlAttributes(QXmlAttributes&&)’
I managed to solve this by following rocommendations from the following link : Cross compiling for Raspberry Error
The solution is to change :
1.Open the /qt5/qtbase/src/xml/sax/qxml.h file
2.Change : "QXmlAttributes(QXmlAttributes &&) Q_DECL_NOTHROW = default"
to "QXmlAttributes(QXmlAttributes &&) = default"
Hope this helps !
I am working on ROOT v6.06.06 on ubuntu 14.04. Everything went OK.
Lately i did apt-get upgrade, and this affected the c++ compiler.
Since then, when i try to run my macros on ROOT, I have this error:
fatal error: file '/usr/include/c++/4.9/cmath' modified since it was first processed
I tried then to re-compile ROOT, but it's not working, I have this error:
[ 36%] Building CXX object interpreter/llvm/src/tools/clang/lib/Driver/CMakeFiles/clangDriver.dir/ToolChains.cpp.o
.../root/interpreter/llvm/src/tools/clang/lib/Driver/ToolChains.cpp: In static member function ‘static std::string clang::driver::toolchains::Hexagon_TC::GetGnuDir(const string&, const llvm::opt::ArgList&)’:
.../root/root6/root/interpreter/llvm/src/tools/clang/lib/Driver/ToolChains.cpp:2110:42: error: ‘LLVM_PREFIX’ was not declared in this scope
std::string PrefixRelDir = std::string(LLVM_PREFIX) + "/../gnu";
^
make[2]: *** [interpreter/llvm/src/tools/clang/lib/Driver/CMakeFiles/clangDriver.dir/ToolChains.cpp.o] Error 1
make[1]: *** [interpreter/llvm/src/tools/clang/lib/Driver/CMakeFiles/clangDriver.dir/all] Error 2
make: *** [all] Error 2
So I need either solving the c++ compiler so i can use the last compiled version of ROOT that I have,
Or succeed to solve the problem while compiling ROOT.
Can you help me please? I am blocked. Thanks a lot.