Failed to 'make' when installing gr-mediatools - makefile

The gr-mediatools could be find from here . The result of 'cmake':
Something like:
Policy CMP0026 is not set: Disallow use of the LOCATION target property
...
get_target_property() called with non-existent target
There may has some problem result in the fail of 'make'. I don't know it quite well.
-- The CXX compiler identification is GNU 5.4.0
-- The C compiler identification is GNU 5.4.0
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Build type not specified: defaulting to release.
-- Boost version: 1.58.0
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.29.1")
Checking for GNU Radio Module: RUNTIME
-- Checking for module 'gnuradio-runtime'
-- Found gnuradio-runtime, version 3.7.9
* INCLUDES=/usr/include
* LIBS=/usr/lib/x86_64-linux-gnu/libgnuradio-runtime.so;/usr/lib/x86_64-linux-gnu/libgnuradio-pmt.so
-- Found GNURADIO_RUNTIME: /usr/lib/x86_64-linux-gnu/libgnuradio-runtime.so;/usr/lib/x86_64-linux-gnu/libgnuradio-pmt.so
GNURADIO_RUNTIME_FOUND = TRUE
Checking for GNU Radio Module: BLOCKS
-- Checking for module 'gnuradio-blocks'
-- Found gnuradio-blocks, version 3.7.9
* INCLUDES=/usr/include
* LIBS=/usr/lib/x86_64-linux-gnu/libgnuradio-blocks.so;/usr/lib/x86_64-linux-gnu/libgnuradio-runtime.so;/usr/lib/x86_64-linux-gnu/libgnuradio-pmt.so
-- Found GNURADIO_BLOCKS: /usr/lib/x86_64-linux-gnu/libgnuradio-blocks.so;/usr/lib/x86_64-linux-gnu/libgnuradio-runtime.so;/usr/lib/x86_64-linux-gnu/libgnuradio-pmt.so
GNURADIO_BLOCKS_FOUND = TRUE
Checking for GNU Radio Module: PMT
-- Checking for module 'gnuradio-runtime'
-- Found gnuradio-runtime, version 3.7.9
* INCLUDES=/usr/include
* LIBS=/usr/lib/x86_64-linux-gnu/libgnuradio-runtime.so;/usr/lib/x86_64-linux-gnu/libgnuradio-pmt.so
-- Found GNURADIO_PMT: /usr/lib/x86_64-linux-gnu/libgnuradio-runtime.so;/usr/lib/x86_64-linux-gnu/libgnuradio-pmt.so
GNURADIO_PMT_FOUND = TRUE
--
-- Checking for module SWIG
-- Found SWIG version 3.0.8.
-- Found SWIG: /usr/bin/swig3.0
-- Found PythonLibs: /usr/lib/x86_64-linux-gnu/libpython2.7.so (found suitable version "2.7.12", minimum required is "2")
-- Found PythonInterp: /usr/bin/python2 (found suitable version "2.7.12", minimum required is "2")
-- Performing Test HAVE_WNO_UNUSED_BUT_SET_VARIABLE
-- Performing Test HAVE_WNO_UNUSED_BUT_SET_VARIABLE - Success
CMake Warning (dev) at /usr/lib/x86_64-linux-gnu/cmake/gnuradio/GrTest.cmake:45 (get_target_property):
Policy CMP0026 is not set: Disallow use of the LOCATION target property.
Run "cmake --help-policy CMP0026" for policy details. Use the cmake_policy
command to set the policy and suppress this warning.
**The LOCATION property should not be read from target "gnuradio-mediatools".
Use the target name directly with add_custom_command, or use the generator
expression $<TARGET_FILE>, as appropriate.**
Call Stack (most recent call first):
python/CMakeLists.txt:44 (GR_ADD_TEST)
This warning is for project developers. Use -Wno-dev to suppress it.
CMake Warning (dev) at /usr/lib/x86_64-linux-gnu/cmake/gnuradio/GrTest.cmake:45 (get_target_property):
Policy CMP0045 is not set: Error on non-existent target in
get_target_property. Run "cmake --help-policy CMP0045" for policy details.
Use the cmake_policy command to set the policy and suppress this warning.
get_target_property() called with non-existent target "/usr/bin/python2".
Call Stack (most recent call first):
python/CMakeLists.txt:44 (GR_ADD_TEST)
This warning is for project developers. Use -Wno-dev to suppress it.
CMake Warning (dev) at /usr/lib/x86_64-linux-gnu/cmake/gnuradio/GrTest.cmake:45 (get_target_property):
Policy CMP0045 is not set: Error on non-existent target in
get_target_property. Run "cmake --help-policy CMP0045" for policy details.
Use the cmake_policy command to set the policy and suppress this warning.
get_target_property() called with non-existent target
"/home/imatrix/
RadioML/dataset-master/gr-mediatools-master/python/qa_mediatools_audiosource_s.py".
Call Stack (most recent call first):
python/CMakeLists.txt:44 (GR_ADD_TEST)
This warning is for project developers. Use -Wno-dev to suppress it.
-- Found Doxygen: /usr/bin/doxygen (found version "1.8.11")
-- Configuring done
-- Generating done
-- Build files have been written to: /home/imatrix/ RadioML/dataset-master/gr-mediatools-master/build
The result of 'make -j4' Error like:‘avcodec_alloc_frame’ was not declared in this scope,AVStream::codec’ is deprecated [-Wdeprecated-declarations] It seems
like that the ' gr-mediatools' it too old,should i use the old GNUradio? How could I fix problem like'AVStream::codec’ is deprecated'?
thanks in advance!
Scanning dependencies of target pygen_python_86ad7
Scanning dependencies of target pygen_apps_9a6dd
Scanning dependencies of target mediatools_swig_swig_doc
Scanning dependencies of target gnuradio-mediatools
[ 0%] Built target pygen_apps_9a6dd
[ 0%] Built target mediatools_swig_swig_doc
[ 5%] Generating __init__.pyc
[ 11%] Generating __init__.pyo
Scanning dependencies of target _mediatools_swig_swig_tag
[ 17%] Building CXX object swig/CMakeFiles/_mediatools_swig_swig_tag.dir/_mediatools_swig_swig_tag.cpp.o
[ 23%] Building CXX object lib/CMakeFiles/gnuradio-mediatools.dir/mediatools_audiosource_s.cc.o
[ 29%] Building CXX object lib/CMakeFiles/gnuradio-mediatools.dir/mediatools_audiosource_impl.cc.o
[ 35%] Linking CXX executable _mediatools_swig_swig_tag
[ 35%] Built target pygen_python_86ad7
[ 35%] Built target _mediatools_swig_swig_tag
[ 41%] Generating mediatools_swig.tag
Scanning dependencies of target mediatools_swig_swig_2d0df
[ 47%] Building CXX object swig/CMakeFiles/mediatools_swig_swig_2d0df.dir/mediatools_swig_swig_2d0df.cpp.o
[ 52%] Linking CXX executable mediatools_swig_swig_2d0df
Swig source
[ 52%] Built target mediatools_swig_swig_2d0df
Scanning dependencies of target pygen_swig_52046
[ 58%] Generating mediatools_swig.pyo
[ 64%] Generating mediatools_swig.pyc
[ 70%] Built target pygen_swig_52046
/home/imatrix/ RadioML/dataset-master/gr-mediatools-master/lib/mediatools_audiosource_impl.cc: In member function ‘bool mediatools_audiosource_impl::open(std::__cxx11::string)’:
/home/imatrix/ RadioML/dataset-master/gr-mediatools-master/lib/mediatools_audiosource_impl.cc:42:58: warning: ‘AVStream::codec’ is deprecated [-Wdeprecated-declarations]
d_codec_ctx = d_format_ctx->streams[stream_idx]->codec;
^
In file included from /home/imatrix/ RadioML/dataset-master/gr-mediatools-master/include/mediatools_audiosource_impl.h:11:0,
from /home/imatrix/ RadioML/dataset-master/gr-mediatools-master/lib/mediatools_audiosource_impl.cc:1:
/usr/local/include/libavformat/avformat.h:893:21: note: declared here
AVCodecContext *codec;
^
/home/imatrix/ RadioML/dataset-master/gr-mediatools-master/lib/mediatools_audiosource_impl.cc:42:58: warning: ‘AVStream::codec’ is deprecated [-Wdeprecated-declarations]
d_codec_ctx = d_format_ctx->streams[stream_idx]->codec;
^
In file included from /home/imatrix/ RadioML/dataset-master/gr-mediatools-master/include/mediatools_audiosource_impl.h:11:0,
from /home/imatrix/ RadioML/dataset-master/gr-mediatools-master/lib/mediatools_audiosource_impl.cc:1:
/usr/local/include/libavformat/avformat.h:893:21: note: declared here
AVCodecContext *codec;
^
/home/imatrix/ RadioML/dataset-master/gr-mediatools-master/lib/mediatools_audiosource_impl.cc:42:58: warning: ‘AVStream::codec’ is deprecated [-Wdeprecated-declarations]
d_codec_ctx = d_format_ctx->streams[stream_idx]->codec;
^
In file included from /home/imatrix/ RadioML/dataset-master/gr-mediatools-master/include/mediatools_audiosource_impl.h:11:0,
from /home/imatrix/ RadioML/dataset-master/gr-mediatools-master/lib/mediatools_audiosource_impl.cc:1:
/usr/local/include/libavformat/avformat.h:893:21: note: declared here
AVCodecContext *codec;
^
/home/imatrix/ RadioML/dataset-master/gr-mediatools-master/lib/mediatools_audiosource_impl.cc: In member function ‘void mediatools_audiosource_impl::readData(std::vector<short int>&)’:
/home/imatrix/ RadioML/dataset-master/gr-mediatools-master/lib/mediatools_audiosource_impl.cc:91:39: error: ‘avcodec_alloc_frame’ was not declared in this scope
d_frame = avcodec_alloc_frame();
^
/home/imatrix/ RadioML/dataset-master/gr-mediatools-master/lib/mediatools_audiosource_impl.cc:95:14: warning: ‘int avcodec_decode_audio4(AVCodecContext*, AVFrame*, int*, const AVPacket*)’ is deprecated [-Wdeprecated-declarations]
int rc = avcodec_decode_audio4(d_codec_ctx, d_frame, &got_frame, &d_packet);
^
In file included from /home/imatrix/ RadioML/dataset-master/gr-mediatools-master/include/mediatools_audiosource_impl.h:10:0,
from /home/imatrix/ RadioML/dataset-master/gr-mediatools-master/lib/mediatools_audiosource_impl.cc:1:
/usr/local/include/libavcodec/avcodec.h:4817:5: note: declared here
int avcodec_decode_audio4(AVCodecContext *avctx, AVFrame *frame,
^
/home/imatrix/ RadioML/dataset-master/gr-mediatools-master/lib/mediatools_audiosource_impl.cc:95:14: warning: ‘int avcodec_decode_audio4(AVCodecContext*, AVFrame*, int*, const AVPacket*)’ is deprecated [-Wdeprecated-declarations]
int rc = avcodec_decode_audio4(d_codec_ctx, d_frame, &got_frame, &d_packet);
^
In file included from /home/imatrix/ RadioML/dataset-master/gr-mediatools-master/include/mediatools_audiosource_impl.h:10:0,
from /home/imatrix/ RadioML/dataset-master/gr-mediatools-master/lib/mediatools_audiosource_impl.cc:1:
/usr/local/include/libavcodec/avcodec.h:4817:5: note: declared here
int avcodec_decode_audio4(AVCodecContext *avctx, AVFrame *frame,
^
/home/imatrix/ RadioML/dataset-master/gr-mediatools-master/lib/mediatools_audiosource_impl.cc:95:79: warning: ‘int avcodec_decode_audio4(AVCodecContext*, AVFrame*, int*, const AVPacket*)’ is deprecated [-Wdeprecated-declarations]
int rc = avcodec_decode_audio4(d_codec_ctx, d_frame, &got_frame, &d_packet);
^
In file included from /home/imatrix/ RadioML/dataset-master/gr-mediatools-master/include/mediatools_audiosource_impl.h:10:0,
from /home/imatrix/ RadioML/dataset-master/gr-mediatools-master/lib/mediatools_audiosource_impl.cc:1:
/usr/local/include/libavcodec/avcodec.h:4817:5: note: declared here
int avcodec_decode_audio4(AVCodecContext *avctx, AVFrame *frame,
^
lib/CMakeFiles/gnuradio-mediatools.dir/build.make:86: recipe for target 'lib/CMakeFiles/gnuradio-mediatools.dir/mediatools_audiosource_impl.cc.o' failed
make[2]: *** [lib/CMakeFiles/gnuradio-mediatools.dir/mediatools_audiosource_impl.cc.o] Error 1
make[2]: *** Waiting for .. undone....
CMakeFiles/Makefile2:135: recipe for target 'lib/CMakeFiles/gnuradio-mediatools.dir/all' failed
make[1]: *** [lib/CMakeFiles/gnuradio-mediatools.dir/all] Error 2
Makefile:138: recipe for target 'all' failed
make: *** [all] Error 2

I needed to change the offending line
d_frame = avcodec_alloc_frame();
in mediatools_audiosource_impl.cc with:
d_frame = av_frame_alloc();
I was able successfully install gr-mediatools after the change.
Thanks

Related

Cmake with "undefined references" Despite Finding Boost Libs

cmake 2.8.12 correctly shows:
Boost version: 1.56.0
Found the following Boost libraries:
system
thread
log
log_setup
And the generated link.txt shows full, correct path to the .so files, but every Boost call is simply "In function...undefined reference to boost..." with no cxx11 or ABI or any other hints.
CMakeFiles/proj.dir/src/proj.cc.o: In function `proj::init()':
/code/proj/src/proj.cc:31: undefined reference to `boost::log::v2s_mt_posix::core::get()'
This is running on an old box, for example using libc-2.13.so on a 32bit processor. I compiled the boost libraries on the box yesterday and am trying to compile this on the box but am getting nowhere. I compiled cmake on the box as well.
Searching dozens of questions here has gotten me nowhere. Any suggestions on what is wrong? How to investigate the issue?
set(PROJ_NAME my-proj)
set(HEADERS
headers/proj.h
)
set(SOURCES
src/proj.cc
)
set(MAIN_FILE src/main.cc)
if(COMMAND cmake_policy)
cmake_policy(SET CMP0003 NEW)
endif(COMMAND cmake_policy)
add_executable (${PROJ_NAME} ${SOURCES}
${HEADERS} ${MAIN_FILE})
target_include_directories ( ${PROJ_NAME}
PUBLIC headers
PRIVATE .
PRIVATE /usr/local/lib/
)
set( Boost_LIBRARY_DIR /usr/local/lib )
find_package(Boost COMPONENTS system thread log log_setup REQUIRED)
link_directories(${Boost_LIBRARY_DIR})
target_link_libraries ( ${PROJ_NAME} -pthread ${Boost_LIBRARIES} )
I think that
set( Boost_LIBRARY_DIR /usr/local/lib )
is wrong and interferes badly with Find_Package. If you want to provide a hint, use e.g. BOOST_ROOT as documented:
BOOST_ROOT=~/custom/boost cmake .
Here's a fixed-up / simplified self-contained example that works:
File CMakeLists.txt
set(PROJ_NAME my-proj)
find_package(Boost 1.65.0 COMPONENTS system thread log log_setup REQUIRED)
set(HEADERS
headers/proj.h
)
set(SOURCES
src/proj.cc
)
set(MAIN_FILE src/main.cc)
if(COMMAND cmake_policy)
cmake_policy(SET CMP0003 NEW)
endif(COMMAND cmake_policy)
add_executable (${PROJ_NAME} ${SOURCES}
${HEADERS} ${MAIN_FILE})
target_include_directories ( ${PROJ_NAME}
PUBLIC headers
PRIVATE .
PRIVATE /usr/local/lib/
)
link_directories(${Boost_LIBRARY_DIR})
target_link_libraries ( ${PROJ_NAME} -pthread ${Boost_LIBRARIES} )
File headers/proj.h
File src/main.cc
int main() {
}
File src/proj.cc
#include <boost/thread.hpp>
void foo() {
boost::thread_group tg;
tg.create_thread([]{});
tg.join_all();
}
Proof of the pudding:
cmake .
CMake Warning (dev) in CMakeLists.txt:
No project() command is present. The top-level CMakeLists.txt file must
contain a literal, direct call to the project() command. Add a line of
code such as
project(ProjectName)
near the top of the file, but after cmake_minimum_required().
CMake is pretending there is a "project(Project)" command on the first
line.
This warning is for project developers. Use -Wno-dev to suppress it.
-- The C compiler identification is GNU 7.5.0
-- The CXX compiler identification is GNU 7.5.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
-- Found Boost: /usr/include (found suitable version "1.65.1", minimum required is "1.65.0") found components: system thread log log_setup chrono date_time atomic filesystem regex
CMake Warning (dev) in CMakeLists.txt:
No cmake_minimum_required command is present. A line of code such as
cmake_minimum_required(VERSION 3.22)
should be added at the top of the file. The version specified may be lower
if you wish to support older CMake versions for this project. For more
information run "cmake --help-policy CMP0000".
This warning is for project developers. Use -Wno-dev to suppress it.
-- Configuring done
-- Generating done
-- Build files have been written to: /tmp/q
 sehe  /  tmp  q  make
[ 66%] Building CXX object CMakeFiles/my-proj.dir/src/proj.o
[ 66%] Building CXX object CMakeFiles/my-proj.dir/src/main.o
[100%] Linking CXX executable my-proj
[100%] Built target my-proj
 sehe  /  tmp  q  ldd my-proj
linux-vdso.so.1 (0x00007ffd917e4000)
libboost_system.so.1.65.1 => /usr/lib/x86_64-linux-gnu/libboost_system.so.1.65.1 (0x00007f40c25bd000)
libboost_thread.so.1.65.1 => /usr/lib/x86_64-linux-gnu/libboost_thread.so.1.65.1 (0x00007f40c2398000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f40c2179000)
libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f40c1d6c000)
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f40c1b54000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f40c1763000)
librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f40c155b000)
/lib64/ld-linux-x86-64.so.2 (0x00007f40c29e7000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f40c11bd000)
NOTES
Note that if you use a too-recent boost then maybe the dependencies might be incorrect:
CMake Warning at /usr/share/cmake-3.22/Modules/FindBoost.cmake:1369 (message):
New Boost version may have incorrect or missing dependencies and imported
targets
Call Stack (most recent call first):
/usr/share/cmake-3.22/Modules/FindBoost.cmake:1492 (_Boost_COMPONENT_DEPENDENCIES)
/usr/share/cmake-3.22/Modules/FindBoost.cmake:2102 (_Boost_MISSING_DEPENDENCIES)
CMakeLists.txt:5 (find_package)
On my system, e.g. in order to use Boost 1.78 successfully, I have to add Boost System manually. Linker errors:
make
[ 33%] Building CXX object CMakeFiles/my-proj.dir/src/proj.o
[ 66%] Building CXX object CMakeFiles/my-proj.dir/src/main.o
[100%] Linking CXX executable my-proj
CMakeFiles/my-proj.dir/src/proj.o: In function `__static_initialization_and_destruction_0(int, int)':
proj.cc:(.text+0x6a1): undefined reference to `boost::system::generic_category()'
proj.cc:(.text+0x6ad): undefined reference to `boost::system::generic_category()'
proj.cc:(.text+0x6b9): undefined reference to `boost::system::system_category()'
CMakeFiles/my-proj.dir/src/proj.o: In function `boost::system::error_category::std_category::equivalent(int, std::error_condition const&) const':
proj.cc:(.text._ZNK5boost6system14error_category12std_category10equivalentEiRKSt15error_condition[_ZNK5boost6system14error_category12std_category10equivalentEiRKSt15error_condition]+0xb8): undefined reference to `boost::system::generic_category()'
proj.cc:(.text._ZNK5boost6system14error_category12std_category10equivalentEiRKSt15error_condition[_ZNK5boost6system14error_category12std_category10equivalentEiRKSt15error_condition]+0xf3): undefined reference to `boost::system::generic_category()'
CMakeFiles/my-proj.dir/src/proj.o: In function `boost::system::error_category::std_category::equivalent(std::error_code const&, int) const':
proj.cc:(.text._ZNK5boost6system14error_category12std_category10equivalentERKSt10error_codei[_ZNK5boost6system14error_category12std_category10equivalentERKSt10error_codei]+0xb8): undefined reference to `boost::system::generic_category()'
proj.cc:(.text._ZNK5boost6system14error_category12std_category10equivalentERKSt10error_codei[_ZNK5boost6system14error_category12std_category10equivalentERKSt10error_codei]+0xf3): undefined reference to `boost::system::generic_category()'
proj.cc:(.text._ZNK5boost6system14error_category12std_category10equivalentERKSt10error_codei[_ZNK5boost6system14error_category12std_category10equivalentERKSt10error_codei]+0x1d2): undefined reference to `boost::system::generic_category()'
CMakeFiles/my-proj.dir/src/proj.o:proj.cc:(.text._ZN5boost16thread_exceptionC2EiPKc[_ZN5boost16thread_exceptionC5EiPKc]+0x28): more undefined references to `boost::system::generic_category()' follow
collect2: error: ld returned 1 exit status
CMakeFiles/my-proj.dir/build.make:121: recipe for target 'my-proj' failed
make[2]: *** [my-proj] Error 1
CMakeFiles/Makefile2:82: recipe for target 'CMakeFiles/my-proj.dir/all' failed
make[1]: *** [CMakeFiles/my-proj.dir/all] Error 2
Makefile:90: recipe for target 'all' failed
make: *** [all] Error 2
Fix:
target_link_libraries ( ${PROJ_NAME} boost_system )
I hope that it is not too late to drop my answer here.
TLDR: When Boost is installed using package managers such as Homebrew or macports often it is compiled using clang++. But on your project side, one might be using a different compiler, leading to undefined references in the linkage stage.
In order to use the compiler that you want to use in your project, you will have to use a version of Boost compiled with the same compiler. to achieve this you can customize Boost compilation on macos as follows:
In the Bootstrap stage use:
./bootstrap.sh --prefix=/usr/local/Cellar/boost_gcc --with-toolset=gcc --without-libraries=python,mpi
Install the headers-only part as follows:
./b2 headers
Customize the compiler to build the libraries by adding a file named user-config.jam with the following line in it:
using gcc : : /usr/local/bin/g++-11 ;
Compile and install the library as follows:
./b2 -d2 -j12 --layout=tagged-1.66 --user-config=user-config.jam install threading=multi,single link=shared,static
I hope that it helps.

