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.
Related
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
Just installed the iRuby kernel following the istructions but when i do jupyter-notebook command and start a new notebook kernel dies and there is a problem reported on the terminal about libczmq:
[I 18:05:11.900 NotebookApp] Kernel started: bcb56cdd-964a-4dae-8a40-76dbcbe7e418
WARNING: ::CZMQ::FFI is not available without libczmq.
Unable to load this gem. The libzmq library (or DLL) could not be found.
If this is a Windows platform, make sure libzmq.dll is on the PATH.
If the DLL was built with mingw, make sure the other two dependent DLLs,
libgcc_s_sjlj-1.dll and libstdc++6.dll, are also on the PATH.
For non-Windows platforms, make sure libzmq is located in this search path:
["/var/lib/gems/2.3.0/gems/ffi-rzmq-core-1.0.6/lib/ffi-rzmq-core/../../ext/libzmq.so", "/home/randomx/anaconda3/bin/libzmq.so", "/home/randomx/bin/libzmq.so", "/home/randomx/.local/bin/libzmq.so", "/usr/local/sbin/libzmq.so", "/usr/local/bin/libzmq.so", "/usr/sbin/libzmq.so", "/usr/bin/libzmq.so", "/sbin/libzmq.so", "/bin/libzmq.so", "/usr/games/libzmq.so", "/usr/local/games/libzmq.so", "/snap/bin/libzmq.so", "/usr/lib/libzmq.so", "/usr/local/lib/libzmq.so", "/opt/local/lib/libzmq.so", "/usr/lib64/libzmq.so"]
You should install cztop, rbczmq or ffi_rzmq before running iruby notebook. See README.
F, [2017-03-26T18:05:12.031981 #13088] FATAL -- : Kernel died: uninitialized constant IRuby::Kernel::Session
/var/lib/gems/2.3.0/gems/iruby-0.3/lib/iruby/kernel.rb:18:in `initialize'
/var/lib/gems/2.3.0/gems/iruby-0.3/lib/iruby/command.rb:70:in `new'
/var/lib/gems/2.3.0/gems/iruby-0.3/lib/iruby/command.rb:70:in `run_kernel'
/var/lib/gems/2.3.0/gems/iruby-0.3/lib/iruby/command.rb:34:in `run'
/var/lib/gems/2.3.0/gems/iruby-0.3/bin/iruby:5:in `<top (required)>'
/usr/local/bin/iruby:23:in `load'
/usr/local/bin/iruby:23:in `<main>'
/var/lib/gems/2.3.0/gems/iruby-0.3/lib/iruby/kernel.rb:18:in `initialize': uninitialized constant IRuby::Kernel::Session (NameError)
from /var/lib/gems/2.3.0/gems/iruby-0.3/lib/iruby/command.rb:70:in `new'
from /var/lib/gems/2.3.0/gems/iruby-0.3/lib/iruby/command.rb:70:in `run_kernel'
from /var/lib/gems/2.3.0/gems/iruby-0.3/lib/iruby/command.rb:34:in `run'
from /var/lib/gems/2.3.0/gems/iruby-0.3/bin/iruby:5:in `<top (required)>'
from /usr/local/bin/iruby:23:in `load'
from /usr/local/bin/iruby:23:in `<main>'
[I 18:05:14.903 NotebookApp] KernelRestarter: restarting kernel (1/5)
WARNING: ::CZMQ::FFI is not available without libczmq.
So I installed cztop and ffi_rzmq but when i go to install rbczmq I got an error install message like this:
config.status: creating src/Makefile
config.status: creating doc/Makefile
config.status: creating src/libczmq.pc
config.status: creating addons/Makefile
config.status: creating src/platform.h
config.status: executing depfiles commands
config.status: executing libtool commands
"make all && make install"
Making all in src
make[1]: ingresso nella directory "/var/lib/gems/2.3.0/gems/rbczmq-1.7.9/ext/czmq/src"
make all-am
make[2]: ingresso nella directory "/var/lib/gems/2.3.0/gems/rbczmq-1.7.9/ext/czmq/src"
/bin/bash ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I../include -pedantic -Werror -Wall -D_GNU_SOURCE -DLINUX -D_REENTRANT -D_THREAD_SAFE -g -I/var/lib/gems/2.3.0/gems/rbczmq-1.7.9/ext/rbczmq/dst/include -g -fPIC -MT zauth.lo -MD -MP -MF .deps/zauth.Tpo -c -o zauth.lo zauth.c
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../include -pedantic -Werror -Wall -D_GNU_SOURCE -DLINUX -D_REENTRANT -D_THREAD_SAFE -g -I/var/lib/gems/2.3.0/gems/rbczmq-1.7.9/ext/rbczmq/dst/include -g -fPIC -MT zauth.lo -MD -MP -MF .deps/zauth.Tpo -c zauth.c -o zauth.o
mv -f .deps/zauth.Tpo .deps/zauth.Plo
/bin/bash ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I../include -pedantic -Werror -Wall -D_GNU_SOURCE -DLINUX -D_REENTRANT -D_THREAD_SAFE -g -I/var/lib/gems/2.3.0/gems/rbczmq-1.7.9/ext/rbczmq/dst/include -g -fPIC -MT zbeacon.lo -MD -MP -MF .deps/zbeacon.Tpo -c -o zbeacon.lo zbeacon.c
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../include -pedantic -Werror -Wall -D_GNU_SOURCE -DLINUX -D_REENTRANT -D_THREAD_SAFE -g -I/var/lib/gems/2.3.0/gems/rbczmq-1.7.9/ext/rbczmq/dst/include -g -fPIC -MT zbeacon.lo -MD -MP -MF .deps/zbeacon.Tpo -c zbeacon.c -o zbeacon.o
mv -f .deps/zbeacon.Tpo .deps/zbeacon.Plo
/bin/bash ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I../include -pedantic -Werror -Wall -D_GNU_SOURCE -DLINUX -D_REENTRANT -D_THREAD_SAFE -g -I/var/lib/gems/2.3.0/gems/rbczmq-1.7.9/ext/rbczmq/dst/include -g -fPIC -MT zcert.lo -MD -MP -MF .deps/zcert.Tpo -c -o zcert.lo zcert.c
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../include -pedantic -Werror -Wall -D_GNU_SOURCE -DLINUX -D_REENTRANT -D_THREAD_SAFE -g -I/var/lib/gems/2.3.0/gems/rbczmq-1.7.9/ext/rbczmq/dst/include -g -fPIC -MT zcert.lo -MD -MP -MF .deps/zcert.Tpo -c zcert.c -o zcert.o
mv -f .deps/zcert.Tpo .deps/zcert.Plo
/bin/bash ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I../include -pedantic -Werror -Wall -D_GNU_SOURCE -DLINUX -D_REENTRANT -D_THREAD_SAFE -g -I/var/lib/gems/2.3.0/gems/rbczmq-1.7.9/ext/rbczmq/dst/include -g -fPIC -MT zcertstore.lo -MD -MP -MF .deps/zcertstore.Tpo -c -o zcertstore.lo zcertstore.c
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../include -pedantic -Werror -Wall -D_GNU_SOURCE -DLINUX -D_REENTRANT -D_THREAD_SAFE -g -I/var/lib/gems/2.3.0/gems/rbczmq-1.7.9/ext/rbczmq/dst/include -g -fPIC -MT zcertstore.lo -MD -MP -MF .deps/zcertstore.Tpo -c zcertstore.c -o zcertstore.o
mv -f .deps/zcertstore.Tpo .deps/zcertstore.Plo
/bin/bash ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I../include -pedantic -Werror -Wall -D_GNU_SOURCE -DLINUX -D_REENTRANT -D_THREAD_SAFE -g -I/var/lib/gems/2.3.0/gems/rbczmq-1.7.9/ext/rbczmq/dst/include -g -fPIC -MT zchunk.lo -MD -MP -MF .deps/zchunk.Tpo -c -o zchunk.lo zchunk.c
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../include -pedantic -Werror -Wall -D_GNU_SOURCE -DLINUX -D_REENTRANT -D_THREAD_SAFE -g -I/var/lib/gems/2.3.0/gems/rbczmq-1.7.9/ext/rbczmq/dst/include -g -fPIC -MT zchunk.lo -MD -MP -MF .deps/zchunk.Tpo -c zchunk.c -o zchunk.o
mv -f .deps/zchunk.Tpo .deps/zchunk.Plo
/bin/bash ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I../include -pedantic -Werror -Wall -D_GNU_SOURCE -DLINUX -D_REENTRANT -D_THREAD_SAFE -g -I/var/lib/gems/2.3.0/gems/rbczmq-1.7.9/ext/rbczmq/dst/include -g -fPIC -MT zclock.lo -MD -MP -MF .deps/zclock.Tpo -c -o zclock.lo zclock.c
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../include -pedantic -Werror -Wall -D_GNU_SOURCE -DLINUX -D_REENTRANT -D_THREAD_SAFE -g -I/var/lib/gems/2.3.0/gems/rbczmq-1.7.9/ext/rbczmq/dst/include -g -fPIC -MT zclock.lo -MD -MP -MF .deps/zclock.Tpo -c zclock.c -o zclock.o
mv -f .deps/zclock.Tpo .deps/zclock.Plo
/bin/bash ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I../include -pedantic -Werror -Wall -D_GNU_SOURCE -DLINUX -D_REENTRANT -D_THREAD_SAFE -g -I/var/lib/gems/2.3.0/gems/rbczmq-1.7.9/ext/rbczmq/dst/include -g -fPIC -MT zconfig.lo -MD -MP -MF .deps/zconfig.Tpo -c -o zconfig.lo zconfig.c
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../include -pedantic -Werror -Wall -D_GNU_SOURCE -DLINUX -D_REENTRANT -D_THREAD_SAFE -g -I/var/lib/gems/2.3.0/gems/rbczmq-1.7.9/ext/rbczmq/dst/include -g -fPIC -MT zconfig.lo -MD -MP -MF .deps/zconfig.Tpo -c zconfig.c -o zconfig.o
mv -f .deps/zconfig.Tpo .deps/zconfig.Plo
/bin/bash ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I../include -pedantic -Werror -Wall -D_GNU_SOURCE -DLINUX -D_REENTRANT -D_THREAD_SAFE -g -I/var/lib/gems/2.3.0/gems/rbczmq-1.7.9/ext/rbczmq/dst/include -g -fPIC -MT zctx.lo -MD -MP -MF .deps/zctx.Tpo -c -o zctx.lo zctx.c
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../include -pedantic -Werror -Wall -D_GNU_SOURCE -DLINUX -D_REENTRANT -D_THREAD_SAFE -g -I/var/lib/gems/2.3.0/gems/rbczmq-1.7.9/ext/rbczmq/dst/include -g -fPIC -MT zctx.lo -MD -MP -MF .deps/zctx.Tpo -c zctx.c -o zctx.o
mv -f .deps/zctx.Tpo .deps/zctx.Plo
/bin/bash ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I../include -pedantic -Werror -Wall -D_GNU_SOURCE -DLINUX -D_REENTRANT -D_THREAD_SAFE -g -I/var/lib/gems/2.3.0/gems/rbczmq-1.7.9/ext/rbczmq/dst/include -g -fPIC -MT zdir.lo -MD -MP -MF .deps/zdir.Tpo -c -o zdir.lo zdir.c
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../include -pedantic -Werror -Wall -D_GNU_SOURCE -DLINUX -D_REENTRANT -D_THREAD_SAFE -g -I/var/lib/gems/2.3.0/gems/rbczmq-1.7.9/ext/rbczmq/dst/include -g -fPIC -MT zdir.lo -MD -MP -MF .deps/zdir.Tpo -c zdir.c -o zdir.o
zdir.c: In function ‘zdir_new’:
zdir.c:156:9: error: ‘readdir_r’ is deprecated [-Werror=deprecated-declarations]
int rc = readdir_r (handle, entry, &result);
^~~
In file included from ../include/czmq_prelude.h:257:0,
from ../include/czmq.h:31,
from zdir.c:35:
/usr/include/dirent.h:183:12: note: declared here
extern int readdir_r (DIR *__restrict __dirp,
^~~~~~~~~
zdir.c:159:13: error: ‘readdir_r’ is deprecated [-Werror=deprecated-declarations]
rc = readdir_r (handle, entry, &result);
^~
In file included from ../include/czmq_prelude.h:257:0,
from ../include/czmq.h:31,
from zdir.c:35:
/usr/include/dirent.h:183:12: note: declared here
extern int readdir_r (DIR *__restrict __dirp,
^~~~~~~~~
cc1: all warnings being treated as errors
Makefile:774: set di istruzioni per l'obiettivo "zdir.lo" non riuscito
make[2]: *** [zdir.lo] Errore 1
make[2]: uscita dalla directory "/var/lib/gems/2.3.0/gems/rbczmq-1.7.9/ext/czmq/src"
Makefile:586: set di istruzioni per l'obiettivo "all" non riuscito
make[1]: *** [all] Errore 2
make[1]: uscita dalla directory "/var/lib/gems/2.3.0/gems/rbczmq-1.7.9/ext/czmq/src"
Makefile:414: set di istruzioni per l'obiettivo "all-recursive" non riuscito
make: *** [all-recursive] Errore 1
CZMQ compile error!
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers. Check the mkmf.log file for more details. You may
need configuration options.
Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/usr/bin/$(RUBY_BASE_NAME)2.3
--with-system-libs
--without-system-libs
--with-system-libs
--without-system-libs
extconf failed, exit code 1
I also have installed libtool autogen autoconf automake but installation fails anyway..I got the last version of Kubuntu as os
What can I do? Thank you for help
Solved! I had to install the zeromq source from here
http://zeromq.org/intro:get-the-software
I'm trying to build gcc 4.9.2 on RHEL6, as follows:
unpack the source tarball (to ~/gcc-4.9.2)
in the source dir:
./contrib/download_prerequisites
create a separate build directory ~/gcc-4.9.2-build
in the build dir:
~/gcc-4.9.2/configure --prefix=/usr/local/gcc-4.9.2
make
This fails with:
make[6]: Entering directory `/root/gcc-4.9.2-build-try0/x86_64-unknown-linux-gnu/libjava/classpath/native/jni/java-math'
/bin/sh ../../../libtool --tag=CC --mode=compile /root/gcc-4.9.2-build-try0/./gcc/xgcc -B/root/gcc-4.9.2-build-try0/./gcc/ -B/usr/local/gcc-4.9.2/x86_64-unknown-linux-gnu/bin/ -B/usr/local/gcc-4.9.2/x86_64-unknown-linux-gnu/lib/ -isystem /usr/local/gcc-4.9.2/x86_64-unknown-linux-gnu/include -isystem /usr/local/gcc-4.9.2/x86_64-unknown-linux-gnu/sys-include -DHAVE_CONFIG_H -I. -I/root/gcc-4.9.2/libjava/classpath/native/jni/java-math -I../../../include -I/root/gcc-4.9.2/libjava/classpath/include -I/root/gcc-4.9.2/libjava/classpath/native/jni/classpath -I/root/gcc-4.9.2/libjava/classpath/native/jni/native-lib -W -Wall -Wmissing-declarations -Wwrite-strings -Wmissing-prototypes -Wno-long-long -I/usr/include -g -O2 -MT gnu_java_math_GMP.lo -MD -MP -MF .deps/gnu_java_math_GMP.Tpo -c -o gnu_java_math_GMP.lo /root/gcc-4.9.2/libjava/classpath/native/jni/java-math/gnu_java_math_GMP.c
libtool: compile: /root/gcc-4.9.2-build-try0/./gcc/xgcc -B/root/gcc-4.9.2-build-try0/./gcc/ -B/usr/local/gcc-4.9.2/x86_64-unknown-linux-gnu/bin/ -B/usr/local/gcc-4.9.2/x86_64-unknown-linux-gnu/lib/ -isystem /usr/local/gcc-4.9.2/x86_64-unknown-linux-gnu/include -isystem /usr/local/gcc-4.9.2/x86_64-unknown-linux-gnu/sys-include -DHAVE_CONFIG_H -I. -I/root/gcc-4.9.2/libjava/classpath/native/jni/java-math -I../../../include -I/root/gcc-4.9.2/libjava/classpath/include -I/root/gcc-4.9.2/libjava/classpath/native/jni/classpath -I/root/gcc-4.9.2/libjava/classpath/native/jni/native-lib -W -Wall -Wmissing-declarations -Wwrite-strings -Wmissing-prototypes -Wno-long-long -I/usr/include -g -O2 -MT gnu_java_math_GMP.lo -MD -MP -MF .deps/gnu_java_math_GMP.Tpo -c /root/gcc-4.9.2/libjava/classpath/native/jni/java-math/gnu_java_math_GMP.c -fPIC -DPIC -o .libs/gnu_java_math_GMP.o
mv -f .deps/gnu_java_math_GMP.Tpo .deps/gnu_java_math_GMP.Plo
/bin/sh ../../../libtool --tag=CC --mode=link /root/gcc-4.9.2-build-try0/./gcc/xgcc -B/root/gcc-4.9.2-build-try0/./gcc/ -B/usr/local/gcc-4.9.2/x86_64-unknown-linux-gnu/bin/ -B/usr/local/gcc-4.9.2/x86_64-unknown-linux-gnu/lib/ -isystem /usr/local/gcc-4.9.2/x86_64-unknown-linux-gnu/include -isystem /usr/local/gcc-4.9.2/x86_64-unknown-linux-gnu/sys-include -W -Wall -Wmissing-declarations -Wwrite-strings -Wmissing-prototypes -Wno-long-long -I/usr/include -g -O2 -module -version-info 0:0:0 -no-undefined -lgmp -avoid-version -o libjavamath.la -rpath /usr/local/gcc-4.9.2/lib/../lib64/gcj-4.9.2-15 gnu_java_math_GMP.lo ../../../native/jni/classpath/jcl.lo -lrt
libtool: link: /root/gcc-4.9.2-build-try0/./gcc/xgcc -B/root/gcc-4.9.2-build-try0/./gcc/ -B/usr/local/gcc-4.9.2/x86_64-unknown-linux-gnu/bin/ -B/usr/local/gcc-4.9.2/x86_64-unknown-linux-gnu/lib/ -isystem /usr/local/gcc-4.9.2/x86_64-unknown-linux-gnu/include -isystem /usr/local/gcc-4.9.2/x86_64-unknown-linux-gnu/sys-include -shared .libs/gnu_java_math_GMP.o ../../../native/jni/classpath/.libs/jcl.o /root/gcc-4.9.2-build-try0/./gmp/.libs/libgmp.a -lrt -Wl,-soname -Wl,libjavamath.so -o .libs/libjavamath.so
/usr/bin/ld: /root/gcc-4.9.2-build-try0/./gmp/.libs/libgmp.a(mp_set_fns.o): relocation R_X86_64_32 against `__gmp_default_allocate' can not be used when making a shared object; recompile with -fPIC
/root/gcc-4.9.2-build-try0/./gmp/.libs/libgmp.a: could not read symbols: Bad value
collect2: error: ld returned 1 exit status
make[6]: *** [libjavamath.la] Error 1
make[6]: Leaving directory `/root/gcc-4.9.2-build-try0/x86_64-unknown-linux-gnu/libjava/classpath/native/jni/java-math'
A little googling pointed me at the --disable-shared option, which sort of helped, but now:
in the build dir:
~/gcc-4.9.2/configure --prefix=/usr/local/gcc-4.9.2 --disable-shared
make
yielded a slightly different error:
make[8]: Entering directory `/root/gcc-4.9.2-build/x86_64-unknown-linux-gnu/32/libjava/classpath/native/jni/classpath'
/bin/sh ../../../libtool --tag=CC --mode=compile /root/gcc-4.9.2-build/./gcc/xgcc -B/root/gcc-4.9.2-build/./gcc/ -B/usr/local/gcc-4.9.2/x86_64-unknown-linux-gnu/bin/ -B/usr/local/gcc-4.9.2/x86_64-unknown-linux-gnu/lib/ -isystem /usr/local/gcc-4.9.2/x86_64-unknown-linux-gnu/include -isystem /usr/local/gcc-4.9.2/x86_64-unknown-linux-gnu/sys-include -m32 -DHAVE_CONFIG_H -I. -I/root/gcc-4.9.2/libjava/classpath/native/jni/classpath -I../../../include -I/root/gcc-4.9.2/libjava/classpath/include -I/root/gcc-4.9.2/libjava/classpath/native/jni/classpath -I/root/gcc-4.9.2/libjava/classpath/native/jni/native-lib -W -Wall -Wmissing-declarations -Wwrite-strings -Wmissing-prototypes -Wno-long-long -Wstrict-prototypes -pedantic -fexceptions -fasynchronous-unwind-tables -g -O2 -m32 -MT jcl.lo -MD -MP -MF .deps/jcl.Tpo -c -o jcl.lo /root/gcc-4.9.2/libjava/classpath/native/jni/classpath/jcl.c
libtool: compile: not configured to build any kind of library
libtool: compile: See the libtool documentation for more information.
libtool: compile: Fatal configuration error.
make[8]: *** [jcl.lo] Error 1
make[8]: Leaving directory `/root/gcc-4.9.2-build/x86_64-unknown-linux-gnu/32/libjava/classpath/native/jni/classpath'
Adding the --enable-static option made no difference.
Any suggestions on what might be wrong?
BTW, gcc 4.9.1 gave the same errors.
System: Linux 2.6.32-431.29.2.el6.x86_64 #1 SMP Sun Jul 27 15:55:46 EDT 2014 x86_64 x86_64 x86_64 GNU/Linux
System is RHEL6, fully updated via Redhat, and has no custom RPMs that I know of.
Just completed building 4.9.2 on a CentOS 6.4 VM using 4.4.7 gcc. Ran into an out of space issue, which caused the build to fail, but once resolved, everything else went smoothly.
Looks like your build is failing in the Java side of town? Not sure if you need the Java support, so have you tried compiling just the c/c++ language support?
~/gcc-4.9.2/configure --enable-languages=c,c++ ...
I also don't require 32-bit binaries, so I add --disable-multilib to the list of configure parameters.
We are a team working on an R package containing C/C++ code. The package can successfully be installed on all the machines but one. These all run the same version of Mac OS X. I have provided the log files for the installation of the package on my computer (success) and a colleague's computer (error). The package depends on the Rcpp package and the GSL library, both of which were successfully installed on both machines.
My Computer
WARNING: ignoring environment value of R_HOME
* installing to library '/Users/dejayn/R/x86_64-apple-darwin10.8.0-library/2.15'
* installing *source* package 'mrenci' ...
** libs
*** arch - x86_64
/opt/local/bin/g++-mp-4.5 -I/opt/local/lib/R/include -I/opt/local/lib/R/include/x86_64 -DNDEBUG -fopenmp -fopenmp -I/opt/local/include -I"/Users/dejayn/R/x86_64-apple-darwin10.8.0-library/2.15/Rcpp/include" -fPIC -pipe -O2 -m64 -c MRMRTree.cc -o MRMRTree.o
/opt/local/bin/g++-mp-4.5 -I/opt/local/lib/R/include -I/opt/local/lib/R/include/x86_64 -DNDEBUG -fopenmp -fopenmp -I/opt/local/include -I"/Users/dejayn/R/x86_64-apple-darwin10.8.0-library/2.15/Rcpp/include" -fPIC -pipe -O2 -m64 -c Matrix.cc -o Matrix.o
/opt/local/bin/g++-mp-4.5 -I/opt/local/lib/R/include -I/opt/local/lib/R/include/x86_64 -DNDEBUG -fopenmp -fopenmp -I/opt/local/include -I"/Users/dejayn/R/x86_64-apple-darwin10.8.0-library/2.15/Rcpp/include" -fPIC -pipe -O2 -m64 -c MiMBuilder.cc -o MiMBuilder.o
/opt/local/bin/g++-mp-4.5 -I/opt/local/lib/R/include -I/opt/local/lib/R/include/x86_64 -DNDEBUG -fopenmp -fopenmp -I/opt/local/include -I"/Users/dejayn/R/x86_64-apple-darwin10.8.0-library/2.15/Rcpp/include" -fPIC -pipe -O2 -m64 -c SymmetricMatrix.cc -o SymmetricMatrix.o
/opt/local/bin/g++-mp-4.5 -I/opt/local/lib/R/include -I/opt/local/lib/R/include/x86_64 -DNDEBUG -fopenmp -fopenmp -I/opt/local/include -I"/Users/dejayn/R/x86_64-apple-darwin10.8.0-library/2.15/Rcpp/include" -fPIC -pipe -O2 -m64 -c adaptor.cc -o adaptor.o
/opt/local/bin/g++-mp-4.5 -I/opt/local/lib/R/include -I/opt/local/lib/R/include/x86_64 -DNDEBUG -fopenmp -fopenmp -I/opt/local/include -I"/Users/dejayn/R/x86_64-apple-darwin10.8.0-library/2.15/Rcpp/include" -fPIC -pipe -O2 -m64 -c memory.cc -o memory.o
/opt/local/bin/g++-mp-4.5 -I/opt/local/lib/R/include -I/opt/local/lib/R/include/x86_64 -DNDEBUG -fopenmp -fopenmp -I/opt/local/include -I"/Users/dejayn/R/x86_64-apple-darwin10.8.0-library/2.15/Rcpp/include" -fPIC -pipe -O2 -m64 -c tools.cc -o tools.o
/opt/local/bin/g++-mp-4.5 -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -single_module -multiply_defined suppress -L/opt/local/lib -o mrenci.so MRMRTree.o Matrix.o MiMBuilder.o SymmetricMatrix.o adaptor.o memory.o tools.o /Users/dejayn/R/x86_64-apple-darwin10.8.0-library/2.15/Rcpp/lib/x86_64/libRcpp.a -fopenmp -fopenmp -L/opt/local/lib/R/lib/x86_64 -lR
installing to /Users/dejayn/R/x86_64-apple-darwin10.8.0-library/2.15/mrenci/libs/x86_64
** R
** preparing package for lazy loading
** testing if installed package can be loaded
* DONE (mrenci)
Colleague's Computer
WARNING: ignoring environment value of R_HOME
* installing to library '/Library/Frameworks/R.framework/Versions/2.15/Resources/library'
* installing *source* package 'mrenci' ...
** libs
*** arch - x86_64
g++ -arch x86_64 -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/x86_64 -DNDEBUG -fopenmp -I/usr/local/include -I"/Library/Frameworks/R.framework/Versions/2.15/Resources/library/Rcpp/include" -fPIC -g -O2 -c MRMRTree.cc -o MRMRTree.o
MRMRTree.cc: In member function 'double* const MRMRTree::bootstrap(unsigned int)':
MRMRTree.cc:73: warning: iteration variable 'i' is unsigned
g++ -arch x86_64 -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/x86_64 -DNDEBUG -fopenmp -I/usr/local/include -I"/Library/Frameworks/R.framework/Versions/2.15/Resources/library/Rcpp/include" -fPIC -g -O2 -c Matrix.cc -o Matrix.o
g++ -arch x86_64 -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/x86_64 -DNDEBUG -fopenmp -I/usr/local/include -I"/Library/Frameworks/R.framework/Versions/2.15/Resources/library/Rcpp/include" -fPIC -g -O2 -c MiMBuilder.cc -o MiMBuilder.o
MiMBuilder.cc: In member function 'Matrix* const MiMBuilder::createMiM(unsigned int*, unsigned int, unsigned int*, unsigned int)':
MiMBuilder.cc:102: warning: iteration variable 'i' is unsigned
g++ -arch x86_64 -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/x86_64 -DNDEBUG -fopenmp -I/usr/local/include -I"/Library/Frameworks/R.framework/Versions/2.15/Resources/library/Rcpp/include" -fPIC -g -O2 -c SymmetricMatrix.cc -o SymmetricMatrix.o
g++ -arch x86_64 -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/x86_64 -DNDEBUG -fopenmp -I/usr/local/include -I"/Library/Frameworks/R.framework/Versions/2.15/Resources/library/Rcpp/include" -fPIC -g -O2 -c adaptor.cc -o adaptor.o
g++ -arch x86_64 -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/x86_64 -DNDEBUG -fopenmp -I/usr/local/include -I"/Library/Frameworks/R.framework/Versions/2.15/Resources/library/Rcpp/include" -fPIC -g -O2 -c memory.cc -o memory.o
g++ -arch x86_64 -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/x86_64 -DNDEBUG -fopenmp -I/usr/local/include -I"/Library/Frameworks/R.framework/Versions/2.15/Resources/library/Rcpp/include" -fPIC -g -O2 -c tools.cc -o tools.o
g++ -arch x86_64 -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -single_module -multiply_defined suppress -L/usr/local/lib -o mrenci.so MRMRTree.o Matrix.o MiMBuilder.o SymmetricMatrix.o adaptor.o memory.o tools.o /Library/Frameworks/R.framework/Versions/2.15/Resources/library/Rcpp/lib/x86_64/libRcpp.a -F/Library/Frameworks/R.framework/.. -framework R -Wl,-framework -Wl,CoreFoundation
installing to /Library/Frameworks/R.framework/Versions/2.15/Resources/library/mrenci/libs/x86_64
** R
** preparing package for lazy loading
** testing if installed package can be loaded
Error in dyn.load(file, DLLpath = DLLpath, ...) :
unable to load shared object '/Library/Frameworks/R.framework/Versions/2.15/Resources/library/mrenci/libs/x86_64/mrenci.so':
dlopen(/Library/Frameworks/R.framework/Versions/2.15/Resources/library/mrenci/libs/x86_64/mrenci.so, 6): Symbol not found: _GOMP_critical_name_end
Referenced from: /Library/Frameworks/R.framework/Versions/2.15/Resources/library/mrenci/libs/x86_64/mrenci.so
Expected in: flat namespace
in /Library/Frameworks/R.framework/Versions/2.15/Resources/library/mrenci/libs/x86_64/mrenci.so
Error: loading failed
Execution halted
ERROR: loading failed
* removing '/Library/Frameworks/R.framework/Versions/2.15/Resources/library/mrenci'
At first, the installation on my colleague's computer would result in the compilation of the package for both architectures, upon which g++ complained about an unknown -arch argument. This issue, however, appears to have been mitigated by forcing the targeting of a single architecture x86_64. It is also worth noting that as a result of these errors, all computers now have several versions of R and g++. Is this an issue with the linker? Does the same compiler need to be used for both R and its packages? In the case of my computer, I never explicitly asked for g++-mp-4.5 to be used rather than the default g++ (version 4.2), so I figured R automatically detects it.
In case this is of any help, here is what my Makevars contains:
PKG_LIBS=`$(R_HOME)/bin/Rscript -e "Rcpp:::LdFlags()"` $(SHLIB_OPENMP_CFLAGS) -fopenmp
PKG_CPPFLAGS=$(SHLIB_OPENMP_CXXFLAGS) -fopenmp
PKG_CFLAGS=$(SHLIB_OPENMP_CFLAGS) -fopenmp
The $(SHLIB_OPENMP_*FLAGS) flags seem to be defined only on my computer; -fopenmp flags were explicitly added for the package to work on all the machines.
Has anyone experienced similar issues? Any help would be appreciated.
I changed my colleague's ~/.R/Makevars to conform to my configs
LDFLAGS=-L/opt/local/lib
CC=/opt/local/bin/gcc-mp-4.5 -std=gnu99
CXX=/opt/local/bin/g++-mp-4.5
CPP=/opt/local/bin/gcc-mp-4.5 -std=gnu99 -E
CXXCPP=/opt/local/bin/g++-mp-4.5 -E
CFLAGS=-pipe -O2 -m64
CXXFLAGS=-pipe -O2 -m64
SHLIB_CXXLD=/opt/local/bin/g++-mp-4.5
SHLIB_CXXLDFLAGS=-dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -single_module -multiply_defined suppress
SHLIB_LD=/opt/local/bin/gcc-mp-4.5 -std=gnu99
SHLIB_LDFLAGS=-dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -single_module -multiply_defined suppress
Additionally, the --no-multiarch argument was used when issuing the installation command. And it now works on his computer.
The problem was because the use of openMP was hardwired (no checks) inside the code and clang did not support openMP at the same I asked the question. My colleague's R was installed using the default (Xcode) compiler when we were trying to use gcc via Mac Ports.
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.