Building the P compiler on Mac OS X - macos

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.

Related

glog doesn't compile on Windows with MinGW

It seems that glog doesn't compile on Windows with MinGW. Cmake configuration and generation is OK, but when I start the mingw32-make.exe -j10 command, I get a lot of errors related with ambiguity declarations.
This is the complete cmake configure and generate command output:
D:\INSTALL\Development\lib\ceres-mingw\glog\build>"D:\Program Files\CMake\bin\cmake.exe" -G "MinGW Makefiles" -Dgflags_DIR="D:\INSTALL\Development\lib\ceres-mingw\gflags\build" ..
-- The C compiler identification is GNU 9.2.0
-- The CXX compiler identification is GNU 9.2.0
-- Check for working C compiler: D:/MinGW/bin/gcc.exe
-- Check for working C compiler: D:/MinGW/bin/gcc.exe -- 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: D:/MinGW/bin/g++.exe
-- Check for working CXX compiler: D:/MinGW/bin/g++.exe -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Looking for gflags namespace
-- Looking for gflags namespace - gflags
-- 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
-- Could NOT find Unwind (missing: Unwind_INCLUDE_DIR Unwind_LIBRARY Unwind_PLATFORM_LIBRARY)
-- Looking for dlfcn.h
-- Looking for dlfcn.h - found
-- Looking for execinfo.h
-- Looking for execinfo.h - not found
-- Looking for glob.h
-- Looking for glob.h - found
-- Looking for inttypes.h
-- Looking for inttypes.h - found
-- Looking for memory.h
-- Looking for memory.h - found
-- Looking for pwd.h
-- Looking for pwd.h - not found
-- Looking for stdint.h
-- Looking for stdint.h - found
-- Looking for stdlib.h
-- Looking for stdlib.h - found
-- Looking for string.h
-- Looking for string.h - found
-- Looking for strings.h
-- Looking for strings.h - found
-- Looking for sys/stat.h
-- Looking for sys/stat.h - found
-- Looking for sys/syscall.h
-- Looking for sys/syscall.h - not found
-- Looking for sys/time.h
-- Looking for sys/time.h - found
-- Looking for sys/types.h
-- Looking for sys/types.h - found
-- Looking for sys/utsname.h
-- Looking for sys/utsname.h - not found
-- Looking for sys/wait.h
-- Looking for sys/wait.h - not found
-- Looking for syscall.h
-- Looking for syscall.h - not found
-- Looking for syslog.h
-- Looking for syslog.h - not found
-- Looking for ucontext.h
-- Looking for ucontext.h - not found
-- Looking for unistd.h
-- Looking for unistd.h - found
-- Looking for C++ include ext/hash_map
-- Looking for C++ include ext/hash_map - found
-- Looking for C++ include ext/hash_set
-- Looking for C++ include ext/hash_set - found
-- Looking for C++ include ext/slist
-- Looking for C++ include ext/slist - found
-- Looking for C++ include tr1/unordered_map
-- Looking for C++ include tr1/unordered_map - found
-- Looking for C++ include tr1/unordered_set
-- Looking for C++ include tr1/unordered_set - found
-- Looking for C++ include unordered_map
-- Looking for C++ include unordered_map - found
-- Looking for C++ include unordered_set
-- Looking for C++ include unordered_set - found
-- Looking for stddef.h
-- Looking for stddef.h - found
-- Check size of unsigned __int16
-- Check size of unsigned __int16 - done
-- Check size of u_int16_t
-- Check size of u_int16_t - failed
-- Check size of uint16_t
-- Check size of uint16_t - done
-- Looking for dladdr
-- Looking for dladdr - not found
-- Looking for fcntl
-- Looking for fcntl - not found
-- Looking for pread
-- Looking for pread - not found
-- Looking for pwrite
-- Looking for pwrite - not found
-- Looking for sigaction
-- Looking for sigaction - not found
-- Looking for sigaltstack
-- Looking for sigaltstack - not found
-- Performing Test HAVE_NO_DEPRECATED
-- Performing Test HAVE_NO_DEPRECATED - Success
-- Performing Test HAVE_NO_UNNAMED_TYPE_TEMPLATE_ARGS
-- Performing Test HAVE_NO_UNNAMED_TYPE_TEMPLATE_ARGS - Failed
-- Looking for snprintf
-- Looking for snprintf - found
-- Looking for UnDecorateSymbolName in dbghelp
-- Looking for UnDecorateSymbolName in dbghelp - not found
-- Performing Test HAVE___ATTRIBUTE__
-- Performing Test HAVE___ATTRIBUTE__ - Success
-- Performing Test HAVE___ATTRIBUTE__VISIBILITY_DEFAULT
-- Performing Test HAVE___ATTRIBUTE__VISIBILITY_DEFAULT - Success
-- Performing Test HAVE___ATTRIBUTE__VISIBILITY_HIDDEN
-- Performing Test HAVE___ATTRIBUTE__VISIBILITY_HIDDEN - Success
-- Performing Test HAVE___BUILTIN_EXPECT
-- Performing Test HAVE___BUILTIN_EXPECT - Success
-- Performing Test HAVE___SYNC_VAL_COMPARE_AND_SWAP
-- Performing Test HAVE___SYNC_VAL_COMPARE_AND_SWAP - Success
-- Performing Test HAVE_RWLOCK
-- Performing Test HAVE_RWLOCK - Failed
-- Performing Test HAVE___DECLSPEC
-- Performing Test HAVE___DECLSPEC - Success
-- Performing Test STL_NO_NAMESPACE
-- Performing Test STL_NO_NAMESPACE - Failed
-- Performing Test STL_STD_NAMESPACE
-- Performing Test STL_STD_NAMESPACE - Success
-- Performing Test HAVE_USING_OPERATOR
-- Performing Test HAVE_USING_OPERATOR - Success
-- Performing Test HAVE_NAMESPACES
-- Performing Test HAVE_NAMESPACES - Success
-- Performing Test HAVE_GCC_TLS
-- Performing Test HAVE_GCC_TLS - Success
-- Performing Test HAVE_MSVC_TLS
-- Performing Test HAVE_MSVC_TLS - Success
-- Performing Test HAVE_CXX11_TLS
-- Performing Test HAVE_CXX11_TLS - Success
-- Performing Test HAVE_ALIGNED_STORAGE
-- Performing Test HAVE_ALIGNED_STORAGE - Success
-- Performing Test HAVE_SYMBOLIZE
-- Performing Test HAVE_SYMBOLIZE - Failed
-- Performing Test HAVE_LOCALTIME_R
-- Performing Test HAVE_LOCALTIME_R - Failed
-- Configuring done
-- Generating done
-- Build files have been written to: D:/INSTALL/Development/lib/ceres-mingw/glog/build
And this is the error output of the mingw32 compilation command:
D:\INSTALL\Development\lib\ceres-mingw\glog\src\demangle.cc:42:10: fatal error: dbghelp.h: No such file or directory
42 | #include <dbghelp.h>
| ^~~~~~~~~~~
compilation terminated.
CMakeFiles\glog.dir\build.make:62: recipe for target 'CMakeFiles/glog.dir/src/demangle.cc.obj' failed
mingw32-make[2]: *** [CMakeFiles/glog.dir/src/demangle.cc.obj] Error 1
mingw32-make[2]: *** Waiting for unfinished jobs....
In file included from D:\INSTALL\Development\lib\ceres-mingw\glog\src\logging.cc:63:
D:\INSTALL\Development\lib\ceres-mingw\glog\src\windows/dirent.h:383:28: error: missing binary operator before token "("
383 | #if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
| ^
D:\INSTALL\Development\lib\ceres-mingw\glog\src\windows/dirent.h:405:28: error: missing binary operator before token "("
405 | #if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
| ^
D:\INSTALL\Development\lib\ceres-mingw\glog\src\symbolize.cc:877:10: fatal error: dbghelp.h: No such file or directory
877 | #include <dbghelp.h>
| ^~~~~~~~~~~
compilation terminated.
In file included from D:\INSTALL\Development\lib\ceres-mingw\glog\src\windows\port.cc:41:
D:\INSTALL\Development\lib\ceres-mingw\glog\src\windows\port.h:166:14: error: ambiguating new declaration of 'char* strerror_r(int, char*, size_t)'
166 | inline char* strerror_r(int errnum, char* buf, size_t buflen) {
| ^~~~~~~~~~
In file included from d:\mingw\include\winnt.h:49,
from d:\mingw\include\windef.h:269,
from d:\mingw\include\windows.h:42,
from D:\INSTALL\Development\lib\ceres-mingw\glog\src\windows\port.h:52,
from D:\INSTALL\Development\lib\ceres-mingw\glog\src\windows\port.cc:41:
d:\mingw\include\string.h:223:12: note: old declaration 'int strerror_r(int, char*, size_t)'
223 | extern int strerror_r (int, char *, size_t);
| ^~~~~~~~~~C akeFiles\glog.dir\build.make:104: recipe for target 'CMakeFiles/glog.dir/src/symbolize.cc.obj' failed
mingw32-make[2]: *** [CMakeFiles/glog.dir/src/sy D:\INSTALL\Development\lib\ceres-mingw\glog\src\windows\port.cc:bo In function 'litm* localtime_r(const time_t*, tm*)ze':
.cD:\INSTALL\Development\lib\ceres-mingw\glog\src\windows\port.cc:53:3:c. oberror: j]' Elocaltime_srr' was not declared in this scope; did you mean 'orlocaltime_r 1'?
53 |
localtime_s(result, timep);
| ^~~~~~~~~~~
| localtime_r
D:\INSTALL\Development\lib\ceres-mingw\glog\src\windows\port.cc: In function 'tm* gmtime_r(const time_t*, tm*)':
D:\INSTALL\Development\lib\ceres-mingw\glog\src\windows\port.cc:59:5: error: 'gmtime_s' was not declared in this scope; did you mean 'gmtime_r'?
59 | gmtime_s(result, timep);
| ^~~~~~~~
| gmtime_r
In file included from D:\INSTALL\Development\lib\ceres-mingw\glog\src\utilities.h:80,
from D:\INSTALL\Development\lib\ceres-mingw\glog\src\raw_logging.cc:34:
D:/INSTALL/Development/lib/ceres-mingw/glog/src/windows/port.h:166:14: error: ambiguating new declaration of 'char* strerror_r(int, char*, size_t)'
166 | inline char* strerror_r(int errnum, char* buf, size_t buflen) {
| ^~~~~~~~~~
In file included from d:\mingw\include\winnt.h:49,
from d:\mingw\include\windef.h:269,
from d:\mingw\include\windows.h:42,
from D:\INSTALL\Development\lib\ceres-mingw\glog\src\base/mutex.h:129,
from D:\INSTALL\Development\lib\ceres-mingw\glog\src\utilities.h:75,
from D:\INSTALL\Development\lib\ceres-mingw\glog\src\raw_logging.cc:34:
d:\mingw\include\string.h:223:12: note: old declaration 'int strerror_r(int, char*, size_t)'
223 | extern int MakeFiles\glog.dir\build.make:160: recipe for target 'CMakeFiles/glog.dirstrerror_r/ rc/windows/port.cc.obj' failed
(int, char *, size_t);
| mi^~~~~~~~~~ng
w32-make[2]: *** [CMakeFiles/glog.dir/src/windows/port.cc.obj] Error 1
In file included from D:\INSTALL\Development\lib\ceres-mingw\glog\src\utilities.h:80,
from D:\INSTALL\Development\lib\ceres-mingw\glog\src\logging.cc:32:
D:/INSTALL/Development/lib/ceres-mingw/glog/src/windows/port.h:166:14: error: ambiguating new declaration of 'char* strerror_r(int, char*, size_t)'
166 | inline char* strerror_r(int errnum, char* buf, size_t buflen) {
| ^~~~~~~~~~
In file included from d:\mingw\include\winnt.h:49,
from d:\mingw\include\windef.h:269,
from d:\mingw\include\windows.h:42,
from In file included from from ,
from from :
ambiguating new declaration of ' '
166 | inline char* 223 | extern int (int errnum, char* buf, size_t buflen) {
| |
^~~~~~~~~~
In file included from d:\mingw\include\winnt.h:49,
from d:\mingw\include\windef.h:269,
from d:\mingw\include\windows.h:42,
from D:\INSTALL\Development\lib\ceres-mingw\glog\src\base/mutex.h:129,
from D:\INSTALL\Development\lib\ceres-mingw\glog\src\utilities.h:75,
from D:\INSTALL\Development\lib\ceres-mingw\glog\src\utilities.cc:32:
d:\mingw\include\string.h:223:12: note: old declaration 'int strerror_r(int, char*, size_t)'
223 | extern int strerror_r (int, char *, size_t);
| ^~~~~~~~~~
In file included from D:\INSTALL\Development\lib\ceres-mingw\glog\src\utilities.h:80,
from D:\INSTALL\Development\lib\ceres-mingw\glog\src\signalhandler.cc:34:
D:/INSTALL/Development/lib/ceres-mingw/glog/src/windows/port.h:166:14: error: ambiguating new declaration of 'char* strerror_r(int, char*, size_t)'
166 | inline char* strerror_r(int errnum, char* buf, size_t buflen) {
| ^~~~~~~~~~
In file included from d:\mingw\include\winnt.h:49,
from d:\mingw\include\windef.h:269,
from d:\mingw\include\windows.h:42,
from D:\INSTALL\Development\lib\ceres-mingw\glog\src\base/mutex.h:129,
from D:\INSTALL\Development\lib\ceres-mingw\glog\src\utilities.h:75,
from D:\INSTALL\Development\lib\ceres-mingw\glog\src\signalhandler.cc:34:
d:\mingw\include\string.h:223:12: note: old declaration 'int strerror_r(int, char*, size_t)'
223 | extern int strerror_r (int, char *, size_t);
| ^~~~~~~~~~
CMakeFiles\glog.dir\build.make:90: recipe for target 'CMakeFiles/glog.dir/src/raw_logging.cc.obj' failed
mingw32-make[2]: *** [CMakeFiles/glog.dir/src/raw_logging.cc.obj] Error 1
CMakeFiles\glog.dir\build.make:118: recipe for target 'CMakeFiles/glog.dir/src/utilities.cc.obj' failed
mingw32-make[2]: *** [CMakeFiles/glog.dir/src/utilities.cc.obj] Error 1
In file included from In file included from D:\INSTALL\Development\lib\ceres-mingw\glog\src\logging.cc:63 ,
from :
D:\INSTALL\Development\lib\ceres-mingw\glog\src\vlog_is_on.cc:35D:\INSTALL\Development\lib\ceres-mingw\glog\src\windows/dirent.h::
In function 'D:/INSTALL/Development/lib/ceres-mingw/glog/src/windows/port.h:166:14:_WDIR* _wopendir(const wchar_t*) ':
error: D:\INSTALL\Development\lib\ceres-mingw\glog\src\windows/dirent.h:413:5:ambiguating new declaration of ' char* strerror_r(int, char*, size_t)error: '
166 | inline char* 'strerror_rwcsncpy_s(int errnum, char* buf, size_t buflen) {
| ' was not declared in this scope; did you mean '^~~~~~~~~~wcsncpy
'?
413 | In file included from | ,
from | ,
from ,
from D:\INSTALL\Development\lib\ceres-mingw\glog\src\base/mutex.h:129,
from D:\INSTALL\Development\lib\ceres-mingw\glog\src\utilities.h:75,
from D:\INSTALL\Development\lib\ceres-mingw\glog\src\vlog_is_on.cc:35:
d:\mingw\include\string.h:223:12: note: old declaration 'int strerror_r(int, char*, size_t)'
223 | extern int strerror_r (int, char *, size_t);
| ^~~~~~~~~~
CMakeFiles\glog.dir\build.make:146: recipe for target 'CMakeFiles/glog.dir/src/signalhandler.cc.obj' failed
mingw32-make[2]: *** [CMakeFiles/glog.dir/src/signalhandler.cc.obj] Error 1
D:\INSTALL\Development\lib\ceres-mingw\glog\src\logging.cc: In function 'void google::TruncateLogFile(const char*, google::int64, google::int64)':
D:\INSTALL\Development\lib\ceres-mingw\glog\src\logging.cc:2266:11: error: 'truncate' was not declared in this scope; did you mean 'ftruncate'?
2266 | if (truncate(path, 0) == -1) {
| ^~~~~~~~
| ftruncate
CMakeFiles\glog.dir\build.make:132: recipe for target 'CMakeFiles/glog.dir/src/vlog_is_on.cc.obj' failed
mingw32-make[2]: *** [CMakeFiles/glog.dir/src/vlog_is_on.cc.obj] Error 1
CMakeFiles\glog.dir\build.make:76: recipe for target 'CMakeFiles/glog.dir/src/logging.cc.obj' failed
mingw32-make[2]: *** [CMakeFiles/glog.dir/src/logging.cc.obj] Error 1
CMakeFiles\Makefile2:926: recipe for target 'CMakeFiles/glog.dir/all' failed
mingw32-make[1]: *** [CMakeFiles/glog.dir/all] Error 2
Makefile:161: recipe for target 'all' failed
mingw32-make: *** [all] Error 2
D:\INSTALL\Development\lib\ceres-mingw\glog\build>
I use cmake version 3.15.4 and the official mingw32, as indicated below:
C:\Users\plamen>"D:\Program Files\CMake\bin\cmake.exe" --version
cmake version 3.15.4
CMake suite maintained and supported by Kitware (kitware.com/cmake).
C:\Users\plamen>mingw32-make,exe --version
GNU Make 3.82.90
Built for i686-pc-mingw32
Copyright (C) 1988-2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Does any body can help me solving this problem?
I managed to compile glog on Windows with MinGW using these steps:
in my ceres folder (in my case "D:\INSTALL\Development\lib\ceres-mingw") I typed:
> git clone https://github.com/google/glog.git
After that I renamed the "glog/BUILD" file to "_BUILD" and created a folder named 'build'. After that I entered the newly created 'build' folder and issued this command:
> "D:\Program Files\CMake\bin\cmake.exe" -G "MinGW Makefiles" -DCMAKE_CXX_STANDARD=14 -DCMAKE_CXX_STANDARD_REQUIRED=ON -Dgflags_DIR="D:\INSTALL\Development\lib\ceres-mingw\gflags\build" ..
> "D:\MinGW64\mingw64\bin\mingw32-make.exe" -j10
Important remark: I copied 'log_severity.h' from the 'src\glog' folder (in my case 'D:\INSTALL\Development\lib\ceres-mingw\glog\src\glog') to the 'build\glog' folder (in my case 'D:\INSTALL\Development\lib\ceres-mingw\glog\build\glog').
As a result, I have:
All include files located in
'D:\INSTALL\Development\lib\ceres-mingw\glog\build\glog'
libglog.a static library located in
'D:\INSTALL\Development\lib\ceres-mingw\glog\build'
glog-config.cmake file located in my build folder (in my case
'D:\INSTALL\Development\lib\ceres-mingw\glog\build')
Optionally one can make install (I didn't):
> "D:\MinGW64\mingw64\bin\mingw32-make.exe" install
Hope this information will be useful for other users too!
P.S.: I should most probably have to recompile again glog (and maybe also gflags and ceres), adding '-fPIC' to CMAKE_CXX_FLAGS, otherwise I get an error linking libopencv_java4.so to libglog.a when compiling OpenCV for Android with MinGW on Windows. Or I have to use shared libraries when compiling OpenCV for Android. I am going to check this soon.

make linker for pdftohtml causes compiler errors

I'm getting the error below when I run make to compile xpdf. It seems to do with papar sizes not been detected. I've not seen this kind of error before, usually its the math library that causes the compiler to complain. Is anyone experienced with this sort of error?
[ 71%] Linking CXX executable pdftohtml
CMakeFiles/xpdf_objs.dir/GlobalParams.cc.o: In function GlobalParams::GlobalParams(char const*)':
GlobalParams.cc:(.text+0xdbd): undefined reference to `paperinit'
GlobalParams.cc:(.text+0xdc2): undefined reference to `systempapername'
GlobalParams.cc:(.text+0xdde): undefined reference to `paperinfo'
GlobalParams.cc:(.text+0xdee): undefined reference to `paperpswidth'
GlobalParams.cc:(.text+0xe05): undefined reference to `paperpsheight'
GlobalParams.cc:(.text+0xe48): undefined reference to `paperdone'
collect2: error: ld returned 1 exit status
make[2]: *** [xpdf/CMakeFiles/pdftohtml.dir/build.make:219: xpdf/pdftohtml] Error 1
make[1]: *** [CMakeFiles/Makefile2:428: xpdf/CMakeFiles/pdftohtml.dir/all] Error 2
make: *** [Makefile:130: all] Error 2
The terminal output from the cmake command is:
$ cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_COMPILER=/usr/bin/g++ .
-- The C compiler identification is GNU 7.3.1
-- The CXX compiler identification is GNU 7.3.1
-- 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
-- Check for working CXX compiler: /usr/bin/g++
-- Check for working CXX compiler: /usr/bin/g++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Looking for mkstemp
-- Looking for mkstemp - found
-- Looking for mkstemps
-- Looking for mkstemps - found
-- Looking for popen
-- Looking for popen - found
-- Performing Test HAVE_STD_SORT
-- Performing Test HAVE_STD_SORT - Success
-- Looking for fseeko
-- Looking for fseeko - found
-- Looking for fseek64
-- Looking for fseek64 - not found
-- Looking for _fseeki64
-- Looking for _fseeki64 - not found
-- Found FreeType (old-style includes): /usr/lib64/libfreetype.so
-- Found ZLIB: /usr/lib64/libz.so (found version "1.2.11")
-- Found PNG: /usr/lib64/libpng.so (found version "1.6.31")
-- Could NOT find JPEG (missing: JPEG_LIBRARY JPEG_INCLUDE_DIR)
-- Could NOT find TIFF (missing: TIFF_LIBRARY TIFF_INCLUDE_DIR)
-- lcms2 not found
-- Qt5 found
CMake Deprecation Warning at cmake-config.txt:263 (cmake_policy):
The OLD behavior for policy CMP0020 will be removed from a future version
of CMake.
The cmake-policies(7) manual explains that the OLD behaviors of all
policies are deprecated and that a policy should be set to OLD only under
specific short-term circumstances. Projects should be ported to the NEW
behavior and not rely on setting a policy to OLD.
Call Stack (most recent call first):
CMakeLists.txt:15 (include)
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- 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
CMake Deprecation Warning at xpdf-qt/CMakeLists.txt:27 (cmake_policy):
The OLD behavior for policy CMP0020 will be removed from a future version
of CMake.
The cmake-policies(7) manual explains that the OLD behaviors of all
policies are deprecated and that a policy should be set to OLD only under
specific short-term circumstances. Projects should be ported to the NEW
behavior and not rely on setting a policy to OLD.
-- Configuring done
-- Generating done
-- Build files have been written to: /home/usr/build/xpdf-4.00
The package is broken. The current available source code does not properly handle the case when libpaper is present. For a full patch set that fixes the wrong behavior properly see this entry in Bugzilla.

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!

Failed to 'make' when installing gr-mediatools

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

cmake failed building project on mac

I'm trying to build a project on my new macbook which was previously built normally on linux computers.
at first when i run cmake, i get a the following:
-- The C compiler identification is Clang 5.1.0
-- The CXX compiler identification is Clang 5.1.0
-- 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
-- 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
-- Performing Test HAVE_CLOCK_GETTIME
-- Performing Test HAVE_CLOCK_GETTIME - Failed
-- Boost version: 1.55.0
-- Found the following Boost libraries:
-- graph
-- Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE)
-- -> doxygen not found -> api-doc will not be created
-- Configuring done
-- Generating done
-- Build files have been written to: /path/to/folder
and then when i run make, it works till around 30% and then it stop with this error:
/path/to/project/lib/helpers.cpp:555:2: error: use of undeclared identifier 'gettimeofday'
gettimeofday(&tv, NULL);
^
1 error generated.
make[2]: *** [lib/CMakeFiles/genom.dir/helpers.cpp.o] Error 1
make[1]: *** [lib/CMakeFiles/genom.dir/all] Error 2
make: *** [all] Error 2
I looked online, there was some suggestions for changing clock_gettime(CLOCK_REALTIME, &t); to clock_get_time(CLOCK_REALTIME, &t);
but they didnt work.
The error message you provided indicates that gettimeofday wasn't included. What clock_gettime has to do with it is not possible to say from the information you provided.
A quick search about this yields, that gettimeofday should be available (it's part of POSIX).
Do you have #include <sys/time.h>(Apple Docs) or #include <sys/types.h>(SO Answer)?

Resources