My codes (https://github.com/fangq/mmc, https://github.com/fangq/mcxcl) have been compiled out-of-box using gcc on Linux & Mac, cygwin-gcc or msys2-gcc on Windows, but not with MinGW compilers (x86-64-mingw64-* compilers for cygwin64, msys2, mingw64 or TDM-GCC, or matlab mingw64 support (mingw64 gcc 4.9.6)) because it complains that it misses a set of header files (sys/ioctl.h, ieee754.h etc), so I included a copy of these header files in my source code, and added -I./mingw64/include to make most of them compile
https://github.com/fangq/mmc/tree/master/src/mingw64/include
however, when compiling the matlab mex file using this script on MATLAB R2016/2018, I received the below error
Error using mex
mcx_utils.o: In function `mcx_progressbar':
D:/Users/fangq/Gitroot/Project/mmc/src/mcx_utils.c:1054: undefined reference to `ioctl'
collect2.exe: error: ld returned 1 exit status
I am wondering why compiling inside matlab and outside matlab are different. Is there a library that I can link to fix the undefined reference to "ioctl" error?
Here is the log when compiling using gcc on msys2:
fangq#zen:~/space/git/Project/mmc/src$ make mex
Building built/xorshift128p_rand.o
cc -c -Wall -g -DMCX_EMBED_CL -fno-strict-aliasing -m64 -DMMC_USE_SSE -DHAVE_SSE2 -msse -msse2 -msse3 -mssse3 -msse4.1 -O3 -fopenmp -DMCX_CONTAINER -DUSE_OS_TIMER -DUSE_OPENCL -DMMC_XORSHIFT -I../src -I"./mingw64/include" -o built/xorshift128p_rand.o xorshift128p_rand.c
Building built/simpmesh.o
cc -c -Wall -g -DMCX_EMBED_CL -fno-strict-aliasing -m64 -DMMC_USE_SSE -DHAVE_SSE2 -msse -msse2 -msse3 -mssse3 -msse4.1 -O3 -fopenmp -DMCX_CONTAINER -DUSE_OS_TIMER -DUSE_OPENCL -DMMC_XORSHIFT -I../src -I"./mingw64/include" -o built/simpmesh.o simpmesh.c
Building built/tettracing.o
cc -c -Wall -g -DMCX_EMBED_CL -fno-strict-aliasing -m64 -DMMC_USE_SSE -DHAVE_SSE2 -msse -msse2 -msse3 -mssse3 -msse4.1 -O3 -fopenmp -DMCX_CONTAINER -DUSE_OS_TIMER -DUSE_OPENCL -DMMC_XORSHIFT -I../src -I"./mingw64/include" -o built/tettracing.o tettracing.c
Building built/mcx_utils.o
cc -c -Wall -g -DMCX_EMBED_CL -fno-strict-aliasing -m64 -DMMC_USE_SSE -DHAVE_SSE2 -msse -msse2 -msse3 -mssse3 -msse4.1 -O3 -fopenmp -DMCX_CONTAINER -DUSE_OS_TIMER -DUSE_OPENCL -DMMC_XORSHIFT -I../src -I"./mingw64/include" -o built/mcx_utils.o mcx_utils.c
Building built/tictoc.o
cc -c -Wall -g -DMCX_EMBED_CL -fno-strict-aliasing -m64 -DMMC_USE_SSE -DHAVE_SSE2 -msse -msse2 -msse3 -mssse3 -msse4.1 -O3 -fopenmp -DMCX_CONTAINER -DUSE_OS_TIMER -DUSE_OPENCL -DMMC_XORSHIFT -I../src -I"./mingw64/include" -o built/tictoc.o tictoc.c
Building built/mmc.o
cc -c -Wall -g -DMCX_EMBED_CL -fno-strict-aliasing -m64 -DMMC_USE_SSE -DHAVE_SSE2 -msse -msse2 -msse3 -mssse3 -msse4.1 -O3 -fopenmp -DMCX_CONTAINER -DUSE_OS_TIMER -DUSE_OPENCL -DMMC_XORSHIFT -I../src -I"./mingw64/include" -o built/mmc.o mmc.c
Building built/cjson/cJSON.o
cc -c -Wall -g -DMCX_EMBED_CL -fno-strict-aliasing -m64 -DMMC_USE_SSE -DHAVE_SSE2 -msse -msse2 -msse3 -mssse3 -msse4.1 -O3 -fopenmp -DMCX_CONTAINER -DUSE_OS_TIMER -DUSE_OPENCL -DMMC_XORSHIFT -I../src -I"./mingw64/include" -o built/cjson/cJSON.o cjson/cJSON.c
Building built/mmc_host.o
cc -c -Wall -g -DMCX_EMBED_CL -fno-strict-aliasing -m64 -DMMC_USE_SSE -DHAVE_SSE2 -msse -msse2 -msse3 -mssse3 -msse4.1 -O3 -fopenmp -DMCX_CONTAINER -DUSE_OS_TIMER -DUSE_OPENCL -DMMC_XORSHIFT -I../src -I"./mingw64/include" -o built/mmc_host.o mmc_host.c
Building built/highordermesh.o
g++ -c -Wall -g -DMCX_EMBED_CL -fno-strict-aliasing -m64 -DMMC_USE_SSE -DHAVE_SSE2 -msse -msse2 -msse3 -mssse3 -msse4.1 -O3 -fopenmp -DMCX_CONTAINER -DUSE_OS_TIMER -DUSE_OPENCL -DMMC_XORSHIFT -I../src -I"./mingw64/include" -o built/highordermesh.o highordermesh.cpp
Building built/mmc_cl_utils.o
cc -c -Wall -g -DMCX_EMBED_CL -fno-strict-aliasing -m64 -DMMC_USE_SSE -DHAVE_SSE2 -msse -msse2 -msse3 -mssse3 -msse4.1 -O3 -fopenmp -DMCX_CONTAINER -DUSE_OS_TIMER -DUSE_OPENCL -DMMC_XORSHIFT -I../src -I"./mingw64/include" -o built/mmc_cl_utils.o mmc_cl_utils.c
Building built/mmc_cl_host.o
cc -c -Wall -g -DMCX_EMBED_CL -fno-strict-aliasing -m64 -DMMC_USE_SSE -DHAVE_SSE2 -msse -msse2 -msse3 -mssse3 -msse4.1 -O3 -fopenmp -DMCX_CONTAINER -DUSE_OS_TIMER -DUSE_OPENCL -DMMC_XORSHIFT -I../src -I"./mingw64/include" -o built/mmc_cl_host.o mmc_cl_host.c
Building bin/mmc
cmd //c mex.bat -v -f mexopts_msys2_gcc.xml COMPFLAGS='$COMPFLAGS -c -Wall -g -DMCX_EMBED_CL -fno-strict-aliasing -m64 -DMMC_USE_SSE -DHAVE_SSE2 -msse -msse2 -msse3 -mssse3 -msse4.1 -O3 -fopenmp -DMCX_CONTAINER -DUSE_OS_TIMER -DUSE_OPENCL -DMMC_XORSHIFT' LDFLAGS='$LDFLAGS -static -fopenmp "c:\Windows\System32\OpenCL.dll" -fopenmp' -outdir ../mmclab mmclab.cpp -I../src -I"./mingw64/include" -output bin/mmc built/xorshift128p_rand.o built/simpmesh.o built/tettracing.o built/mcx_utils.o built/tictoc.o built/mmc.o built/cjson/cJSON.o built/mmc_host.o built/highordermesh.o built/mmc_cl_utils.o built/mmc_cl_host.o
Verbose mode is on.
... Looking for compiler 'MinGW64 Compiler (C++)' ...
... Looking for environment variable 'MW_MINGW64_LOC' ...Yes ('C:/msys64/usr/').
... Looking for file 'C:\msys64\usr\bin\g++.exe' ...Yes.
... Looking for folder 'C:\msys64\usr' ...Yes.
... Looking for environment variable 'MW_MINGW64_LOC' ...Yes ('C:/msys64/usr/').
... Executing command 'C:\msys64\usr\bin\g++ -dumpmachine' ...Yes ('x86_64-pc-msys').
Found installed compiler 'MinGW64 Compiler (C++)'.
Set PATH = C:\msys64\usr\bin;C:\Program Files\MATLAB\R2018a\extern\include\win64;C:\Program Files\MATLAB\R2018a\extern\include;C:\Program Files\MATLAB\R2018a\simulink\include;C:\Program Files\MATLAB\R2018a\lib\win64;.;C:\msys64\opt\local\bin;C:\msys64\usr\local\cuda\bin\;.;C:\msys64\pub\bin;C:\msys64\pub\pgi\linux86-64\18.4\bin;C:\msys64\mingw64\bin;C:\msys64\usr\local\bin;C:\msys64\usr\bin;C:\msys64\usr\bin;C:\Windows\System32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\msys64\usr\bin\site_perl;C:\msys64\usr\bin\vendor_perl;C:\msys64\usr\bin\core_perl;C:\msys64\usr\local\bin;C:\msys64\home\users\fangq\space\Download\MCXStudio;C;C:\Program Files\MATLAB\R2018a\bin;C:\msys64\usr\lib\gcc\x86_64-pc-msys\9.3.0\
Set INCLUDE = C:\msys64\usr\include;C:\msys64\usr\x86_64-pc-msys\include\c++;C:\msys64\usr\x86_64-pc-msys\include;C:\msys64\usr\x86_64-pc-msys\include\c++\x86_64-pc-msys;C:\msys64\usr\x86_64-pc-msys\include\c++\backward;
Set LIB = C:\msys64\usr\lib;;
Set MW_TARGET_ARCH = win64;
Set LIBPATH = C:\Program Files\MATLAB\R2018a\extern\lib\win64;
Options file details
-------------------------------------------------------------------
Compiler location: C:\msys64\usr
Options file: C:\msys64\home\fangq\space\git\Project\mmc\src\mexopts_msys2_gcc.xml
CMDLINE2 : C:\msys64\usr\bin\g++ -m64 -Wl,--no-undefined -static -fopenmp "c:\Windows\System32\OpenCL.dll" -fopenmp -shared -static -s -Wl,"C:\Program Files\MATLAB\R2018a/extern/lib/win64/mingw64/exportsmexfileversion.def" C:\msys64\tmp\mex_1481040925092289_7396\mmclab.obj C:\msys64\tmp\mex_1481040925092289_7396\cpp_mexapi_version.obj "built/xorshift128p_rand.o" "built/simpmesh.o" "built/tettracing.o" "built/mcx_utils.o" "built/tictoc.o" "built/mmc.o" "built/cjson/cJSON.o" "built/mmc_host.o" "built/highordermesh.o" "built/mmc_cl_utils.o" "built/mmc_cl_host.o" -L"C:\Program Files\MATLAB\R2018a\extern\lib\win64\mingw64" -llibmx -llibmex -llibmat -o C:\msys64\home\fangq\space\git\Project\mmc\mmclab\mmc.mexw64
CXX : C:\msys64\usr\bin\g++
COMPILER : C:\msys64\usr\bin\g++
DEFINES : -DMATLAB_DEFAULT_RELEASE=R2017b -DUSE_MEX_CMD -m64 -DMATLAB_MEX_FILE
MATLABMEX : -DMATLAB_MEX_FILE
CFLAGS : -c -Wall -g -DMCX_EMBED_CL -fno-strict-aliasing -m64 -DMMC_USE_SSE -DHAVE_SSE2 -msse -msse2 -msse3 -mssse3 -msse4.1 -O3 -fopenmp -DMCX_CONTAINER -DUSE_OS_TIMER -DUSE_OPENCL -DMMC_XORSHIFT -fexceptions -fno-omit-frame-pointer
CXXFLAGS : -c -Wall -g -DMCX_EMBED_CL -fno-strict-aliasing -m64 -DMMC_USE_SSE -DHAVE_SSE2 -msse -msse2 -msse3 -mssse3 -msse4.1 -O3 -fopenmp -DMCX_CONTAINER -DUSE_OS_TIMER -DUSE_OPENCL -DMMC_XORSHIFT -fexceptions -fno-omit-frame-pointer
INCLUDE : -I"..\src" -I".\mingw64\include" -I"C:\msys64\usr\usr\include" -I"C:\Program Files\MATLAB\R2018a/extern/include" -I"C:\Program Files\MATLAB\R2018a/simulink/include"
CXXOPTIMFLAGS : -O -DNDEBUG
CXXDEBUGFLAGS : -g
LDXX : C:\msys64\usr\bin\g++
LINKER : C:\msys64\usr\bin\g++
LDFLAGS : -m64 -Wl,--no-undefined -static -fopenmp "c:\Windows\System32\OpenCL.dll" -fopenmp
LDTYPE : -shared -static
LINKEXPORT : -Wl,"C:\Program Files\MATLAB\R2018a/extern/lib/win64/mingw64/mexFunction.def"
LINKEXPORTVER : -Wl,"C:\Program Files\MATLAB\R2018a/extern/lib/win64/mingw64/exportsmexfileversion.def"
LIBLOC : C:\Program Files\MATLAB\R2018a\extern\lib\win64\mingw64
LINKLIBS : -L"C:\Program Files\MATLAB\R2018a\extern\lib\win64\mingw64" -llibmx -llibmex -llibmat
LDOPTIMFLAGS : -s
LDDEBUGFLAGS : -g
OBJEXT : .obj
LDEXT : .mexw64
SETENV : set COMPILER=C:\msys64\usr\bin\gcc
set CXXCOMPILER=C:\msys64\usr\bin\g++
set COMPFLAGS=-c -c -Wall -g -DMCX_EMBED_CL -fno-strict-aliasing -m64 -DMMC_USE_SSE -DHAVE_SSE2 -msse -msse2 -msse3 -mssse3 -msse4.1 -O3 -fopenmp -DMCX_CONTAINER -DUSE_OS_TIMER -DUSE_OPENCL -DMMC_XORSHIFT -fexceptions -fno-omit-frame-pointer -DMATLAB_DEFAULT_RELEASE=R2017b -DUSE_MEX_CMD -m64 -DMATLAB_MEX_FILE -DMATLAB_MEX_FILE
set CXXCOMPFLAGS=-c -c -Wall -g -DMCX_EMBED_CL -fno-strict-aliasing -m64 -DMMC_USE_SSE -DHAVE_SSE2 -msse -msse2 -msse3 -mssse3 -msse4.1 -O3 -fopenmp -DMCX_CONTAINER -DUSE_OS_TIMER -DUSE_OPENCL -DMMC_XORSHIFT -DMATLAB_DEFAULT_RELEASE=R2017b -DUSE_MEX_CMD -m64 -DMATLAB_MEX_FILE -DMATLAB_MEX_FILE
set OPTIMFLAGS=-O -DNDEBUG
set DEBUGFLAGS=-g
set LINKER=C:\msys64\usr\bin\gcc
set CXXLINKER=C:\msys64\usr\bin\g++
set LINKFLAGS=-m64 -Wl,--no-undefined -static -fopenmp "c:\Windows\System32\OpenCL.dll" -fopenmp -shared -static -L"C:\Program Files\MATLAB\R2018a\extern\lib\win64\mingw64" -llibmx -llibmex -llibmat -Wl,"C:\Program Files\MATLAB\R2018a/extern/lib/win64/mingw64/mexFunction.def"
set LINKDEBUGFLAGS=-g
set NAME_OUTPUT= -o "%OUTDIR%%MEX_NAME%%MEX_EXT%"
MINGWROOT : C:\msys64\usr
MINGWTARGET : x86_64-pc-msys
MATLABROOT : C:\Program Files\MATLAB\R2018a
ARCH : win64
SRC : "C:\msys64\home\fangq\space\git\Project\mmc\src\mmclab.cpp";"C:\Program Files\MATLAB\R2018a\extern\version\cpp_mexapi_version.cpp"
OBJ : C:\msys64\tmp\mex_1481040925092289_7396\mmclab.obj;C:\msys64\tmp\mex_1481040925092289_7396\cpp_mexapi_version.obj
OBJS : C:\msys64\tmp\mex_1481040925092289_7396\mmclab.obj C:\msys64\tmp\mex_1481040925092289_7396\cpp_mexapi_version.obj "built/xorshift128p_rand.o" "built/simpmesh.o" "built/tettracing.o" "built/mcx_utils.o" "built/tictoc.o" "built/mmc.o" "built/cjson/cJSON.o" "built/mmc_host.o" "built/highordermesh.o" "built/mmc_cl_utils.o" "built/mmc_cl_host.o"
SRCROOT : C:\msys64\home\fangq\space\git\Project\mmc\src\mmclab
DEF : C:\msys64\tmp\mex_1481040925092289_7396\mmc.def
EXP : "C:\msys64\home\fangq\space\git\Project\mmc\mmclab\mmc.exp"
LIB : "C:\msys64\home\fangq\space\git\Project\mmc\mmclab\mmc.lib"
EXE : C:\msys64\home\fangq\space\git\Project\mmc\mmclab\mmc.mexw64
ILK : "C:\msys64\home\fangq\space\git\Project\mmc\mmclab\mmc.ilk"
MANIFEST : "C:\msys64\home\fangq\space\git\Project\mmc\mmclab\mmc.mexw64.manifest"
TEMPNAME : C:\msys64\home\fangq\space\git\Project\mmc\mmclab\mmc
EXEDIR : C:\msys64\home\fangq\space\git\Project\mmc\mmclab\
EXENAME : mmc
COMPFLAGS : -c -Wall -g -DMCX_EMBED_CL -fno-strict-aliasing -m64 -DMMC_USE_SSE -DHAVE_SSE2 -msse -msse2 -msse3 -mssse3 -msse4.1 -O3 -fopenmp -DMCX_CONTAINER -DUSE_OS_TIMER -DUSE_OPENCL -DMMC_XORSHIFT
OPTIM : -O -DNDEBUG
LINKOPTIM : -s
CMDLINE1_0 : C:\msys64\usr\bin\g++ -c -DMATLAB_DEFAULT_RELEASE=R2017b -DUSE_MEX_CMD -m64 -DMATLAB_MEX_FILE -I"..\src" -I".\mingw64\include" -I"C:\msys64\usr\usr\include" -I"C:\Program Files\MATLAB\R2018a/extern/include" -I"C:\Program Files\MATLAB\R2018a/simulink/include" -c -Wall -g -DMCX_EMBED_CL -fno-strict-aliasing -m64 -DMMC_USE_SSE -DHAVE_SSE2 -msse -msse2 -msse3 -mssse3 -msse4.1 -O3 -fopenmp -DMCX_CONTAINER -DUSE_OS_TIMER -DUSE_OPENCL -DMMC_XORSHIFT -fexceptions -fno-omit-frame-pointer -O -DNDEBUG "C:\msys64\home\fangq\space\git\Project\mmc\src\mmclab.cpp" -o C:\msys64\tmp\mex_1481040925092289_7396\mmclab.obj
CMDLINE1_1 : C:\msys64\usr\bin\g++ -c -DMATLAB_DEFAULT_RELEASE=R2017b -DUSE_MEX_CMD -m64 -DMATLAB_MEX_FILE -I"..\src" -I".\mingw64\include" -I"C:\msys64\usr\usr\include" -I"C:\Program Files\MATLAB\R2018a/extern/include" -I"C:\Program Files\MATLAB\R2018a/simulink/include" -c -Wall -g -DMCX_EMBED_CL -fno-strict-aliasing -m64 -DMMC_USE_SSE -DHAVE_SSE2 -msse -msse2 -msse3 -mssse3 -msse4.1 -O3 -fopenmp -DMCX_CONTAINER -DUSE_OS_TIMER -DUSE_OPENCL -DMMC_XORSHIFT -fexceptions -fno-omit-frame-pointer -O -DNDEBUG "C:\Program Files\MATLAB\R2018a\extern\version\cpp_mexapi_version.cpp" -o C:\msys64\tmp\mex_1481040925092289_7396\cpp_mexapi_version.obj
-------------------------------------------------------------------
Building with 'MinGW64 Compiler (C++)'.
Warning: You are using an unsupported version of MinGW Compiler. To install the supported version of MinGW compiler, visit https://www.mathworks.com/help/matlab/matlab_external/install-mingw-support-package.html.
For a list of currently supported compilers see: https://www.mathworks.com/support/compilers.
C:\msys64\usr\bin\g++ -c -DMATLAB_DEFAULT_RELEASE=R2017b -DUSE_MEX_CMD -m64 -DMATLAB_MEX_FILE -I"..\src" -I".\mingw64\include" -I"C:\msys64\usr\usr\include" -I"C:\Program Files\MATLAB\R2018a/extern/include" -I"C:\Program Files\MATLAB\R2018a/simulink/include" -c -Wall -g -DMCX_EMBED_CL -fno-strict-aliasing -m64 -DMMC_USE_SSE -DHAVE_SSE2 -msse -msse2 -msse3 -mssse3 -msse4.1 -O3 -fopenmp -DMCX_CONTAINER -DUSE_OS_TIMER -DUSE_OPENCL -DMMC_XORSHIFT -fexceptions -fno-omit-frame-pointer -O -DNDEBUG "C:\msys64\home\fangq\space\git\Project\mmc\src\mmclab.cpp" -o C:\msys64\tmp\mex_1481040925092289_7396\mmclab.obj
C:\msys64\usr\bin\g++ -c -DMATLAB_DEFAULT_RELEASE=R2017b -DUSE_MEX_CMD -m64 -DMATLAB_MEX_FILE -I"..\src" -I".\mingw64\include" -I"C:\msys64\usr\usr\include" -I"C:\Program Files\MATLAB\R2018a/extern/include" -I"C:\Program Files\MATLAB\R2018a/simulink/include" -c -Wall -g -DMCX_EMBED_CL -fno-strict-aliasing -m64 -DMMC_USE_SSE -DHAVE_SSE2 -msse -msse2 -msse3 -mssse3 -msse4.1 -O3 -fopenmp -DMCX_CONTAINER -DUSE_OS_TIMER -DUSE_OPENCL -DMMC_XORSHIFT -fexceptions -fno-omit-frame-pointer -O -DNDEBUG "C:\Program Files\MATLAB\R2018a\extern\version\cpp_mexapi_version.cpp" -o C:\msys64\tmp\mex_1481040925092289_7396\cpp_mexapi_version.obj
C:\msys64\usr\bin\g++ -m64 -Wl,--no-undefined -static -fopenmp "c:\Windows\System32\OpenCL.dll" -fopenmp -shared -static -s -Wl,"C:\Program Files\MATLAB\R2018a/extern/lib/win64/mingw64/exportsmexfileversion.def" C:\msys64\tmp\mex_1481040925092289_7396\mmclab.obj C:\msys64\tmp\mex_1481040925092289_7396\cpp_mexapi_version.obj "built/xorshift128p_rand.o" "built/simpmesh.o" "built/tettracing.o" "built/mcx_utils.o" "built/tictoc.o" "built/mmc.o" "built/cjson/cJSON.o" "built/mmc_host.o" "built/highordermesh.o" "built/mmc_cl_utils.o" "built/mmc_cl_host.o" -L"C:\Program Files\MATLAB\R2018a\extern\lib\win64\mingw64" -llibmx -llibmex -llibmat -o C:\msys64\home\fangq\space\git\Project\mmc\mmclab\mmc.mexw64
Recompile embedded version with '-DMATLAB_MEXCMD_RELEASE=R2017b'
C:\msys64\usr\bin\g++ -c -DMATLAB_DEFAULT_RELEASE=R2017b -DUSE_MEX_CMD -m64 -DMATLAB_MEX_FILE -I"..\src" -I".\mingw64\include" -I"C:\msys64\usr\usr\include" -I"C:\Program Files\MATLAB\R2018a/extern/include" -I"C:\Program Files\MATLAB\R2018a/simulink/include" -c -Wall -g -DMCX_EMBED_CL -fno-strict-aliasing -m64 -DMMC_USE_SSE -DHAVE_SSE2 -msse -msse2 -msse3 -mssse3 -msse4.1 -O3 -fopenmp -DMCX_CONTAINER -DUSE_OS_TIMER -DUSE_OPENCL -DMMC_XORSHIFT -fexceptions -fno-omit-frame-pointer -O -DNDEBUG "C:\Program Files\MATLAB\R2018a\extern\version\cpp_mexapi_version.cpp" -o C:\msys64\tmp\mex_1481040925092289_7396\cpp_mexapi_version.obj -DMATLAB_MEXCMD_RELEASE=R2017b
C:\msys64\usr\bin\g++ -m64 -Wl,--no-undefined -static -fopenmp "c:\Windows\System32\OpenCL.dll" -fopenmp -shared -static -s -Wl,"C:\Program Files\MATLAB\R2018a/extern/lib/win64/mingw64/exportsmexfileversion.def" C:\msys64\tmp\mex_1481040925092289_7396\mmclab.obj C:\msys64\tmp\mex_1481040925092289_7396\cpp_mexapi_version.obj "built/xorshift128p_rand.o" "built/simpmesh.o" "built/tettracing.o" "built/mcx_utils.o" "built/tictoc.o" "built/mmc.o" "built/cjson/cJSON.o" "built/mmc_host.o" "built/highordermesh.o" "built/mmc_cl_utils.o" "built/mmc_cl_host.o" -L"C:\Program Files\MATLAB\R2018a\extern\lib\win64\mingw64" -llibmx -llibmex -llibmat -o C:\msys64\home\fangq\space\git\Project\mmc\mmclab\mmc.mexw64
MEX completed successfully.
fangq#zen:~/space/git/Project/mmc/src$ which gcc
/usr/bin/gcc
fangq#zen:~/space/git/Project/mmc/src$ which g++
/usr/bin/g++
fangq#zen:~/space/git/Project/mmc/src$ which cc
/usr/bin/cc
fangq#zen:~/space/git/Project/mmc/src$ gcc --version
gcc (GCC) 9.3.0
Copyright (C) 2019 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
What is the reason you included ioctl.h?
Copying that header from somewhere else is a bad idea. At best it will define functions for which libraries don't exist causing linker errors.
Typically you would need to use Windows alternatives for whatever IOCTL stuff you do on other platforms.
I tried to compile MMC on Windows with MSYS2 removing this include and the build succeeded:
patch -ulbf src/mcx_utils.c << EOF
## -35,3 +35,5 ##
#include <time.h>
+#ifndef _WIN32
#include <sys/ioctl.h>
+#endif
#include "mcx_utils.h"
EOF
sed -i.bak -e "s/^EXTRALIB\s*+*=.*$/& -Wl,--as-needed -lwinmm/" commons/Makefile_common.mk
~/buildstatus.sh build &&
make -Csrc CC=gcc PLATFORM=MINGW32 &&
echo Success
Related
I am trying to install bwa package in the terminal of mac. I downloaded bwa-0.7.17 from https://sourceforge.net/projects/bio-bwa/files/
I followed the steps to install it but when I tried to "make", it showed me this:
gcc -c -g -Wall -Wno-unused-function -O2 -DHAVE_PTHREAD -DUSE_MALLOC_WRAPPERS utils.c -o utils.o
gcc -c -g -Wall -Wno-unused-function -O2 -DHAVE_PTHREAD -DUSE_MALLOC_WRAPPERS kthread.c -o kthread.o
gcc -c -g -Wall -Wno-unused-function -O2 -DHAVE_PTHREAD -DUSE_MALLOC_WRAPPERS kstring.c -o kstring.o
gcc -c -g -Wall -Wno-unused-function -O2 -DHAVE_PTHREAD -DUSE_MALLOC_WRAPPERS ksw.c -o ksw.o
gcc -c -g -Wall -Wno-unused-function -O2 -DHAVE_PTHREAD -DUSE_MALLOC_WRAPPERS bwt.c -o bwt.o
gcc -c -g -Wall -Wno-unused-function -O2 -DHAVE_PTHREAD -DUSE_MALLOC_WRAPPERS bntseq.c -o bntseq.o
gcc -c -g -Wall -Wno-unused-function -O2 -DHAVE_PTHREAD -DUSE_MALLOC_WRAPPERS bwa.c -o bwa.o
gcc -c -g -Wall -Wno-unused-function -O2 -DHAVE_PTHREAD -DUSE_MALLOC_WRAPPERS bwamem.c -o bwamem.o
gcc -c -g -Wall -Wno-unused-function -O2 -DHAVE_PTHREAD -DUSE_MALLOC_WRAPPERS bwamem_pair.c -o bwamem_pair.o
gcc -c -g -Wall -Wno-unused-function -O2 -DHAVE_PTHREAD -DUSE_MALLOC_WRAPPERS bwamem_extra.c -o bwamem_extra.o
gcc -c -g -Wall -Wno-unused-function -O2 -DHAVE_PTHREAD -DUSE_MALLOC_WRAPPERS malloc_wrap.c -o malloc_wrap.o
gcc -c -g -Wall -Wno-unused-function -O2 -DHAVE_PTHREAD -DUSE_MALLOC_WRAPPERS QSufSort.c -o QSufSort.o
gcc -c -g -Wall -Wno-unused-function -O2 -DHAVE_PTHREAD -DUSE_MALLOC_WRAPPERS bwt_gen.c -o bwt_gen.o
gcc -c -g -Wall -Wno-unused-function -O2 -DHAVE_PTHREAD -DUSE_MALLOC_WRAPPERS rope.c -o rope.o
gcc -c -g -Wall -Wno-unused-function -O2 -DHAVE_PTHREAD -DUSE_MALLOC_WRAPPERS rle.c -o rle.o
gcc -c -g -Wall -Wno-unused-function -O2 -DHAVE_PTHREAD -DUSE_MALLOC_WRAPPERS is.c -o is.o
gcc -c -g -Wall -Wno-unused-function -O2 -DHAVE_PTHREAD -DUSE_MALLOC_WRAPPERS bwtindex.c -o bwtindex.o
ar -csru libbwa.a utils.o kthread.o kstring.o ksw.o bwt.o bntseq.o bwa.o bwamem.o bwamem_pair.o bwamem_extra.o malloc_wrap.o QSufSort.o bwt_gen.o rope.o rle.o is.o bwtindex.o
gcc -c -g -Wall -Wno-unused-function -O2 -DHAVE_PTHREAD -DUSE_MALLOC_WRAPPERS bwashm.c -o bwashm.o
gcc -c -g -Wall -Wno-unused-function -O2 -DHAVE_PTHREAD -DUSE_MALLOC_WRAPPERS bwase.c -o bwase.o
gcc -c -g -Wall -Wno-unused-function -O2 -DHAVE_PTHREAD -DUSE_MALLOC_WRAPPERS bwaseqio.c -o bwaseqio.o
gcc -c -g -Wall -Wno-unused-function -O2 -DHAVE_PTHREAD -DUSE_MALLOC_WRAPPERS bwtgap.c -o bwtgap.o
gcc -c -g -Wall -Wno-unused-function -O2 -DHAVE_PTHREAD -DUSE_MALLOC_WRAPPERS bwtaln.c -o bwtaln.o
gcc -c -g -Wall -Wno-unused-function -O2 -DHAVE_PTHREAD -DUSE_MALLOC_WRAPPERS bamlite.c -o bamlite.o
gcc -c -g -Wall -Wno-unused-function -O2 -DHAVE_PTHREAD -DUSE_MALLOC_WRAPPERS bwape.c -o bwape.o
gcc -c -g -Wall -Wno-unused-function -O2 -DHAVE_PTHREAD -DUSE_MALLOC_WRAPPERS kopen.c -o kopen.o
gcc -c -g -Wall -Wno-unused-function -O2 -DHAVE_PTHREAD -DUSE_MALLOC_WRAPPERS pemerge.c -o pemerge.o
gcc -c -g -Wall -Wno-unused-function -O2 -DHAVE_PTHREAD -DUSE_MALLOC_WRAPPERS maxk.c -o maxk.o
gcc -c -g -Wall -Wno-unused-function -O2 -DHAVE_PTHREAD -DUSE_MALLOC_WRAPPERS bwtsw2_core.c -o bwtsw2_core.o
gcc -c -g -Wall -Wno-unused-function -O2 -DHAVE_PTHREAD -DUSE_MALLOC_WRAPPERS bwtsw2_main.c -o bwtsw2_main.o
gcc -c -g -Wall -Wno-unused-function -O2 -DHAVE_PTHREAD -DUSE_MALLOC_WRAPPERS bwtsw2_aux.c -o bwtsw2_aux.o
gcc -c -g -Wall -Wno-unused-function -O2 -DHAVE_PTHREAD -DUSE_MALLOC_WRAPPERS bwt_lite.c -o bwt_lite.o
gcc -c -g -Wall -Wno-unused-function -O2 -DHAVE_PTHREAD -DUSE_MALLOC_WRAPPERS bwtsw2_chain.c -o bwtsw2_chain.o
gcc -c -g -Wall -Wno-unused-function -O2 -DHAVE_PTHREAD -DUSE_MALLOC_WRAPPERS fastmap.c -o fastmap.o
gcc -c -g -Wall -Wno-unused-function -O2 -DHAVE_PTHREAD -DUSE_MALLOC_WRAPPERS bwtsw2_pair.c -o bwtsw2_pair.o
gcc -c -g -Wall -Wno-unused-function -O2 -DHAVE_PTHREAD -DUSE_MALLOC_WRAPPERS main.c -o main.o
gcc -g -Wall -Wno-unused-function -O2 -DHAVE_PTHREAD -DUSE_MALLOC_WRAPPERS bwashm.o bwase.o bwaseqio.o bwtgap.o bwtaln.o bamlite.o bwape.o kopen.o pemerge.o maxk.o bwtsw2_core.o bwtsw2_main.o bwtsw2_aux.o bwt_lite.o bwtsw2_chain.o fastmap.o bwtsw2_pair.o main.o -o bwa -L. -lbwa -lm -lz -lpthread
Then I tried again "make" and it showed:
make: Nothing to be done for `all'
Do you know what is the problem and how can I fix it? I would really appreciate your help.
All the best,
Mayra
It's been days trying to compile caffe-segnet, and now stuck at this error, I m using gcc gcc (Ubuntu 4.8.5-4ubuntu8) 4.8.5
to compile caffe-segnet. I'm using Cuda 9.0, cudnn v2 and opencv 3.3.0 as mentionned in the documentation of caffe and opencv. Disabling cudnn or not in the Makefile.config doesn't change anything as mentioned here.
Before that I was using cuda 10.0 and cudnn 7.0 and deleted all because when starting my model there was so many errors. Here is the output error when using make all:
CXX src/caffe/common.cpp
/usr/bin/g++-4.8 src/caffe/common.cpp -pthread -fPIC -DNDEBUG -O2 -I/usr/include/python2.7 -I/usr/lib/python2.7/dist-packages/numpy/core/include -I/usr/local/include -I/usr/local/hdf5 -I/usr/local/hdf5/include -I.build_release/src -I./src -I./include -I/usr/local/cuda/include -Wall -Wno-sign-compare -std=c++11 -MMD -MP -pthread -fPIC -DNDEBUG -O2 -I/usr/include/python2.7 -I/usr/lib/python2.7/dist-packages/numpy/core/include -I/usr/local/include -I/usr/local/hdf5 -I/usr/local/hdf5/include -I.build_release/src -I./src -I./include -I/usr/local/cuda/include -Wall -Wno-sign-compare -c -o .build_release/src/caffe/common.o 2> .build_release/src/caffe/common.o.warnings.txt \
|| (cat .build_release/src/caffe/common.o.warnings.txt; exit 1)
CXX src/caffe/internal_thread.cpp
/usr/bin/g++-4.8 src/caffe/internal_thread.cpp -pthread -fPIC -DNDEBUG -O2 -I/usr/include/python2.7 -I/usr/lib/python2.7/dist-packages/numpy/core/include -I/usr/local/include -I/usr/local/hdf5 -I/usr/local/hdf5/include -I.build_release/src -I./src -I./include -I/usr/local/cuda/include -Wall -Wno-sign-compare -std=c++11 -MMD -MP -pthread -fPIC -DNDEBUG -O2 -I/usr/include/python2.7 -I/usr/lib/python2.7/dist-packages/numpy/core/include -I/usr/local/include -I/usr/local/hdf5 -I/usr/local/hdf5/include -I.build_release/src -I./src -I./include -I/usr/local/cuda/include -Wall -Wno-sign-compare -c -o .build_release/src/caffe/internal_thread.o 2> .build_release/src/caffe/internal_thread.o.warnings.txt \
|| (cat .build_release/src/caffe/internal_thread.o.warnings.txt; exit 1)
NVCC src/caffe/layers/upsample_layer.cu
/usr/local/cuda/bin/nvcc -D_FORCE_INLINES -ccbin=/usr/bin/g++-4.8 -Xcompiler -fPIC -DNDEBUG -O2 -I/usr/include/python2.7 -I/usr/lib/python2.7/dist-packages/numpy/core/include -I/usr/local/include -I/usr/local/hdf5 -I/usr/local/hdf5/include -I.build_release/src -I./src -I./include -I/usr/local/cuda/include -std=c++11 -ccbin=/usr/bin/g++-4.8 -Xcompiler -fPIC -DNDEBUG -O2 -I/usr/include/python2.7 -I/usr/lib/python2.7/dist-packages/numpy/core/include -I/usr/local/include -I/usr/local/hdf5 -I/usr/local/hdf5/include -I.build_release/src -I./src -I./include -I/usr/local/cuda/include -M src/caffe/layers/upsample_layer.cu -o .build_release/cuda/src/caffe/layers/upsample_layer.d \
-odir .build_release/cuda/src/caffe/layers
nvcc fatal : redefinition of argument 'compiler-bindir'
Makefile:544: recipe for target '.build_release/cuda/src/caffe/layers/upsample_layer.o' failed
make: *** [.build_release/cuda/src/caffe/layers/upsample_layer.o] Error 1
and the line 544 in Makefile which the error come from:
...
# cat $#.$(WARNS_EXT)
$(BUILD_DIR)/cuda/%.o: %.cu | $(ALL_BUILD_DIRS)
544> # echo NVCC $<
$(Q)$(CUDA_DIR)/bin/nvcc $(NVCCFLAGS) $(CUDA_ARCH) -M $< -o ${#:.o=.d} \
-odir $(#D)
...
Notice that I tried compiling it with gcc 5 and gcc 7 and the same error occur ! Any idea guys ?
EDIT 1:
I also added this CUSTOM_CXX := /usr/bin/g++-4.8 to Makefile.config
Since no one aswered I finaly found a solution, the error is caused because the same argument is called twice, in my Makefile I added those lines of code:
CXXFLAGS += -pthread -fPIC $(COMMON_FLAGS) $(WARNINGS) -std=c++11
NVCCFLAGS += -D_FORCE_INLINES -ccbin=$(CXX) -Xcompiler -fPIC $(COMMON_FLAGS) -std=c++11
LINKFLAGS += -pthread -fPIC $(COMMON_FLAGS) $(WARNINGS) -std=c++11
to avoid this error /usr/include/c++/4.8/bits/c++0x_warning.h:32:2: error: #error This file requires compiler and library support for the ISO C++ 2011 standard. This support is currently experimental, and must be enabled with the -std=c++11 or -std=gnu++11 compiler options.
In the same file in the complete build flags, we have the same flag:
...
# Complete build flags.
COMMON_FLAGS += $(foreach includedir,$(INCLUDE_DIRS),-I$(includedir))
CXXFLAGS += -pthread -fPIC $(COMMON_FLAGS) $(WARNINGS)
NVCCFLAGS += -ccbin=$(CXX) -Xcompiler -fPIC $(COMMON_FLAGS)
# mex may invoke an older gcc that is too liberal with -Wuninitalized
...
what I did is commenting my flag I added:
CXXFLAGS += -pthread -fPIC $(COMMON_FLAGS) $(WARNINGS) -std=c++11
#NVCCFLAGS += -D_FORCE_INLINES -ccbin=$(CXX) -Xcompiler -fPIC $(COMMON_FLAGS) -std=c++11
LINKFLAGS += -pthread -fPIC $(COMMON_FLAGS) $(WARNINGS) -std=c++11
and add -std=c++11 argument to NVCCFLAGS in the complete build flags section, it turned to be something like this:
...
# Complete build flags.
COMMON_FLAGS += $(foreach includedir,$(INCLUDE_DIRS),-I$(includedir))
CXXFLAGS += -pthread -fPIC $(COMMON_FLAGS) $(WARNINGS)
NVCCFLAGS += -ccbin=$(CXX) -Xcompiler -fPIC $(COMMON_FLAGS) -std=c++11
# mex may invoke an older gcc that is too liberal with -Wuninitalized
...
Before doing a make all after editing your Makefile, make sure you do a make clean or you'll get the same error !
I successfully installed PocketSphinx on Ubuntu16.04 and Mac 10.13.6(High Sierra), When I tried to install it on Mac 10.14.5(Mojave) with the command: $ pip3 install pocketsphinx, it couldn't find swig.
and got this error
Collecting pocketsphinx
Using cached https://files.pythonhosted.org/packages/cd/4a/adea55f189a81aed88efa0b0e1d25628e5ed22622ab9174bf696dd4f9474/pocketsphinx-0.1.15.tar.gz
Building wheels for collected packages: pocketsphinx
Building wheel for pocketsphinx (setup.py) ... error
ERROR: Complete output from command /Users/lzl/anaconda3/bin/python -u -c 'import setuptools, tokenize;__file__='"'"'/private/var/folders/gg/85tn8f210s59lz087b_ftc8m0000gn/T/pip-install-yiu5l4t9/pocketsphinx/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /private/var/folders/gg/85tn8f210s59lz087b_ftc8m0000gn/T/pip-wheel-h2va4b_y --python-tag cp37:
ERROR: running bdist_wheel
running build_ext
building 'sphinxbase._sphinxbase' extension
swigging deps/sphinxbase/swig/sphinxbase.i to deps/sphinxbase/swig/sphinxbase_wrap.c
swig -python -modern -threads -Ideps/sphinxbase/include -Ideps/sphinxbase/include/sphinxbase -Ideps/sphinxbase/include/android -Ideps/sphinxbase/swig -outdir sphinxbase -o deps/sphinxbase/swig/sphinxbase_wrap.c deps/sphinxbase/swig/sphinxbase.i
unable to execute 'swig': No such file or directory
error: command 'swig' failed with exit status 1
----------------------------------------
ERROR: Failed building wheel for pocketsphinx
I thought maybe I need swig so I installed swig separately but still got another error
ERROR: Complete output from command /Users/lzl/anaconda3/bin/python -u -c 'import setuptools, tokenize;__file__='"'"'/private/var/folders/gg/85tn8f210s59lz087b_ftc8m0000gn/T/pip-install-6cx6cog5/pocketsphinx/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/gg/85tn8f210s59lz087b_ftc8m0000gn/T/pip-record-vn4e3pmx/install-record.txt --single-version-externally-managed --compile:
ERROR: running install
running build_ext
building 'sphinxbase._sphinxbase' extension
swigging deps/sphinxbase/swig/sphinxbase.i to deps/sphinxbase/swig/sphinxbase_wrap.c
swig -python -modern -threads -Ideps/sphinxbase/include -Ideps/sphinxbase/include/sphinxbase -Ideps/sphinxbase/include/android -Ideps/sphinxbase/swig -outdir sphinxbase -o deps/sphinxbase/swig/sphinxbase_wrap.c deps/sphinxbase/swig/sphinxbase.i
Deprecated command line option: -modern. This option is now always on.
creating build
creating build/temp.macosx-10.7-x86_64-3.7
creating build/temp.macosx-10.7-x86_64-3.7/deps
creating build/temp.macosx-10.7-x86_64-3.7/deps/sphinxbase
creating build/temp.macosx-10.7-x86_64-3.7/deps/sphinxbase/src
creating build/temp.macosx-10.7-x86_64-3.7/deps/sphinxbase/src/libsphinxbase
creating build/temp.macosx-10.7-x86_64-3.7/deps/sphinxbase/src/libsphinxbase/lm
creating build/temp.macosx-10.7-x86_64-3.7/deps/sphinxbase/src/libsphinxbase/feat
creating build/temp.macosx-10.7-x86_64-3.7/deps/sphinxbase/src/libsphinxbase/util
creating build/temp.macosx-10.7-x86_64-3.7/deps/sphinxbase/src/libsphinxbase/fe
creating build/temp.macosx-10.7-x86_64-3.7/deps/sphinxbase/swig
gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/Users/lzl/anaconda3/include -arch x86_64 -I/Users/lzl/anaconda3/include -arch x86_64 -DSPHINXBASE_EXPORTS -DPOCKETSPHINX_EXPORTS -DSPHINX_DLL -DHAVE_CONFIG_H -Ideps/sphinxbase/include -Ideps/sphinxbase/include/sphinxbase -Ideps/sphinxbase/include/android -I/System/Library/Frameworks/OpenAL.framework/Versions/A/Headers -I/Users/lzl/anaconda3/include/python3.7m -c deps/sphinxbase/src/libsphinxbase/lm/ngram_model_set.c -o build/temp.macosx-10.7-x86_64-3.7/deps/sphinxbase/src/libsphinxbase/lm/ngram_model_set.o -Wno-macro-redefined -Wno-sign-compare -Wno-logical-op-parentheses
gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/Users/lzl/anaconda3/include -arch x86_64 -I/Users/lzl/anaconda3/include -arch x86_64 -DSPHINXBASE_EXPORTS -DPOCKETSPHINX_EXPORTS -DSPHINX_DLL -DHAVE_CONFIG_H -Ideps/sphinxbase/include -Ideps/sphinxbase/include/sphinxbase -Ideps/sphinxbase/include/android -I/System/Library/Frameworks/OpenAL.framework/Versions/A/Headers -I/Users/lzl/anaconda3/include/python3.7m -c deps/sphinxbase/src/libsphinxbase/lm/jsgf.c -o build/temp.macosx-10.7-x86_64-3.7/deps/sphinxbase/src/libsphinxbase/lm/jsgf.o -Wno-macro-redefined -Wno-sign-compare -Wno-logical-op-parentheses
gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/Users/lzl/anaconda3/include -arch x86_64 -I/Users/lzl/anaconda3/include -arch x86_64 -DSPHINXBASE_EXPORTS -DPOCKETSPHINX_EXPORTS -DSPHINX_DLL -DHAVE_CONFIG_H -Ideps/sphinxbase/include -Ideps/sphinxbase/include/sphinxbase -Ideps/sphinxbase/include/android -I/System/Library/Frameworks/OpenAL.framework/Versions/A/Headers -I/Users/lzl/anaconda3/include/python3.7m -c deps/sphinxbase/src/libsphinxbase/lm/ngram_model.c -o build/temp.macosx-10.7-x86_64-3.7/deps/sphinxbase/src/libsphinxbase/lm/ngram_model.o -Wno-macro-redefined -Wno-sign-compare -Wno-logical-op-parentheses
1 warning generated.
gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/Users/lzl/anaconda3/include -arch x86_64 -I/Users/lzl/anaconda3/include -arch x86_64 -DSPHINXBASE_EXPORTS -DPOCKETSPHINX_EXPORTS -DSPHINX_DLL -DHAVE_CONFIG_H -Ideps/sphinxbase/include -Ideps/sphinxbase/include/sphinxbase -Ideps/sphinxbase/include/android -I/System/Library/Frameworks/OpenAL.framework/Versions/A/Headers -I/Users/lzl/anaconda3/include/python3.7m -c deps/sphinxbase/src/libsphinxbase/lm/jsgf_parser.c -o build/temp.macosx-10.7-x86_64-3.7/deps/sphinxbase/src/libsphinxbase/lm/jsgf_parser.o -Wno-macro-redefined -Wno-sign-compare -Wno-logical-op-parentheses
jsgf_parser.c:1685:6: warning: code will never be executed [-Wunreachable-code]
goto yyerrorlab;
^~~~~~~~~~~~~~~
jsgf_parser.c:1684:21: note: silence by adding parentheses to mark code as explicitly dead
if (/*CONSTCOND*/ 0)
^
/* DISABLES CODE */ ( )
1 warning generated.
gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/Users/lzl/anaconda3/include -arch x86_64 -I/Users/lzl/anaconda3/include -arch x86_64 -DSPHINXBASE_EXPORTS -DPOCKETSPHINX_EXPORTS -DSPHINX_DLL -DHAVE_CONFIG_H -Ideps/sphinxbase/include -Ideps/sphinxbase/include/sphinxbase -Ideps/sphinxbase/include/android -I/System/Library/Frameworks/OpenAL.framework/Versions/A/Headers -I/Users/lzl/anaconda3/include/python3.7m -c deps/sphinxbase/src/libsphinxbase/lm/fsg_model.c -o build/temp.macosx-10.7-x86_64-3.7/deps/sphinxbase/src/libsphinxbase/lm/fsg_model.o -Wno-macro-redefined -Wno-sign-compare -Wno-logical-op-parentheses
gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/Users/lzl/anaconda3/include -arch x86_64 -I/Users/lzl/anaconda3/include -arch x86_64 -DSPHINXBASE_EXPORTS -DPOCKETSPHINX_EXPORTS -DSPHINX_DLL -DHAVE_CONFIG_H -Ideps/sphinxbase/include -Ideps/sphinxbase/include/sphinxbase -Ideps/sphinxbase/include/android -I/System/Library/Frameworks/OpenAL.framework/Versions/A/Headers -I/Users/lzl/anaconda3/include/python3.7m -c deps/sphinxbase/swig/sphinxbase_wrap.c -o build/temp.macosx-10.7-x86_64-3.7/deps/sphinxbase/swig/sphinxbase_wrap.o -Wno-macro-redefined -Wno-sign-compare -Wno-logical-op-parentheses
creating build/lib.macosx-10.7-x86_64-3.7
creating build/lib.macosx-10.7-x86_64-3.7/sphinxbase
gcc -bundle -undefined dynamic_lookup -L/Users/lzl/anaconda3/lib -arch x86_64 -L/Users/lzl/anaconda3/lib -arch x86_64 -arch x86_64 build/temp.macosx-10.7-x86_64-3.7/deps/sphinxbase/src/libsphinxbase/lm/ngram_model_set.o build/temp.macosx-10.7-x86_64-3.7/deps/sphinxbase/src/libsphinxbase/lm/jsgf.o build/temp.macosx-10.7-x86_64-3.7/deps/sphinxbase/src/libsphinxbase/lm/ngram_model.o build/temp.macosx-10.7-x86_64-3.7/deps/sphinxbase/src/libsphinxbase/lm/lm_trie.o build/temp.macosx-10.7-x86_64-3.7/deps/sphinxbase/src/libsphinxbase/lm/ngrams_raw.o build/temp.macosx-10.7-x86_64-3.7/deps/sphinxbase/src/libsphinxbase/lm/lm_trie_quant.o build/temp.macosx-10.7-x86_64-3.7/deps/sphinxbase/src/libsphinxbase/lm/ngram_model_trie.o build/temp.macosx-10.7-x86_64-3.7/deps/sphinxbase/src/libsphinxbase/lm/jsgf_scanner.o build/temp.macosx-10.7-x86_64-3.7/deps/sphinxbase/src/libsphinxbase/lm/jsgf_parser.o build/temp.macosx-10.7-x86_64-3.7/deps/sphinxbase/src/libsphinxbase/lm/fsg_model.o build/temp.macosx-10.7-x86_64-3.7/deps/sphinxbase/src/libsphinxbase/feat/agc.o build/temp.macosx-10.7-x86_64-3.7/deps/sphinxbase/src/libsphinxbase/feat/cmn.o build/temp.macosx-10.7-x86_64-3.7/deps/sphinxbase/src/libsphinxbase/feat/cmn_live.o build/temp.macosx-10.7-x86_64-3.7/deps/sphinxbase/src/libsphinxbase/feat/lda.o build/temp.macosx-10.7-x86_64-3.7/deps/sphinxbase/src/libsphinxbase/feat/feat.o build/temp.macosx-10.7-x86_64-3.7/deps/sphinxbase/src/libsphinxbase/util/strfuncs.o build/temp.macosx-10.7-x86_64-3.7/deps/sphinxbase/src/libsphinxbase/util/slamch.o build/temp.macosx-10.7-x86_64-3.7/deps/sphinxbase/src/libsphinxbase/util/dtoa.o build/temp.macosx-10.7-x86_64-3.7/deps/sphinxbase/src/libsphinxbase/util/heap.o build/temp.macosx-10.7-x86_64-3.7/deps/sphinxbase/src/libsphinxbase/util/cmd_ln.o build/temp.macosx-10.7-x86_64-3.7/deps/sphinxbase/src/libsphinxbase/util/bitarr.o build/temp.macosx-10.7-x86_64-3.7/deps/sphinxbase/src/libsphinxbase/util/filename.o build/temp.macosx-10.7-x86_64-3.7/deps/sphinxbase/src/libsphinxbase/util/bitvec.o build/temp.macosx-10.7-x86_64-3.7/deps/sphinxbase/src/libsphinxbase/util/case.o build/temp.macosx-10.7-x86_64-3.7/deps/sphinxbase/src/libsphinxbase/util/errno.o build/temp.macosx-10.7-x86_64-3.7/deps/sphinxbase/src/libsphinxbase/util/ckd_alloc.o build/temp.macosx-10.7-x86_64-3.7/deps/sphinxbase/src/libsphinxbase/util/logmath.o build/temp.macosx-10.7-x86_64-3.7/deps/sphinxbase/src/libsphinxbase/util/sbthread.o build/temp.macosx-10.7-x86_64-3.7/deps/sphinxbase/src/libsphinxbase/util/glist.o build/temp.macosx-10.7-x86_64-3.7/deps/sphinxbase/src/libsphinxbase/util/pio.o build/temp.macosx-10.7-x86_64-3.7/deps/sphinxbase/src/libsphinxbase/util/err.o build/temp.macosx-10.7-x86_64-3.7/deps/sphinxbase/src/libsphinxbase/util/slapack_lite.o build/temp.macosx-10.7-x86_64-3.7/deps/sphinxbase/src/libsphinxbase/util/bio.o build/temp.macosx-10.7-x86_64-3.7/deps/sphinxbase/src/libsphinxbase/util/listelem_alloc.o build/temp.macosx-10.7-x86_64-3.7/deps/sphinxbase/src/libsphinxbase/util/mmio.o build/temp.macosx-10.7-x86_64-3.7/deps/sphinxbase/src/libsphinxbase/util/profile.o build/temp.macosx-10.7-x86_64-3.7/deps/sphinxbase/src/libsphinxbase/util/genrand.o build/temp.macosx-10.7-x86_64-3.7/deps/sphinxbase/src/libsphinxbase/util/hash_table.o build/temp.macosx-10.7-x86_64-3.7/deps/sphinxbase/src/libsphinxbase/util/f2c_lite.o build/temp.macosx-10.7-x86_64-3.7/deps/sphinxbase/src/libsphinxbase/util/priority_queue.o build/temp.macosx-10.7-x86_64-3.7/deps/sphinxbase/src/libsphinxbase/util/blas_lite.o build/temp.macosx-10.7-x86_64-3.7/deps/sphinxbase/src/libsphinxbase/util/matrix.o build/temp.macosx-10.7-x86_64-3.7/deps/sphinxbase/src/libsphinxbase/fe/fe_interface.o build/temp.macosx-10.7-x86_64-3.7/deps/sphinxbase/src/libsphinxbase/fe/fe_warp.o build/temp.macosx-10.7-x86_64-3.7/deps/sphinxbase/src/libsphinxbase/fe/fe_warp_inverse_linear.o build/temp.macosx-10.7-x86_64-3.7/deps/sphinxbase/src/libsphinxbase/fe/fe_sigproc.o build/temp.macosx-10.7-x86_64-3.7/deps/sphinxbase/src/libsphinxbase/fe/fe_prespch_buf.o build/temp.macosx-10.7-x86_64-3.7/deps/sphinxbase/src/libsphinxbase/fe/fixlog.o build/temp.macosx-10.7-x86_64-3.7/deps/sphinxbase/src/libsphinxbase/fe/fe_warp_affine.o build/temp.macosx-10.7-x86_64-3.7/deps/sphinxbase/src/libsphinxbase/fe/yin.o build/temp.macosx-10.7-x86_64-3.7/deps/sphinxbase/src/libsphinxbase/fe/fe_noise.o build/temp.macosx-10.7-x86_64-3.7/deps/sphinxbase/src/libsphinxbase/fe/fe_warp_piecewise_linear.o build/temp.macosx-10.7-x86_64-3.7/deps/sphinxbase/swig/sphinxbase_wrap.o -o build/lib.macosx-10.7-x86_64-3.7/sphinxbase/_sphinxbase.cpython-37m-darwin.so
building 'pocketsphinx._pocketsphinx' extension
swigging deps/pocketsphinx/swig/pocketsphinx.i to deps/pocketsphinx/swig/pocketsphinx_wrap.c
swig -python -modern -threads -Ideps/sphinxbase/include -Ideps/sphinxbase/include/sphinxbase -Ideps/sphinxbase/include/android -Ideps/pocketsphinx/include -Ideps/sphinxbase/swig -outdir pocketsphinx -o deps/pocketsphinx/swig/pocketsphinx_wrap.c deps/pocketsphinx/swig/pocketsphinx.i
Deprecated command line option: -modern. This option is now always on.
creating build/temp.macosx-10.7-x86_64-3.7/deps/pocketsphinx
creating build/temp.macosx-10.7-x86_64-3.7/deps/pocketsphinx/src
creating build/temp.macosx-10.7-x86_64-3.7/deps/pocketsphinx/src/libpocketsphinx
creating build/temp.macosx-10.7-x86_64-3.7/deps/pocketsphinx/swig
gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/Users/lzl/anaconda3/include -arch x86_64 -I/Users/lzl/anaconda3/include -arch x86_64 -DSPHINXBASE_EXPORTS -DPOCKETSPHINX_EXPORTS -DSPHINX_DLL -DHAVE_CONFIG_H -Ideps/sphinxbase/include -Ideps/sphinxbase/include/sphinxbase -Ideps/sphinxbase/include/android -Ideps/pocketsphinx/include -I/Users/lzl/anaconda3/include/python3.7m -c deps/sphinxbase/src/libsphinxbase/lm/ngram_model_set.c -o build/temp.macosx-10.7-x86_64-3.7/deps/sphinxbase/src/libsphinxbase/lm/ngram_model_set.o -Wno-macro-redefined -Wno-sign-compare -Wno-logical-op-parentheses
gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/Users/lzl/anaconda3/include -arch x86_64 -I/Users/lzl/anaconda3/include -arch x86_64 -DSPHINXBASE_EXPORTS -DPOCKETSPHINX_EXPORTS -DSPHINX_DLL -DHAVE_CONFIG_H -Ideps/sphinxbase/include -Ideps/sphinxbase/include/sphinxbase -Ideps/sphinxbase/include/android -Ideps/pocketsphinx/include -I/Users/lzl/anaconda3/include/python3.7m -c deps/sphinxbase/src/libsphinxbase/lm/jsgf.c -o build/temp.macosx-10.7-x86_64-3.7/deps/sphinxbase/src/libsphinxbase/lm/jsgf.o -Wno-macro-redefined -Wno-sign-compare -Wno-logical-op-parentheses
gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/Users/lzl/anaconda3/include -arch x86_64 -I/Users/lzl/anaconda3/include -arch x86_64 -DSPHINXBASE_EXPORTS -DPOCKETSPHINX_EXPORTS -DSPHINX_DLL -DHAVE_CONFIG_H -Ideps/sphinxbase/include -Ideps/sphinxbase/include/sphinxbase -Ideps/sphinxbase/include/android -Ideps/pocketsphinx/include -I/Users/lzl/anaconda3/include/python3.7m -c deps/sphinxbase/src/libsphinxbase/lm/ngram_model.c -o build/temp.macosx-10.7-x86_64-3.7/deps/sphinxbase/src/libsphinxbase/lm/ngram_model.o -Wno-macro-redefined -Wno-sign-compare -Wno-logical-op-parentheses
gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/Users/lzl/anaconda3/include -arch x86_64 -I/Users/lzl/anaconda3/include -arch x86_64 -DSPHINXBASE_EXPORTS -DPOCKETSPHINX_EXPORTS -DSPHINX_DLL -DHAVE_CONFIG_H -Ideps/sphinxbase/include -Ideps/sphinxbase/include/sphinxbase -Ideps/sphinxbase/include/android -Ideps/pocketsphinx/include -I/Users/lzl/anaconda3/include/python3.7m -c deps/sphinxbase/src/libsphinxbase/lm/lm_trie.c -o build/temp.macosx-10.7-x86_64-3.7/deps/sphinxbase/src/libsphinxbase/lm/lm_trie.o -Wno-macro-redefined -Wno-sign-compare -Wno-logical-op-parentheses
gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/Users/lzl/anaconda3/include -arch x86_64 -I/Users/lzl/anaconda3/include -arch x86_64 -DSPHINXBASE_EXPORTS -DPOCKETSPHINX_EXPORTS -DSPHINX_DLL -DHAVE_CONFIG_H -Ideps/sphinxbase/include -Ideps/sphinxbase/include/sphinxbase -Ideps/sphinxbase/include/android -Ideps/pocketsphinx/include -I/Users/lzl/anaconda3/include/python3.7m -c deps/sphinxbase/src/libsphinxbase/lm/jsgf_scanner.c -o build/temp.macosx-10.7-x86_64-3.7/deps/sphinxbase/src/libsphinxbase/lm/jsgf_scanner.o -Wno-macro-redefined -Wno-sign-compare -Wno-logical-op-parentheses
jsgf_scanner.c:1165:13: warning: code will never be executed [-Wunreachable-code]
if ( ! yyg->yy_did_buffer_switch_on_eof )
^~~
1 warning generated.
gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/Users/lzl/anaconda3/include -arch x86_64 -I/Users/lzl/anaconda3/include -arch x86_64 -DSPHINXBASE_EXPORTS -DPOCKETSPHINX_EXPORTS -DSPHINX_DLL -DHAVE_CONFIG_H -Ideps/sphinxbase/include -Ideps/sphinxbase/include/sphinxbase -Ideps/sphinxbase/include/android -Ideps/pocketsphinx/include -I/Users/lzl/anaconda3/include/python3.7m -c deps/sphinxbase/src/libsphinxbase/lm/jsgf_parser.c -o build/temp.macosx-10.7-x86_64-3.7/deps/sphinxbase/src/libsphinxbase/lm/jsgf_parser.o -Wno-macro-redefined -Wno-sign-compare -Wno-logical-op-parentheses
jsgf_parser.c:1685:6: warning: code will never be executed [-Wunreachable-code]
goto yyerrorlab;
^~~~~~~~~~~~~~~
jsgf_parser.c:1684:21: note: silence by adding parentheses to mark code as explicitly dead
if (/*CONSTCOND*/ 0)
^
/* DISABLES CODE */ ( )
1 warning generated.
gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/Users/lzl/anaconda3/include -arch x86_64 -I/Users/lzl/anaconda3/include -arch x86_64 -DSPHINXBASE_EXPORTS -DPOCKETSPHINX_EXPORTS -DSPHINX_DLL -DHAVE_CONFIG_H -Ideps/sphinxbase/include -Ideps/sphinxbase/include/sphinxbase -Ideps/sphinxbase/include/android -Ideps/pocketsphinx/include -I/Users/lzl/anaconda3/include/python3.7m -c deps/sphinxbase/src/libsphinxbase/lm/fsg_model.c -o build/temp.macosx-10.7-x86_64-3.7/deps/sphinxbase/src/libsphinxbase/lm/fsg_model.o -Wno-macro-redefined -Wno-sign-compare -Wno-logical-op-parentheses
gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/Users/lzl/anaconda3/include -arch x86_64 -I/Users/lzl/anaconda3/include -arch x86_64 -DSPHINXBASE_EXPORTS -DPOCKETSPHINX_EXPORTS -DSPHINX_DLL -DHAVE_CONFIG_H -Ideps/sphinxbase/include -Ideps/sphinxbase/include/sphinxbase -Ideps/sphinxbase/include/android -Ideps/pocketsphinx/include -I/Users/lzl/anaconda3/include/python3.7m -c deps/sphinxbase/src/libsphinxbase/feat/agc.c -o build/temp.macosx-10.7-x86_64-3.7/deps/sphinxbase/src/libsphinxbase/feat/agc.o -Wno-macro-redefined -Wno-sign-compare -Wno-logical-op-parentheses
gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/Users/lzl/anaconda3/include -arch x86_64 -I/Users/lzl/anaconda3/include -arch x86_64 -DSPHINXBASE_EXPORTS -DPOCKETSPHINX_EXPORTS -DSPHINX_DLL -DHAVE_CONFIG_H -Ideps/sphinxbase/include -Ideps/sphinxbase/include/sphinxbase -Ideps/sphinxbase/include/android -Ideps/pocketsphinx/include -I/Users/lzl/anaconda3/include/python3.7m -c deps/pocketsphinx/swig/pocketsphinx_wrap.c -o build/temp.macosx-10.7-x86_64-3.7/deps/pocketsphinx/swig/pocketsphinx_wrap.o -Wno-macro-redefined -Wno-sign-compare -Wno-logical-op-parentheses
creating build/lib.macosx-10.7-x86_64-3.7/pocketsphinx
gcc -bundle -undefined dynamic_lookup -L/Users/lzl/anaconda3/lib -arch x86_64 -L/Users/lzl/anaconda3/lib -arch x86_64 -arch x86_64 build/temp.macosx-10.7-x86_64-3.7/deps/sphinxbase/src/libsphinxbase/lm/ngram_model_set.o build/temp.macosx-10.7-x86_64-3.7/deps/sphinxbase/src/libsphinxbase/lm/jsgf.o build/temp.macosx-10.7-x86_64-3.7/deps/sphinxbase/src/libsphinxbase/lm/ngram_model.o build/temp.macosx-10.7-x86_64-3.7/deps/sphinxbase/src/libsphinxbase/lm/lm_trie.o build/temp.macosx-10.7-x86_64-3.7/deps/sphinxbase/src/libsphinxbase/lm/ngrams_raw.o build/temp.macosx-10.7-x86_64-3.7/deps/sphinxbase/src/libsphinxbase/lm/lm_trie_quant.o build/temp.macosx-10.7-x86_64-3.7/deps/sphinxbase/src/libsphinxbase/lm/ngram_model_trie.o build/temp.macosx-10.7-x86_64-3.7/deps/sphinxbase/src/libsphinxbase/lm/jsgf_scanner.o build/temp.macosx-10.7-x86_64-3.7/deps/sphinxbase/src/libsphinxbase/lm/jsgf_parser.o build/temp.macosx-10.7-x86_64-3.7/deps/sphinxbase/src/libsphinxbase/lm/fsg_model.o build/temp.macosx-10.7-x86_64-3.7/deps/sphinxbase/src/libsphinxbase/feat/agc.o build/temp.macosx-10.7-x86_64-3.7/deps/sphinxbase/src/libsphinxbase/feat/cmn.o build/temp.macosx-10.7-x86_64-3.7/deps/sphinxbase/src/libsphinxbase/feat/cmn_live.o build/temp.macosx-10.7-x86_64-3.7/deps/sphinxbase/src/libsphinxbase/feat/lda.o build/temp.macosx-10.7-x86_64-3.7/deps/sphinxbase/src/libsphinxbase/feat/feat.o build/temp.macosx-10.7-x86_64-3.7/deps/sphinxbase/src/libsphinxbase/util/strfuncs.o build/temp.macosx-10.7-x86_64-3.7/deps/sphinxbase/src/libsphinxbase/util/slamch.o build/temp.macosx-10.7-x86_64-3.7/deps/sphinxbase/src/libsphinxbase/util/dtoa.o build/temp.macosx-10.7-x86_64-3.7/deps/sphinxbase/src/libsphinxbase/util/heap.o build/temp.macosx-10.7-x86_64-3.7/deps/sphinxbase/src/libsphinxbase/util/cmd_ln.o build/temp.macosx-10.7-x86_64-3.7/deps/sphinxbase/src/libsphinxbase/util/bitarr.o build/temp.macosx-10.7-x86_64-3.7/deps/sphinxbase/src/libsphinxbase/util/filename.o build/temp.macosx-10.7-x86_64-3.7/deps/sphinxbase/src/libsphinxbase/util/bitvec.o build/temp.macosx-10.7-x86_64-3.7/deps/sphinxbase/src/libsphinxbase/util/case.o build/temp.macosx-10.7-x86_64-3.7/deps/sphinxbase/src/libsphinxbase/util/errno.o build/temp.macosx-10.7-x86_64-3.7/deps/sphinxbase/src/libsphinxbase/util/ckd_alloc.o build/temp.macosx-10.7-x86_64-3.7/deps/sphinxbase/src/libsphinxbase/util/logmath.o build/temp.macosx-10.7-x86_64-3.7/deps/sphinxbase/src/libsphinxbase/util/sbthread.o build/temp.macosx-10.7-x86_64-3.7/deps/sphinxbase/src/libsphinxbase/util/glist.o build/temp.macosx-10.7-x86_64-3.7/deps/sphinxbase/src/libsphinxbase/util/pio.o build/temp.macosx-10.7-x86_64-3.7/deps/sphinxbase/src/libsphinxbase/util/err.o build/temp.macosx-10.7-x86_64-3.7/deps/sphinxbase/src/libsphinxbase/util/slapack_lite.o build/temp.macosx-10.7-x86_64-3.7/deps/sphinxbase/src/libsphinxbase/util/bio.o build/temp.macosx-10.7-x86_64-3.7/deps/sphinxbase/src/libsphinxbase/util/listelem_alloc.o build/temp.macosx-10.7-x86_64-3.7/deps/sphinxbase/src/libsphinxbase/util/mmio.o build/temp.macosx-10.7-x86_64-3.7/deps/sphinxbase/src/libsphinxbase/util/profile.o build/temp.macosx-10.7-x86_64-3.7/deps/sphinxbase/src/libsphinxbase/util/genrand.o build/temp.macosx-10.7-x86_64-3.7/deps/sphinxbase/src/libsphinxbase/util/hash_table.o build/temp.macosx-10.7-x86_64-3.7/deps/sphinxbase/src/libsphinxbase/util/f2c_lite.o build/temp.macosx-10.7-x86_64-3.7/deps/sphinxbase/src/libsphinxbase/util/priority_queue.o build/temp.macosx-10.7-x86_64-3.7/deps/sphinxbase/src/libsphinxbase/util/blas_lite.o build/temp.macosx-10.7-x86_64-3.7/deps/sphinxbase/src/libsphinxbase/util/matrix.o build/temp.macosx-10.7-x86_64-3.7/deps/sphinxbase/src/libsphinxbase/fe/fe_interface.o build/temp.macosx-10.7-x86_64-3.7/deps/sphinxbase/src/libsphinxbase/fe/fe_warp.o build/temp.macosx-10.7-x86_64-3.7/deps/sphinxbase/src/libsphinxbase/fe/fe_warp_inverse_linear.o build/temp.macosx-10.7-x86_64-3.7/deps/sphinxbase/src/libsphinxbase/fe/fe_sigproc.o build/temp.macosx-10.7-x86_64-3.7/deps/sphinxbase/src/libsphinxbase/fe/fe_prespch_buf.o build/temp.macosx-10.7-x86_64-3.7/deps/sphinxbase/src/libsphinxbase/fe/fixlog.o build/temp.macosx-10.7-x86_64-3.7/deps/sphinxbase/src/libsphinxbase/fe/fe_warp_affine.o build/temp.macosx-10.7-x86_64-3.7/deps/sphinxbase/src/libsphinxbase/fe/yin.o build/temp.macosx-10.7-x86_64-3.7/deps/sphinxbase/src/libsphinxbase/fe/fe_noise.o build/temp.macosx-10.7-x86_64-3.7/deps/sphinxbase/src/libsphinxbase/fe/fe_warp_piecewise_linear.o build/temp.macosx-10.7-x86_64-3.7/deps/pocketsphinx/src/libpocketsphinx/dict.o build/temp.macosx-10.7-x86_64-3.7/deps/pocketsphinx/src/libpocketsphinx/ngram_search.o build/temp.macosx-10.7-x86_64-3.7/deps/pocketsphinx/src/libpocketsphinx/ps_mllr.o build/temp.macosx-10.7-x86_64-3.7/deps/pocketsphinx/src/libpocketsphinx/ms_mgau.o build/temp.macosx-10.7-x86_64-3.7/deps/pocketsphinx/src/libpocketsphinx/state_align_search.o build/temp.macosx-10.7-x86_64-3.7/deps/pocketsphinx/src/libpocketsphinx/ps_alignment.o build/temp.macosx-10.7-x86_64-3.7/deps/pocketsphinx/src/libpocketsphinx/dict2pid.o build/temp.macosx-10.7-x86_64-3.7/deps/pocketsphinx/src/libpocketsphinx/ms_gauden.o build/temp.macosx-10.7-x86_64-3.7/deps/pocketsphinx/src/libpocketsphinx/pocketsphinx.o build/temp.macosx-10.7-x86_64-3.7/deps/pocketsphinx/src/libpocketsphinx/ngram_search_fwdtree.o build/temp.macosx-10.7-x86_64-3.7/deps/pocketsphinx/src/libpocketsphinx/ps_lattice.o build/temp.macosx-10.7-x86_64-3.7/deps/pocketsphinx/src/libpocketsphinx/tmat.o build/temp.macosx-10.7-x86_64-3.7/deps/pocketsphinx/src/libpocketsphinx/fsg_history.o build/temp.macosx-10.7-x86_64-3.7/deps/pocketsphinx/src/libpocketsphinx/vector.o build/temp.macosx-10.7-x86_64-3.7/deps/pocketsphinx/src/libpocketsphinx/phone_loop_search.o build/temp.macosx-10.7-x86_64-3.7/deps/pocketsphinx/src/libpocketsphinx/kws_detections.o build/temp.macosx-10.7-x86_64-3.7/deps/pocketsphinx/src/libpocketsphinx/blkarray_list.o build/temp.macosx-10.7-x86_64-3.7/deps/pocketsphinx/src/libpocketsphinx/fsg_search.o build/temp.macosx-10.7-x86_64-3.7/deps/pocketsphinx/src/libpocketsphinx/fsg_lextree.o build/temp.macosx-10.7-x86_64-3.7/deps/pocketsphinx/src/libpocketsphinx/allphone_search.o build/temp.macosx-10.7-x86_64-3.7/deps/pocketsphinx/src/libpocketsphinx/mdef.o build/temp.macosx-10.7-x86_64-3.7/deps/pocketsphinx/src/libpocketsphinx/ms_senone.o build/temp.macosx-10.7-x86_64-3.7/deps/pocketsphinx/src/libpocketsphinx/acmod.o build/temp.macosx-10.7-x86_64-3.7/deps/pocketsphinx/src/libpocketsphinx/ptm_mgau.o build/temp.macosx-10.7-x86_64-3.7/deps/pocketsphinx/src/libpocketsphinx/s2_semi_mgau.o build/temp.macosx-10.7-x86_64-3.7/deps/pocketsphinx/src/libpocketsphinx/hmm.o build/temp.macosx-10.7-x86_64-3.7/deps/pocketsphinx/src/libpocketsphinx/kws_search.o build/temp.macosx-10.7-x86_64-3.7/deps/pocketsphinx/src/libpocketsphinx/bin_mdef.o build/temp.macosx-10.7-x86_64-3.7/deps/pocketsphinx/src/libpocketsphinx/ngram_search_fwdflat.o build/temp.macosx-10.7-x86_64-3.7/deps/pocketsphinx/swig/pocketsphinx_wrap.o -o build/lib.macosx-10.7-x86_64-3.7/pocketsphinx/_pocketsphinx.cpython-37m-darwin.so
building 'sphinxbase._ad_openal' extension
swigging swig/sphinxbase/ad_openal.i to swig/sphinxbase/ad_openal_wrap.c
swig -python -modern -threads -Ideps/sphinxbase/include -Ideps/sphinxbase/include/sphinxbase -Ideps/sphinxbase/include/android -Ideps/sphinxbase/swig -outdir sphinxbase -o swig/sphinxbase/ad_openal_wrap.c swig/sphinxbase/ad_openal.i
Deprecated command line option: -modern. This option is now always on.
creating build/temp.macosx-10.7-x86_64-3.7/swig
creating build/temp.macosx-10.7-x86_64-3.7/swig/sphinxbase
creating build/temp.macosx-10.7-x86_64-3.7/deps/sphinxbase/src/libsphinxad
gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/Users/lzl/anaconda3/include -arch x86_64 -I/Users/lzl/anaconda3/include -arch x86_64 -DSPHINXBASE_EXPORTS -DPOCKETSPHINX_EXPORTS -DSPHINX_DLL -DHAVE_CONFIG_H -Ideps/sphinxbase/include -Ideps/sphinxbase/include/sphinxbase -Ideps/sphinxbase/include/android -I/System/Library/Frameworks/OpenAL.framework/Versions/A/Headers -I/Users/lzl/anaconda3/include/python3.7m -c deps/sphinxbase/src/libsphinxad/ad_openal.c -o build/temp.macosx-10.7-x86_64-3.7/deps/sphinxbase/src/libsphinxad/ad_openal.o -Wno-macro-redefined -Wno-sign-compare -Wno-logical-op-parentheses
deps/sphinxbase/src/libsphinxad/ad_openal.c:43:10: fatal error: 'al.h' file not found
#include <al.h>
^~~~~~
1 error generated.
error: command 'gcc' failed with exit status 1
----------------------------------------
ERROR: Command "/Users/lzl/anaconda3/bin/python -u -c 'import setuptools, tokenize;__file__='"'"'/private/var/folders/gg/85tn8f210s59lz087b_ftc8m0000gn/T/pip-install-6cx6cog5/pocketsphinx/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/gg/85tn8f210s59lz087b_ftc8m0000gn/T/pip-record-vn4e3pmx/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/var/folders/gg/85tn8f210s59lz087b_ftc8m0000gn/T/pip-install-6cx6cog5/pocketsphinx/
How can I fix this? Thanks.
I'm working in Windows 7, 64 bit, running in a Virtual Box machine on a (recent-ish) Mac with Intel processor.
I have MinGW installed:
gcc -dumpmachine
>>> x86_64-w64-mingw32
I am trying to compile a Windows exe for this code (Landsat-8 routines for solar and satellite angle calculations):
gcc -I ias_lib -o l8_angle.exe -c l8_angle.c
which gives me no errors or warnings when run, and creates l8_angle.exe as expected. When opened, the exe gives:
The version of this file is not compatible with the version of Windows
you're running. Check your computer's system information to see
whether you need an x86 (32-bit) for x64 (64-bit) version of the
program, and then contact the software publisher.
Is it possible to compile this program on my setup?
If you're wondering I can run make on the Mac OS side to get a Linux executable, but I need a Windows executable for my production machine.
I was able to compile successully by echoing the gcc statements in both makefiles:
#echo $(value INCS)
which for some reasom prints the completely assembled gcc command. I then confirmed what the selected flags did and saw that they were all equally appropriate for a Windows build.
The build commands were then:
cd ias_lib
gcc -g -Wall -O2 -march=nocona -mfpmath=sse -msse2 -c ias_angle_gen_calculate_angles_rpc.c -o ias_angle_gen_calculate_angles_rpc.o
gcc -g -Wall -O2 -march=nocona -mfpmath=sse -msse2 -c ias_angle_gen_read_ang.c -o ias_angle_gen_read_ang.o
gcc -g -Wall -O2 -march=nocona -mfpmath=sse -msse2 -c ias_angle_gen_utilities.c -o ias_angle_gen_utilities.o
gcc -g -Wall -O2 -march=nocona -mfpmath=sse -msse2 -c ias_angle_gen_initialize.c -o ias_angle_gen_initialize.o
gcc -g -Wall -O2 -march=nocona -mfpmath=sse -msse2 -c ias_angle_gen_write_image.c -o ias_angle_gen_write_image.o
gcc -g -Wall -O2 -march=nocona -mfpmath=sse -msse2 -c ias_angle_gen_find_scas.c -o ias_angle_gen_find_scas.o
gcc -g -Wall -O2 -march=nocona -mfpmath=sse -msse2 -c ias_geo_convert_dms2deg.c -o ias_geo_convert_dms2deg.o
gcc -g -Wall -O2 -march=nocona -mfpmath=sse -msse2 -c ias_math_compute_unit_vector.c -o ias_math_compute_unit_vector.o
gcc -g -Wall -O2 -march=nocona -mfpmath=sse -msse2 -c ias_math_compute_vector_length.c -o ias_math_compute_vector_length.o
gcc -g -Wall -O2 -march=nocona -mfpmath=sse -msse2 -c ias_math_find_line_segment_intersection.c -o ias_math_find_line_segment_intersection.o
gcc -g -Wall -O2 -march=nocona -mfpmath=sse -msse2 -c ias_logging.c -o ias_logging.o
gcc -g -Wall -O2 -march=nocona -mfpmath=sse -msse2 -c ias_misc_create_output_image_trim_lut.c -o ias_misc_create_output_image_trim_lut.o
gcc -g -Wall -O2 -march=nocona -mfpmath=sse -msse2 -c ias_misc_convert_to_uppercase.c -o ias_misc_convert_to_uppercase.o
gcc -g -Wall -O2 -march=nocona -mfpmath=sse -msse2 -c ias_misc_write_envi_header.c -o ias_misc_write_envi_header.o
gcc -g -Wall -O2 -march=nocona -mfpmath=sse -msse2 -c ias_odl_free_tree.c -o ias_odl_free_tree.o
gcc -g -Wall -O2 -march=nocona -mfpmath=sse -msse2 -c ias_odl_get_field.c -o ias_odl_get_field.o
gcc -g -Wall -O2 -march=nocona -mfpmath=sse -msse2 -c ias_odl_read_tree.c -o ias_odl_read_tree.o
gcc -g -Wall -O2 -march=nocona -mfpmath=sse -msse2 -c ias_parm_provide_help.c -o ias_parm_provide_help.o
gcc -g -Wall -O2 -march=nocona -mfpmath=sse -msse2 -c ias_parm_read.c -o ias_parm_read.o
gcc -g -Wall -O2 -march=nocona -mfpmath=sse -msse2 -c ias_parm_map_odl_type.c -o ias_parm_map_odl_type.o
gcc -g -Wall -O2 -march=nocona -mfpmath=sse -msse2 -c ias_parm_check_ranges.c -o ias_parm_check_ranges.o
gcc -g -Wall -O2 -march=nocona -mfpmath=sse -msse2 -c ias_satellite_attributes.c -o ias_satellite_attributes.o
gcc -g -Wall -O2 -march=nocona -mfpmath=sse -msse2 -c landsat8.c -o landsat8.o
gcc -g -Wall -O2 -march=nocona -mfpmath=sse -msse2 -c lablib3.c -o lablib3.o
ar -r libl8ang.a ias_angle_gen_calculate_angles_rpc.o ias_angle_gen_read_ang.o ias_angle_gen_utilities.o ias_angle_gen_initialize.o ias_angle_gen_write_image.o ias_angle_gen_find_scas.o ias_geo_convert_dms2deg.o ias_math_compute_unit_vector.o ias_math_compute_vector_length.o ias_math_find_line_segment_intersection.o ias_logging.o ias_misc_create_output_image_trim_lut.o ias_misc_convert_to_uppercase.o ias_misc_write_envi_header.o ias_odl_free_tree.o ias_odl_get_field.o ias_odl_read_tree.o ias_parm_provide_help.o ias_parm_read.o ias_parm_map_odl_type.o ias_parm_check_ranges.o ias_satellite_attributes.o landsat8.o lablib3.o
cd ..
gcc -g -Wall -O2 -march=nocona -mfpmath=sse -msse2 -I./ias_lib/ -I./ -c -o l8_angles.o l8_angles.c
gcc -g -Wall -O2 -march=nocona -mfpmath=sse -msse2 -I./ias_lib/ -I./ -c -o angles_api.o angles_api.c
gcc -g -Wall -O2 -I./ias_lib/ -I./ -o l8_angles.exe ias_lib/libl8ang.a l8_angles.o angles_api.o -L./ias_lib/ -ll8ang -lm
where the only change was in the final line, l8_angles.exe rather than l8_angles. If anyone has a more straightforward way, I would love to see it.
I've haven't been successful in finding a solution to the following error which I get during the pyvlfeat 0.1.1a3 installation: /usr/bin/ld: cannot find -lboost_python-mt-py26
I've installed boost python. Here's the console output:
lenovo#lenovo-ThinkPad-T61:~/Downloads/pyvlfeat-0.1.1a3$ ipython
Python 2.7.2+ (default, Oct 4 2011, 20:03:08)
Type "copyright", "credits" or "license" for more information.
IPython 0.12 -- An enhanced Interactive Python.
? -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help -> Python's own help system.
object? -> Details about 'object', use 'object??' for extra details.
In [1]: run setup.py clean
running clean
removing 'build/temp.linux-i686-2.7' (and everything under it)
In [2]: run setup.py build
running build
running build_py
running build_ext
building '_vlfeat' extension
creating build/temp.linux-i686-2.7
creating build/temp.linux-i686-2.7/vlfeat
creating build/temp.linux-i686-2.7/vlfeat/vl
creating build/temp.linux-i686-2.7/vlfeat/mser
creating build/temp.linux-i686-2.7/vlfeat/sift
creating build/temp.linux-i686-2.7/vlfeat/imop
creating build/temp.linux-i686-2.7/vlfeat/misc
creating build/temp.linux-i686-2.7/vlfeat/kmeans
creating build/temp.linux-i686-2.7/vlfeat/quickshift
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -Ivlfeat/ -I/usr/include/python2.7 -c vlfeat/vl/aib.c -o build/temp.linux-i686-2.7/vlfeat/vl/aib.o -msse2 -O2 -fPIC -w
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -Ivlfeat/ -I/usr/include/python2.7 -c vlfeat/vl/generic.c -o build/temp.linux-i686-2.7/vlfeat/vl/generic.o -msse2 -O2 -fPIC -w
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -Ivlfeat/ -I/usr/include/python2.7 -c vlfeat/vl/hikmeans.c -o build/temp.linux-i686-2.7/vlfeat/vl/hikmeans.o -msse2 -O2 -fPIC -w
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -Ivlfeat/ -I/usr/include/python2.7 -c vlfeat/vl/ikmeans.c -o build/temp.linux-i686-2.7/vlfeat/vl/ikmeans.o -msse2 -O2 -fPIC -w
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -Ivlfeat/ -I/usr/include/python2.7 -c vlfeat/vl/imopv.c -o build/temp.linux-i686-2.7/vlfeat/vl/imopv.o -msse2 -O2 -fPIC -w
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -Ivlfeat/ -I/usr/include/python2.7 -c vlfeat/vl/mathop.c -o build/temp.linux-i686-2.7/vlfeat/vl/mathop.o -msse2 -O2 -fPIC -w
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -Ivlfeat/ -I/usr/include/python2.7 -c vlfeat/vl/mathop_sse2.c -o build/temp.linux-i686-2.7/vlfeat/vl/mathop_sse2.o -msse2 -O2 -fPIC -w
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -Ivlfeat/ -I/usr/include/python2.7 -c vlfeat/vl/pgm.c -o build/temp.linux-i686-2.7/vlfeat/vl/pgm.o -msse2 -O2 -fPIC -w
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -Ivlfeat/ -I/usr/include/python2.7 -c vlfeat/vl/rodrigues.c -o build/temp.linux-i686-2.7/vlfeat/vl/rodrigues.o -msse2 -O2 -fPIC -w
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -Ivlfeat/ -I/usr/include/python2.7 -c vlfeat/vl/stringop.c -o build/temp.linux-i686-2.7/vlfeat/vl/stringop.o -msse2 -O2 -fPIC -w
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -Ivlfeat/ -I/usr/include/python2.7 -c vlfeat/vl/getopt_long.c -o build/temp.linux-i686-2.7/vlfeat/vl/getopt_long.o -msse2 -O2 -fPIC -w
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -Ivlfeat/ -I/usr/include/python2.7 -c vlfeat/vl/host.c -o build/temp.linux-i686-2.7/vlfeat/vl/host.o -msse2 -O2 -fPIC -w
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -Ivlfeat/ -I/usr/include/python2.7 -c vlfeat/vl/imopv_sse2.c -o build/temp.linux-i686-2.7/vlfeat/vl/imopv_sse2.o -msse2 -O2 -fPIC -w
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -Ivlfeat/ -I/usr/include/python2.7 -c vlfeat/vl/mser.c -o build/temp.linux-i686-2.7/vlfeat/vl/mser.o -msse2 -O2 -fPIC -w
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -Ivlfeat/ -I/usr/include/python2.7 -c vlfeat/vl/random.c -o build/temp.linux-i686-2.7/vlfeat/vl/random.o -msse2 -O2 -fPIC -w
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -Ivlfeat/ -I/usr/include/python2.7 -c vlfeat/vl/sift.c -o build/temp.linux-i686-2.7/vlfeat/vl/sift.o -msse2 -O2 -fPIC -w
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -Ivlfeat/ -I/usr/include/python2.7 -c vlfeat/vl/dsift.c -o build/temp.linux-i686-2.7/vlfeat/vl/dsift.o -msse2 -O2 -fPIC -w
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -Ivlfeat/ -I/usr/include/python2.7 -c vlfeat/vl/quickshift.c -o build/temp.linux-i686-2.7/vlfeat/vl/quickshift.o -msse2 -O2 -fPIC -w
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -Ivlfeat/ -I/usr/include/python2.7 -c vlfeat/mser/vl_erfill.cpp -o build/temp.linux-i686-2.7/vlfeat/mser/vl_erfill.o -msse2 -O2 -fPIC -w
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for Ada/C/ObjC but not for C++ [enabled by default]
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -Ivlfeat/ -I/usr/include/python2.7 -c vlfeat/mser/vl_mser.cpp -o build/temp.linux-i686-2.7/vlfeat/mser/vl_mser.o -msse2 -O2 -fPIC -w
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for Ada/C/ObjC but not for C++ [enabled by default]
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -Ivlfeat/ -I/usr/include/python2.7 -c vlfeat/sift/vl_sift.cpp -o build/temp.linux-i686-2.7/vlfeat/sift/vl_sift.o -msse2 -O2 -fPIC -w
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for Ada/C/ObjC but not for C++ [enabled by default]
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -Ivlfeat/ -I/usr/include/python2.7 -c vlfeat/sift/vl_dsift.cpp -o build/temp.linux-i686-2.7/vlfeat/sift/vl_dsift.o -msse2 -O2 -fPIC -w
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for Ada/C/ObjC but not for C++ [enabled by default]
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -Ivlfeat/ -I/usr/include/python2.7 -c vlfeat/sift/vl_siftdescriptor.cpp -o build/temp.linux-i686-2.7/vlfeat/sift/vl_siftdescriptor.o -msse2 -O2 -fPIC -w
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for Ada/C/ObjC but not for C++ [enabled by default]
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -Ivlfeat/ -I/usr/include/python2.7 -c vlfeat/imop/vl_imsmooth.cpp -o build/temp.linux-i686-2.7/vlfeat/imop/vl_imsmooth.o -msse2 -O2 -fPIC -w
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for Ada/C/ObjC but not for C++ [enabled by default]
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -Ivlfeat/ -I/usr/include/python2.7 -c vlfeat/misc/vl_binsum.cpp -o build/temp.linux-i686-2.7/vlfeat/misc/vl_binsum.o -msse2 -O2 -fPIC -w
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for Ada/C/ObjC but not for C++ [enabled by default]
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -Ivlfeat/ -I/usr/include/python2.7 -c vlfeat/kmeans/vl_hikmeans.cpp -o build/temp.linux-i686-2.7/vlfeat/kmeans/vl_hikmeans.o -msse2 -O2 -fPIC -w
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for Ada/C/ObjC but not for C++ [enabled by default]
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -Ivlfeat/ -I/usr/include/python2.7 -c vlfeat/kmeans/vl_ikmeans.cpp -o build/temp.linux-i686-2.7/vlfeat/kmeans/vl_ikmeans.o -msse2 -O2 -fPIC -w
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for Ada/C/ObjC but not for C++ [enabled by default]
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -Ivlfeat/ -I/usr/include/python2.7 -c vlfeat/kmeans/vl_hikmeanspush.cpp -o build/temp.linux-i686-2.7/vlfeat/kmeans/vl_hikmeanspush.o -msse2 -O2 -fPIC -w
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for Ada/C/ObjC but not for C++ [enabled by default]
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -Ivlfeat/ -I/usr/include/python2.7 -c vlfeat/kmeans/vl_ikmeanspush.cpp -o build/temp.linux-i686-2.7/vlfeat/kmeans/vl_ikmeanspush.o -msse2 -O2 -fPIC -w
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for Ada/C/ObjC but not for C++ [enabled by default]
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -Ivlfeat/ -I/usr/include/python2.7 -c vlfeat/quickshift/vl_quickshift.cpp -o build/temp.linux-i686-2.7/vlfeat/quickshift/vl_quickshift.o -msse2 -O2 -fPIC -w
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for Ada/C/ObjC but not for C++ [enabled by default]
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -Ivlfeat/ -I/usr/include/python2.7 -c vlfeat/py_vlfeat.cpp -o build/temp.linux-i686-2.7/vlfeat/py_vlfeat.o -msse2 -O2 -fPIC -w
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for Ada/C/ObjC but not for C++ [enabled by default]
g++ -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions build/temp.linux-i686-2.7/vlfeat/vl/aib.o build/temp.linux-i686-2.7/vlfeat/vl/generic.o build/temp.linux-i686-2.7/vlfeat/vl/hikmeans.o build/temp.linux-i686-2.7/vlfeat/vl/ikmeans.o build/temp.linux-i686-2.7/vlfeat/vl/imopv.o build/temp.linux-i686-2.7/vlfeat/vl/mathop.o build/temp.linux-i686-2.7/vlfeat/vl/mathop_sse2.o build/temp.linux-i686-2.7/vlfeat/vl/pgm.o build/temp.linux-i686-2.7/vlfeat/vl/rodrigues.o build/temp.linux-i686-2.7/vlfeat/vl/stringop.o build/temp.linux-i686-2.7/vlfeat/vl/getopt_long.o build/temp.linux-i686-2.7/vlfeat/vl/host.o build/temp.linux-i686-2.7/vlfeat/vl/imopv_sse2.o build/temp.linux-i686-2.7/vlfeat/vl/mser.o build/temp.linux-i686-2.7/vlfeat/vl/random.o build/temp.linux-i686-2.7/vlfeat/vl/sift.o build/temp.linux-i686-2.7/vlfeat/vl/dsift.o build/temp.linux-i686-2.7/vlfeat/vl/quickshift.o build/temp.linux-i686-2.7/vlfeat/mser/vl_erfill.o build/temp.linux-i686-2.7/vlfeat/mser/vl_mser.o build/temp.linux-i686-2.7/vlfeat/sift/vl_sift.o build/temp.linux-i686-2.7/vlfeat/sift/vl_dsift.o build/temp.linux-i686-2.7/vlfeat/sift/vl_siftdescriptor.o build/temp.linux-i686-2.7/vlfeat/imop/vl_imsmooth.o build/temp.linux-i686-2.7/vlfeat/misc/vl_binsum.o build/temp.linux-i686-2.7/vlfeat/kmeans/vl_hikmeans.o build/temp.linux-i686-2.7/vlfeat/kmeans/vl_ikmeans.o build/temp.linux-i686-2.7/vlfeat/kmeans/vl_hikmeanspush.o build/temp.linux-i686-2.7/vlfeat/kmeans/vl_ikmeanspush.o build/temp.linux-i686-2.7/vlfeat/quickshift/vl_quickshift.o build/temp.linux-i686-2.7/vlfeat/py_vlfeat.o -o build/lib.linux-i686-2.7/_vlfeat.so -msse -shared -lboost_python-mt-py26
/usr/bin/ld: cannot find -lboost_python-mt-py26
collect2: ld returned 1 exit status
An exception has occurred, use %tb to see the full traceback.
SystemExit: error: command 'g++' failed with exit status 1
In [3]:
A quick fix to this is to simply edit the setup.py for pyvlfeat and modify the LinkArgs line to refer to your installation of boost-python. For my system, (and likely many others) this amounts to just changing -lboost_python-mt-py26 to -lboost_python-mt-py27 to refer to the proper Python revision.