I am bumped into one intractable issue when I install opencv using linuxbrew.
Below is the error information, I googled it but found nothing works.
[ 44%] Built target opencv_features2d
[ 44%] Linking CXX shared library ../../lib/libopencv_objdetect.so
cd /tmp/opencv-20160725-28945-vyl9j5/opencv-2.4.13/macbuild/modules/objdetect && /home/usrname/.linuxbrew/Cellar/cmake/3.6.0/bin/cmake -E cmake_link_script CMakeFiles/opencv_objdetect.dir/link.txt --verbose=1
/usr/bin/g++-5 -fPIC -Os -w -pipe -march=native -fsigned-char -W -Wall - Werror=return-type -Werror=address -Werror=sequence-point -Wformat -Werror=format- security -Wmissing-declarations -Wundef -Winit-self -Wpointer-arith -Wshadow - Wsign-promo -Wno-narrowing -Wno-delete-non-virtual-dtor -Wno-unnamed-type- template-args -Wno-array-bounds -Wno-aggressive-loop-optimizations -fdiagnostics- show-option -Wno-long-long -pthread -fomit-frame-pointer -msse -msse2 -msse3 - ffunction-sections -DNDEBUG -DNDEBUG -L/home/usrname/.linuxbrew/lib -Wl,-- dynamic-linker=/home/usrname/.linuxbrew/lib/ld.so -Wl,- rpath,/home/usrname/.linuxbrew/lib -shared -Wl,- soname,libopencv_objdetect.so.2.4 -o ../../lib/libopencv_objdetect.so.2.4.13 CMakeFiles/opencv_objdetect.dir/src/cascadedetect.cpp.o CMakeFiles/opencv_objdetect.dir/src/datamatrix.cpp.o CMakeFiles/opencv_objdetect.dir/src/distancetransform.cpp.o CMakeFiles/opencv_objdetect.dir/src/featurepyramid.cpp.o CMakeFiles/opencv_objdetect.dir/src/fft.cpp.o CMakeFiles/opencv_objdetect.dir/src/haar.cpp.o CMakeFiles/opencv_objdetect.dir/src/hog.cpp.o CMakeFiles/opencv_objdetect.dir/src/latentsvm.cpp.o CMakeFiles/opencv_objdetect.dir/src/latentsvmdetector.cpp.o CMakeFiles/opencv_objdetect.dir/src/linemod.cpp.o CMakeFiles/opencv_objdetect.dir/src/lsvmparser.cpp.o CMakeFiles/opencv_objdetect.dir/src/lsvmtbbversion.cpp.o CMakeFiles/opencv_objdetect.dir/src/matching.cpp.o CMakeFiles/opencv_objdetect.dir/src/objdetect_init.cpp.o CMakeFiles/opencv_objdetect.dir/src/resizeimg.cpp.o CMakeFiles/opencv_objdetect.dir/src/routine.cpp.o ../../lib/libopencv_highgui.so.2.4.13 -ldl -lm -lpthread -lrt ../../lib/libopencv_imgproc.so.2.4.13 ../../lib/libopencv_core.so.2.4.13 -ldl -lm -lpthread -lrt -Wl,-rpath,/home/usrname/.linuxbrew/Cellar/opencv/2.4.13/lib
cd /tmp/opencv-20160725-28945-vyl9j5/opencv-2.4.13/macbuild/modules/objdetect && /home/usrname/.linuxbrew/Cellar/cmake/3.6.0/bin/cmake -E cmake_symlink_library ../../lib/libopencv_objdetect.so.2.4.13 ../../lib/libopencv_objdetect.so.2.4 ../../lib/libopencv_objdetect.so
make[2]: Leaving directory '/tmp/opencv-20160725-28945-vyl9j5/opencv-2.4.13/macbuild'
[ 44%] Built target opencv_objdetect
make[1]: Leaving directory '/tmp/opencv-20160725-28945-vyl9j5/opencv-2.4.13/macbuild'
make: *** [Makefile:164: all] Error 2
READ THIS: https://github.com/Linuxbrew/brew/blob/master/share/doc/homebrew/Troubleshooting.md#troubleshooting
If reporting this issue please do so at (not Homebrew/brew):
https://github.com/Homebrew/homebrew-science/issues
These open issues may also help:
That's all.
Related
I have a problem that when I try to install python 3 modules, using setup.py, I get this messsage
python3 /home/pi/Python-3.9.6/setup.py build
running build
running build_ext
INFO: Can't locate Tcl/Tk libs and/or headers
building '_struct' extension
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I. -I/usr/include/arm-linux-gnueabihf -I/usr/local/include -I/usr/local/include/python3.9 -c _struct.c -o build/temp.linux-armv7l-3.9/_struct.o
gcc: error: _struct.c: No such file or directory
gcc: fatal error: no input files
compilation terminated.
building 'array' extension
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I. -I/usr/include/arm-linux-gnueabihf -I/usr/local/include -I/usr/local/include/python3.9 -c arraymodule.c -o build/temp.linux-armv7l-3.9/arraymodule.o
gcc: error: arraymodule.c: No such file or directory
gcc: fatal error: no input files
compilation terminated.
building '_contextvars' extension
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I. -I/usr/include/arm-linux-gnueabihf -I/usr/local/include -I/usr/local/include/python3.9 -c _contextvarsmodule.c -o build/temp.linux-armv7l-3.9/_contextvarsmodule.o
gcc: error: _contextvarsmodule.c: No such file or directory
gcc: fatal error: no input files
compilation terminated.
building 'math' extension
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I. -I/usr/include/arm-linux-gnueabihf -I/usr/local/include -I/usr/local/include/python3.9 -c mathmodule.c -o build/temp.linux-armv7l-3.9/mathmodule.o -DPy_BUILD_CORE_MODULE
gcc: error: mathmodule.c: No such file or directory
gcc: fatal error: no input files
compilation terminated.
building 'cmath' extension
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I. -I/usr/include/arm-linux-gnueabihf -I/usr/local/include -I/usr/local/include/python3.9 -c cmathmodule.c -o build/temp.linux-armv7l-3.9/cmathmodule.o -DPy_BUILD_CORE_MODULE
gcc: error: cmathmodule.c: No such file or directory
gcc: fatal error: no input files
compilation terminated.
building '_datetime' extension
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I. -I/usr/include/arm-linux-gnueabihf -I/usr/local/include -I/usr/local/include/python3.9 -c _datetimemodule.c -o build/temp.linux-armv7l-3.9/_datetimemodule.o
gcc: error: _datetimemodule.c: No such file or directory
gcc: fatal error: no input files
compilation terminated.
building '_zoneinfo' extension
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I. -I/usr/include/arm-linux-gnueabihf -I/usr/local/include -I/usr/local/include/python3.9 -c _zoneinfo.c -o build/temp.linux-armv7l-3.9/_zoneinfo.o
gcc: error: _zoneinfo.c: No such file or directory
gcc: fatal error: no input files
compilation terminated.
building '_random' extension
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I. -I/usr/include/arm-linux-gnueabihf -I/usr/local/include -I/usr/local/include/python3.9 -c _randommodule.c -o build/temp.linux-armv7l-3.9/_randommodule.o -DPy_BUILD_CORE_MODULE
gcc: error: _randommodule.c: No such file or directory
gcc: fatal error: no input files
compilation terminated.
building '_bisect' extension
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I. -I/usr/include/arm-linux-gnueabihf -I/usr/local/include -I/usr/local/include/python3.9 -c _bisectmodule.c -o build/temp.linux-armv7l-3.9/_bisectmodule.o
gcc: error: _bisectmodule.c: No such file or directory
gcc: fatal error: no input files
compilation terminated.
building '_heapq' extension
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I. -I/usr/include/arm-linux-gnueabihf -I/usr/local/include -I/usr/local/include/python3.9 -c _heapqmodule.c -o build/temp.linux-armv7l-3.9/_heapqmodule.o
gcc: error: _heapqmodule.c: No such file or directory
gcc: fatal error: no input files
compilation terminated.
building '_pickle' extension
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I. -I/usr/include/arm-linux-gnueabihf -I/usr/local/include -I/usr/local/include/python3.9 -c _pickle.c -o build/temp.linux-armv7l-3.9/_pickle.o -DPy_BUILD_CORE_MODULE
gcc: error: _pickle.c: No such file or directory
gcc: fatal error: no input files
compilation terminated.
building '_json' extension
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I. -I/usr/include/arm-linux-gnueabihf -I/usr/local/include -I/usr/local/include/python3.9 -c _json.c -o build/temp.linux-armv7l-3.9/_json.o -DPy_BUILD_CORE_MODULE
gcc: error: _json.c: No such file or directory
gcc: fatal error: no input files
compilation terminated.
building '_lsprof' extension
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I. -I/usr/include/arm-linux-gnueabihf -I/usr/local/include -I/usr/local/include/python3.9 -c _lsprof.c -o build/temp.linux-armv7l-3.9/_lsprof.o
gcc: error: _lsprof.c: No such file or directory
gcc: fatal error: no input files
compilation terminated.
building 'unicodedata' extension
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I. -I/usr/include/arm-linux-gnueabihf -I/usr/local/include -I/usr/local/include/python3.9 -c unicodedata.c -o build/temp.linux-armv7l-3.9/unicodedata.o
gcc: error: unicodedata.c: No such file or directory
gcc: fatal error: no input files
compilation terminated.
building '_opcode' extension
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I. -I/usr/include/arm-linux-gnueabihf -I/usr/local/include -I/usr/local/include/python3.9 -c _opcode.c -o build/temp.linux-armv7l-3.9/_opcode.o
gcc: error: _opcode.c: No such file or directory
gcc: fatal error: no input files
compilation terminated.
building '_asyncio' extension
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I. -I/usr/include/arm-linux-gnueabihf -I/usr/local/include -I/usr/local/include/python3.9 -c _asynciomodule.c -o build/temp.linux-armv7l-3.9/_asynciomodule.o -DPy_BUILD_CORE_MODULE
gcc: error: _asynciomodule.c: No such file or directory
gcc: fatal error: no input files
compilation terminated.
building '_queue' extension
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I. -I/usr/include/arm-linux-gnueabihf -I/usr/local/include -I/usr/local/include/python3.9 -c _queuemodule.c -o build/temp.linux-armv7l-3.9/_queuemodule.o
gcc: error: _queuemodule.c: No such file or directory
gcc: fatal error: no input files
compilation terminated.
building '_statistics' extension
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I. -I/usr/include/arm-linux-gnueabihf -I/usr/local/include -I/usr/local/include/python3.9 -c _statisticsmodule.c -o build/temp.linux-armv7l-3.9/_statisticsmodule.o
gcc: error: _statisticsmodule.c: No such file or directory
gcc: fatal error: no input files
compilation terminated.
building 'fcntl' extension
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I. -I/usr/include/arm-linux-gnueabihf -I/usr/local/include -I/usr/local/include/python3.9 -c fcntlmodule.c -o build/temp.linux-armv7l-3.9/fcntlmodule.o
gcc: error: fcntlmodule.c: No such file or directory
gcc: fatal error: no input files
compilation terminated.
building 'grp' extension
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I. -I/usr/include/arm-linux-gnueabihf -I/usr/local/include -I/usr/local/include/python3.9 -c grpmodule.c -o build/temp.linux-armv7l-3.9/grpmodule.o
gcc: error: grpmodule.c: No such file or directory
gcc: fatal error: no input files
compilation terminated.
building 'spwd' extension
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I. -I/usr/include/arm-linux-gnueabihf -I/usr/local/include -I/usr/local/include/python3.9 -c spwdmodule.c -o build/temp.linux-armv7l-3.9/spwdmodule.o
gcc: error: spwdmodule.c: No such file or directory
gcc: fatal error: no input files
compilation terminated.
building 'select' extension
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I. -I/usr/include/arm-linux-gnueabihf -I/usr/local/include -I/usr/local/include/python3.9 -c selectmodule.c -o build/temp.linux-armv7l-3.9/selectmodule.o
gcc: error: selectmodule.c: No such file or directory
gcc: fatal error: no input files
compilation terminated.
building 'parser' extension
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I. -I/usr/include/arm-linux-gnueabihf -I/usr/local/include -I/usr/local/include/python3.9 -c parsermodule.c -o build/temp.linux-armv7l-3.9/parsermodule.o
gcc: error: parsermodule.c: No such file or directory
gcc: fatal error: no input files
compilation terminated.
building 'mmap' extension
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I. -I/usr/include/arm-linux-gnueabihf -I/usr/local/include -I/usr/local/include/python3.9 -c mmapmodule.c -o build/temp.linux-armv7l-3.9/mmapmodule.o
gcc: error: mmapmodule.c: No such file or directory
gcc: fatal error: no input files
compilation terminated.
building 'syslog' extension
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I. -I/usr/include/arm-linux-gnueabihf -I/usr/local/include -I/usr/local/include/python3.9 -c syslogmodule.c -o build/temp.linux-armv7l-3.9/syslogmodule.o
gcc: error: syslogmodule.c: No such file or directory
gcc: fatal error: no input files
compilation terminated.
building '_xxsubinterpreters' extension
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I. -I/usr/include/arm-linux-gnueabihf -I/usr/local/include -I/usr/local/include/python3.9 -c _xxsubinterpretersmodule.c -o build/temp.linux-armv7l-3.9/_xxsubinterpretersmodule.o
gcc: error: _xxsubinterpretersmodule.c: No such file or directory
gcc: fatal error: no input files
compilation terminated.
building 'audioop' extension
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I. -I/usr/include/arm-linux-gnueabihf -I/usr/local/include -I/usr/local/include/python3.9 -c audioop.c -o build/temp.linux-armv7l-3.9/audioop.o
gcc: error: audioop.c: No such file or directory
gcc: fatal error: no input files
compilation terminated.
building '_csv' extension
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I. -I/usr/include/arm-linux-gnueabihf -I/usr/local/include -I/usr/local/include/python3.9 -c _csv.c -o build/temp.linux-armv7l-3.9/_csv.o
gcc: error: _csv.c: No such file or directory
gcc: fatal error: no input files
compilation terminated.
building '_posixsubprocess' extension
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I. -I/usr/include/arm-linux-gnueabihf -I/usr/local/include -I/usr/local/include/python3.9 -c _posixsubprocess.c -o build/temp.linux-armv7l-3.9/_posixsubprocess.o
gcc: error: _posixsubprocess.c: No such file or directory
gcc: fatal error: no input files
compilation terminated.
building '_testcapi' extension
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I. -I/usr/include/arm-linux-gnueabihf -I/usr/local/include -I/usr/local/include/python3.9 -c _testcapimodule.c -o build/temp.linux-armv7l-3.9/_testcapimodule.o
gcc: error: _testcapimodule.c: No such file or directory
gcc: fatal error: no input files
compilation terminated.
building '_testinternalcapi' extension
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I. -I/usr/include/arm-linux-gnueabihf -I/usr/local/include -I/usr/local/include/python3.9 -c _testinternalcapi.c -o build/temp.linux-armv7l-3.9/_testinternalcapi.o -DPy_BUILD_CORE_MODULE
gcc: error: _testinternalcapi.c: No such file or directory
gcc: fatal error: no input files
compilation terminated.
building '_testbuffer' extension
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I. -I/usr/include/arm-linux-gnueabihf -I/usr/local/include -I/usr/local/include/python3.9 -c _testbuffer.c -o build/temp.linux-armv7l-3.9/_testbuffer.o
gcc: error: _testbuffer.c: No such file or directory
gcc: fatal error: no input files
compilation terminated.
building '_testimportmultiple' extension
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I. -I/usr/include/arm-linux-gnueabihf -I/usr/local/include -I/usr/local/include/python3.9 -c _testimportmultiple.c -o build/temp.linux-armv7l-3.9/_testimportmultiple.o
gcc: error: _testimportmultiple.c: No such file or directory
gcc: fatal error: no input files
compilation terminated.
building '_testmultiphase' extension
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I. -I/usr/include/arm-linux-gnueabihf -I/usr/local/include -I/usr/local/include/python3.9 -c _testmultiphase.c -o build/temp.linux-armv7l-3.9/_testmultiphase.o
gcc: error: _testmultiphase.c: No such file or directory
gcc: fatal error: no input files
compilation terminated.
building '_xxtestfuzz' extension
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I. -I/usr/include/arm-linux-gnueabihf -I/usr/local/include -I/usr/local/include/python3.9 -c _xxtestfuzz/_xxtestfuzz.c -o build/temp.linux-armv7l-3.9/_xxtestfuzz/_xxtestfuzz.o
gcc: error: _xxtestfuzz/_xxtestfuzz.c: No such file or directory
gcc: fatal error: no input files
compilation terminated.
building '_crypt' extension
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I. -I/usr/include/arm-linux-gnueabihf -I/usr/local/include -I/usr/local/include/python3.9 -c _cryptmodule.c -o build/temp.linux-armv7l-3.9/_cryptmodule.o
gcc: error: _cryptmodule.c: No such file or directory
gcc: fatal error: no input files
compilation terminated.
building '_socket' extension
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I. -I/usr/include/arm-linux-gnueabihf -I/usr/local/include -I/usr/local/include/python3.9 -c socketmodule.c -o build/temp.linux-armv7l-3.9/socketmodule.o
gcc: error: socketmodule.c: No such file or directory
gcc: fatal error: no input files
compilation terminated.
building '_sha256' extension
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I. -I/usr/include/arm-linux-gnueabihf -I/usr/local/include -I/usr/local/include/python3.9 -c sha256module.c -o build/temp.linux-armv7l-3.9/sha256module.o -DPy_BUILD_CORE_MODULE
gcc: error: sha256module.c: No such file or directory
gcc: fatal error: no input files
compilation terminated.
building '_sha512' extension
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I. -I/usr/include/arm-linux-gnueabihf -I/usr/local/include -I/usr/local/include/python3.9 -c sha512module.c -o build/temp.linux-armv7l-3.9/sha512module.o -DPy_BUILD_CORE_MODULE
gcc: error: sha512module.c: No such file or directory
gcc: fatal error: no input files
compilation terminated.
building '_md5' extension
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I. -I/usr/include/arm-linux-gnueabihf -I/usr/local/include -I/usr/local/include/python3.9 -c md5module.c -o build/temp.linux-armv7l-3.9/md5module.o
gcc: error: md5module.c: No such file or directory
gcc: fatal error: no input files
compilation terminated.
building '_sha1' extension
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I. -I/usr/include/arm-linux-gnueabihf -I/usr/local/include -I/usr/local/include/python3.9 -c sha1module.c -o build/temp.linux-armv7l-3.9/sha1module.o
gcc: error: sha1module.c: No such file or directory
gcc: fatal error: no input files
compilation terminated.
building '_blake2' extension
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I. -I/usr/include/arm-linux-gnueabihf -I/usr/local/include -I/usr/local/include/python3.9 -c _blake2/blake2b_impl.c -o build/temp.linux-armv7l-3.9/_blake2/blake2b_impl.o
gcc: error: _blake2/blake2b_impl.c: No such file or directory
gcc: fatal error: no input files
compilation terminated.
building '_sha3' extension
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I. -I/usr/include/arm-linux-gnueabihf -I/usr/local/include -I/usr/local/include/python3.9 -c _sha3/sha3module.c -o build/temp.linux-armv7l-3.9/_sha3/sha3module.o
gcc: error: _sha3/sha3module.c: No such file or directory
gcc: fatal error: no input files
compilation terminated.
building 'termios' extension
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I. -I/usr/include/arm-linux-gnueabihf -I/usr/local/include -I/usr/local/include/python3.9 -c termios.c -o build/temp.linux-armv7l-3.9/termios.o
gcc: error: termios.c: No such file or directory
gcc: fatal error: no input files
compilation terminated.
building 'resource' extension
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I. -I/usr/include/arm-linux-gnueabihf -I/usr/local/include -I/usr/local/include/python3.9 -c resource.c -o build/temp.linux-armv7l-3.9/resource.o
gcc: error: resource.c: No such file or directory
gcc: fatal error: no input files
compilation terminated.
building 'ossaudiodev' extension
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I. -I/usr/include/arm-linux-gnueabihf -I/usr/local/include -I/usr/local/include/python3.9 -c ossaudiodev.c -o build/temp.linux-armv7l-3.9/ossaudiodev.o
gcc: error: ossaudiodev.c: No such file or directory
gcc: fatal error: no input files
compilation terminated.
building 'nis' extension
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I. -I/usr/include/arm-linux-gnueabihf -I/usr/local/include -I/usr/local/include/python3.9 -c nismodule.c -o build/temp.linux-armv7l-3.9/nismodule.o
gcc: error: nismodule.c: No such file or directory
gcc: fatal error: no input files
compilation terminated.
building 'zlib' extension
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I. -I/usr/include/arm-linux-gnueabihf -I/usr/local/include -I/usr/local/include/python3.9 -c zlibmodule.c -o build/temp.linux-armv7l-3.9/zlibmodule.o
gcc: error: zlibmodule.c: No such file or directory
gcc: fatal error: no input files
compilation terminated.
building 'binascii' extension
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I. -I/usr/include/arm-linux-gnueabihf -I/usr/local/include -I/usr/local/include/python3.9 -c binascii.c -o build/temp.linux-armv7l-3.9/binascii.o -DUSE_ZLIB_CRC32
gcc: error: binascii.c: No such file or directory
gcc: fatal error: no input files
compilation terminated.
building 'pyexpat' extension
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -DHAVE_EXPAT_CONFIG_H=1 -DXML_POOR_ENTROPY=1 -I/usr/local/lib/python3.9/config-3.9-arm-linux-gnueabihf/Modules/expat -I. -I/usr/include/arm-linux-gnueabihf -I/usr/local/include -I/usr/local/include/python3.9 -c expat/xmlparse.c -o build/temp.linux-armv7l-3.9/expat/xmlparse.o -Wno-unreachable-code
gcc: error: expat/xmlparse.c: No such file or directory
gcc: fatal error: no input files
compilation terminated.
building '_multibytecodec' extension
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I. -I/usr/include/arm-linux-gnueabihf -I/usr/local/include -I/usr/local/include/python3.9 -c cjkcodecs/multibytecodec.c -o build/temp.linux-armv7l-3.9/cjkcodecs/multibytecodec.o
gcc: error: cjkcodecs/multibytecodec.c: No such file or directory
gcc: fatal error: no input files
compilation terminated.
building '_codecs_kr' extension
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I. -I/usr/include/arm-linux-gnueabihf -I/usr/local/include -I/usr/local/include/python3.9 -c cjkcodecs/_codecs_kr.c -o build/temp.linux-armv7l-3.9/cjkcodecs/_codecs_kr.o
gcc: error: cjkcodecs/_codecs_kr.c: No such file or directory
gcc: fatal error: no input files
compilation terminated.
building '_codecs_jp' extension
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I. -I/usr/include/arm-linux-gnueabihf -I/usr/local/include -I/usr/local/include/python3.9 -c cjkcodecs/_codecs_jp.c -o build/temp.linux-armv7l-3.9/cjkcodecs/_codecs_jp.o
gcc: error: cjkcodecs/_codecs_jp.c: No such file or directory
gcc: fatal error: no input files
compilation terminated.
building '_codecs_cn' extension
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I. -I/usr/include/arm-linux-gnueabihf -I/usr/local/include -I/usr/local/include/python3.9 -c cjkcodecs/_codecs_cn.c -o build/temp.linux-armv7l-3.9/cjkcodecs/_codecs_cn.o
gcc: error: cjkcodecs/_codecs_cn.c: No such file or directory
gcc: fatal error: no input files
compilation terminated.
building '_codecs_tw' extension
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I. -I/usr/include/arm-linux-gnueabihf -I/usr/local/include -I/usr/local/include/python3.9 -c cjkcodecs/_codecs_tw.c -o build/temp.linux-armv7l-3.9/cjkcodecs/_codecs_tw.o
gcc: error: cjkcodecs/_codecs_tw.c: No such file or directory
gcc: fatal error: no input files
compilation terminated.
building '_codecs_hk' extension
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I. -I/usr/include/arm-linux-gnueabihf -I/usr/local/include -I/usr/local/include/python3.9 -c cjkcodecs/_codecs_hk.c -o build/temp.linux-armv7l-3.9/cjkcodecs/_codecs_hk.o
gcc: error: cjkcodecs/_codecs_hk.c: No such file or directory
gcc: fatal error: no input files
compilation terminated.
building '_codecs_iso2022' extension
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I. -I/usr/include/arm-linux-gnueabihf -I/usr/local/include -I/usr/local/include/python3.9 -c cjkcodecs/_codecs_iso2022.c -o build/temp.linux-armv7l-3.9/cjkcodecs/_codecs_iso2022.o
gcc: error: cjkcodecs/_codecs_iso2022.c: No such file or directory
gcc: fatal error: no input files
compilation terminated.
building '_decimal' extension
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -DCONFIG_32=1 -DANSI=1 -I/usr/local/lib/python3.9/config-3.9-arm-linux-gnueabihf/Modules/_decimal/libmpdec -I. -I/usr/include/arm-linux-gnueabihf -I/usr/local/include -I/usr/local/include/python3.9 -c _decimal/_decimal.c -o build/temp.linux-armv7l-3.9/_decimal/_decimal.o
gcc: error: _decimal/_decimal.c: No such file or directory
gcc: fatal error: no input files
compilation terminated.
building '_ctypes_test' extension
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I. -I/usr/include/arm-linux-gnueabihf -I/usr/local/include -I/usr/local/include/python3.9 -c _ctypes/_ctypes_test.c -o build/temp.linux-armv7l-3.9/_ctypes/_ctypes_test.o
gcc: error: _ctypes/_ctypes_test.c: No such file or directory
gcc: fatal error: no input files
compilation terminated.
building '_posixshmem' extension
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -IModules/_multiprocessing -I. -I/usr/include/arm-linux-gnueabihf -I/usr/local/include -I/usr/local/include/python3.9 -c _multiprocessing/posixshmem.c -o build/temp.linux-armv7l-3.9/_multiprocessing/posixshmem.o
gcc: error: _multiprocessing/posixshmem.c: No such file or directory
gcc: fatal error: no input files
compilation terminated.
building '_multiprocessing' extension
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -IModules/_multiprocessing -I. -I/usr/include/arm-linux-gnueabihf -I/usr/local/include -I/usr/local/include/python3.9 -c _multiprocessing/multiprocessing.c -o build/temp.linux-armv7l-3.9/_multiprocessing/multiprocessing.o
gcc: error: _multiprocessing/multiprocessing.c: No such file or directory
gcc: fatal error: no input files
compilation terminated.
building '_uuid' extension
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/usr/include/uuid -I. -I/usr/include/arm-linux-gnueabihf -I/usr/local/include -I/usr/local/include/python3.9 -c _uuidmodule.c -o build/temp.linux-armv7l-3.9/_uuidmodule.o
gcc: error: _uuidmodule.c: No such file or directory
gcc: fatal error: no input files
compilation terminated.
building 'xxlimited' extension
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -DPy_LIMITED_API=0x03050000 -I. -I/usr/include/arm-linux-gnueabihf -I/usr/local/include -I/usr/local/include/python3.9 -c xxlimited.c -o build/temp.linux-armv7l-3.9/xxlimited.o
gcc: error: xxlimited.c: No such file or directory
gcc: fatal error: no input files
compilation terminated.
building '_ctypes' extension
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I. -I/usr/include/arm-linux-gnueabihf -I/usr/local/include -I/usr/local/include/python3.9 -c _ctypes/_ctypes.c -o build/temp.linux-armv7l-3.9/_ctypes/_ctypes.o -DPy_BUILD_CORE_MODULE
gcc: error: _ctypes/_ctypes.c: No such file or directory
gcc: fatal error: no input files
compilation terminated.
Python build finished successfully!
The necessary bits to build these optional modules were not found:
_bz2 _curses _curses_panel
_dbm _elementtree _gdbm
_hashlib _lzma _sqlite3
_ssl _tkinter readline
To find the necessary bits, look in setup.py in detect_modules() for the module's name.
The following modules found by detect_modules() in setup.py, have been
built by the Makefile instead, as configured by the Setup files:
_abc atexit pwd
time
Failed to build these modules:
_asyncio _bisect _blake2
_codecs_cn _codecs_hk _codecs_iso2022
_codecs_jp _codecs_kr _codecs_tw
_contextvars _crypt _csv
_ctypes _ctypes_test _datetime
_decimal _heapq _json
_lsprof _md5 _multibytecodec
_multiprocessing _opcode _pickle
_posixshmem _posixsubprocess _queue
_random _sha1 _sha256
_sha3 _sha512 _socket
_statistics _struct _testbuffer
_testcapi _testimportmultiple _testinternalcapi
_testmultiphase _uuid _xxsubinterpreters
_xxtestfuzz _zoneinfo array
audioop binascii cmath
fcntl grp math
mmap nis ossaudiodev
parser pyexpat resource
select spwd syslog
termios unicodedata xxlimited
zlib
Could not build the ssl module!
Python requires an OpenSSL 1.0.2 or 1.1 compatible libssl with X509_VERIFY_PARAM_set1_host().
LibreSSL 2.6.4 and earlier do not provide the necessary APIs, https://github.com/libressl-portable/portable/issues/381
running build_scripts
error: file '/usr/local/lib/python3.9/config-3.9-arm-linux-gnueabihf/Tools/scripts/pydoc3' does not exist.
As you can see, about 30 modules failed to load, can anyone tell me why? Thank you in advance.
I think this is the cause, in setup.py:
def build_extensions(self):
self.srcdir = sysconfig.get_config_var('srcdir')
self.srcdir = os.path.abspath(self.srcdir)
[SNIP]
# Fix up the autodetected modules, prefixing all the source files
# with Modules/.
moddirlist = [os.path.join(self.srcdir, 'Modules')]
It's picking the wrong source directory.
I replaced the second line of the function above with:
self.srcdir = os.path.dirname(os.path.abspath(__file__))
I'm trying to install RStudio Desktop using these instructions. This requires boost >= v1.69. I'm running Ubuntu 18.10 in a Windows subsystem (WSL), and there is no repository for this version of boost. Consequently, I installed boost v1.70 from source using these instructions.
However, when I run the cmake command in the RStudio install instructions, I get this:
(base) balter#spectre3:~$ cmake .. -DRSTUDIO_TARGET=Desktop -DRSTUDIO_PACKAGE_BUILD=1
CMake Error: The source directory "/home" does not appear to contain CMakeLists.txt.
Specify --help for usage, or press the help button on the CMake GUI.
(base) balter#spectre3:~$ cd rstudio/build/
(base) balter#spectre3:~/rstudio/build$ cmake .. -DRSTUDIO_TARGET=Desktop -DRSTUDIO_PACKAGE_BUILD=1
-- CMake build type not set; defaulting to debug build
-- Found Boost 1.70.0 at /usr/lib/cmake/Boost-1.70.0
-- Requested configuration: QUIET REQUIRED
-- Found boost_headers 1.70.0 at /usr/lib/cmake/boost_headers-1.70.0
-- Boost 1.69.0 found.
-- Found Boost 1.70.0 at /usr/lib/cmake/Boost-1.70.0
-- Requested configuration: QUIET REQUIRED COMPONENTS atomic;chrono;date_time;filesystem;iostreams;program_options;random;regex;system;thread
-- Found boost_atomic 1.70.0 at /usr/lib/cmake/boost_atomic-1.70.0
-- No suitable boost_atomic variant has been identified!
-- libboost_atomic.so.1.70.0 (shared, Boost_USE_STATIC_LIBS=ON)
CMake Error at /usr/lib/cmake/Boost-1.70.0/BoostConfig.cmake:95 (find_package):
Found package configuration file:
/usr/lib/cmake/boost_atomic-1.70.0/boost_atomic-config.cmake
but it set boost_atomic_FOUND to FALSE so package "boost_atomic" is
considered to be NOT FOUND. Reason given by package:
No suitable build variant has been found.
Call Stack (most recent call first):
/usr/lib/cmake/Boost-1.70.0/BoostConfig.cmake:124 (boost_find_dependency)
/usr/share/cmake-3.12/Modules/FindBoost.cmake:261 (find_package)
src/cpp/CMakeLists.txt:235 (find_package)
-- Configuring incomplete, errors occurred!
See also "/home/balter/rstudio/build/CMakeFiles/CMakeOutput.log".
See also "/home/balter/rstudio/build/CMakeFiles/CMakeError.log".
The last bits of the log files are:
CMakeOutput.log
~~~~~~~~~~~~~~~~~~~~~~~~
Determining if the function inotify_init1 exists passed with the following output:
Change Dir: /home/balter/rstudio/build/CMakeFiles/CMakeTmp
Run Build Command:"/home/balter/conda/bin/make" "cmTC_bd56e/fast"
/home/balter/conda/bin/make -f CMakeFiles/cmTC_bd56e.dir/build.make CMakeFiles/cmTC_bd56e.dir/build
make[1]: Entering directory '/home/balter/rstudio/build/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_bd56e.dir/CheckFunctionExists.c.o
/home/balter/conda/bin/x86_64-conda_cos6-linux-gnu-cc -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -pipe -DCHECK_FUNCTION_EXISTS=inotify_init1 -fPIE -o CMakeFiles/cmTC_bd56e.dir/CheckFunctionExists.c.o -c /usr/share/cmake-3.12/Modules/CheckFunctionExists.c
Linking C executable cmTC_bd56e
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_bd56e.dir/link.txt --verbose=1
/home/balter/conda/bin/x86_64-conda_cos6-linux-gnu-cc -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -pipe -DCHECK_FUNCTION_EXISTS=inotify_init1 -Wl,-O2 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro -Wl,-z,now -Wl,--disable-new-dtags -pie -Wl,-z,relro,-z,now CMakeFiles/cmTC_bd56e.dir/CheckFunctionExists.c.o -o cmTC_bd56e
make[1]: Leaving directory '/home/balter/rstudio/build/CMakeFiles/CMakeTmp'
Determining if the function setresuid exists passed with the following output:
Change Dir: /home/balter/rstudio/build/CMakeFiles/CMakeTmp
Run Build Command:"/home/balter/conda/bin/make" "cmTC_af28b/fast"
/home/balter/conda/bin/make -f CMakeFiles/cmTC_af28b.dir/build.make CMakeFiles/cmTC_af28b.dir/build
make[1]: Entering directory '/home/balter/rstudio/build/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_af28b.dir/CheckFunctionExists.c.o
/home/balter/conda/bin/x86_64-conda_cos6-linux-gnu-cc -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -pipe -DCHECK_FUNCTION_EXISTS=setresuid -fPIE -o CMakeFiles/cmTC_af28b.dir/CheckFunctionExists.c.o -c /usr/share/cmake-3.12/Modules/CheckFunctionExists.c
Linking C executable cmTC_af28b
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_af28b.dir/link.txt --verbose=1
/home/balter/conda/bin/x86_64-conda_cos6-linux-gnu-cc -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -pipe -DCHECK_FUNCTION_EXISTS=setresuid -Wl,-O2 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro -Wl,-z,now -Wl,--disable-new-dtags -pie -Wl,-z,relro,-z,now CMakeFiles/cmTC_af28b.dir/CheckFunctionExists.c.o -o cmTC_af28b
make[1]: Leaving directory '/home/balter/rstudio/build/CMakeFiles/CMakeTmp'
CMakeOutput.log
Determining if the pthread_create exist failed with the following output:
Change Dir: /home/balter/rstudio/build/CMakeFiles/CMakeTmp
Run Build Command:"/home/balter/conda/bin/make" "cmTC_6613e/fast"
/home/balter/conda/bin/make -f CMakeFiles/cmTC_6613e.dir/build.make CMakeFiles/cmTC_6613e.dir/build
make[1]: Entering directory '/home/balter/rstudio/build/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_6613e.dir/CheckSymbolExists.c.o
/home/balter/conda/bin/x86_64-conda_cos6-linux-gnu-cc -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -pipe -fPIE -o CMakeFiles/cmTC_6613e.dir/CheckSymbolExists.c.o -c /home/balter/rstudio/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c
Linking C executable cmTC_6613e
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_6613e.dir/link.txt --verbose=1
/home/balter/conda/bin/x86_64-conda_cos6-linux-gnu-cc -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -pipe -Wl,-O2 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro -Wl,-z,now -Wl,--disable-new-dtags -pie -Wl,-z,relro,-z,now CMakeFiles/cmTC_6613e.dir/CheckSymbolExists.c.o -o cmTC_6613e
/home/balter/conda/bin/../lib/gcc/x86_64-conda_cos6-linux-gnu/7.3.0/../../../../x86_64-conda_cos6-linux-gnu/bin/ld: CMakeFiles/cmTC_6613e.dir/CheckSymbolExists.c.o: in function `main':
CheckSymbolExists.c:(.text.startup+0x3): undefined reference to `pthread_create'
collect2: error: ld returned 1 exit status
make[1]: *** [CMakeFiles/cmTC_6613e.dir/build.make:87: cmTC_6613e] Error 1
make[1]: Leaving directory '/home/balter/rstudio/build/CMakeFiles/CMakeTmp'
make: *** [Makefile:121: cmTC_6613e/fast] Error 2
File /home/balter/rstudio/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c:
/* */
#include <pthread.h>
int main(int argc, char** argv)
{
(void)argv;
#ifndef pthread_create
return ((int*)(&pthread_create))[argc];
#else
(void)argc;
return 0;
#endif
}
Determining if the function pthread_create exists in the pthreads failed with the following output:
Change Dir: /home/balter/rstudio/build/CMakeFiles/CMakeTmp
Run Build Command:"/home/balter/conda/bin/make" "cmTC_c8506/fast"
/home/balter/conda/bin/make -f CMakeFiles/cmTC_c8506.dir/build.make CMakeFiles/cmTC_c8506.dir/build
make[1]: Entering directory '/home/balter/rstudio/build/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_c8506.dir/CheckFunctionExists.c.o
/home/balter/conda/bin/x86_64-conda_cos6-linux-gnu-cc -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -pipe -DCHECK_FUNCTION_EXISTS=pthread_create -fPIE -o CMakeFiles/cmTC_c8506.dir/CheckFunctionExists.c.o -c /usr/share/cmake-3.12/Modules/CheckFunctionExists.c
Linking C executable cmTC_c8506
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_c8506.dir/link.txt --verbose=1
/home/balter/conda/bin/x86_64-conda_cos6-linux-gnu-cc -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -pipe -DCHECK_FUNCTION_EXISTS=pthread_create -Wl,-O2 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro -Wl,-z,now -Wl,--disable-new-dtags -pie -Wl,-z,relro,-z,now CMakeFiles/cmTC_c8506.dir/CheckFunctionExists.c.o -o cmTC_c8506 -lpthreads
/home/balter/conda/bin/../lib/gcc/x86_64-conda_cos6-linux-gnu/7.3.0/../../../../x86_64-conda_cos6-linux-gnu/bin/ld: cannot find -lpthreads
collect2: error: ld returned 1 exit status
make[1]: *** [CMakeFiles/cmTC_c8506.dir/build.make:87: cmTC_c8506] Error 1
make[1]: Leaving directory '/home/balter/rstudio/build/CMakeFiles/CMakeTmp'
make: *** [Makefile:121: cmTC_c8506/fast] Error 2
Determining if the function getpeereid exists failed with the following output:
Change Dir: /home/balter/rstudio/build/CMakeFiles/CMakeTmp
Run Build Command:"/home/balter/conda/bin/make" "cmTC_b9b1c/fast"
/home/balter/conda/bin/make -f CMakeFiles/cmTC_b9b1c.dir/build.make CMakeFiles/cmTC_b9b1c.dir/build
make[1]: Entering directory '/home/balter/rstudio/build/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_b9b1c.dir/CheckFunctionExists.c.o
/home/balter/conda/bin/x86_64-conda_cos6-linux-gnu-cc -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -pipe -DCHECK_FUNCTION_EXISTS=getpeereid -fPIE -o CMakeFiles/cmTC_b9b1c.dir/CheckFunctionExists.c.o -c /usr/share/cmake-3.12/Modules/CheckFunctionExists.c
Linking C executable cmTC_b9b1c
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_b9b1c.dir/link.txt --verbose=1
/home/balter/conda/bin/x86_64-conda_cos6-linux-gnu-cc -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -pipe -DCHECK_FUNCTION_EXISTS=getpeereid -Wl,-O2 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro -Wl,-z,now -Wl,--disable-new-dtags -pie -Wl,-z,relro,-z,now CMakeFiles/cmTC_b9b1c.dir/CheckFunctionExists.c.o -o cmTC_b9b1c
/home/balter/conda/bin/../lib/gcc/x86_64-conda_cos6-linux-gnu/7.3.0/../../../../x86_64-conda_cos6-linux-gnu/bin/ld: CMakeFiles/cmTC_b9b1c.dir/CheckFunctionExists.c.o: in function `main':
CheckFunctionExists.c:(.text.startup+0xd): undefined reference to `getpeereid'
collect2: error: ld returned 1 exit status
make[1]: *** [CMakeFiles/cmTC_b9b1c.dir/build.make:87: cmTC_b9b1c] Error 1
make[1]: Leaving directory '/home/balter/rstudio/build/CMakeFiles/CMakeTmp'
make: *** [Makefile:121: cmTC_b9b1c/fast] Error 2
I am unable to build rgdal (see output in code chunk below) on my AWS server. I understand from the discussion here, and here that this has something to do with missing libraries for geos and gdal, but none of the solutions suggested appears to work. If I run sudo yum install libgdal1 libgdal1-dev libgeos libgeos-dev I get the following output:
Loaded plugins: priorities, update-motd, upgrade-helper amzn-main
| 2.1 kB 00:00:00 amzn-updates
| 2.5 kB 00:00:00 1045 packages excluded due to repository
priority protections No package libgdal1 available. No package
libgdal1-dev available. Package geos-3.4.2-1.4.amzn1.x86_64 already
installed and latest version No package libgeos-dev available. Nothing
to do
I have already enabled EPEL, but it does not solve the problem.
Unfortunately I'm not very experienced with Linux, and have no idea how to move forward...
R output after attempting to install rgdal:
> install.packages("rgdal", type="source")
Installing package into ‘/home/andrea/R/x86_64-redhat-linux-gnu-library’
(as ‘lib’ is unspecified)
trying URL 'https://cran.rstudio.com/src/contrib/rgdal_1.3-2.tar.gz'
Content type 'application/x-gzip' length 1667049 bytes (1.6 MB)
==================================================
downloaded 1.6 MB
* installing *source* package ‘rgdal’ ...
** package ‘rgdal’ successfully unpacked and MD5 sums checked
configure: CC: gcc -m64 -std=gnu99
configure: CXX: g++ -m64
configure: rgdal: 1.3-2
checking for /usr/bin/svnversion... no
configure: svn revision: 755
checking whether the C++ compiler works... yes
checking for C++ compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C++ compiler... yes
checking whether g++ -m64 accepts -g... yes
checking whether g++ -m64 supports C++11 features by default... no
checking whether g++ -m64 supports C++11 features with -std=gnu++11... yes
configure: C++11 support available
checking for gdal-config... /usr/local/bin/gdal-config
checking gdal-config usability... yes
configure: GDAL: 2.0.0
checking GDAL version >= 1.11.4... yes
checking gdal: linking with --libs only... yes
checking GDAL: /usr/local/share/gdal/pcs.csv readable... yes
checking proj_api.h presence and usability... yes
./configure: line 3395: test: =: unary operator expected
checking PROJ version >= 4.8.0... yes
checking projects.h presence and usability... yes
/tmp/ccV0TCuc.o: In function `main':
/tmp/Rtmp52ge38/R.INSTALL4e4e42b08a4a/rgdal/proj_conf_test2.c:14: undefined reference to `pj_get_default_ctx'
/tmp/Rtmp52ge38/R.INSTALL4e4e42b08a4a/rgdal/proj_conf_test2.c:20: undefined reference to `pj_ctx_fclose'
collect2: error: ld returned 1 exit status
./configure: line 3511: ./proj_conf_test2: No such file or directory
checking PROJ.4: epsg found and readable... yes
/tmp/cczdLgSd.o: In function `main':
/tmp/Rtmp52ge38/R.INSTALL4e4e42b08a4a/rgdal/proj_conf_test3.c:14: undefined reference to `pj_get_default_ctx'
/tmp/Rtmp52ge38/R.INSTALL4e4e42b08a4a/rgdal/proj_conf_test3.c:20: undefined reference to `pj_ctx_fclose'
collect2: error: ld returned 1 exit status
./configure: line 3570: ./proj_conf_test3: No such file or directory
checking PROJ.4: conus found and readable... yes
configure: Package CPP flags: -I/usr/local/include
configure: Package LIBS: -L/usr/local/lib -lgdal -lproj
configure: creating ./config.status
config.status: creating src/Makevars
** libs
g++ -m64 -std=gnu++11 -I/usr/include/R -DNDEBUG -I/usr/local/include -I"/home/andrea/R/x86_64-redhat-linux-gnu-library/sp/include" -I/usr/local/include -fpic -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -c OGR_write.cpp -o OGR_write.o
g++ -m64 -std=gnu++11 -I/usr/include/R -DNDEBUG -I/usr/local/include -I"/home/andrea/R/x86_64-redhat-linux-gnu-library/sp/include" -I/usr/local/include -fpic -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -c gdal-bindings.cpp -o gdal-bindings.o
gcc -m64 -std=gnu99 -I/usr/include/R -DNDEBUG -I/usr/local/include -I"/home/andrea/R/x86_64-redhat-linux-gnu-library/sp/include" -I/usr/local/include -fpic -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -c init.c -o init.o
gcc -m64 -std=gnu99 -I/usr/include/R -DNDEBUG -I/usr/local/include -I"/home/andrea/R/x86_64-redhat-linux-gnu-library/sp/include" -I/usr/local/include -fpic -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -c inverser.c -o inverser.o
gcc -m64 -std=gnu99 -I/usr/include/R -DNDEBUG -I/usr/local/include -I"/home/andrea/R/x86_64-redhat-linux-gnu-library/sp/include" -I/usr/local/include -fpic -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -c local_stubs.c -o local_stubs.o
g++ -m64 -std=gnu++11 -I/usr/include/R -DNDEBUG -I/usr/local/include -I"/home/andrea/R/x86_64-redhat-linux-gnu-library/sp/include" -I/usr/local/include -fpic -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -c ogr_geom.cpp -o ogr_geom.o
gcc -m64 -std=gnu99 -I/usr/include/R -DNDEBUG -I/usr/local/include -I"/home/andrea/R/x86_64-redhat-linux-gnu-library/sp/include" -I/usr/local/include -fpic -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -c ogr_polygons.c -o ogr_polygons.o
g++ -m64 -std=gnu++11 -I/usr/include/R -DNDEBUG -I/usr/local/include -I"/home/andrea/R/x86_64-redhat-linux-gnu-library/sp/include" -I/usr/local/include -fpic -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -c ogr_proj.cpp -o ogr_proj.o
g++ -m64 -std=gnu++11 -I/usr/include/R -DNDEBUG -I/usr/local/include -I"/home/andrea/R/x86_64-redhat-linux-gnu-library/sp/include" -I/usr/local/include -fpic -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -c ogrdrivers.cpp -o ogrdrivers.o
g++ -m64 -std=gnu++11 -I/usr/include/R -DNDEBUG -I/usr/local/include -I"/home/andrea/R/x86_64-redhat-linux-gnu-library/sp/include" -I/usr/local/include -fpic -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -c ogrsource.cpp -o ogrsource.o
g++ -m64 -std=gnu++11 -I/usr/include/R -DNDEBUG -I/usr/local/include -I"/home/andrea/R/x86_64-redhat-linux-gnu-library/sp/include" -I/usr/local/include -fpic -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -c projectit.cpp -o projectit.o
g++ -m64 -std=gnu++11 -shared -L/usr/lib64/R/lib -L/usr/local/lib64 -o rgdal.so OGR_write.o gdal-bindings.o init.o inverser.o local_stubs.o ogr_geom.o ogr_polygons.o ogr_proj.o ogrdrivers.o ogrsource.o projectit.o -L/usr/local/lib -lgdal -lproj -L/usr/lib64/R/lib -lR
installing to /home/andrea/R/x86_64-redhat-linux-gnu-library/rgdal/libs
** R
** data
** inst
** preparing package for lazy loading
** help
*** installing help indices
converting help for package ‘rgdal’
finding HTML links ... done
CRS-class html
GDALDataset-class html
GDALDriver-class html
GDALMajorObject-class html
GDALRasterBand-class html
GDALReadOnlyDataset-class html
GDALReadOnlyDataset-methods html
GDALTransientDataset-class html
GridsDatums html
RGB2PCT html
SGDF2PCT html
SpatialGDAL-class html
closeDataset-methods html
displayDataset html
llgrid html
Rd warning: /tmp/Rtmp52ge38/R.INSTALL4e4e42b08a4a/rgdal/man/llgrid.Rd:11: missing file link ‘Spatial’
Rd warning: /tmp/Rtmp52ge38/R.INSTALL4e4e42b08a4a/rgdal/man/llgrid.Rd:16: missing file link ‘gridat’
Rd warning: /tmp/Rtmp52ge38/R.INSTALL4e4e42b08a4a/rgdal/man/llgrid.Rd:17: missing file link ‘gridat’
make_EPSG html
nor2k html
projInfo html
project html
readGDAL html
Rd warning: /tmp/Rtmp52ge38/R.INSTALL4e4e42b08a4a/rgdal/man/readGDAL.Rd:136: missing file link ‘flipVertical’
readOGR html
showWKT html
spTransform-methods html
wrappers html
writeOGR html
** building package indices
** installing vignettes
** testing if installed package can be loaded
Error: package or namespace load failed for ‘rgdal’ in dyn.load(file, DLLpath = DLLpath, ...):
unable to load shared object '/home/andrea/R/x86_64-redhat-linux-gnu-library/rgdal/libs/rgdal.so':
libgdal.so.20: cannot open shared object file: No such file or directory
Error: loading failed
Execution halted
ERROR: loading failed
* removing ‘/home/andrea/R/x86_64-redhat-linux-gnu-library/rgdal’
Warning in install.packages :
installation of package ‘rgdal’ had non-zero exit status
The downloaded source packages are in
‘/tmp/RtmpnAqQL2/downloaded_packages’
The issue is that, while GDAL is correctly built, rgdal cannot find its libraries. This is because the AWS ec2 AMI does not include /usr/local/lib in the default search path for libraries. The solution is provided in an answer to this question.
In brief:
edit /etc/ld.so.conf using sudo vi /etc/ld.so.conf to make it contain: include /etc/ld.so.conf.d/*.conf.
Edit / create a file /etc/ld.so.conf.d/libc.conf so that it contains: /usr/local/lib
Run sudo ldconfig to save changes
This makes the libraries searchable when building rgdal.
Upgrade gcc version to 5.x.x, and then run the followings (depending on the gcc version, you may have a different file of libstdc++.so.6.0.25):
cp /usr/local/lib64/libstdc++.so.6.0.25 /lib64
cd /lib64
rm -rf libstdc++.so.6
ln -s libstdc++.so.6.0.25 libstdc++.so.6
I have installed (GCC) 4.7.2 20121015 (Red Hat 4.7.2-5) already and jave also installed yum install gcc-gfortran . (Package gcc-gfortran-4.4.7-18.el6.x86_64)
But I'm getting error like :
/usr/bin/ld: cannot find -lgfortran
collect2: error: ld returned 1 exit status
make: *** [quadprog.so] Error 1
Please help me in installing -lgfortran. It seems like I need to install "Fortran -dev package providing the Fortran library". I do not know how to do that in RedHat/CentOS. Please help. I'm facing hard time in doing this.
I have tried installing libgfortran using:
yum install libgfortran
But it says:
Package libgfortran-4.4.7-18.el6.x86_64 already installed and latest version
Nothing to do
(Running in an interactive session, skipping clean step.)
More Info:
I tried installing package quadprog for R and below are the logs:
install.packages('https://cran.cnr.berkeley.edu/src/contrib/quadprog_1.5-5.tar.gz',dependencies = TRUE,repos = NULL,type ="source")
Installing package into '/usr/lib64/R/library'
(as 'lib' is unspecified)
trying URL 'https://cran.cnr.berkeley.edu/src/contrib/quadprog_1.5-5.tar.gz'
Content type 'application/x-gzip' length 33651 bytes (32 KB)
==================================================
downloaded 32 KB
* installing *source* package 'quadprog' ...
** package 'quadprog' successfully unpacked and MD5 sums checked
** libs
gfortran -m64 -fvisibility=hidden -fpic -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -I/usr/lib64/gfortran/modules -c aind.f -o aind.o
gcc -m64 -std=gnu99 -I/usr/include/R -DNDEBUG -I/usr/local/include -fpic -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -fpic -fPIC -c init.c -o init.o
gfortran -m64 -fvisibility=hidden -fpic -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -I/usr/lib64/gfortran/modules -ffloat-store -c -o solve.QP.compact.o solve.QP.compact.f
solve.QP.compact.f:254.3:
72 if (nvl .EQ. 0) then
1
Warning: Label 72 at (1) defined but not used
solve.QP.compact.f:302.2:
7 t1inf = .FALSE.
1
Warning: Label 7 at (1) defined but not used
solve.QP.compact.f: In function 'qpgen1':
solve.QP.compact.f:94: warning: 'it1' may be used uninitialized in this function
solve.QP.compact.f:98: warning: 't1' may be used uninitialized in this function
gfortran -m64 -fvisibility=hidden -fpic -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -I/usr/lib64/gfortran/modules -ffloat-store -c -o solve.QP.o solve.QP.f
solve.QP.f:245.3:
72 if (nvl .EQ. 0) then
1
Warning: Label 72 at (1) defined but not used
solve.QP.f:293.2:
7 t1inf = .FALSE.
1
Warning: Label 7 at (1) defined but not used
solve.QP.f: In function 'qpgen2':
solve.QP.f:85: warning: 'it1' may be used uninitialized in this function
solve.QP.f:89: warning: 't1' may be used uninitialized in this function
gfortran -m64 -fvisibility=hidden -fpic -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -I/usr/lib64/gfortran/modules -c util.f -o util.o
gcc -m64 -std=gnu99 -shared -L/usr/lib64/R/lib -o quadprog.so aind.o init.o solve.QP.compact.o solve.QP.o util.o -L/usr/lib64/R/lib -lRblas -lgfortran -lm -lgfortran -lm -L/usr/lib64/R/lib -lR
/usr/bin/ld: cannot find -lgfortran
collect2: error: ld returned 1 exit status
make: *** [quadprog.so] Error 1
ERROR: compilation failed for package 'quadprog'
* removing '/usr/lib64/R/library/quadprog'
Warning message:
In install.packages("https://cran.cnr.berkeley.edu/src/contrib/quadprog_1.5-5.tar.gz", :
installation of package '/tmp/Rtmpry5XTG/downloaded_packages/quadprog_1.5-5.tar.gz' had non-zero exit status
Edits :
bash-4.1# rpm -ql libgfortran
/usr/lib64/libgfortran.so.3
/usr/lib64/libgfortran.so.3.0.0
You showed us this:
# type -a gcc
gcc is /opt/centos/devtoolset-1.1/root/usr/bin/gcc
gcc is /usr/bin/gcc'
It means that you have installed Red Hat Developer Toolset and enabled it for this shell, using scl enable or a similar command. Do you still need it? If not, I suggest to disable it.
If you need DTS, you will have to install the Fortran compiler from DTS 1.1, using:
yum install devtoolset-1.1-gcc-gfortran
(Or download it directly from here, which seems to be the repository from where you got your DTS compiler.)
This will install the Fortran compiler which is compatible with the gcc compiler you have configured. Without that, the system Fortran compiler and the DTS gcc are used together, which does not work because the DTS gcc command (used for linking in the build process you quoted) is not able to locate the libgfortran.so library from the system Fortran compiler.
Alternatively, you can bring the two compilers into sync by deinstalling the DTS compiler:
yum install devtoolset-1.1-gcc-gfortran
The following compile line was looking for libgfortran at /usr/lib64/R/lib but the library is not there. Hence, the linker error.
gcc -m64 -std=gnu99 -shared -L/usr/lib64/R/lib -o quadprog.so aind.o init.o solve.QP.compact.o solve.QP.o util.o -L/usr/lib64/R/lib -lRblas -lgfortran -lm -lgfortran -lm -L/usr/lib64/R/lib -lR
As we could not locate and modify the makefile. We created a symbolic link /usr/lib64/R/lib/libgfortran.so to /usr/lib64/libgfortran.so.3 and rerun the installation steps and it resolves the linker error.
This is a work around that we follow which resolves the issue
I was able to successfully build cython on Ubuntu 14.04 from source as explained in this SE question/answer Compiling cython From source with icc and I downloaded the source code from here - Cython source code download.
The command to compile cython is
CC=icc LINKCC=icc python3.4 setup.py build
I am enclosing the build log. It is STILL using gcc for linking. Here is a sample of build log.
It appears CC=icc LINKCC=icc does NOT seem to change the linker to icc. It is still using x86_64-linux-gnu-gcc. When I set the environmental variable LDFLAGS = -lirc the environmental variable is being passed to gcc and not to icc.
Also when I put print statements in BuildExecutable.py they are not getting called.
icc -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.4m -c /home/aswin/libPython/Cython-0.24/Cython/Plex/Scanners.c -o build/temp.linux-x86_64-3.4/home/aswin/libPython/Cython-0.24/Cython/Plex/Scanners.o
icc: command line warning #10006: ignoring unknown option '-fwrapv'
creating build/lib.linux-x86_64-3.4
creating build/lib.linux-x86_64-3.4/Cython
creating build/lib.linux-x86_64-3.4/Cython/Plex
x86_64-linux-gnu-gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions -Wl,-z,relro -lirc -g -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 build/temp.linux-x86_64-3.4/home/aswin/libPython/Cython-0.24/Cython/Plex/Scanners.o -o build/lib.linux-x86_64-3.4/Cython/Plex/Scanners.cpython-34m.so
How do I fix it ?
You need to override the linker
by setting export LDSHARED="icc -shared". That generates the icc linker. Here is an example of the build log by typing
CC=icc python3.4 setup.py build_ext
Alternatively you can also do the same by typing
LDSHARED="icc -shared" CC=icc python3.4 setup.py build_ex
icc -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.4m -c /home/a/libPython/Cython-0.24/Cython/Plex/Scanners.c -o build/temp.linux-x86_64-3.4/home/a/libPython/Cython-0.24/Cython/Plex/Scanners.o
icc: command line warning #10006: ignoring unknown option '-fwrapv'
creating build/lib.linux-x86_64-3.4
creating build/lib.linux-x86_64-3.4/Cython
creating build/lib.linux-x86_64-3.4/Cython/Plex
icc -shared -Wl,-Bsymbolic-functions -Wl,-z,relro -g -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 build/temp.linux-x86_64-3.4/home/a/libPython/Cython-0.24/Cython/Plex/Scanners.o -o build/lib.linux-x86_64-3.4/Cython/Plex/Scanners.cpython-34m.so
cythoning /home/a/libPython/Cython-0.24/Cython/Plex/Actions.py to /home/a/libPython/Cython-0.24/Cython/Plex/Actions.c
You could try to add -static-intel to link options so that all Intel specific functions will be static-linked.