Other Parts Discussed in Thread: SYSBIOS
Hi,
I am trying to initialize CMAKE to work with gcc 4.9 for the TI-RTOS with the VSDK.
I created a CMAKE configuration file and run the CMAKE to configure everything. In my code pthread library is a must so CMAKE is looking for it but fails as follows:
cmake .. -DCMAKE_BUILD_TYPE=Release ... -DCMAKE_TOOLCHAIN_FILE="../build_tools/cmake/arm32-toolchain.cmake"
-- The C compiler identification is GNU 4.9.3
-- The CXX compiler identification is GNU 4.9.3
-- Check for working C compiler: ../PROCESSOR_SDK_VISION_03_08_00_00/gcc-arm-none-eabi-4_9-2015q3/bin/arm-none-eabi-gcc
-- Check for working C compiler: ../PROCESSOR_SDK_VISION_03_08_00_00/gcc-arm-none-eabi-4_9-2015q3/bin/arm-none-eabi-gcc -- 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: ../PROCESSOR_SDK_VISION_03_08_00_00/gcc-arm-none-eabi-4_9-2015q3/bin/arm-none-eabi-g++
-- Check for working CXX compiler: ../PROCESSOR_SDK_VISION_03_08_00_00/gcc-arm-none-eabi-4_9-2015q3/bin/arm-none-eabi-g++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Code Coverage NOT found
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Check if compiler accepts -pthread
-- Check if compiler accepts -pthread - no
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - not found
CMake Error at /usr/share/cmake-3.16/Modules/FindPackageHandleStandardArgs.cmake:146 (message):
Could NOT find Threads (missing: Threads_FOUND)
Call Stack (most recent call first):
/usr/share/cmake-3.16/Modules/FindPackageHandleStandardArgs.cmake:393 (_FPHSA_FAILURE_MESSAGE)
/usr/share/cmake-3.16/Modules/FindThreads.cmake:220 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
CMakeLists.txt:213 (find_package)
It seems that the compiler does not support pthread: "-- Check if compiler accepts -pthread - no"
The compiler I am version is as follows, as you can see it says --disable-threads:
gcc-arm-none-eabi-4_9-2015q3/bin/arm-none-eabi-gcc -v
Using built-in specs.
COLLECT_GCC=/home/eyesight/PROCESSOR_SDK_VISION_03_08_00_00/gcc-arm-none-eabi-4_9-2015q3/bin/arm-none-eabi-gcc
COLLECT_LTO_WRAPPER=/home/eyesight/PROCESSOR_SDK_VISION_03_08_00_00/gcc-arm-none-eabi-4_9-2015q3/bin/../lib/gcc/arm-none-eabi/4.9.3/lto-wrapper
Target: arm-none-eabi
Configured with: /home/build/work/GCC-4-9-build/src/gcc/configure --target=arm-none-eabi --prefix=/home/build/work/GCC-4-9-build/install-native --libexecdir=/home/build/work/GCC-4-9-build/install-native/lib --infodir=/home/build/work/GCC-4-9-build/install-native/share/doc/gcc-arm-none-eabi/info --mandir=/home/build/work/GCC-4-9-build/install-native/share/doc/gcc-arm-none-eabi/man --htmldir=/home/build/work/GCC-4-9-build/install-native/share/doc/gcc-arm-none-eabi/html --pdfdir=/home/build/work/GCC-4-9-build/install-native/share/doc/gcc-arm-none-eabi/pdf --enable-languages=c,c++ --enable-plugins --disable-decimal-float --disable-libffi --disable-libgomp --disable-libmudflap --disable-libquadmath --disable-libssp --disable-libstdcxx-pch --disable-nls --disable-shared --disable-threads --disable-tls --with-gnu-as --with-gnu-ld --with-newlib --with-headers=yes --with-python-dir=share/gcc-arm-none-eabi --with-sysroot=/home/build/work/GCC-4-9-build/install-native/arm-none-eabi --build=i686-linux-gnu --host=i686-linux-gnu --with-gmp=/home/build/work/GCC-4-9-build/build-native/host-libs/usr --with-mpfr=/home/build/work/GCC-4-9-build/build-native/host-libs/usr --with-mpc=/home/build/work/GCC-4-9-build/build-native/host-libs/usr --with-isl=/home/build/work/GCC-4-9-build/build-native/host-libs/usr --with-cloog=/home/build/work/GCC-4-9-build/build-native/host-libs/usr --with-libelf=/home/build/work/GCC-4-9-build/build-native/host-libs/usr --with-host-libstdcxx='-static-libgcc -Wl,-Bstatic,-lstdc++,-Bdynamic -lm' --with-pkgversion='GNU Tools for ARM Embedded Processors' --with-multilib-list=armv6-m,armv7-m,armv7e-m,cortex-m7,armv7-r
Thread model: single
gcc version 4.9.3 20150529 (release) [ARM/embedded-4_9-branch revision 227977] (GNU Tools for ARM Embedded Processors)
When I search for pthread in both the GCC and the SDK I cannot find any libraries or shared object though I do find a source code
CMAKE version used: 3.16.3
How can I solve this issue?
Is this the wrong compiler that I am using?
Thanks.