I am having a problem with the installation of a ROS packages on my raspberry pi 3. I really hope you can help me.
<== Finished processing package [10 of 53]: 'fzi_icl_core'
==> Processing plain cmake package: 'fzi_icl_can'
==> Building with env: '/opt/ros/kinetic/env.sh'
==> cmake /home/pi/ros_catkin_ws/src/fzi_icl_can -DCMAKE_INSTALL_PREFIX=/opt/ros/kinetic -DCMAKE_BUILD_TYPE=Release -G Unix Makefiles in '/home/pi/ros_catkin_ws/build_isolated/fzi_icl_can/install'
The C compiler identification is unknown
-- The CXX compiler identification is GNU 4.9.2
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- broken
CMake Error at /usr/share/cmake-3.6/Modules/CMakeTestCCompiler.cmake:61 (message):
** The C compiler "/usr/bin/cc" is not able to compile a simple test program.**
It fails with the following output:
Change Dir: /home/pi/ros_catkin_ws/build_isolated/fzi_icl_can/install/CMakeFiles/CMakeTmp
Run Build Command:"/usr/bin/make" "cmTC_cd4f1/fast"
/usr/bin/make -f CMakeFiles/cmTC_cd4f1.dir/build.make
CMakeFiles/cmTC_cd4f1.dir/build
make[1]: Entering directory
'/home/pi/ros_catkin_ws/build_isolated/fzi_icl_can/install/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_cd4f1.dir/testCCompiler.c.o
/usr/bin/cc -o CMakeFiles/cmTC_cd4f1.dir/testCCompiler.c.o -c
/home/pi/ros_catkin_ws/build_isolated/fzi_icl_can/install/CMakeFiles/CMakeTmp/testCCompiler.c
cc1: internal compiler error: in next_pass_1, at passes.c:1258
Please submit a full bug report,
with preprocessed source if appropriate.
See for instructions.
CMakeFiles/cmTC_cd4f1.dir/build.make:65: recipe for target
'CMakeFiles/cmTC_cd4f1.dir/testCCompiler.c.o' failed
make[1]: *** [CMakeFiles/cmTC_cd4f1.dir/testCCompiler.c.o] Error 1
make[1]: Leaving directory
'/home/pi/ros_catkin_ws/build_isolated/fzi_icl_can/install/CMakeFiles/CMakeTmp'
Makefile:126: recipe for target 'cmTC_cd4f1/fast' failed
make: *** [cmTC_cd4f1/fast] Error 2
CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
CMakeLists.txt:2 (project)
-- Configuring incomplete, errors occurred!
See also "/home/pi/ros_catkin_ws/build_isolated/fzi_icl_can/install/CMakeFiles/CMakeOutput.log".
See also "/home/pi/ros_catkin_ws/build_isolated/fzi_icl_can/install/CMakeFiles/CMakeError.log".
<== Failed to process package 'fzi_icl_can':
Command '['/opt/ros/kinetic/env.sh', 'cmake', '/home/pi/ros_catkin_ws/src/fzi_icl_can', '-DCMAKE_INSTALL_PREFIX=/opt/ros/kinetic', '-DCMAKE_BUILD_TYPE=Release', '-G', 'Unix Makefiles']' returned non-zero exit status 1
Reproduce this error by running:
==> cd /home/pi/ros_catkin_ws/build_isolated/fzi_icl_can && /opt/ros/kinetic/env.sh cmake /home/pi/ros_catkin_ws/src/fzi_icl_can -DCMAKE_INSTALL_PREFIX=/opt/ros/kinetic -DCMAKE_BUILD_TYPE=Release -G 'Unix Makefiles'
Command failed, exiting.
The output was:
1
cc1: internal compiler error: in next_pass_1, at passes.c:1258
Please submit a full bug report,
If you haven't already, I would try sudo apt-get install build-essential to make sure that all the necessary build components are installed.
Search installed gcc libs:
dpkg -l | grep libgcc | cut -d' ' -f 3 | tr '\n' ' '
My result:
libgcc-5-dev:amd64 libgcc1:amd64
Reinstall it:
apt install --reinstall libgcc1:armhf libgcc-5-dev:armhf
Related
We are trying to use Gstreamer's mpegts pluging to record a video stream stream using the following Gstreamer example code https://gstreamer.freedesktop.org/documentation/mpegtsmux/mpegtsmux.html?gi-language=c. When we compile the code using gcc mpegtstest.c -o mpegtstest `pkg-config --cflags --libs gstreamer-1.0 gstreamer-mpegts-1.0` -v everything works as expected and the program records with no issues. We are now trying to compile the code using cmake and make. cmake generates correctly but make fails with error.
/usr/bin/ld: cannot find -lgstreamer-mpegts-1.0.
CMakeLists.txt
##################### STANDARD HEADER #########################
cmake_minimum_required(VERSION 2.6)
set(CMAKE_INSTALL_PREFIX "/usr" CACHE PATH "" FORCE)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/CMakeHelpers/")
##################### PROJECT DEF #############################
project(mpegsttest)
################### VARIABLES #################################
include_directories("${PROJECT_BINARY_DIR}")
include_directories("${PROJECT_SOURCE_DIR}/../")
set(MPEGTS_TEST_SOURCES
mpegtstest.c
)
####################### Targets ########################
add_executable(${CMAKE_PROJECT_NAME} ${MPEGTS_TEST_SOURCES})
################### Linked Libraries ###################
find_package(GLIB2 REQUIRED)
include_directories(${GLIB2_INCLUDE_DIRS})
include_directories("/usr/include/gio-unix-2.0")
target_link_libraries(${CMAKE_PROJECT_NAME} ${GLIB2_LIBRARIES} gobject-2.0 gio-2.0)
find_package(GStreamer REQUIRED)
include_directories(${GSTREAMER_INCLUDE_DIRS})
target_link_libraries(${CMAKE_PROJECT_NAME} ${GSTREAMER_LIBRARIES})
include_directories(${GSTREAMER-MPEGTS_INCLUDE_DIRS})
target_link_libraries(${CMAKE_PROJECT_NAME} gstreamer-mpegts-1.0)
cmake output
-- The C compiler identification is GNU 5.3.0
-- The CXX compiler identification is GNU 5.3.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.29.1")
-- Checking for one of the modules 'glib-2.0'
-- Found GLib2: glib-2.0 /usr/include/glib-2.0;/usr/lib/glib-2.0/include
-- Looking for include file glib/gregex.h
-- Looking for include file glib/gregex.h - not found
-- Looking for include file glib/gchecksum.h
-- Looking for include file glib/gchecksum.h - not found
-- Checking for module 'gstreamer-1.0 >= '
-- Found gstreamer-1.0 , version 1.6.3
-- Checking for module 'gstreamer-base-1.0 >= '
-- Found gstreamer-base-1.0 , version 1.6.3
-- Checking for module 'gstreamer-app-1.0 >= '
-- Found gstreamer-app-1.0 , version 1.6.3
-- Checking for module 'gstreamer-audio-1.0 >= '
-- Found gstreamer-audio-1.0 , version 1.6.3
-- Checking for module 'gstreamer-fft-1.0 >= '
-- Found gstreamer-fft-1.0 , version 1.6.3
-- Checking for module 'gstreamer-mpegts-1.0>=1.4.0'
-- Found gstreamer-mpegts-1.0, version 1.6.3
-- Checking for module 'gstreamer-pbutils-1.0 >= '
-- Found gstreamer-pbutils-1.0 , version 1.6.3
-- Checking for module 'gstreamer-tag-1.0 >= '
-- Found gstreamer-tag-1.0 , version 1.6.3
-- Checking for module 'gstreamer-video-1.0 >= '
-- Found gstreamer-video-1.0 , version 1.6.3
-- Found GStreamer: GSTREAMER_INCLUDE_DIRS;GSTREAMER_LIBRARIES;GSTREAMER_VERSION;GSTREAMER_BASE_INCLUDE_DIRS;GSTREAMER_BASE_LIBRARIES
-- Configuring done
-- Generating done
-- Build files have been written to: /home/dev3lx/build/mpegts
make --trace output
Makefile:176: target 'cmake_check_build_system' does not exist
/usr/bin/cmake -H/home/dev3lx/Development/mptestsrc -B/home/dev3lx/build/mpegts --check-build-system CMakeFiles/Makefile.cmake 0
Makefile:83: update target 'all' due to: cmake_check_build_system
/usr/bin/cmake -E cmake_progress_start /home/dev3lx/build/mpegts/CMakeFiles /home/dev3lx/build/mpegts/CMakeFiles/progress.marks
make -f CMakeFiles/Makefile2 all
CMakeFiles/Makefile2:67: target 'CMakeFiles/mpegsttest.dir/all' does not exist
make -f CMakeFiles/mpegsttest.dir/build.make CMakeFiles/mpegsttest.dir/depend
CMakeFiles/mpegsttest.dir/build.make:112: target 'CMakeFiles/mpegsttest.dir/depend' does not exist
cd /home/dev3lx/build/mpegts && /usr/bin/cmake -E cmake_depends "Unix Makefiles" /home/dev3lx/Development/mptestsrc /home/dev3lx/Development/mptestsrc /home/dev3lx/build/mpegts /home/dev3lx/build/mpegts /home/dev3lx/build/mpegts/CMakeFiles/mpegsttest.dir/DependInfo.cmake --color=
Scanning dependencies of target mpegsttest
make -f CMakeFiles/mpegsttest.dir/build.make CMakeFiles/mpegsttest.dir/build
CMakeFiles/mpegsttest.dir/build.make:62: update target 'CMakeFiles/mpegsttest.dir/mpegtstest.c.o' due to: /home/dev3lx/Development/mptestsrc/mpegtstest.c /usr/include/glib-2.0/glib-object.h /usr/include/glib-2.0/glib.h /usr/include/glib-2.0/glib/deprecated/gallocator.h /usr/include/glib-2.0/glib/deprecated/gcache.h /usr/include/glib-2.0/glib/deprecated/gcompletion.h /usr/include/glib-2.0/glib/deprecated/gmain.h /usr/include/glib-2.0/glib/deprecated/grel.h /usr/include/glib-2.0/glib/deprecated/gthread.h /usr/include/glib-2.0/glib/galloca.h /usr/include/glib-2.0/glib/garray.h /usr/include/glib-2.0/glib/gasyncqueue.h /usr/include/glib-2.0/glib/gatomic.h /usr/include/glib-2.0/glib/gbacktrace.h /usr/include/glib-2.0/glib/gbase64.h /usr/include/glib-2.0/glib/gbitlock.h /usr/include/glib-2.0/glib/gbookmarkfile.h /usr/include/glib-2.0/glib/gbytes.h /usr/include/glib-2.0/glib/gcharset.h /usr/include/glib-2.0/glib/gchecksum.h /usr/include/glib-2.0/glib/gconvert.h /usr/include/glib-2.0/glib/gdataset.h /usr/include/glib-2.0/glib/gdate.h /usr/include/glib-2.0/glib/gdatetime.h /usr/include/glib-2.0/glib/gdir.h /usr/include/glib-2.0/glib/genviron.h /usr/include/glib-2.0/glib/gerror.h /usr/include/glib-2.0/glib/gfileutils.h /usr/include/glib-2.0/glib/ggettext.h /usr/include/glib-2.0/glib/ghash.h /usr/include/glib-2.0/glib/ghmac.h /usr/include/glib-2.0/glib/ghook.h /usr/include/glib-2.0/glib/ghostutils.h /usr/include/glib-2.0/glib/giochannel.h /usr/include/glib-2.0/glib/gkeyfile.h /usr/include/glib-2.0/glib/glib-autocleanups.h /usr/include/glib-2.0/glib/glist.h /usr/include/glib-2.0/glib/gmacros.h /usr/include/glib-2.0/glib/gmain.h /usr/include/glib-2.0/glib/gmappedfile.h /usr/include/glib-2.0/glib/gmarkup.h /usr/include/glib-2.0/glib/gmem.h /usr/include/glib-2.0/glib/gmessages.h /usr/include/glib-2.0/glib/gnode.h /usr/include/glib-2.0/glib/goption.h /usr/include/glib-2.0/glib/gpattern.h /usr/include/glib-2.0/glib/gpoll.h /usr/include/glib-2.0/glib/gprimes.h /usr/include/glib-2.0/glib/gqsort.h /usr/include/glib-2.0/glib/gquark.h /usr/include/glib-2.0/glib/gqueue.h /usr/include/glib-2.0/glib/grand.h /usr/include/glib-2.0/glib/gregex.h /usr/include/glib-2.0/glib/gscanner.h /usr/include/glib-2.0/glib/gsequence.h /usr/include/glib-2.0/glib/gshell.h /usr/include/glib-2.0/glib/gslice.h /usr/include/glib-2.0/glib/gslist.h /usr/include/glib-2.0/glib/gspawn.h /usr/include/glib-2.0/glib/gstrfuncs.h /usr/include/glib-2.0/glib/gstring.h /usr/include/glib-2.0/glib/gstringchunk.h /usr/include/glib-2.0/glib/gtestutils.h /usr/include/glib-2.0/glib/gthread.h /usr/include/glib-2.0/glib/gthreadpool.h /usr/include/glib-2.0/glib/gtimer.h /usr/include/glib-2.0/glib/gtimezone.h /usr/include/glib-2.0/glib/gtrashstack.h /usr/include/glib-2.0/glib/gtree.h /usr/include/glib-2.0/glib/gtypes.h /usr/include/glib-2.0/glib/gunicode.h /usr/include/glib-2.0/glib/gurifuncs.h /usr/include/glib-2.0/glib/gutils.h /usr/include/glib-2.0/glib/gvariant.h /usr/include/glib-2.0/glib/gvarianttype.h /usr/include/glib-2.0/glib/gversion.h /usr/include/glib-2.0/glib/gversionmacros.h /usr/include/glib-2.0/glib/gwin32.h /usr/include/glib-2.0/gobject/gbinding.h /usr/include/glib-2.0/gobject/gboxed.h /usr/include/glib-2.0/gobject/gclosure.h /usr/include/glib-2.0/gobject/genums.h /usr/include/glib-2.0/gobject/glib-types.h /usr/include/glib-2.0/gobject/gmarshal.h /usr/include/glib-2.0/gobject/gobject-autocleanups.h /usr/include/glib-2.0/gobject/gobject.h /usr/include/glib-2.0/gobject/gparam.h /usr/include/glib-2.0/gobject/gparamspecs.h /usr/include/glib-2.0/gobject/gsignal.h /usr/include/glib-2.0/gobject/gsourceclosure.h /usr/include/glib-2.0/gobject/gtype.h /usr/include/glib-2.0/gobject/gtypemodule.h /usr/include/glib-2.0/gobject/gtypeplugin.h /usr/include/glib-2.0/gobject/gvalue.h /usr/include/glib-2.0/gobject/gvaluearray.h /usr/include/glib-2.0/gobject/gvaluetypes.h /usr/include/gstreamer-1.0/gst/glib-compat.h /usr/include/gstreamer-1.0/gst/gst.h /usr/include/gstreamer-1.0/gst/gstallocator.h /usr/include/gstreamer-1.0/gst/gstatomicqueue.h /usr/include/gstreamer-1.0/gst/gstbin.h /usr/include/gstreamer-1.0/gst/gstbuffer.h /usr/include/gstreamer-1.0/gst/gstbufferlist.h /usr/include/gstreamer-1.0/gst/gstbufferpool.h /usr/include/gstreamer-1.0/gst/gstbus.h /usr/include/gstreamer-1.0/gst/gstcaps.h /usr/include/gstreamer-1.0/gst/gstcapsfeatures.h /usr/include/gstreamer-1.0/gst/gstchildproxy.h /usr/include/gstreamer-1.0/gst/gstclock.h /usr/include/gstreamer-1.0/gst/gstcompat.h /usr/include/gstreamer-1.0/gst/gstcontext.h /usr/include/gstreamer-1.0/gst/gstcontrolbinding.h /usr/include/gstreamer-1.0/gst/gstcontrolsource.h /usr/include/gstreamer-1.0/gst/gstdatetime.h /usr/include/gstreamer-1.0/gst/gstdebugutils.h /usr/include/gstreamer-1.0/gst/gstdevice.h /usr/include/gstreamer-1.0/gst/gstdevicemonitor.h /usr/include/gstreamer-1.0/gst/gstdeviceprovider.h /usr/include/gstreamer-1.0/gst/gstdeviceproviderfactory.h /usr/include/gstreamer-1.0/gst/gstelement.h /usr/include/gstreamer-1.0/gst/gstelementfactory.h /usr/include/gstreamer-1.0/gst/gstelementmetadata.h /usr/include/gstreamer-1.0/gst/gstenumtypes.h /usr/include/gstreamer-1.0/gst/gsterror.h /usr/include/gstreamer-1.0/gst/gstevent.h /usr/include/gstreamer-1.0/gst/gstformat.h /usr/include/gstreamer-1.0/gst/gstghostpad.h /usr/include/gstreamer-1.0/gst/gstinfo.h /usr/include/gstreamer-1.0/gst/gstiterator.h /usr/include/gstreamer-1.0/gst/gstmacros.h /usr/include/gstreamer-1.0/gst/gstmemory.h /usr/include/gstreamer-1.0/gst/gstmessage.h /usr/include/gstreamer-1.0/gst/gstmeta.h /usr/include/gstreamer-1.0/gst/gstminiobject.h /usr/include/gstreamer-1.0/gst/gstobject.h /usr/include/gstreamer-1.0/gst/gstpad.h /usr/include/gstreamer-1.0/gst/gstpadtemplate.h /usr/include/gstreamer-1.0/gst/gstparamspecs.h /usr/include/gstreamer-1.0/gst/gstparse.h /usr/include/gstreamer-1.0/gst/gstpipeline.h /usr/include/gstreamer-1.0/gst/gstplugin.h /usr/include/gstreamer-1.0/gst/gstpluginfeature.h /usr/include/gstreamer-1.0/gst/gstpoll.h /usr/include/gstreamer-1.0/gst/gstpreset.h /usr/include/gstreamer-1.0/gst/gstprotection.h /usr/include/gstreamer-1.0/gst/gstquery.h /usr/include/gstreamer-1.0/gst/gstregistry.h /usr/include/gstreamer-1.0/gst/gstsample.h /usr/include/gstreamer-1.0/gst/gstsegment.h /usr/include/gstreamer-1.0/gst/gststructure.h /usr/include/gstreamer-1.0/gst/gstsystemclock.h /usr/include/gstreamer-1.0/gst/gsttaglist.h /usr/include/gstreamer-1.0/gst/gsttagsetter.h /usr/include/gstreamer-1.0/gst/gsttask.h /usr/include/gstreamer-1.0/gst/gsttaskpool.h /usr/include/gstreamer-1.0/gst/gsttoc.h /usr/include/gstreamer-1.0/gst/gsttocsetter.h /usr/include/gstreamer-1.0/gst/gsttypefind.h /usr/include/gstreamer-1.0/gst/gsttypefindfactory.h /usr/include/gstreamer-1.0/gst/gsturi.h /usr/include/gstreamer-1.0/gst/gstutils.h /usr/include/gstreamer-1.0/gst/gstvalue.h /usr/include/gstreamer-1.0/gst/gstversion.h /usr/include/gstreamer-1.0/gst/mpegts/gst-atsc-section.h /usr/include/gstreamer-1.0/gst/mpegts/gst-dvb-descriptor.h /usr/include/gstreamer-1.0/gst/mpegts/gst-dvb-section.h /usr/include/gstreamer-1.0/gst/mpegts/gst-scte-section.h /usr/include/gstreamer-1.0/gst/mpegts/gstmpegts-enumtypes.h /usr/include/gstreamer-1.0/gst/mpegts/gstmpegtsdescriptor.h /usr/include/gstreamer-1.0/gst/mpegts/gstmpegtssection.h /usr/include/gstreamer-1.0/gst/mpegts/mpegts.h /usr/lib/glib-2.0/include/glibconfig.h /usr/lib/gstreamer-1.0/include/gst/gstconfig.h CMakeFiles/mpegsttest.dir/flags.make
/usr/bin/cmake -E cmake_echo_color --switch= --green --progress-dir=/home/dev3lx/build/mpegts/CMakeFiles --progress-num=1 "Building C object CMakeFiles/mpegsttest.dir/mpegtstest.c.o"
[ 50%] Building C object CMakeFiles/mpegsttest.dir/mpegtstest.c.o
/usr/bin/cc -I/home/dev3lx/build/mpegts -I/home/dev3lx/Development/mptestsrc/.. -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/gio-unix-2.0 -I/usr/include/gstreamer-1.0 -I/usr/lib/gstreamer-1.0/include -o CMakeFiles/mpegsttest.dir/mpegtstest.c.o -c /home/dev3lx/Development/mptestsrc/mpegtstest.c
CMakeFiles/mpegsttest.dir/build.make:95: update target 'mpegsttest' due to: CMakeFiles/mpegsttest.dir/link.txt CMakeFiles/mpegsttest.dir/mpegtstest.c.o CMakeFiles/mpegsttest.dir/build.make /usr/lib64/libgstreamer-1.0.so
/usr/bin/cmake -E cmake_echo_color --switch= --green --bold --progress-dir=/home/dev3lx/build/mpegts/CMakeFiles --progress-num=2 "Linking C executable mpegsttest"
[100%] Linking C executable mpegsttest
/usr/bin/cmake -E cmake_link_script CMakeFiles/mpegsttest.dir/link.txt --verbose=
/usr/bin/ld: cannot find -lgstreamer-mpegts-1.0
collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/mpegsttest.dir/build.make:96: mpegsttest] Error 1
make[1]: *** [CMakeFiles/Makefile2:68: CMakeFiles/mpegsttest.dir/all] Error 2
make: *** [Makefile:84: all] Error 2
After searching online and trying a few different things found online like here and looking at Github code we don't know why or how to fix it. Any advice or assistance is much appreciated. thanks in advance.
Solution
Thanks to nega's comment and solution, changing include_directories(${GSTREAMER-MPEGTS_INCLUDE_DIRS}) to include_directories(${GSTREAMER_MPEGTS_INCLUDE_DIRS}) worked.
Based on your cmake output, I'd guess that you're using a version of FindGStreamer.cmake cribbed from WebKit. If that's the case, the variable you want to use is GSTREAMER_MPEGTS_INCLUDE_DIRS. Note the lack of a hyphen in the variable name.
If that's not the case, use a simple message() statement before the use of a variable to show you its value during the cmake step.
In your CMakeLists.txt:
message("GMID: ${GSTREAMER_MPEGTS_INCLUDE_DIRS}")
include_directories(${GSTREAMER_MPEGTS_INCLUDE_DIRS})
target_link_libraries(${CMAKE_PROJECT_NAME} gstreamer-mpegts-1.0)
In your shell:
$ cmake ../src |grep -i ^gmid
GMID: /usr/local/Cellar/libffi/3.3_2/include;/usr/local/Cellar/gst-plugins-bad/1.18.3/include/gstreamer-1.0;/usr/local/Cellar/gstreamer/1.18.3/include/gstreamer-1.0;/usr/local/Cellar/glib/2.66.7/include;/usr/local/Cellar/glib/2.66.7/include/glib-2.0;/usr/local/Cellar/glib/2.66.7/lib/glib-2.0/include;/usr/local/opt/gettext/include;/usr/local/Cellar/pcre/8.44/include
Another easy debugging step is to grep the cache after running cmake.
$ grep -i ^gstream CMakeCache.txt
GSTREAMER_APP_LIBRARIES:FILEPATH=/usr/local/Cellar/gst-plugins-base/1.18.3/lib/libgstapp-1.0.dylib
GSTREAMER_AUDIO_LIBRARIES:FILEPATH=/usr/local/Cellar/gst-plugins-base/1.18.3/lib/libgstaudio-1.0.dylib
GSTREAMER_BASE_LIBRARIES:FILEPATH=/usr/local/Cellar/gstreamer/1.18.3/lib/libgstbase-1.0.dylib
GSTREAMER_CODECPARSERS_LIBRARIES:FILEPATH=/usr/local/Cellar/gst-plugins-bad/1.18.3/lib/libgstcodecparsers-1.0.dylib
GSTREAMER_FFT_LIBRARIES:FILEPATH=/usr/local/Cellar/gst-plugins-base/1.18.3/lib/libgstfft-1.0.dylib
GSTREAMER_FULL_LIBRARIES:FILEPATH=GSTREAMER_FULL_LIBRARIES-NOTFOUND
GSTREAMER_GL_LIBRARIES:FILEPATH=/usr/local/Cellar/gst-plugins-base/1.18.3/lib/libgstgl-1.0.dylib
GSTREAMER_LIBRARIES:FILEPATH=/usr/local/Cellar/gstreamer/1.18.3/lib/libgstreamer-1.0.dylib
GSTREAMER_MPEGTS_LIBRARIES:FILEPATH=/usr/local/Cellar/gst-plugins-bad/1.18.3/lib/libgstmpegts-1.0.dylib
GSTREAMER_PBUTILS_LIBRARIES:FILEPATH=/usr/local/Cellar/gst-plugins-base/1.18.3/lib/libgstpbutils-1.0.dylib
GSTREAMER_TAG_LIBRARIES:FILEPATH=/usr/local/Cellar/gst-plugins-base/1.18.3/lib/libgsttag-1.0.dylib
GSTREAMER_VIDEO_LIBRARIES:FILEPATH=/usr/local/Cellar/gst-plugins-base/1.18.3/lib/libgstvideo-1.0.dylib
I write the C program using MinGW on windows 10 with Clion IDE. I had everything working and compiled successfully multiple times before. Can't link the error with any action but now cmake test in Clion fails - "Test Cmake run finished with errors" and I can't compile. Cmake error:
-- The C compiler identification is GNU 9.2.0
-- The CXX compiler identification is GNU 9.2.0
-- Check for working C compiler: C:/msys64/mingw64/bin/gcc.exe
-- Check for working C compiler: C:/msys64/mingw64/bin/gcc.exe -- broken
CMake Error at C:/Users/karol/AppData/Local/JetBrains/Toolbox/apps/CLion/ch-0/193.6015.37/bin/cmake/win/share/cmake-3.15/Modules/CMakeTestCCompiler.cmake:60 (message):
The C compiler
"C:/msys64/mingw64/bin/gcc.exe"
is not able to compile a simple test program.
It fails with the following output:
Change Dir: C:/Users/karol/AppData/Local/Temp/cmake_check_environment/_build11621595605978509144/CMakeFiles/CMakeTmp
Run Build Command(s):C:/msys64/mingw64/bin/mingw32-make.exe cmTC_15aad/fast && C:/msys64/mingw64/bin/mingw32-make.exe -f CMakeFiles\cmTC_15aad.dir\build.make CMakeFiles/cmTC_15aad.dir/build
mingw32-make.exe[1]: Entering directory 'C:/Users/karol/AppData/Local/Temp/cmake_check_environment/_build11621595605978509144/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_15aad.dir/testCCompiler.c.obj
C:\msys64\mingw64\bin\gcc.exe -o CMakeFiles\cmTC_15aad.dir\testCCompiler.c.obj -c C:\Users\karol\AppData\Local\Temp\cmake_check_environment\_build11621595605978509144\CMakeFiles\CMakeTmp\testCCompiler.c
Linking C executable cmTC_15aad.exe
C:\Users\karol\AppData\Local\JetBrains\Toolbox\apps\CLion\ch-0\193.6015.37\bin\cmake\win\bin\cmake.exe -E cmake_link_script CMakeFiles\cmTC_15aad.dir\link.txt --verbose=1
C:\Users\karol\AppData\Local\JetBrains\Toolbox\apps\CLion\ch-0\193.6015.37\bin\cmake\win\bin\cmake.exe -E remove -f CMakeFiles\cmTC_15aad.dir/objects.a
C:\msys64\mingw64\bin\ar.exe cr CMakeFiles\cmTC_15aad.dir/objects.a #CMakeFiles\cmTC_15aad.dir\objects1.rsp
C:\msys64\mingw64\bin\gcc.exe -Wl,--whole-archive CMakeFiles\cmTC_15aad.dir/objects.a -Wl,--no-whole-archive -o cmTC_15aad.exe -Wl,--out-implib,libcmTC_15aad.dll.a -Wl,--major-image-version,0,--minor-image-version,0 #CMakeFiles\cmTC_15aad.dir\linklibs.rsp
gcc.exe: fatal error: cannot execute 'ld': CreateProcess: No such file or directory
compilation terminated.
mingw32-make.exe[1]: *** [CMakeFiles\cmTC_15aad.dir\build.make:88: cmTC_15aad.exe] Error 1
mingw32-make.exe[1]: Leaving directory 'C:/Users/karol/AppData/Local/Temp/cmake_check_environment/_build11621595605978509144/CMakeFiles/CMakeTmp'
mingw32-make.exe: *** [Makefile:120: cmTC_15aad/fast] Error 2
CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
CMakeLists.txt:1 (project)
-- Configuring incomplete, errors occurred!
See also "C:/Users/karol/AppData/Local/Temp/cmake_check_environment/_build11621595605978509144/CMakeFiles/CMakeOutput.log".
See also "C:/Users/karol/AppData/Local/Temp/cmake_check_environment/_build11621595605978509144/CMakeFiles/CMakeError.log".
Error code: 1
I don't know what caused it. One thing I did around the time it broke is turn off avast cyber capture. But now I turned off avast antivirus completely and turned off "Check apps and files" option in Defender. The latter I did when Clion popped a notification saying "Windows Defender might be interrupting build speed". I also clicked "fix" in this Clion pop-up and it added project folders to exceptions. Clion notified me of it not immediately after the error but way later.
The directory "C:/Users/karol/AppData/Local/Temp/cmake_check_environment/" mentioned in the error report doesn't exist. I tried unchecking "read-only access" of AppData/Local/temp directory but Windows keeps putting it on. Between those changes and antivirus changes, I was restarting windows many times.
The error message i get when trying to compile:
C:\Users\karol\AppData\Local\JetBrains\Toolbox\apps\CLion\ch-0\193.6015.37\bin\cmake\win\bin\cmake.exe --build C:\Users\karol\Desktop\studia\wstep_do_C\final_project\cmake-build-debug --target final_project -- -j 2
[ 20%] Linking C executable final_project.exe
gcc.exe: fatal error: cannot execute 'ld': CreateProcess: No such file or directory
compilation terminated.
mingw32-make.exe[3]: *** [CMakeFiles\final_project.dir\build.make:134: final_project.exe] Error 1
mingw32-make.exe[2]: *** [CMakeFiles\Makefile2:75: CMakeFiles/final_project.dir/all] Error 2
mingw32-make.exe[1]: *** [CMakeFiles\Makefile2:82: CMakeFiles/final_project.dir/rule] Error 2
mingw32-make.exe: *** [Makefile:117: final_project] Error 2
Many poeple experienced simmilar error caused by non-latin characters in path, not the case here. Also i don't suspect mingw installation as it used to work.
Clion toolchains settings
I am working on build a c library for android 5.1.1.
First I build a standalone toolchain by following the google ndk standalone toolchain guild.
<prebuilt_ndk_r12b_path>/build/tools/make-standalone-toolchain.sh --platform=android-22 --ndk-dir=<prebuilt_ndk_r12b_path> --install-dir=/home/r0ng/utilities/ndk --toolchain=x86_64-linux-android-4.9
After that, I exported CC, AR and RANLIB in ~/.bashrc
export ANDROID_NDK=/home/r0ng/utilities/ndk
SYSROOT=$ANDROID_NDK/sysroot
export CC="$ANDROID_NDK/bin/arm-linux-androideabi-gcc-4.9.x --sysroot=$SYSROOT"
export AR="$ANDROID_NDK/bin/arm-linux-androideabi-gcc-ar --sysroot=$SYSROOT"
export RANLIB="$ANDROID_NDK/bin/arm-linux-androideabi-gcc-ranlib --sysroot=$SYSROOT"
But when I tried to compile by using cmake ... I had the following errors:
-- The C compiler identification is GNU 4.9.0
-- The CXX compiler identification is GNU 4.9.3
-- Check for working C compiler: /home/r0ng/utilities/ndk/bin/arm-linux-androideabi-gcc
-- Check for working C compiler: /home/r0ng/utilities/ndk/bin/arm-linux-androideabi-gcc -- broken
CMake Error at /usr/share/cmake-3.5/Modules/CMakeTestCCompiler.cmake:61 (message):
The C compiler "/home/r0ng/utilities/ndk/bin/arm-linux-androideabi-gcc" is
not able to compile a simple test program.
It fails with the following output:
Change Dir: /home/r0ng/projects/relic/build/CMakeFiles/CMakeTmp
Run Build Command:"/usr/bin/make" "cmTC_8d7ca/fast"
/usr/bin/make -f CMakeFiles/cmTC_8d7ca.dir/build.make
CMakeFiles/cmTC_8d7ca.dir/build
make[1]: Entering directory
'/home/r0ng/projects/relic/build/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_8d7ca.dir/testCCompiler.c.o
/home/r0ng/utilities/ndk/bin/arm-linux-androideabi-gcc
--sysroot=/home/r0ng/utilities/ndk -o
CMakeFiles/cmTC_8d7ca.dir/testCCompiler.c.o -c
/home/r0ng/projects/relic/build/CMakeFiles/CMakeTmp/testCCompiler.c
Linking C executable cmTC_8d7ca
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_8d7ca.dir/link.txt
--verbose=1
/home/r0ng/utilities/ndk/bin/arm-linux-androideabi-gcc
--sysroot=/home/r0ng/utilities/ndk
CMakeFiles/cmTC_8d7ca.dir/testCCompiler.c.o -o cmTC_8d7ca -rdynamic
/home/r0ng/utilities/ndk/bin/../lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld:
error: cannot open crtbegin_dynamic.o: No such file or directory
/home/r0ng/utilities/ndk/bin/../lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld:
error: cannot open crtend_android.o: No such file or directory
/home/r0ng/utilities/ndk/bin/../lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld:
error: cannot find -lc
/home/r0ng/utilities/ndk/bin/../lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld:
error: cannot find -ldl
collect2: error: ld returned 1 exit status
CMakeFiles/cmTC_8d7ca.dir/build.make:97: recipe for target 'cmTC_8d7ca'
failed
make[1]: *** [cmTC_8d7ca] Error 1
make[1]: Leaving directory
'/home/r0ng/projects/relic/build/CMakeFiles/CMakeTmp'
Makefile:126: recipe for target 'cmTC_8d7ca/fast' failed
make: *** [cmTC_8d7ca/fast] Error 2
CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
CMakeLists.txt:6 (project)
-- Configuring incomplete, errors occurred!
See also "/home/r0ng/projects/relic/build/CMakeFiles/CMakeOutput.log".
See also "/home/r0ng/projects/relic/build/CMakeFiles/CMakeError.log".
It seems that the compiler is unable to find "crtbegin_dynamic.o", "crtend_android.o", "libc" neither "libdl". But when I checked, those files are all in the folder $HOME/utilities/ndk/sysroot/usr/lib. And I already set the --sysroot in CC, AR and RANLIB.
Update 1 :
After changed the toolchain generation command based on Dan Albert's comment, The command cmake .. is able to be run successfully. But when I run make . I got following error:
arm-linux-androideabi-gcc-4.9.x: error: unrecognized command line option '-m64'
src/CMakeFiles/relic.dir/build.make:62: recipe for target 'src/CMakeFiles/relic.dir/relic_err.c.o' failed
make[2]: *** [src/CMakeFiles/relic.dir/relic_err.c.o] Error 1
CMakeFiles/Makefile2:120: recipe for target 'src/CMakeFiles/relic.dir/all' failed
make[1]: *** [src/CMakeFiles/relic.dir/all] Error 2
Makefile:138: recipe for target 'all' failed
make: *** [all] Error 2
Thanks,
Environment:
OS: Ubuntu 16.04 LTS
gcc / g++: 4.9.3
AOSP: 5.1.1_r30
NDK: android-ndk-r12b
cmake: 3.5.1
If you want to use cmake, you don't need a standalone toolchain. Android Studio natively supports cmake now: http://tools.android.com/tech-docs/external-c-builds
NDK r13 (not released yet) will also ship a cmake toolchain file for using cmake directly (the method shown in https://stackoverflow.com/a/5099229/632035).
You shouldn't add --sysroot= explicitly. Standalone toolchain already knows about proper one.
While OpenSSL ver. 0.9.8za was already installed on my system (darwin64-x86_64-cc), I elected to install the latest version, 1.0.1j, using the instructions for UNIX systems, in the "INSTALL" file within the downloaded tarball. I chose to configure with the 64-bit option, './Configure darwin64-x86_64-cc', and then ran the makefile. So far, so good. After about a minute, as I was thinking the installation would be successful, the compiler displayed following error messages, after compilation terminated:
Compile command line: './Configure darwin64-x86_64-cc' (Openssl suggestion for 64-bit)
duplicate symbol _OPENSSL_cleanse in:
../libcrypto.a(mem_clr.o)
../libcrypto.a(x86_64cpuid.o)
ld: 1 duplicate symbol for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [link_app.] Error 1
make[1]: *** [openssl] Error 2
make: *** [build_apps] Error 1
The problem appears to originate in the linker, but then again, I'm still a command line novice.
So, given this error, what needs to be changed in order to fully compile OpenSSL 1.0.1j?
When the automatic configuration route was taken (./config), the following error is given:
cc -I.. -I../.. -I../modes -I../asn1 -I../evp -I../../include -DOPENSSL_THREADS -D_REENTRANT
DDSO_DLFCN -DHAVE_DLFCN_H -arch i386 -O3 -fomit-frame-pointer -DL_ENDIAN
DOPENSSL_BN_ASM_PART_WORDS -DOPENSSL_IA32_SSE2 -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_GF2m
DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DMD5_ASM -DRMD160_ASM -DAES_ASM -DVPAES_ASM -DWHIRLPOOL_ASM
DGHASH_ASM -c -o obj_xref.o obj_xref.c
ar r ../../libcrypto.a o_names.o obj_dat.o obj_lib.o obj_err.o obj_xref.o
ar: ../../libcrypto.a is a fat file (use libtool(1) or lipo(1) and ar(1) on it)
ar: ../../libcrypto.a: Inappropriate file type or format
make[2]: *** [lib] Error 1
make[1]: *** [subdirs] Error 1
make: *** [build_crypto] Error 1
Update: The "PROBLEMS" documentation suggests changing two lines in the apps/Makefile and test/Makefile:
"LIBCRYPTO= -L.. -lcrypto"
"LIBSSL=-L -lssl"
to:
"LIBCRYPTO=../libcrypto.a"
"LIBSSL=../libssl.a"
Re-attempting make afterward, the same message was given.
My sincere thanks for the help and comments by jww, Jonathan L. and others gave/made. Should errors persist, I'll continue the search for the missing information and eventually post a solution.
I'm not sure what your problem is. Using XCode 6 (6.1.1, I believe) on Yosemite 10.10.1, I was able to get openssl-1.0.1j from OpenSSL.org and extract it. I then configured it with:
./Configure --prefix=/usr/openssl/openssl-1.0.1j darwin64-x86_64-cc zlib threads shared
With those, I was able to build, test and install without problem. That's pretty close to what you did; I simply have noted the presence of zlib (compression) and requested thread and shared library support — and specified a slightly out-of-the-way location to install it. (The top-level directory specified with --prefix existed but was empty.) I tried adding sctp to the configuration options, but no dice — an SCTP header is missing, so I didn't bother to try further.
I've been tring to build portmidi on OSX 10.8.2
http://sourceforge.net/apps/trac/portmedia/wiki/Installing%20portmidi%20on%20Mac
Anyway, the README tells me to first use the command:
make -f pm_mac/Makefile.osx
but bash returns the following error message:
[~/Desktop/portmedia/portmidi]
DanMoore -> make -f pm_mac/Makefile.osx
rm -f CMakeCache.txt
mkdir -p Release
cd Release; cmake .. -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release
-- The C compiler identification is GNU 4.2.1
-- The CXX compiler identification is Clang 4.0.0
-- Checking whether C compiler has -isysroot
-- Checking whether C compiler has -isysroot - yes
-- Checking whether C compiler supports OSX deployment target flag
-- Checking whether C compiler supports OSX deployment target flag - yes
-- Check for working C compiler: /usr/bin/gcc
-- Check for working C compiler: /usr/bin/gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - failed
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - failed
-- SYSROOT: /Developer/SDKs/MacOSX10.5.sdk
-- DEFAULT_DEBUG_FLAGS not nil: -g
-- SYSROOT: /Developer/SDKs/MacOSX10.5.sdk
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/DanMoore/Desktop/portmedia/portmidi/Release
cd Release; make
Scanning dependencies of target pmjni
[ 3%] Building C object pm_common/CMakeFiles/pmjni.dir/__/pm_mac/pmmacosxcm.c.o
llvm-gcc-4.2: error trying to exec '/usr/bin/../llvm-gcc-4.2/bin/powerpc-apple-darwin11-llvm-gcc-4.2': execvp: No such file or directory
lipo: can't figure out the architecture type of: /var/folders/y4/p_kjk8692z73xy4nhwx6h_100000gn/T//cc73yejt.out
make[3]: *** [pm_common/CMakeFiles/pmjni.dir/__/pm_mac/pmmacosxcm.c.o] Error 255
make[2]: *** [pm_common/CMakeFiles/pmjni.dir/all] Error 2
make[1]: *** [all] Error 2
make: *** [all] Error 2
I wasn't expecting an easy build, but these errors look foreign to me.
Can anyone explain whats going on??
I'm trying to render a library file for simple C programs. (.a or .la)
Thanks in advance to anyone who takes a look!!