igatools install logstream error

I am building igatools logstream error, try to solve the problem through http://logstream.sourceforge.net/ download loglog, but logtream installation failed, has been studied for two weeks, still unresolved,
Error:
[ 47%] Building CXX object CMakeFiles/igatools.dir/source/base/tensor.cpp.o
In file included from
/usr/local/src/igatools/include/igatools/base/tensor.h:26:0,
from /usr/local/src/igatools/source/base/tensor.cpp:21:
/usr/local/src/igatools/include/igatools/base/logstream.h: In member
function ‘iga::LogStream& iga::LogStream::operator<<(double)’:
/usr/local/src/igatools/include/igatools/base/logstream.h:667:14: error:
‘numeric_limits’ is not a member of ‘std’
if (!(t <= std::numeric_limits<double>::max()))
^~~
/usr/local/src/igatools/include/igatools/base/logstream.h:667:34: error:
expected primary-expression before ‘double’
if (!(t <= std::numeric_limits<double>::max()))
^~~~~~
/usr/local/src/igatools/include/igatools/base/logstream.h:667:34: error:
expected ‘)’ before ‘double’
/usr/local/src/igatools/include/igatools/base/logstream.h:668:16: error:
expected ‘)’ before ‘;’ token
stream << t;
^
make[2]: *** [CMakeFiles/igatools.dir/source/base/tensor.cpp.o] Error 1
make[1]: *** [CMakeFiles/igatools.dir/all] Error 2
make: *** [all] Error 2
This is my system environment:
System:CentOS 6.7 x86_64
Cmake:3.1.0
Doxygen:1.8.1
Boost:1..64.0
Trilinos:11.6.1
GCC:6.2.0 (gcc,g++,gfortran)
Igatools:git clone https://github.com/igatoolsProject/igatools.git
Igatools install:
Before the installation boost1.54.0 boost report error, and finally in the boost1.54.0 on the basis of the same method used to compile and install boost1.64.0, to solve the problem of boost error, although it still shows boost1.54.0, but should not affect if Maybe, I think it is not difficult to solve
[root#localhost build_igatools]# cmake ${IGATOOLS_SOURCE} \
> -DTrilinos_PREFIX=${TRILINOS_PREFIX} \
> -DCMAKE_INSTALL_PREFIX=${IGATOOLS_PREFIX} \
> -DCMAKE_CXX_COMPILER=/usr/local/bin/g++
-- The CXX compiler identification is GNU 6.2.0
-- The C compiler identification is GNU 6.2.0
-- Check for working CXX compiler: /usr/local/bin/g++
-- Check for working CXX compiler: /usr/local/bin/g++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Check for working C compiler: /usr/local/bin/gcc
-- Check for working C compiler: /usr/local/bin/gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Found sed: /bin/sed.
-- Found PythonInterp: /usr/bin/python (found version "2.6.6")
-- Found Doxygen: /usr/local/bin/doxygen (found suitable version "1.8.1",
minimum required is "1.8.1")
-- TRILINOS support is enabled.
-- NURBS support is enabled.
-- Quadruple precision support (EXPERIMENTAL) is not enabled.
-- Multipatch features (EXPERIMENTAL) are not enabled.
-- Hierarchical splines support (EXPERIMENTAL) is not enabled.
-- Mesh refinement support (EXPERIMENTAL) is enabled.
-- Serialization support (EXPERIMENTAL) is not enabled.
-- Paraview plugin building (EXPERIMENTAL) is not enabled.
-- XML I/O support (EXPERIMENTAL) is not enabled.
-- VTK support (EXPERIMENTAL) is not enabled.
-- CGAL support (EXPERIMENTAL) is not enabled.
-- Boost version: 1.54.0
-- Found Trilinos: version 11.6.1.
-- IGATOOLS build type: DEBUG
Configuring instantiations
-- Generating physical basis table.
Default instantiation table was created.
Configuring Tutorial
-- Configured: example_06
-- Configured: example_02
-- Configured: example_07
-- Configured: example_05
-- Configured: example_08
-- Configured: example_01
-- Configured: example_04
-- Configured: example_09
-- Configured: example_03
Configuring unit tests
******************************************************************
**
** [1] To compile and install the library run:
** make install
**
** [2] To use the library it should be made visible to the loader.
** Add the following line to your ~/.bash_rc
** export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/lib
**
** [3] To generate and install the online documentation run:
** make doc
**
******************************************************************
-- Configuring done
-- Generating done
-- Build files have been written to: /usr/local/src/build_igatools
[root#localhost build_igatools]#
When i make install on the error, suggesting that logtream error message, I tried to install logtream package, but failed
[root#localhost build_igatools]# make install
[ 0%] Generating file io/writer.inst
[ 0%] Generating file base/tensor.inst
[ 2%] Generating file base/quadrature_lib.inst
...
...
...
[ 43%] Generating file functions/ig_function_handler.inst
[ 43%] Generating file functions/sub_grid_function_element.inst
[ 45%] Generating file functions/grid_function_handler.inst
[ 45%] Generating file functions/function_element.inst
[ 45%] Generating file functions/sub_grid_function.inst
Scanning dependencies of target igatools
[ 47%] Building CXX object CMakeFiles/igatools.dir/source/base/tensor.cpp.o
In file included from
/usr/local/src/igatools/include/igatools/base/tensor.h:26:0,
from /usr/local/src/igatools/source/base/tensor.cpp:21:
/usr/local/src/igatools/include/igatools/base/logstream.h: In member
function ‘iga::LogStream& iga::LogStream::operator<<(double)’:
/usr/local/src/igatools/include/igatools/base/logstream.h:667:14: error:
‘numeric_limits’ is not a member of ‘std’
if (!(t <= std::numeric_limits<double>::max()))
^~~
/usr/local/src/igatools/include/igatools/base/logstream.h:667:34: error:
expected primary-expression before ‘double’
if (!(t <= std::numeric_limits<double>::max()))
^~~~~~
/usr/local/src/igatools/include/igatools/base/logstream.h:667:34: error:
expected ‘)’ before ‘double’
/usr/local/src/igatools/include/igatools/base/logstream.h:668:16: error:
expected ‘)’ before ‘;’ token
stream << t;
^
make[2]: *** [CMakeFiles/igatools.dir/source/base/tensor.cpp.o] Error 1
make[1]: *** [CMakeFiles/igatools.dir/all] Error 2
make: *** [all] Error 2
Oh,my god ,help me!

Building the P compiler on Mac OS X

I'm having trouble building Microsoft's P language compiler on Mac OS X El Capitan 10.11.6.
Relevant portions of the build log (cd Bld; ./build.sh):
~/workspace/P/Bld
-- The C compiler identification is AppleClang 8.0.0.8000038
-- The CXX compiler identification is AppleClang 8.0.0.8000038
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - found
-- Found Threads: TRUE
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/jlieberm/workspace/P/Bld/build
Scanning dependencies of target Prt
[ 12%] Building C object Prt/CMakeFiles/Prt.dir/API/PrtUser.c.o
In file included from /Users/jlieberm/workspace/P/Src/Prt/API/PrtUser.c:1:
In file included from /Users/jlieberm/workspace/P/Src/Prt/API/PrtUser.h:9:
In file included from /Users/jlieberm/workspace/P/Src/Prt/Core/PrtExecution.h:4:
In file included from /Users/jlieberm/workspace/P/Src/Prt/API/Prt.h:9:
In file included from /Users/jlieberm/workspace/P/Src/Prt/API/PrtProgram.h:14:
/Users/jlieberm/workspace/P/Src/Prt/API/PrtValues.h:255:8: error: unknown type
name 'PRT_FUN_PARAM_STATUS'
_In_ PRT_FUN_PARAM_STATUS status,
^
/Users/jlieberm/workspace/P/Src/Prt/API/PrtValues.h:326:8: error: unknown type
name 'PRT_FUN_PARAM_STATUS'
_In_ PRT_FUN_PARAM_STATUS status,
^
/Users/jlieberm/workspace/P/Src/Prt/API/PrtValues.h:436:8: error: unknown type
name 'PRT_FUN_PARAM_STATUS'
_In_ PRT_FUN_PARAM_STATUS status,
^
In file included from /Users/jlieberm/workspace/P/Src/Prt/API/PrtUser.c:1:
In file included from /Users/jlieberm/workspace/P/Src/Prt/API/PrtUser.h:9:
/Users/jlieberm/workspace/P/Src/Prt/Core/PrtExecution.h:164:122: error: unknown
type name 'PRT_FUN_PARAM_STATUS'
...PRT_MACHINEINST_PRIV * context, _In_ PRT_UINT32 varIndex, _In_ PRT_FUN_P...
^
/Users/jlieberm/workspace/P/Src/Prt/Core/PrtExecution.h:184:8: error: unknown
type name 'PRT_FUN_PARAM_STATUS'
_In_ PRT_FUN_PARAM_STATUS status,
^
/Users/jlieberm/workspace/P/Src/Prt/Core/PrtExecution.h:500:8: error: unknown
type name 'PRT_FUN_PARAM_STATUS'
_In_ PRT_FUN_PARAM_STATUS payloadStatus,
^
/Users/jlieberm/workspace/P/Src/Prt/API/PrtUser.c:508:3: error: use of
undeclared identifier 'PRT_FUN_PARAM_STATUS'
PRT_FUN_PARAM_STATUS argStatus = va_arg(argp, PRT_FUN_PA...
^
7 errors generated.
make[2]: *** [Prt/CMakeFiles/Prt.dir/API/PrtUser.c.o] Error 1
make[1]: *** [Prt/CMakeFiles/Prt.dir/all] Error 2
make: *** [all] Error 2
I am using mono 4.6.0 stable and cmake 3.6.2, which meet the minimum requirements in the P build guide for OS X and Linux.
What am I doing wrong?
This was a bug with the source code. The P team failed to include the PRT_FUN_PARAM_STATUS enum declaration in PrtValues.h:
typedef enum PRT_FUN_PARAM_STATUS
{
PRT_FUN_PARAM_CLONE,
PRT_FUN_PARAM_SWAP,
PRT_FUN_PARAM_XFER
} PRT_FUN_PARAM_STATUS;
Fixed with 1fd291c.

CppuTest to build with C++11 versions

Installed g++ 4.9.0 (experimental) version under Ubuntu (I am using certain features provided by this version)
When building my code, I use cmake from a script, and it builds correctly. gcc below contains the path where g++ is installed (/mnt...)
$_cmake_ $_dir_ -DCMAKE_CXX_COMPILER=${_gpp_} -DCMAKE_C_COMPILER=${_gcc_} -DCMAKE_BUILD_TYPE=${_build_} -DCMAKE_INSTALL_PREFIX=${_install_} -DBUILD_TESTING:BOOL=1
Now, when I make the CppuTest to build the Unit Tests for my code, I get the following error.
make all
compiling UncrosserTest.cpp
In file included from /home/miguel/Desktop/Ugur/scmProject/scm/dist/dev/mfx_prod/scm/20160207/include/scm/services/primitives.hpp:4:0,
from /home/miguel/Desktop/Ugur/scmProject/log/lidya/src/cpp/scm/services/examples/dummy_strategy/Inside.hpp:6,
from AllTests/Uncrosser/UncrosserTest.cpp:7:
/usr/include/c++/4.9/experimental/optional: In member function ‘void std::experimental::_Optional_base<_Tp, _ShouldProvideDestructor>::_M_construct(_Args&& ...)’:
/usr/include/c++/4.9/experimental/optional:294:18: error: expected type-specifier
::new (std::__addressof(this->_M_payload))
^
/usr/include/c++/4.9/experimental/optional:294:18: error: expected ‘)’
/usr/include/c++/4.9/experimental/optional: In member function ‘void std::experimental::_Optional_base<_Tp, false>::_M_construct(_Args&& ...)’:
/usr/include/c++/4.9/experimental/optional:424:18: error: expected type-specifier
::new (std::__addressof(this->_M_payload))
^
/usr/include/c++/4.9/experimental/optional:424:18: error: expected ‘)’
make: *** [objs/AllTests/Uncrosser/UncrosserTest.o] Error 1
In the CppuTest makefile have included CPPUTEST_CPPFLAGS += -std=c++1y. I guess that am missing some flags in this makefile because as I said the C++ experimental library is building correctly in my "regular" code. What am I missing ?
Possible it's an include problem, see CppUTest Manual - section Conflicts with operator new macros (STL!) and Conflicts with my own overload!
TL;DR
In UncrosserTest add includes for CppUTest after your's.
Instead of
#include <CppUTest/TestHarnes.h>
#include "whatever.h"
do
#include "whatever.h"
#include <CppUTest/TestHarnes.h>

