I have a project with different sub-modules. Each sub-module has a CMakeLists.txt and I have a general CMakeLists.txt at the root of the project.
When I run cmake --build [...] or make [...], it recursively builds sub-modules as expected but it prints verbose like this:
make[2]: Entering directory '/some/path/'
make[2]: Entering directory '/some/path/'
make[2]: Leaving directory '/some/path/'
make[2]: Leaving directory '/some/path/'
...
What I have tried
Explicitly turn off cmake/make verbose by adding set(CMAKE_VERBOSE_MAKEFILE OFF) in the general CMakeLists.txt.
make [...] --no-print-directory
cmake [...] -- [...] --no-print-directory
The --no-print-directory flag removes these messages as intended, but I used to not have to specify this flag in previous projects. I would prefer to avoid using this flag to get the same results as before.
Versions
GNU Make 4.3
cmake version 3.16.4
You can use
MAKEFLAGS += --no-print-directory
Described in the GNU make manual
Related
I am trying to run the unit tests on CRIU 1.8. To prep the box, I installed:
libprotobuf-lite8
libprotobuf8
zlib1g-dev
libprotobuf-dev
libprotobuf-c0
libprotobuf-c0-dev
libprotoc8
protobuf-c-compiler
protobuf-compiler
libaio-dev
libcap-dev
After that, as root, I ran, make test and got the following output:
...
make[3]: Leaving directory `/home/ubuntu/criu-1.8/test/zdtm/live/static'
make[2]: Leaving directory `/home/ubuntu/criu-1.8/test/zdtm/live'
make[1]: Leaving directory `/home/ubuntu/criu-1.8/test/zdtm'
make[1]: Entering directory `/home/ubuntu/criu-1.8/test'
make zdtm
make[2]: Entering directory `/home/ubuntu/criu-1.8/test'
./zdtm.sh -l > zdtm-tst-list
================================= CRIU CHECK =================================
prctl: PR_SET_MM_MAP is not supported, which is required for restoring user namespaces
Error (cr-check.c:634): Kernel doesn't support PTRACE_O_SUSPEND_SECCOMP
Error (cr-check.c:683): Dumping seccomp filters not supported: Input/output error
Error (timerfd.c:55): timerfd: No timerfd support for c/r: Inappropriate ioctl for device
Error (cr-check.c:780): AIO remap doesn't work properly
Error (cr-check.c:796): fdinfo doesn't contain the lock field
============================= WARNING =============================
Not all features needed for CRIU are merged to upstream kernel yet,
so for now we maintain our own branch which can be cloned from:
git://git.kernel.org/pub/scm/linux/kernel/git/gorcunov/linux-cr.git
===================================================================
make -f Makefile.zdtm zdtm_nons
make[3]: Entering directory `/home/ubuntu/criu-1.8/test'
gcc -O2 -Wall -Werror -DCONFIG_X86_64 -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -D_GNU_SOURCE -D_GNU_SOURCE -D_GNU_SOURCE zdtm_ct.c -o zdtm_ct
flock zdtm_mount_cgroups ./zdtm_mount_cgroups
flock: ./zdtm_mount_cgroups: Text file busy
make[3]: *** [mount_cgroups] Error 69
make[3]: Leaving directory `/home/ubuntu/criu-1.8/test'
make[2]: *** [zdtm] Error 2
make[2]: Leaving directory `/home/ubuntu/criu-1.8/test'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/home/ubuntu/criu-1.8/test'
make: *** [test] Error 2
I assume my issues are the ones inside the CRIU CHECK block there, but I'm just not sure what I am seeing here. Can anyone point me in the right direction. If Google was helpful, then I was just too ignorant to recognize it. Thanks!
Also, I don't have the reputation on SO to tag this as CRIU (apparently that's a new tag), but it is clearly related to CRIU. If you agree and have the power, please throw a tag on this?
You need a new Linux kernel.
The stuff in that CRIU CHECK box is all about things that it requires, but are not supported by either the libraries on your system (e.g. libc), or by the kernel. In the box below, they describe where you'll have to get the kernel that has the necessary patches:
============================= WARNING =============================
Not all features needed for CRIU are merged to upstream kernel yet,
so for now we maintain our own branch which can be cloned from:
git://git.kernel.org/pub/scm/linux/kernel/git/gorcunov/linux-cr.git
===================================================================
Follow the instructions on the CRIU installation page on how to configure the kernel: https://criu.org/Installation. And, use a page like the one at "kernel newbies" for general advice on building the kernel yourself: http://kernelnewbies.org/KernelBuild.
Building a kernel is fairly straightforward, but it can sometimes be tricky to get it working correctly. Make sure to leave a fallback kernel in GRUB, and consider having some sort of "live" bootable Linux ISO accessible to get back into your system in case it totally goes south.
I am trying to compile a gcc from source since I cannot use yum, apt-get and so forth. My steps are simple:
-I download the source GCC (I tried gcc-4.8.4 and gcc-5.3.0) in my pc and I used:
./contrib/download_prerequisites
-After this, I send this my gcc source file to my system using powerPC y Linux.
mkdir objdir
cd objdir
../gcc-4.6.2/configure --prefix=/usr --enable-languages=c,c++,fortran,go
make
I have got the next error:
In file included from ../../gcc-4.9.2/gcc/genmddeps.c:19:0:
../../gcc-4.9.2/gcc/system.h:205:20: fatal error: cstring: No such file or directory
# include <cstring>
^
compilation terminated.
make[3]: *** [build/genmddeps.o] Error 1
make[3]: Leaving directory `/home/root/build/gcc'
make[2]: *** [all-stage1-gcc] Error 2
make[2]: Leaving directory `/home/root/build'
make[1]: *** [stage1-bubble] Error 2
make[1]: Leaving directory `/home/root/build'
make: *** [all] Error 2
Any idea about what it is going wrong?
Best regards
Some advice: first, compile (notably for learning purposes) something simpler than GCC, e.g. GNU make if you never compiled GNU stuff from source code.
Then compile a recent GCC (so 5.3 in january 2016) - building issues would be the same with 4.8, and GCC 5 is better! You need the gcc & libc-dev & g++ & libstdc++-dev for your host machine (the one running your future cross-compiler). I am not sure your --prefix=/usr is a good idea. Consider perhaps a --program-suffix=-mine option (otherwise, your system's /usr/bin/gcc could be overwritten, which you don't want to happen)
You could leave the default --prefix=/usr/local and later add appropriately /usr/local/bin/ into your PATH
I try to cross-compiler icu4c 51.1 with Emscripten (clang) via
emconfigure source/configure --host=i386-pc-linux-gnu --prefix=${myprefix} --enable-static --disable-shared --disable-dyload --disable-renaming CXXFLAGS='-DU_USING_ICU_NAMESPACE=0' CPPFLAGS='-DU_DISABLE_RENAMING=1'
emmake make
emmake make install
It compiles most of the sources fine, but fails with
Unpacking ../source/data/in/icudt51l.dat and generating out/tmp/icudata.lst (list of data files)
LD_LIBRARY_PATH=../lib:../stubdata:../tools/ctestfw:$LD_LIBRARY_PATH ../bin/icupkg -d ./out/build/icudt51l --list -x \* ../source/data/in/icudt51l.dat -o out/tmp/icudata.lst
run-detectors: warning: unable to exec /usr/bin/lli-2.8: No such file or directory
run-detectors: warning: unable to exec /usr/bin/lli-2.9: No such file or directory
LLVM ERROR: Program used external function 'findBasename' which could not be resolved!
make[1]: *** [out/tmp/icudata.lst] Error 1
make[1]: Leaving directory `/home/andreas/.emscripten-libs/sources/icu4c/51.1/data'
make: *** [all-recursive] Error 2
So I am wondering, where it tries to find findBasename and what this data compiling is all about.
EDIT:
The error messages come from icupkg being built with clang, which does not make sense in this case. How can I specifc that the libraries are built with clang, but the tools with another compiler?
Sounds like it wasn't able to find, I'm guessing, ICU tool utilities lib in ../lib - might try running ldd or equivalent on icupkg
I tried to compile xcbproto 1.7 in linux and get an error message when type make install command
Making install in xcbgen
make[1]: Entering directory `/home/reham/miriad_files/xcb-proto-1.7/xcbgen'
make[2]: Entering directory `/home/reham/miriad_files/xcb-proto-1.7/xcbgen'
make[2]: Nothing to be done for `install-exec-am'.
test -z "/usr/local/lib/python2.5/site-packages/xcbgen" || /bin/mkdir -p "/usr/local/lib/python2.5/site-packages/xcbgen"
/usr/bin/install -c -m 644 __init__.py error.py expr.py matcher.py state.py xtypes.py '/usr/local/lib/python2.5/site-packages/xcbgen'
/home/reham/Desktop/Fermi/ScienceTools-v9r15p2-fssc-20090808-i686-pc-linux-gnu-libc2.5/i686-pc-linux-gnu-libc2.5/bin/python: error while loading shared libraries: libpython2.5.so.1.0: cannot open shared object file: No such file or directory
make[2]: *** [install-pkgpythonPYTHON] Error 127
make[2]: Leaving directory `/home/reham/miriad_files/xcb-proto-1.7/xcbgen'
make[1]: *** [install-am] Error 2
make[1]: Leaving directory `/home/reham/miriad_files/xcb-proto-1.7/xcbgen'
make: *** [install-recursive] Error 1
What is the problem?
It seems there's a problem with a custom python version you seem to have installed on your system. Namely this one:
/home/reham/Desktop/Fermi/ScienceTools-v9r15p2-fssc-20090808-i686-pc-linux-gnu-libc2.5/i686-pc-linux-gnu-libc2.5/bin/python
This seems to depend on the shared library libpython2.5.so.1.0 which isn't found by the linker.
Most probably the custom python version you installed brought this shared library along and it just isn't found as it is not in one of the standard directories.
To fix this you might either try to use the python version installed on your system or add the path containing libpython2.5.so.1.0 to the ones searched by the linker.
My guess is it will be somewhere below /home/reham/Desktop/Fermi/ScienceTools-v9r15p2-fssc-20090808-i686-pc-linux-gnu-libc2.5/i686-pc-linux-gnu-libc2.5/
Most probably in the subdirectory /lib .
I'm attempting to compile gcc 4.7.1 on Mint Linux with gcc 4.7.2 and get the following output:
[snip]
ar rc .libs/libgmp.a assert.o compat.o errno.o [snip]
rm -fr .libs/libgmp.lax
creating libgmp.la
(cd .libs && rm -f libgmp.la && ln -s ../libgmp.la libgmp.la)
make[5]: Leaving directory `/home/justin/projects/os/linux/src/gcc-4.7.0/build/gmp'
make[4]: Leaving directory `/home/justin/projects/os/linux/src/gcc-4.7.0/build/gmp'
make[3]: Leaving directory `/home/justin/projects/os/linux/src/gcc-4.7.0/build/gmp'
make[2]: Leaving directory `/home/justin/projects/os/linux/src/gcc-4.7.0/build'
make[1]: *** [stage1-bubble] Error 2
make[1]: Leaving directory `/home/justin/projects/os/linux/src/gcc-4.7.0/build'
make: *** [all] Error 2
I don't even know where to start looking since I don't get a descriptive error! It looks like it compiles GMP successfully and then fails after that, unable to complete whatever the next step should be.
The question is answered in its comments above. To sum up: The error was due to an improper global (presumably environment) variable, much earlier in the scrollback; that because OP was using a -j flag and other currently active branches did continue building.