Unix & Linux Stack Exchange
Q&A for users of Linux, FreeBSD and other Unix-like operating systems
Latest Questions
3
votes
1
answers
2902
views
How do you specify the pkg-config path when compiling something with cmake?
I want to build ffmpeg with support for the av1 codec on CentOS 7. I start by following the instructions [here][1]: git clone https://aomedia.googlesource.com/aom mkdir aom_build cd aom_build cmake ../aom make sudo make install This writes a file to `/usr/local/lib64/pkgconfig/aom.pc`. When I later...
I want to build ffmpeg with support for the av1 codec on CentOS 7.
I start by following the instructions here :
git clone https://aomedia.googlesource.com/aom
mkdir aom_build
cd aom_build
cmake ../aom
make
sudo make install
This writes a file to
/usr/local/lib64/pkgconfig/aom.pc
.
When I later clone ffmpeg's git repo and try to run ./configure --enable-libaom ...
, it complains that pkg-config can't find the aom.pc file.
This is because if I run pkg-config --variable pc_path pkg-config
, I can see that pkg-config only checks here:
/usr/lib64/pkgconfig:/usr/share/pkgconfig
It doesn't look in /usr/local/lib64/pkgconfig
, where aom.pc is.
So far, the only fix I've come up with is to run this instead in ffmpeg's git directory:
PKG_CONFIG_PATH=$PKG_CONFIG_PATH/usr/local/lib64/pkgconfig: ./configure --enable-libaom ...
This works, but I'd rather just tell libaom to write aom.pc to /usr/lib64/pkgconfig in the first place.
Is there any way, when building aom, to tell cmake or make to write the aom.pc file to /usr/lib64/pkgconfig instead of /usr/local/lib64/pkgconfig?
In other projects that have a ./configure
step, I've seen it possible to specify this with ./configure --pkgconfigdir=/usr/lib64/pkgconfig
, but the aom project doesn't have a ./configure
script, so I'm not sure what to do here.
Tal
(2252 rep)
Apr 24, 2019, 02:52 PM
• Last activity: Jul 28, 2025, 12:07 AM
0
votes
1
answers
2001
views
colcon can not find my package
I have been writing some ROS2 code in C++ using colcon on Ubuntu 20.04, all has been working fine, up until now. colcon all of a sudden started complaining that it couldn't find my packages. When I run `colcon build --packages-select test` I get the following error ``` WARNING:colcon.colcon_core.pac...
I have been writing some ROS2 code in C++ using colcon on Ubuntu 20.04, all has been working fine, up until now. colcon all of a sudden started complaining that it couldn't find my packages. When I run
colcon build --packages-select test
I get the following error
WARNING:colcon.colcon_core.package_selection:ignoring unknown package 'test' in --packages-select
My test package is still in the ~ros/dev_ws/src
directory. If I create a new package (test2
say), I can build it without error.
Any help would be greatly appreciated
stew
(1 rep)
Oct 28, 2020, 02:12 AM
• Last activity: Jun 20, 2025, 05:04 AM
4
votes
1
answers
2443
views
Cross-compiling and CMake
I am trying to cross-compile [CGAL](http://www.cgal.org) on an amd64 Linux machine to the ARM architecture. CGAL uses [CMake](http://www.cmake.org/) for building. CGAL has several dependencies, including [GMP](http://gmplib.org/) and [MPFR](http://www.mpfr.org/) libraries. When CMake runs, it needs...
I am trying to cross-compile [CGAL](http://www.cgal.org) on an amd64 Linux machine to the ARM architecture. CGAL uses [CMake](http://www.cmake.org/) for building.
CGAL has several dependencies, including [GMP](http://gmplib.org/) and [MPFR](http://www.mpfr.org/) libraries. When CMake runs, it needs to determine the versions of these dependencies. To find the versions, CMake compiles and runs several small test programs that simply link with these libraries and output their versions. This works fine during a regular, non-cross-compiled build.
But when I cross-compile, naturally these test programs will not run on the host machine. Here's an example:
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTryCompileExec.dir/link.txt --verbose=1
/opt/Company/ArmTools_GCC435_GLIBC_Q3_2011/bin/arm-rc-linux-gnueabi-g++ -fPIC CMakeFiles/cmTryCompileExec.dir/print_GMP_version.cpp.o -o cmTryCompileExec -rdynamic /home/pmw/Software-Engineering/build/Lib/mpir-2.6.0/arm/lib/libgmp.a
gmake: Leaving directory `/home/pmw/Software-Engineering/SW_Tools/CGAL-4.1/CMakeFiles/CMakeTmp'
/home/pmw/Software-Engineering/SW_Tools/CGAL-4.1/CMakeFiles/CMakeTmp/cmTryCompileExec: /home/pmw/Software-Engineering/SW_Tools/CGAL-4.1/CMakeFiles/CMakeTmp/cmTryCompileExec: cannot execute binary file
-- USING GMP_VERSION = 'unknown'
I found [a suggestion](http://www.cmake.org/Wiki/BuildingPythonWithCMake#Cross_compiling_Python_for_another_platform) (if I understand it correctly) to specify the GMP version explicitly; that should keep CMake from trying and failing to determine it. So I created a file containing this line:
SET(GMP_VERSION 2.6.0)
and invoked CMake with the argument
-C path/to/my/file
. But that didn't change anything. Then I tried invoking CMake with the argument -DCMAKE_TOOLCHAIN_FILE=/path/to/my/file
instead. Again, no effect. I see that CMake is able to find and parse this file, however.
So, how can I convince CMake to not try to build and execute cross-compiled programs on the host machine?
I apologize in advance if this Unix & Linux StackExchange site is not the best place for this question. Last week [I posted my question on the CGAL mailing list](https://sympa.inria.fr/sympa/arc/cgal-discuss/2009-01/msg00203.html) (which is now the top three Google results for "cross-compiling cgal"; I am famous!) but received no replies.
Philip
(293 rep)
Nov 19, 2012, 11:19 PM
• Last activity: May 30, 2025, 05:03 PM
2
votes
1
answers
2724
views
libzip Linux cross-compile configuration
I am trying to cross compile **libzip-1.5.1** having previously successfully complied **zlib-1.2.11** (these are required by libzip and I have installed in a local home path), but I am experiencing problems with the cmake's process. The script I use to build and compile (from a build directory into...
I am trying to cross compile **libzip-1.5.1** having previously successfully complied **zlib-1.2.11** (these are required by libzip and I have installed in a local home path), but I am experiencing problems with the cmake's process.
The script I use to build and compile (from a build directory into the libzip's sources folder) is the following:
#!/bin/sh
PREFIX=${PWD}/install
CCPATH=/opt/arm64/gcc-linaro-6.3.1-2017.02-rc2-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf
ZLIBPATH=${PWD}/../../zlib-1.2.11/
# here is where zlib is installed
# ZLIBINSTALLEDPATH contains include, lib, share directories
ZLIBINSTALLEDPATH=${ZLIBPATH}/build_armhf64/install/
export PKG_CONFIG_PATH="${PKG_CONFIG_PATH}:${ZLIBINSTALLEDPATH}/lib/pkgconfig/"
export LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:${ZLIBINSTALLEDPATH}/lib/"
export CMAKE_AR=${CCPATH}-ar
export CC=${CCPATH}-gcc
export CXX=${CCPATH}-g++
export CMAKE_LINKER=${CCPATH}-ld
export CMAKE_RANLIB=${CCPATH}-ranlib
export CMAKE_OBJDUMP=${CCPATH}-objdump
export CMAKE_OBJCOPY=${CCPATH}-objcopy
export CMAKE_STRIP=${CCPATH}-strip
#export CMAKE_READELF=${CCPREFIX}-readelf
export CMAKE_NM=${CCPATH}-nm
cmake -DCMAKE_INSTALL_PREFIX=${PREFIX} \
-DZLIB_INCLUDE_DIR=${ZLIBINSTALLEDPATH}/include/ \
-DZLIB_LIBRARY=${ZLIBINSTALLEDPATH}/lib/ \
../
make -j 8
But at 94 % of building process, I get the following errors:
[ 92%] Building C object regress/CMakeFiles/tryopen.dir/tryopen.c.o
[ 94%] Building C object src/CMakeFiles/zipcmp.dir/zipcmp.c.o
[ 94%] Linking C executable add_from_filep
[ 94%] Linking C executable fopen_unchanged
[ 94%] Linking C executable tryopen
[ 94%] Building C object regress/CMakeFiles/hole.dir/source_hole.c.o
[ 94%] Linking C executable zipmerge
../lib/libzip.so.5.0: undefined reference to `inflate'
../lib/libzip.so.5.0: undefined reference to `crc32'
../lib/libzip.so.5.0: undefined reference to `zError'
../lib/libzip.so.5.0: undefined reference to `deflate'
../lib/libzip.so.5.0: undefined reference to `deflateInit2_'
../lib/libzip.so.5.0: undefined reference to `inflateEnd'
../lib/libzip.so.5.0: undefined reference to `deflateEnd'
../lib/libzip.so.5.0: undefined reference to `inflateInit2_'
collect2: error: ld returned 1 exit status
regress/CMakeFiles/add_from_filep.dir/build.make:95: recipe for target 'regress/add_from_filep' failed
make: *** [regress/add_from_filep] Error 1
CMakeFiles/Makefile2:726: recipe for target 'regress/CMakeFiles/add_from_filep.dir/all' failed
make: *** [regress/CMakeFiles/add_from_filep.dir/all] Error 2
make: *** Waiting for unfinished jobs....
../lib/libzip.so.5.0: undefined reference to `inflate'
../lib/libzip.so.5.0: undefined reference to `crc32'
../lib/libzip.so.5.0: undefined reference to `zError'
../lib/libzip.so.5.0: undefined reference to `deflate'
../lib/libzip.so.5.0: undefined reference to `deflateInit2_'
../lib/libzip.so.5.0: undefined reference to `inflateEnd'
../lib/libzip.so.5.0: undefined reference to `deflateEnd'
../lib/libzip.so.5.0: undefined reference to `inflateInit2_'
collect2: error: ld returned 1 exit status
regress/CMakeFiles/tryopen.dir/build.make:95: recipe for target 'regress/tryopen' failed
make: *** [regress/tryopen] Error 1
CMakeFiles/Makefile2:800: recipe for target 'regress/CMakeFiles/tryopen.dir/all' failed
make: *** [regress/CMakeFiles/tryopen.dir/all] Error 2
../lib/libzip.so.5.0: undefined reference to `inflate'
../lib/libzip.so.5.0: undefined reference to `crc32'
../lib/libzip.so.5.0: undefined reference to `zError'
../lib/libzip.so.5.0: undefined reference to `deflate'
../lib/libzip.so.5.0: undefined reference to `deflateInit2_'
../lib/libzip.so.5.0: undefined reference to `inflateEnd'
../lib/libzip.so.5.0: undefined reference to `deflateEnd'
../lib/libzip.so.5.0: undefined reference to `inflateInit2_'
collect2: error: ld returned 1 exit status
regress/CMakeFiles/fopen_unchanged.dir/build.make:95: recipe for target 'regress/fopen_unchanged' failed
make: *** [regress/fopen_unchanged] Error 1
CMakeFiles/Makefile2:615: recipe for target 'regress/CMakeFiles/fopen_unchanged.dir/all' failed
make: *** [regress/CMakeFiles/fopen_unchanged.dir/all] Error 2
[ 94%] Building C object regress/CMakeFiles/ziptool_regress.dir/source_hole.c.o
../lib/libzip.so.5.0: undefined reference to `inflate'
../lib/libzip.so.5.0: undefined reference to `crc32'
../lib/libzip.so.5.0: undefined reference to `zError'
../lib/libzip.so.5.0: undefined reference to `deflate'
../lib/libzip.so.5.0: undefined reference to `deflateInit2_'
../lib/libzip.so.5.0: undefined reference to `inflateEnd'
../lib/libzip.so.5.0: undefined reference to `deflateEnd'
../lib/libzip.so.5.0: undefined reference to `inflateInit2_'
collect2: error: ld returned 1 exit status
src/CMakeFiles/zipmerge.dir/build.make:95: recipe for target 'src/zipmerge' failed
make: *** [src/zipmerge] Error 1
CMakeFiles/Makefile2:432: recipe for target 'src/CMakeFiles/zipmerge.dir/all' failed
make: *** [src/CMakeFiles/zipmerge.dir/all] Error 2
[ 94%] Linking C executable zipcmp
[ 94%] Linking C executable ziptool
[ 96%] Linking C executable hole
CMakeFiles/zipcmp.dir/zipcmp.c.o.:. /Inlib /functionlibzip.so.5.0 :` compute_crcundefined' :reference
zipcmp.cto: (`.inflatetext'+
0x4a0.).:/ libundefined/ libzip.so.5.0reference: toundefined `referencecrc32 'to
zipcmp.c`:crc32('.
text.+.0x53e/)lib:/ libzip.so.5.0undefined: referenceundefined toreference
tocrc32 '
zErrorCMakeFiles'/
zipcmp.dir./.zipcmp.c.o/:lib /Inlibzip.so.5.0 :function undefined` test_filereference':
zipcmp.cto: (`.deflatetext'+
0x1494.).:/ libundefined/ libzip.so.5.0reference: toundefined `referencecrc32'
zipcmp.c:(.text+0x14fe): undefined reference to `crc32'
.. /tolib /`libzip.so.5.0deflateInit2_:'
undefined. .reference/ libto/ libzip.so.5.0`:inflate 'undefined
.reference. /tolib /`libzip.so.5.0inflateEnd:'
undefined. .reference/ libto/ libzip.so.5.0`:zError 'undefined
.reference. /tolib /libzip.so.5.0deflateEnd:' undefined reference to
deflate'
.
../.lib//liblibzip.so.5.0/:libzip.so.5.0 :undefined undefinedreference referenceto to deflateInit2_
'inflateInit2_
'.
./lib/libzip.so.5.0: undefined reference to `inflateEnd'
../lib/libzip.so.5.0: undefined reference to `deflateEnd'
../lib/libzip.so.5.0: undefined reference to `collect2: error: ld returned 1 exit status
inflateInit2_'
collect2: error: ld returned 1 exit status
src/CMakeFiles/ziptool.dir/build.make:95: recipe for target 'src/ziptool' failed
make: *** [src/ziptool] Error 1
src/CMakeFiles/zipcmp.dir/build.make:95: recipe for target 'src/zipcmp' failed
make: *** [src/zipcmp] Error 1
CMakeFiles/Makefile2:469: recipe for target 'src/CMakeFiles/ziptool.dir/all' failed
make: *** [src/CMakeFiles/ziptool.dir/all] Error 2
CMakeFiles/Makefile2:395: recipe for target 'src/CMakeFiles/zipcmp.dir/all' failed
make: *** [src/CMakeFiles/zipcmp.dir/all] Error 2
../lib/libzip.so.5.0: undefined reference to `inflate'
../lib/libzip.so.5.0: undefined reference to `crc32'
../lib/libzip.so.5.0: undefined reference to `zError'
../lib/libzip.so.5.0: undefined reference to `deflate'
../lib/libzip.so.5.0: undefined reference to `deflateInit2_'
../lib/libzip.so.5.0: undefined reference to `inflateEnd'
../lib/libzip.so.5.0: undefined reference to `deflateEnd'
../lib/libzip.so.5.0: undefined reference to `inflateInit2_'
collect2: error: ld returned 1 exit status
[ 98%] Linking C executable ziptool_regress
regress/CMakeFiles/hole.dir/build.make:121: recipe for target 'regress/hole' failed
make: *** [regress/hole] Error 1
CMakeFiles/Makefile2:652: recipe for target 'regress/CMakeFiles/hole.dir/all' failed
make: *** [regress/CMakeFiles/hole.dir/all] Error 2
../lib/libzip.so.5.0: undefined reference to `inflate'
../lib/libzip.so.5.0: undefined reference to `crc32'
../lib/libzip.so.5.0: undefined reference to `zError'
../lib/libzip.so.5.0: undefined reference to `deflate'
../lib/libzip.so.5.0: undefined reference to `deflateInit2_'
../lib/libzip.so.5.0: undefined reference to `inflateEnd'
../lib/libzip.so.5.0: undefined reference to `deflateEnd'
../lib/libzip.so.5.0: undefined reference to `inflateInit2_'
collect2: error: ld returned 1 exit status
regress/CMakeFiles/ziptool_regress.dir/build.make:121: recipe for target 'regress/ziptool_regress' failed
make: *** [regress/ziptool_regress] Error 1
CMakeFiles/Makefile2:689: recipe for target 'regress/CMakeFiles/ziptool_regress.dir/all' failed
make: *** [regress/CMakeFiles/ziptool_regress.dir/all] Error 2
Makefile:138: recipe for target 'all' failed
make: *** [all] Error 2
It seems that cmake cannot find the compiled zlib libraries, even if the paths seems to be well configured (or not ?).
Do some has experienced similar issues with libzip ?
Is there any addition cmake's macro that would solve this issue ?
**---- UPDATE ----**
----------
I actually get rid of this error suppressing building task for **zipcmp**, **zipmerge** and **ziptool** (since I don't need them) commenting the lines:
#ADD_EXECUTABLE(zipcmp zipcmp.c ${SRC_EXTRA_FILES})
#TARGET_LINK_LIBRARIES(zipcmp zip)
#INSTALL(TARGETS zipcmp RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
#ADD_EXECUTABLE(zipmerge zipmerge.c ${SRC_EXTRA_FILES})
#TARGET_LINK_LIBRARIES(zipmerge zip)
#INSTALL(TARGETS zipmerge RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
#ADD_EXECUTABLE(ziptool ziptool.c ${SRC_EXTRA_FILES})
#TARGET_LINK_LIBRARIES(ziptool zip)
#INSTALL(TARGETS ziptool RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
into src/CMakeLists.txt
.
Then I compiled the libs using make -j 8 zip
and then make install/fast
.
It still returns the error
Install the project...
-- Install configuration: ""
-- Installing: /home/simo/adtdev/Var_libs/libzip-1.5.1/build_armhf64/install/lib/pkgconfig/libzip.pc
-- Installing: /home/simo/adtdev/Var_libs/libzip-1.5.1/build_armhf64/install/include/zipconf.h
-- Installing: /home/simo/adtdev/Var_libs/libzip-1.5.1/build_armhf64/install/include/zip.h
-- Installing: /home/simo/adtdev/Var_libs/libzip-1.5.1/build_armhf64/install/lib/libzip.a
CMake Error at man/cmake_install.cmake:36 (file):
file INSTALL cannot find
"/home/simo/adtdev/Var_libs/libzip-1.5.1/build_armhf64/man/ZIP_SOURCE_GET_ARGS.3".
Call Stack (most recent call first):
cmake_install.cmake:46 (include)
Makefile:89: recipe for target 'install/fast' failed
make: *** [install/fast] Error 1
but I don't care about it since I have the libs and headers installed in the install dir, and this is what I need.
xyx
(797 rep)
Nov 8, 2018, 01:41 PM
• Last activity: May 23, 2025, 11:06 AM
2
votes
1
answers
3256
views
ERROR: Bitbake couldn't find CMakelists.txt after extraction (Yocto)
I am trying to compile Ceres solver on a yocto build (for Intel Aero drone). I earlier tried pulling using the git repository at https://ceres-solver.googlesource.com/ceres-solver/ but could not get it to fetch. So I downloaded the tar.gz file myself, uploaded it on a public domain I own and tried t...
I am trying to compile Ceres solver on a yocto build (for Intel Aero drone).
I earlier tried pulling using the git repository at https://ceres-solver.googlesource.com/ceres-solver/ but could not get it to fetch. So I downloaded the tar.gz file myself, uploaded it on a public domain I own and tried to compile.
Here is how my bb file looks as of now.
LICENSE = "CLOSED"
LIC_FILES_CHKSUM = ""
DEPENDS = "glog gcc libeigen"
SRC_URI = "http://sidj.in/wp-content/uploads/2017/06/ceres-solver-41455566ac633e55f222bce7c4d2cb4cc33d5c72.tar.gz "
SRC_URI[md5sum] = "6f24d5639bbe738e6f8ca5d7a129400e"
SRC_URI[sha256sum] = "005ed7405350767f22164d9fff93b3613207eeef9cbb56afbd02335542360b16"
PV = "1.0"
S = "${WORKDIR}/ceres-cmake"
inherit cmake pkgconfig
# Specify any options you want to pass to cmake using EXTRA_OECMAKE:
EXTRA_OECMAKE = ""
Now I see the download getting completed, but upon running the bitbake ceres command, I get an error saying that CMakelists.txt could not be found, while it is clearly in the tar.gz file. I looked at other recipes that seem to work, and feel that the do_unpack step is not the one failing. The output of the console is:
Loading cache...done.
Loaded 2790 entries from dependency cache.
Parsing recipes...done.
Parsing of 2225 .bb files complete (2219 cached, 6 parsed). 2794 targets, 109 skipped, 0 masked, 0 errors.
NOTE: Resolving any missing task queue dependencies
Build Configuration:
BB_VERSION = "1.30.0"
BUILD_SYS = "x86_64-linux"
NATIVELSBSTRING = "universal"
TARGET_SYS = "x86_64-poky-linux"
MACHINE = "intel-aero"
DISTRO = "poky-aero"
DISTRO_VERSION = "1.4.0-dev"
TUNE_FEATURES = "m64 corei7"
TARGET_FPU = ""
meta
meta-poky
meta-yocto-bsp = "HEAD:cca8dd15c8096626052f6d8d25ff1e9a606104a3"
meta-qt4 = "HEAD:fc9b050569e94b5176bed28b69ef28514e4e4553"
meta-qt5 = "HEAD:9aa870eecf6dc7a87678393bd55b97e21033ab48"
meta-uav = "HEAD:0f9395139b6a3c3f0f2c18a6a87f4048d0ca1a4f"
meta-ros = "HEAD:4258013ec33f5ed2b0c9be12fb5902fe918fe98b"
meta-intel-realsense = "HEAD:82e9dbfd8783292f42f4a6fcc7bd5b8a6b1c567a"
meta-intel-aero = "HEAD:1d7e341ff35aa903c37491f94677bdacc9427f6e"
meta-oe
meta-python
meta-networking = "HEAD:55c8a76da5dc099a7bc3838495c672140cedb78e"
meta-cmu-rasl = "master:39e39bf41e915323bf7cb70cad50e67cb8b1b90e"
meta-dense-visual-tracking = "HEAD:cca8dd15c8096626052f6d8d25ff1e9a606104a3"
meta-intel = "HEAD:1f8dd1b00ce9c72d73583c405ec392690d9b08b7"
NOTE: Preparing RunQueue
NOTE: Executing SetScene Tasks
NOTE: Running setscene task 184 of 202 (/home/thesidjway/rasl_ws/src/intel-aero/poky/meta-dense-visual-tracking/recipes-dry/ceres/ceres.bb, do_populate_lic_setscene)
NOTE: recipe ceres-1.0-r0: task do_populate_lic_setscene: Started
NOTE: recipe ceres-1.0-r0: task do_populate_lic_setscene: Succeeded
NOTE: Executing RunQueue Tasks
NOTE: Running task 711 of 722 (ID: 4, /home/thesidjway/rasl_ws/src/intel-aero/poky/meta-dense-visual-tracking/recipes-dry/ceres/ceres.bb, do_fetch)
NOTE: recipe ceres-1.0-r0: task do_fetch: Started
NOTE: recipe ceres-1.0-r0: task do_fetch: Succeeded
NOTE: Running task 712 of 722 (ID: 0, /home/thesidjway/rasl_ws/src/intel-aero/poky/meta-dense-visual-tracking/recipes-dry/ceres/ceres.bb, do_unpack)
NOTE: recipe ceres-1.0-r0: task do_unpack: Started
NOTE: recipe ceres-1.0-r0: task do_unpack: Succeeded
NOTE: Running task 713 of 722 (ID: 1, /home/thesidjway/rasl_ws/src/intel-aero/poky/meta-dense-visual-tracking/recipes-dry/ceres/ceres.bb, do_patch)
NOTE: recipe ceres-1.0-r0: task do_patch: Started
NOTE: recipe ceres-1.0-r0: task do_patch: Succeeded
NOTE: Running task 714 of 722 (ID: 5, /home/thesidjway/rasl_ws/src/intel-aero/poky/meta-dense-visual-tracking/recipes-dry/ceres/ceres.bb, do_generate_toolchain_file)
NOTE: recipe ceres-1.0-r0: task do_generate_toolchain_file: Started
NOTE: recipe ceres-1.0-r0: task do_generate_toolchain_file: Succeeded
NOTE: Running task 716 of 722 (ID: 6, /home/thesidjway/rasl_ws/src/intel-aero/poky/meta-dense-visual-tracking/recipes-dry/ceres/ceres.bb, do_configure)
NOTE: recipe ceres-1.0-r0: task do_configure: Started
Log data follows:
| DEBUG: Executing python function sysroot_cleansstate
| DEBUG: Python function sysroot_cleansstate finished
| DEBUG: Executing shell function do_configure
| CMake Error: The source directory "/home/thesidjway/rasl_ws/src/intel-aero/poky/build/tmp/work/x86_64-linux/ceres/1.0-r0/ceres-cmake" does not appear to contain CMakeLists.txt.
| Specify --help for usage, or press the help button on the CMake GUI.
| WARNING: exit code 1 from a shell command.
| ERROR: Function failed: do_configure (log file is located at /home/thesidjway/rasl_ws/src/intel-aero/poky/build/tmp/work/x86_64-linux/ceres/1.0-r0/temp/log.do_configure.9002)
NOTE: recipe ceres-1.0-r0: task do_configure: Failed
NOTE: Tasks Summary: Attempted 716 tasks of which 711 didn't need to be rerun and 1 failed.
Summary: 1 task failed:
/home/thesidjway/rasl_ws/src/intel-aero/poky/meta-dense-visual-tracking/recipes-dry/ceres/ceres.bb, do_configure
Summary: There was 1 ERROR message shown, returning a non-zero exit code.
Am I doing something stupid or wrong?
Siddharth Jha
(21 rep)
May 31, 2017, 09:05 PM
• Last activity: May 8, 2025, 12:03 PM
0
votes
3
answers
75
views
Does CMake/make have the ability to make my Linux operating system unstable?
30 years ago, I've started `C++`. Mostly under DOS, `Windows 3.1` and `95`. I've wrote some for 10 years. Then `Java` replaced it at work, for about 20 years. Now `C++` in coming back in the front of the scene. I'm enjoying it but the whole environment has changed. It's with `stdlib` that I have to...
30 years ago, I've started
C++
. Mostly under DOS, Windows 3.1
and 95
. I've wrote some for 10 years. Then Java
replaced it at work, for about 20 years. Now C++
in coming back in the front of the scene. I'm enjoying it but the whole environment has changed. It's with stdlib
that I have to work now, and learn some changes that came from C++ 98
where I left it, up to C++ 23
where it is now.
My main troubles, however, aren't with the language itself. But the CMake
scripts and their complexities that make builds complex to understand, and sometimes: to perform. Generating make
script itself, a lot of sub projects, sometimes being helped by Conan
or another tool. It's difficult to figure all it can do.
But what is making me asking a question in this Unix/Linux S.E. and not StackOverflow, is that I had to generate and adapt a somewhat long C++
project (a generation coming from OpenApi
generator for pistache
server) few months ago.
During some changes I was attempting, I went on trouble with a gir1
library that was generated by an underlying sub project, for a purpose it only knows, whose .so.1
wasn't able to link to .so
or something like that, and where I was figuring that the underlying make
scripts could be able/willing to put their .so
binary to /usr/local/bin
or to some place where it could attempt to replace the binary currently used by my Debian 12
.
Or that, if I dared attempting to run my CMake
command with a sudo
, this could happen.
Are my fears true? May I put my OS definitively in trouble with a bad compilation, replacing a genuine component by a dev one? Does such risk exist and, in general, for any project involving make
builder, I have to be careful, Or is there some kind of protection on my operating system that prevent this absolutely?
Marc Le Bihan
(2353 rep)
Mar 30, 2025, 02:50 PM
• Last activity: Apr 26, 2025, 07:22 AM
2
votes
1
answers
2105
views
Installing KDE4 development files in 2020
I want to compile the [Oxygen-transparent][1] project which requires KDE4. I've tried building and installing the [KDELibs 4 Support][2] package , but still there's no `kde4-config` in my system. Here's the output of running `CMake` in the Oxygen-transparent repo : ``` CMake Error at /usr/share/cmak...
I want to compile the Oxygen-transparent project which requires KDE4. I've tried building and installing the KDELibs 4 Support package , but still there's no
kde4-config
in my system.
Here's the output of running CMake
in the Oxygen-transparent repo :
CMake Error at /usr/share/cmake-3.10/Modules/FindKDE4.cmake:60 (message):
ERROR: Could not find KDE4 kde4-config
Where can I find that file ? Is it possible at all to install such an old program in newer KDEs ?
By the way I use KDE Neon dev edition 5.19.
Thanks in advance.
Parsa Mousavi
(1130 rep)
Jun 7, 2020, 09:17 PM
• Last activity: Apr 23, 2025, 07:10 AM
1
votes
3
answers
6357
views
Passing options to cmake in bash script
I am trying to write a script that will build multiple cppUtes lib.a files for different sanitizers with a bash script. When trying to pass the compiler flags as variables to cmake I am unable to correctly format them. Please see the brief example below. ```bash #!/bin/sh set -euo pipefail COMMON_OP...
I am trying to write a script that will build multiple cppUtes lib.a files for different sanitizers with a bash script.
When trying to pass the compiler flags as variables to cmake I am unable to correctly format them. Please see the brief example below.
#!/bin/sh
set -euo pipefail
COMMON_OPTS='-fno-common -g -fno-omit-frame-pointer'
ASAN_OPT='-fsanitize=address'
ASAN_C_FLAGS="-DCMAKE_C_FLAGS=\"$ASAN_OPT $COMMON_OPTS\""
echo "cmake ../ $ASAN_C_FLAGS"
cmake ../ $ASAN_C_FLAGS
make
The output of echo is what I expect, and what works for setting flags when not running in a bash script:
cmake ../ -DCMAKE_C_FLAGS="-fsanitize=address -fno-common -g -fno-omit-frame-pointer"
However, when I run the script cmake is not interpreting the flags correctly. They do not appear in the cmake flags that are displayed during the configuration:
CppUTest CFLAGS: -include "/home/ubuntu/cpputest/include/CppUTest/MemoryLeakDetectorMallocMacros.h" -Wall -Wextra -pedantic -Wshadow -Wswitch-default -Wswitch-enum -Wconversion -Wsign-conversion -Wno-padded -Wno-long-long -Wstrict-prototypes
and finally, I get the following compilation error from make:
c++: error: unrecognized argument to '-fsanitize=' option: 'address -g -fno-omit-frame-pointer'
Any help would be kindly appreciated.
Buoy
(111 rep)
Jan 8, 2020, 02:05 AM
• Last activity: Feb 25, 2025, 04:14 PM
0
votes
1
answers
174
views
How can uninstall a built package completely?
I install taskwarrior this way: ```sh tar xzf task-3.3.0.tar.gz cd task-3.3.0 cmake -S . -B build -DCMAKE_BUILD_TYPE=Release . cmake --build build sudo cmake --install build cd .. ; rm -r task-3.3.0.tar.gz ``` I can check it with `checkinstall`: sudo checkinstall checkinstall 1.6.3, Copyright 2010 F...
I install taskwarrior this way:
tar xzf task-3.3.0.tar.gz
cd task-3.3.0
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release .
cmake --build build
sudo cmake --install build
cd .. ; rm -r task-3.3.0.tar.gz
I can check it with checkinstall
:
sudo checkinstall
checkinstall 1.6.3, Copyright 2010 Felipe Eduardo Sanchez Diaz Duran
This software is released under the GNU GPL.
*****************************************
**** Debian package creation selected ***
*****************************************
This package will be built according to these values:
0 - Maintainer: [ root@debian ]
1 - Summary: [ taskwarrior ]
2 - Name: [ task ]
3 - Version: [ 3.3.0 ]
4 - Release: [ 1 ]
5 - License: [ GPL ]
6 - Group: [ checkinstall ]
7 - Architecture: [ amd64 ]
8 - Source location: [ task-3.3.0 ]
9 - Alternate source location: [ ]
10 - Requires: [ ]
11 - Recommends: [ ]
12 - Suggests: [ ]
13 - Provides: [ task ]
14 - Conflicts: [ ]
15 - Replaces: [ ]
How can remove it completely?
sudo make uninstall
make: *** No rule to make target 'uninstall'. Stop.
Romeo Ninov's suggestion can't work!
cmake -n --install build
CMake Error: Unknown argument --install
CMake Error: Run 'cmake --help' for all supported options.
cmake -n install
CMake Error: Unknown argument -n
CMake Error: Run 'cmake --help' for all supported options.
showkey
(499 rep)
Feb 11, 2025, 02:57 AM
• Last activity: Feb 11, 2025, 09:41 AM
32
votes
3
answers
187419
views
Why is there `No CMAKE_CXX_COMPILER could be found.` and how to solve?
I just installed `cmake` but I'm getting compiler not found error. In trying to build https://gitlab.com/interception/linux/tools on a new Kubuntu installation, running `cmake ..` from the `tools/build` directory returns the error: ``` CMake Error at CMakeLists.txt:3 (project): No CMAKE_CXX_COMPILER...
I just installed
cmake
but I'm getting compiler not found error.
In trying to build https://gitlab.com/interception/linux/tools on a new Kubuntu installation, running cmake ..
from the tools/build
directory returns the error:
CMake Error at CMakeLists.txt:3 (project):
No CMAKE_CXX_COMPILER could be found.
Tell CMake where to find the compiler by setting either the environment
variable "CXX" or the CMake cache entry CMAKE_CXX_COMPILER to the full path
to the compiler, or to the compiler name if it is in the PATH.
What's wrong? I assumed cmake
would be equipped with its compiler, but maybe it needs to be configured before it can be used???
alec
(1928 rep)
Mar 25, 2020, 09:09 PM
• Last activity: Feb 4, 2025, 03:32 PM
1
votes
2
answers
2481
views
Packaging CMake components for Debian
I have a single upstream source package using cmake and I'd like to package it as two binary debian packages. ``` $ tree proj proj/ ├── app1.c ├── app2.c └── CMakeLists.txt ``` Upstream's `CMakeLists.txt` was already written with this in mind. They use the COMPONENTS argument of [`install`](https://...
I have a single upstream source package using cmake and I'd like to package it as two binary debian packages.
$ tree proj
proj/
├── app1.c
├── app2.c
└── CMakeLists.txt
Upstream's CMakeLists.txt
was already written with this in mind. They use the COMPONENTS argument of [install
](https://cmake.org/cmake/help/v3.7/command/install.html)
$ cat proj/CMakeLists.txt
include(GnuInstallDirs)
add_executable(app1 app1.c)
install(
TARGETS app1
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
COMPONENT app1)
add_executable(app2 app2.c)
install(
TARGETS app2
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
COMPONENT app2)
To compile/install locally, it's pretty easy:
$ mkdir build && cd build
$ cmake ../proj -DCMAKE_INSTALL_PREFIX=/usr/local # Configure
$ cmake --build . # Build
$ cmake -DCOMPONENT=app1 -P cmake_install.cmake # Install app1 component
$ cmake -DCOMPONENT=app2 -P cmake_install.cmake # Install app2 component
But how would you build a debian/rules
file for this?
Stewart
(15631 rep)
May 20, 2019, 03:05 PM
• Last activity: Dec 30, 2024, 10:01 AM
1
votes
1
answers
871
views
Using checkinstall in place of sudo cmake?
I've been trying to compile digikam and as part of that process needed to compile jasper. Jasper developers use `cmake`, I wanted to make a .deb package -- in fact was trying to learn how to make a package to share -- and so tried to do this (which errors as below): sudo checkinstall -D "sudo cmake...
I've been trying to compile digikam and as part of that process needed to compile jasper. Jasper developers use
cmake
, I wanted to make a .deb package -- in fact was trying to learn how to make a package to share -- and so tried to do this (which errors as below):
sudo checkinstall -D "sudo cmake --build '/home/username/Downloads/jasper/buildlocal' --target install"
Checkinstall run with sudo returns a "not found" error (end of 4th line) despite the command being passed to it working successfully:
Installing with sudo cmake --build '/home/username/Downloads/jasper/buildlocal' --target install...
========================= Installation results ===========================
/var/tmp/tmp.miGWYgiNzT/installscript.sh: 4: sudo cmake --build '/home/username/Downloads/jasper/buildlocal' --target install: not found
**** Installation failed. Aborting package creation.
Cleaning up...OK
Bye.
To repeat, the command
sudo cmake --build '/home/username/Downloads/jasper/buildlocal' --target install
was successful, but neither sudo checkinstall
, nor sudo cmake
with plain checkinstall, nor using sudo for both, worked.
How can I pass the correct invocation to checkinstall to make a package here. More details of all commands run at my blog, but I feel this is enough to answer the question.
pbhj
(443 rep)
Jan 1, 2022, 10:51 PM
• Last activity: Jul 25, 2024, 01:39 PM
30
votes
4
answers
81401
views
How to compile without optimizations -O0 using CMake
I am using [Scientific Linux][1] (SL). I am trying to compile a project that uses a bunch of C++ (.cpp) files. In the directory `user/project/Build`, I enter `make` to compile and link all the .cpp files. I then have to go to `user/run/` and then type `./run.sh values.txt` To debug with GDB, I have...
I am using Scientific Linux (SL). I am trying to compile a project that uses a bunch of C++ (.cpp) files.
In the directory
user/project/Build
, I enter make
to compile and link all the .cpp files. I then have to go to user/run/
and then type ./run.sh values.txt
To debug with GDB, I have to go to user/run
and then type gdb ../project/Build/bin/Project
and to run, I enter run -Project INPUT/inputfile.txt
. However, I am trying to print out the value of variable using p variablename
.
However, I get the message s1 =
. I have done some research online, and it seems I need to compile without optimizations using -O0
to resolve this. But where do I enter that? In the CMakeLists
? If so, which CMakeLists? The one in project/Build
or project/src/project
?
user4352158
(471 rep)
Feb 28, 2015, 10:08 PM
• Last activity: Jun 24, 2024, 07:12 AM
1
votes
0
answers
3995
views
Compiling CFLAGS in a Yocto Recipe File
**Issue:** I have 2 macros I added in a c file and I have 2 machines. Using Yocto recipe I wish to build the code with specific macros for specific machines. Breaking down the issue in sub parts - **hello.c** ``` // Simple hello.c program #include void main(){ printf("Hello World!\n"); //Introducing...
**Issue:** I have 2 macros I added in a c file and I have 2 machines. Using Yocto recipe I wish to build the code with specific macros for specific machines.
Breaking down the issue in sub parts -
**hello.c**
// Simple hello.c program
#include
void main(){
printf("Hello World!\n");
//Introducing Macro 1 -- abc
#ifdef abc
printf("Day 1\n");
#endif
//Introducing Macro 2 -- xyz
#ifdef xyz
printf("Day 2\n");
#endif
}
**Expected & Observed Output:**
gcc hello.c -o hello
./hello
Hello World!
gcc hello.c -Dabc -o test1
./test1
Hello World!
Day 1
gcc hello.c -Dxyz -o test2
./test2
Hello World!
Day 2
**Makefile Contents:**
obj-m := hello.o
SRC := ${shell pwd}
CFLAGS += -Dabc
all:
${MAKE} -C M=${SRC} ${CFLAGS}
test_install:
${MAKE} -C M=${SRC} ${CFLAGS} test_install
clean:
rm -rf *.o
Have checked the above Makefile contents using cat -e -t Makefile
. It is properly terminated with $ at end of each line.
Since I am using MAKE, it does have the gcc compiler.
In the Makefile I have hardcoded CFLAGS="-Dabc" , intention being if the code is compiled accordingly then I can add ifeq condition to the Makefile handle the other CFLAGS="-Dxyz"
**Recipe File Contents:**
S = "${WORKDIR}/helloworld/hello"
COMPATIBLE_MACHINE = "oldmachine|newmachine"
EXTRA_OEMAKE_oldmachine += "CFLAGS=-Dabc"
EXTRA_OEMAKE_newmachine += "CFLAGS=-Dxyz"
do_compile(){
${EXTRA_OEMAKE}_${MACHINE}
}
The default function of do_compile is to run oe_runmake, I assumed that it will be picking up this CFLAGS which I am trying to pass.
I checked the contents of the log.do_compile under tmp/work/... folder and I do not see the CFLAGS being used.
The above recipe I also re-wrote as
do_compile_append_oldmachine(){
CFLAGS="-Dabc"
}
do_compile_append_newmachine(){
CFLAGS="-Dxyz" #Also tried passing EXTRA_OEMAKE_MACHINE as above
}
This method also, unable to find the CFLAGS part when I check the log.do_compile file under tmp/work/.. directory.
How do I make use the CFLAGS so that it compiles the code as per the specific architecture?
**Misc Details:**
Under the specific meta layer, I have the directory like this.
helloworld
- hello.c
- hello.o
- Makefile
Note: Due to less rep, could not add CFLAGS as a tag for this.
Nathan
(31 rep)
Mar 27, 2023, 03:28 AM
• Last activity: Jun 20, 2024, 06:28 AM
0
votes
1
answers
227
views
CMake against Conda environment
I am trying to build some project ([crocoddyl](https://github.com/loco-3d/crocoddyl)) against the conda environment using CMake. Build command is: `cmake -DCMAKE_INSTALL_PREFIX=$CONDA_PREFIX ${CMAKE_ARGS} -S . -B build` I have all the necessary dependencies, namely pinocchio, libboost-python-devel,...
I am trying to build some project ([crocoddyl](https://github.com/loco-3d/crocoddyl)) against the conda environment using CMake. Build command is:
cmake -DCMAKE_INSTALL_PREFIX=$CONDA_PREFIX ${CMAKE_ARGS} -S . -B build
I have all the necessary dependencies, namely pinocchio, libboost-python-devel, eignepy. CMake successfully finds eignepy, it is fine, however, when eigenpy checks for boost-python dependency, everything crashes with error:
CMake Error at /home/m8/micromamba/envs/sber-croc/share/cmake-3.29/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
Could NOT find Boost (missing: python310) (found version "1.85.0")
Call Stack (most recent call first):
/home/m8/micromamba/envs/sber-croc/share/cmake-3.29/Modules/FindPackageHandleStandardArgs.cmake:600 (_FPHSA_FAILURE_MESSAGE)
/home/m8/micromamba/envs/sber-croc/share/cmake-3.29/Modules/FindBoost.cmake:2393 (find_package_handle_standard_args)
/home/m8/micromamba/envs/sber-croc/lib/cmake/eigenpy/boost.cmake:144 (find_package)
/home/m8/micromamba/envs/sber-croc/lib/cmake/eigenpy/eigenpyConfig.cmake:149 (SEARCH_FOR_BOOST_PYTHON)
cmake/package-config.cmake:110 (find_package)
CMakeLists.txt:90 (add_project_dependency)
I know for sure, that $CONDA_PREFIX/lib
contains libboost_python310.so
and libboost_python310.so.1.84.0
. However my host system does not have python bindings and only has 1.85.0 version of boost. So I think that during CMake, somehow find_package of eigenpy messes with prefixes and looks in the wrong lib dir.
How do I either ignore the system lib or properly specify prefixes?
I have tried export CMAKE_PREFIX_PATH=$CONDA_PREFIX
as well as -DCMAKE_PREFIX_PATH=$CONDA_PREFIX
with no luck. Exporting LD_LIBRARY_PATH
did not have effect either. CMake, compilers, pkg-config, everything is installed in conda environment.
m8dotpie
(1 rep)
May 28, 2024, 07:41 AM
• Last activity: May 30, 2024, 10:34 AM
0
votes
1
answers
261
views
CMake error: In the make step, compiler is unable to see header file that does exist. Exporting pasth to CPATH doesn't help
On Pop!_OS 22.04 LTS x86_64, I am trying to install libLAS-1.8.1 from source (downloaded as a targz2)(as a dependency of ESRI - 3DForests. I am following the official? [tutorial][1] but am stuck. **"Issue" 1:** Per the guide, I need to - $ cd liblas $ mkdir makefiles $ cd makefiles $ cmake -G "Unix...
On Pop!_OS 22.04 LTS x86_64, I am trying to install libLAS-1.8.1 from source (downloaded as a targz2)(as a dependency of ESRI - 3DForests. I am following the official? tutorial but am stuck.
**"Issue" 1:** Per the guide, I need to -
$ cd liblas
$ mkdir makefiles
$ cd makefiles
$ cmake -G "Unix Makefiles"
However, this gives -
> CMake Error: The source directory "/home/sd/myApps/libLAS-1.8.1/makefiles" does not appear to contain CMakeLists.txt.
So I instead add the following, and it works (for now) -
$ cmake -G "Unix Makefiles" -S "./.."
**Issue 2:** (The actual issue) When I do make, the following error occurs:
> /home/sd/myApps/libLAS-1.8.1/src/../include/liblas/detail/binary.hpp:28:10: fatal error: boost/detail/endian.hpp: No such file or directory
I verify (using ls) that the file "/usr/include/boost/endian/endian.hpp" does indeed exist.
Next I search around and it seems I need to add it to CMake path, for which I do -
> export CPATH=/usr/include/boost
This however does not help. And I keep getting the error.
Any help as to why this is happening and how I can fix this is much appreciated. Also, I believe there are binaries for liblas on "DebianGIS's" repositories. Is there any way to get and install that on other debian based OSs'?
**EDIT1:**
Per a comment, tried deleting the directory and doing it again (after export CPATH). Didn't work.
The following is the full error line, reading which again, makes me think that it was looking for the endian.hpp within the sourcefiles.
> /home/sd/myApps/libLAS-1.8.1/src/../include/liblas/detail/binary.hpp:28:10:
> fatal error: boost/detail/endian.hpp: No such file or directory
Doing find, I see the file exists.
sd@pop-os:~/myApps/libLAS-1.8.1$ find ~/myApps/libLAS-1.8.1 -type f -iname *endian.hpp
/home/sd/myApps/libLAS-1.8.1/include/liblas/detail/endian.hpp
sd@pop-os:~/myApps/libLAS-1.8.1$
**EDIT2:**
Per suggestion of user @steeldriver , downloaded the source using git clone (was using the targz2 before). This fixed it.
ChiggyClaus
(13 rep)
May 11, 2024, 10:57 AM
• Last activity: May 11, 2024, 04:50 PM
3
votes
1
answers
1529
views
fatal error: bsd/string.h: No such file or directory
According to the [answer][1] I need to include -lbsd to the gcc command. But I have no idea where I am supposed to insert it here. I'm using Ubuntu 24.04, `Linux vivobook16-m1605xa-mb089 6.8.0-31-generic #31-Ubuntu SMP PREEMPT_DYNAMIC Sat Apr 20 00:40:06 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux`. Her...
According to the answer I need to include -lbsd to the gcc command. But I have no idea where I am supposed to insert it here.
I'm using Ubuntu 24.04,
Linux vivobook16-m1605xa-mb089 6.8.0-31-generic #31-Ubuntu SMP PREEMPT_DYNAMIC Sat Apr 20 00:40:06 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
.
Here is Makefile I need to compile:
SHELL := /bin/bash
TARGET = ax_usb_nic
KDIR = /lib/modules/$(shell uname -r)/build
PWD = $(shell pwd)
CFILES = ax_main.c \
ax88179_178a.c \
ax88179a_772d.c
EXTRA_CFLAGS = -DEXPORT_SYMTAB -fno-pie
ifneq (,$(filter $(SUBLEVEL),14 15 16 17 18 19 20 21))
MDIR = kernel/drivers/usb/net
else
MDIR = kernel/drivers/net/usb
endif
$(TARGET)-objs := $(CFILES:.c=.o)
obj-m := $(TARGET).o
all:
make -C $(KDIR) M=$(PWD) modules
$(CC) ax88179_programmer.c -o ax88179_programmer
$(CC) ax88179a_programmer.c -o ax88179a_programmer
#$(CC) ax_ioctl.c -o ax_ioctl
install:
ifneq (,$(wildcard /lib/modules/$(shell uname -r)/$(MDIR)/ax88179_178a.ko))
gzip /lib/modules/$(shell uname -r)/$(MDIR)/ax88179_178a.ko
endif
make -C $(KDIR) M=$(PWD) INSTALL_MOD_DIR=$(MDIR) modules_install
depmod -A
clean:
make -C $(KDIR) M=$(PWD) clean
rm -f ax88179_programmer ax88179a_programmer ax_ioctl
Here is the error I receive after I added the #include
myself:
make -C /lib/modules/6.8.0-31-generic/build M=/home/lelechko/Downloads/dexp-zh-utc2_drajver_100507_30082022/AX88772D-AX88179A-Drive/ASIX_USB_NET_Linux_Driver_v1.0.0_b7_Source/ASIX_USB_NET_Linux_Driver_v1.0.0_Source_b7 modules
make[1] : Entering directory '/usr/src/linux-headers-6.8.0-31-generic'
warning: the compiler differs from the one used to build the kernel
The kernel was built by: x86_64-linux-gnu-gcc-13 (Ubuntu 13.2.0-23ubuntu4) 13.2.0
You are using: gcc-13 (Ubuntu 13.2.0-23ubuntu4) 13.2.0
CC [M] /home/lelechko/Downloads/dexp-zh-utc2_drajver_100507_30082022/AX88772D-AX88179A-Drive/ASIX_USB_NET_Linux_Driver_v1.0.0_b7_Source/ASIX_USB_NET_Linux_Driver_v1.0.0_Source_b7/ax_main.o
/home/lelechko/Downloads/dexp-zh-utc2_drajver_100507_30082022/AX88772D-AX88179A-Drive/ASIX_USB_NET_Linux_Driver_v1.0.0_b7_Source/ASIX_USB_NET_Linux_Driver_v1.0.0_Source_b7/ax_main.c:4:10: fatal error: bsd/string.h: No such file or directory
4 | #include
| ^~~~~~~~~~~~~~
compilation terminated.
make: *** [scripts/Makefile.build:243: /home/lelechko/Downloads/dexp-zh-utc2_drajver_100507_30082022/AX88772D-AX88179A-Drive/ASIX_USB_NET_Linux_Driver_v1.0.0_b7_Source/ASIX_USB_NET_Linux_Driver_v1.0.0_Source_b7/ax_main.o] Error 1
make: *** [/usr/src/linux-headers-6.8.0-31-generic/Makefile:1926: /home/lelechko/Downloads/dexp-zh-utc2_drajver_100507_30082022/AX88772D-AX88179A-Drive/ASIX_USB_NET_Linux_Driver_v1.0.0_b7_Source/ASIX_USB_NET_Linux_Driver_v1.0.0_Source_b7] Error 2
make[1] : *** [Makefile:240: __sub-make] Error 2
make[1] : Leaving directory '/usr/src/linux-headers-6.8.0-31-generic'
make: *** [Makefile:20: all] Error 2
I would appreciate your help, as I am complete noob in Makefiles, I am just trying to install driver for my DEXP ZH-UTC2 usb-ethernet adapter
chipichippichappachapppa
(33 rep)
May 4, 2024, 02:01 PM
• Last activity: May 4, 2024, 02:30 PM
0
votes
2
answers
63
views
Specifying a toplevel installation directory
I am building the lean prover system git clone https://github.com/leanprover/lean4 --recurse-submodules cd lean4 mkdir -p build/release cd build/release cmake ../.. make But rather than using a standard install I want to specify the toplevel installation directory. What can I do ?
I am building the lean prover system
git clone https://github.com/leanprover/lean4 --recurse-submodules
cd lean4
mkdir -p build/release
cd build/release
cmake ../..
make
But rather than using a standard install I want to specify the toplevel installation directory. What can I do ?
Vera
(1363 rep)
May 2, 2024, 01:32 PM
• Last activity: May 2, 2024, 02:37 PM
2
votes
1
answers
1225
views
How can I find the cmake variable that holds the path to a package
Let's say I used find_package(SDL REQUIRED) now I need to link to this library through target_link_libraries what would be the name of the variable to pass to target_link_libraries? In general is there a way to find these variables other than heuristically guessing? I've tried SDL_LIBRARY, SDL2_LIBR...
Let's say I used find_package(SDL REQUIRED) now I need to link to this library through target_link_libraries what would be the name of the variable to pass to target_link_libraries? In general is there a way to find these variables other than heuristically guessing? I've tried SDL_LIBRARY, SDL2_LIBRARY, and SDL_LIBRARIES. I do have sdl2 installed.
I would've expected this to work but it did not:
cmake_minimum_required(VERSION 3.10)
project(someProject)
# Find SDL2
find_package(SDL REQUIRED)
find_package(SDL_image REQUIRED)
# Include directories
include_directories(${SDL2_INCLUDE_DIRS} ${SDL2_IMAGE_INCLUDE_DIRS})
# Set source files
set(SOURCES main.cpp)
# Set executable
add_executable(someProject ${SOURCES})
# Link libraries
target_link_libraries(someProject ${SDL2_LIBRARIES} ${SDL2_IMAGE_LIBRARIES})
I get
CMake Error at
/usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:230
(message):
Could NOT find SDL (missing: SDL_LIBRARY SDL_INCLUDE_DIR)
Call Stack (most recent call first):
/usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:600 (_FPHSA_FAILURE_MESSAGE)
/usr/share/cmake/Modules/FindSDL.cmake:224 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
CMakeLists.txt:5 (find_package)
-- Configuring incomplete, errors occurred!
SGriffeth
(43 rep)
Apr 7, 2024, 07:14 PM
• Last activity: Apr 8, 2024, 01:01 PM
0
votes
1
answers
907
views
CMake build can't find Qt6 library in /usr/local
I have an Orange Pi 5, an arm64 SBC running *Joshua Riek's Ubuntu 22.04.4 for RK3588* ([link to project][1]). I'm trying to build [Duckstation][2], a PS1 emulator, which depends on Qt 6.6.2. The latest arm64 Qt version I have available through apt is version 6.2.4. I'm building Qt 6.6.2 from source,...
I have an Orange Pi 5, an arm64 SBC running *Joshua Riek's Ubuntu 22.04.4 for RK3588* (link to project ).
I'm trying to build Duckstation , a PS1 emulator, which depends on Qt 6.6.2. The latest arm64 Qt version I have available through apt is version 6.2.4.
I'm building Qt 6.6.2 from source, but I'm having issues linking the built library to the Duckstation cmake build.
### Building Qt 6.6.2 from git
The Qt installer application is not available for arm64, so I followed Qt's documentation on how to build Qt6 from git, found here . The steps I have taken are as follows:
1. Clone the Qt6 repository and switch to 6.6.2 branch
### Building Duckstation
Following the build instructions on Duckstation's readme, here are the build steps
1. Clone the repository
**How do I link the built library to the CMake build?**
I have tried creating an ldconfig file
$ git clone git://code.qt.io/qt/qt5.git qt6
$ cd qt6
$ git switch 6.6.2
2. Initialize the submodules with init-repository script
$ perl init-repository
3. Create a build directory and configure
$ mkdir build && cd build
$ ../configure
I left the -prefix attribute out, by default it will be set to /usr/local/Qt-6.6.2
4. Build the whole Qt6 library and install
$ cmake --build . --parallel $(nproc)
$ sudo cmake --install .
Building the full library takes over an hour on this platform. After installing, the contents of the directory /usr/local/Qt-6.6.2
look like this:

$ git clone https://github.com/stenzek/duckstation.git duckstation
$ cd duckstation
2. Create a build directory and configure
$ mkdir build
$ cmake -Bbuild -DCMAKE_BUILD_TYPE=Release
When trying to configure the build, I'm getting an error locating the Qt 6.6.2:

/etc/ld.so.conf.d/Qt-6.6.2.conf
which contains
/usr/local/Qt-6.6.2/bin
/usr/local/Qt-6.6.2/lib
After creating the file, I ran sudo ldconfig
.
If it's not a linking issue, am I installing the Qt6 to a wrong location, or missing some critical configuration step in the build?
As a sidenote: I'm able to build Duckstation successfully by patching the required Qt version to 6.2.4 and by modifying the sources a bit, but I'd like to be able to build the main branches, for handling updates more easily etc.
eeliale
(11 rep)
Mar 15, 2024, 01:09 PM
• Last activity: Mar 15, 2024, 05:37 PM
Showing page 1 of 20 total questions