Problems Compiling PySide on MacOSX

I'm trying to compile PySide on a Mac (to use it with a software that has its own Python interpreter, that's why I can't use the binaries installers), and I have some issues I don't know how to solve...
I am using mac 10.8, and all dependencies (Cmake, XCode...) are up-to-date.
I don't know what's wrong, and I am now out of ideas.
here is the last part of what the compiler tells me:
Linking CXX executable testcontainer
[ 39%] Built target testcontainer
[ 39%] Generating testctorinformation.moc
Scanning dependencies of target testctorinformation
[ 39%] Building CXX object ApiExtractor/tests/CMakeFiles/testctorinformation.dir/testctorinformation.cpp.o
1 warning generated.
Linking CXX executable testcodeinjection
Undefined symbols for architecture x86_64:
"QCoreApplication::QCoreApplication(int&, char**, int)", referenced from:
TestCodeInjections::testReadFileUtf8() in testcodeinjection.cpp.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [ApiExtractor/tests/testcodeinjection] Error 1
make[1]: *** [ApiExtractor/tests/CMakeFiles/testcodeinjection.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
In file included from /Users/jle_guen/Desktop/C4D MAC/BuildScripts-master/shiboken/ApiExtractor/tests/testconversionruletag.cpp:26:
In file included from /Users/jle_guen/Desktop/C4D MAC/BuildScripts-master/shiboken/ApiExtractor/tests/testutil.h:27:
In file included from /Users/jle_guen/Desktop/C4D MAC/BuildScripts-master/shiboken/ApiExtractor/abstractmetabuilder.h:28:
/Users/jle_guen/Desktop/C4D MAC/BuildScripts-master/shiboken/ApiExtractor/abstractmetalang.h:1347:10: warning:
private field 'm_reserveIn file included from /Users/jle_guen/Desktop/C4D MAC/BuildScripts-master/shiboken/ApiExtractor/tests/testconversionoperator.cpp:26:
In file included from /Users/jle_guen/Desktop/C4D MAC/BuildScripts-master/shiboken/ApiExtractor/tests/testutil.h:27:
In file included from /Users/jle_guen/Desktop/C4D MAC/BuildScripts-master/shiboken/ApiExtractor/abstractmetabuilder.h:28:
/Users/jle_guen/Desktop/C4D MAC/BuildScripts-master/shiboken/ApiExtractor/abstractmetalang.h:1347:10: warning:
private field 'm_reserved' is not used [-Wunused-private-field]
d' is not used [-Wunused-private-field]
uint m_reserved : 31;
^
uint m_reserved : 31;
^
1 warning generated.
Linking CXX executable testconversionruletag
[ 39%] Built target testconversionruletag
1 warning generated.
Linking CXX executable testconversionoperator
[ 39%] Built target testconversionoperator
In file included from /Users/jle_guen/Desktop/C4D MAC/BuildScripts-master/shiboken/ApiExtractor/tests/testctorinformation.cpp:25:
In file included from /Users/jle_guen/Desktop/C4D MAC/BuildScripts-master/shiboken/ApiExtractor/abstractmetabuilder.h:28:
/Users/jle_guen/Desktop/C4D MAC/BuildScripts-master/shiboken/ApiExtractor/abstractmetalang.h:1347:10: warning:
private field 'm_reserved' is not used [-Wunused-private-field]
uint m_reserved : 31;
^
1 warning generated.
Linking CXX executable testctorinformation
[ 39%] Built target testctorinformation
make: *** [all] Error 2

Resources