Building OpenImageIO on Kubuntu 14.10: make error - linux

bit of a newbie to Ubuntu here and this has really been confusing me.
Currently trying to build OpenImageIO using make, following the steps outlined here: https://sites.google.com/site/openimageio/checking-out-and-building-openimageio
As far as I'm aware, I have installed all of the dependencies, however trying to run make gives me the following error:
platform=linux64, hw=x86_64
OPENIMAGEIO_SITE = shanesimmsart-pc
dist_dir = dist/linux64
INSTALLDIR = /home/shanesimmsart/oiio
( cd build/linux64 ; make )
make[1]: Entering directory `/home/shanesimmsart/oiio/build/linux64'
make[2]: Entering directory `/home/shanesimmsart/oiio/build/linux64'
make[3]: Entering directory `/home/shanesimmsart/oiio/build/linux64'
make[3]: Leaving directory `/home/shanesimmsart/oiio/build/linux64'
make[3]: Entering directory `/home/shanesimmsart/oiio/build/linux64'
[ 0%] Building CXX object src/libutil/CMakeFiles/OpenImageIO_Util.dir/strutil.cpp.o
/home/shanesimmsart/oiio/src/libutil/strutil.cpp: In function ‘OpenImageIO::v1_6::string_view OpenImageIO::v1_6::Strutil::parse_nested(OpenImageIO::v1_6::string_view&, bool)’:
/home/shanesimmsart/oiio/src/libutil/strutil.cpp:768:28: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
for ( ; nesting && len < p.size(); ++len) {
^
cc1plus: all warnings being treated as errors
make[3]: *** [src/libutil/CMakeFiles/OpenImageIO_Util.dir/strutil.cpp.o] Error 1
make[3]: Leaving directory `/home/shanesimmsart/oiio/build/linux64'
make[2]: *** [src/libutil/CMakeFiles/OpenImageIO_Util.dir/all] Error 2
make[2]: Leaving directory `/home/shanesimmsart/oiio/build/linux64'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/home/shanesimmsart/oiio/build/linux64'
make: *** [cmake] Error 2
Does anyone have any idea what I might be doing wrong / might be missing?

The package you're using has enabled the -Werror flag by default, which forces the compiler to treat all warnings as errors. This is always a bad idea for shipping code to users, because users will have a wide variety of different compilers and versions of compilers, so users will get different warnings than developers. When developers build the code they should absolutely use -Werror. When developers ship code to users, they should absolutely not enable -Werror by default.
Anyway, looking at the code in Git it appears that if you do this:
make STOP_ON_WARNING=no
it will disable -Werror.

Related

SeedLabs Firewall Lab: Implement a Simple Kernel Module, failure to build a kernel module

I'm following the steps from here at 3.1 Task 1.A: Implement a Simple Kernel Module:
https://seedsecuritylabs.org/Labs_20.04/Files/Firewall/Firewall.pdf
Everything was fine until I ran the make command. the hello.ko file wasn't generated and I don't know what's wrong.
make -C /lib/modules/5.11.0-38-generic/build M=/home/seed/Downloads/Labsetup/Files/kernel_module modules
make[1]: Entering directory '/usr/src/linux-headers-5.11.0-38-generic'
CC [M] /home/seed/Downloads/Labsetup/Files/kernel_module/hello.o
MODPOST /home/seed/Downloads/Labsetup/Files/kernel_module/Module.symvers
ERROR: modpost: missing MODULE_LICENSE() in /home/seed/Downloads/Labsetup/Files/kernel_module/hello.o
make[2]: *** [scripts/Makefile.modpost:124: /home/seed/Downloads/Labsetup/Files/kernel_module/Module.symvers] Error 1
make[2]: *** Deleting file '/home/seed/Downloads/Labsetup/Files/kernel_module/Module.symvers'
make[1]: *** [Makefile:1753: modules] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-5.11.0-38-generic'
make: *** [Makefile:4: all] Error 2
ERROR: modpost: missing MODULE_LICENSE() in /home/seed/Downloads/Labsetup/Files/kernel_module/hello.o
You must add the license in hello.c.
e.g.
MODULE_LICENSE("GPL");

Why am I receiving make errors when trying to compile GCC?

I am currently working on Linux From Scratch part 5.5: http://www.linuxfromscratch.org/lfs/view/stable/chapter05/gcc-pass1.html Although i have followed everything exactly correctly to this point, I am receiving the following make errors after about 20 minutes of compiling GCC 8.2.0:
make[3]: *** [Makefile:1110: graphite-isl-ast-to-gimple.o] Error 1
make[3]: Leaving directory '/mnt/lfs/sources/gcc-8.2.0/build/gcc'
make[2]: *** [Makefile:4567: all-stage1-gcc] Error 2
make[2]: Leaving directory '/mnt/lfs/sources/gcc-8.2.0/build'
make[1]: *** [Makefile:21435: stage1-bubble] Error 2
make[1]: Leaving directory '/mnt/lfs/sources/gcc-8.2.0/build'
make: *** [Makefile:897: all] Error 2
Any help would be appreciated, I have been trying for hours.

RTEMS compilation and installation error

I am trying to compile RTEMS on Ubuntu 14.04.
I am getting following error while trying run 'make':
Making all in tools/build
make[1]: Entering directory /home/user/development/rtems/b-sis/tools/build'
make all-am
make[2]: Entering directory/home/user/development/rtems/b-sis/tools/build'
make[2]: Leaving directory /home/user/development/rtems/b-sis/tools/build'
make[1]: Leaving directory/home/user/development/rtems/b-sis/tools/build'
Making all in tools/cpu
make[1]: Entering directory /home/user/development/rtems/b-sis/tools/cpu'
Making all in generic
make[2]: Entering directory/home/user/development/rtems/b-sis/tools/cpu/generic'
make[2]: Nothing to be done for all'.
make[2]: Leaving directory/home/user/development/rtems/b-sis/tools/cpu/generic'
make[2]: Entering directory /home/user/development/rtems/b-sis/tools/cpu'
make[2]: Nothing to be done forall-am'.
make[2]: Leaving directory /home/user/development/rtems/b-sis/tools/cpu'
make[1]: Leaving directory/home/user/development/rtems/b-sis/tools/cpu'
Making all in testsuites/tools
make[1]: Entering directory /home/user/development/rtems/b-sis/testsuites/tools'
Making all in generic
make[2]: Entering directory/home/user/development/rtems/b-sis/testsuites/tools/generic'
make[2]: Nothing to be done for all'.
make[2]: Leaving directory/home/user/development/rtems/b-sis/testsuites/tools/generic'
make[2]: Entering directory /home/user/development/rtems/b-sis/testsuites/tools'
make[2]: Nothing to be done forall-am'.
make[2]: Leaving directory /home/user/development/rtems/b-sis/testsuites/tools'
make[1]: Leaving directory/home/user/development/rtems/b-sis/testsuites/tools'
Making all in sparc-rtems4.11/c
make[1]: Entering directory /home/user/development/rtems/b-sis/sparc-rtems4.11/c'
Making all in .
make[2]: Entering directory/home/user/development/rtems/b-sis/sparc-rtems4.11/c'
make[2]: Nothing to be done for all-am'.
make[2]: Leaving directory/home/user/development/rtems/b-sis/sparc-rtems4.11/c'
Making all in sis
make[2]: Entering directory /home/user/development/rtems/b-sis/sparc-rtems4.11/c/sis'
make[2]: *** No rule to make targetall'. Stop.
make[2]: Leaving directory /home/user/development/rtems/b-sis/sparc-rtems4.11/c/sis'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory/home/user/development/rtems/b-sis/sparc-rtems4.11/c'
make: *** [all-recursive] Error 1
Here, is a list of steps I followed:
To install toold I used RSB and ran all commands listed here:
https://devel.rtems.org/wiki/Developer/Tools/RSB
Then I have followed this list of commands:
https://devel.rtems.org/wiki/TBR/UserManual/Quick_Start
In this list, I have tried changing PATH variable = /development/rtems/4.11/bin=$PATH
Other then this everything is done by me following the commands listed here. I have done ./bootstrap -p as well.
You need the toolchain tools. Follow the source builder tutorial before compiling rtems.
1º Clone the tools
git clone git://git.rtems.org/rtems-source-builder.git
2º Check environment
${PATH-rtems-source-builder}/source-builder/sb-check
You must got:
RTEMS Source Builder - Check, 4.11 (6b0d76cc9b43 modified)
Environment is ok
If not, you need more dependencies.
3º Check the target arch you want:
cd ${PATH-rtems-source-builder}/rtems
../source-builder/sb-set-builder --list-bsets
${PATH-rtems-source-builder}/source-builder/sb-set-builder --log=l-sparc.txt --prefix=$HOME/development/rtems/4.11 4.11/rtems-sparc
You need to stay in ${PATH-rtems-source-builder}/rtems path, or the list won't be complete!
4º Configure
EXECUTABLE=$HOME/Repositories/git/rtems
TARGET=sparc-rtems4.11
PREFIX=${HOME}/opt/rtems
${EXECUTABLE}/configure --target=${TARGET} --enable-rtemsbsp=sis --enable-tests=samples --prefix=${PREFIX}
5º Execute boostrap
$HOME/Repositories/git/rtems/bootstrap
6º Go to your build path and compile & install
make
make install
Remember, you need the valid toolchain path in your environment variables.
In example:
export PATH=$HOME/development/rtems/4.11/bin:$PATH
If you don't want to do it everytime you restart, add that in your ~/.bashrc file. And use commando source to update the current terminal environment.
source ~/.bashrc
The problem is that it cannot find binaries.
That is probably because you haven't added them to your PATH environment variable.
You can do that with (use the correct path to the bin-directory of your setup)
export PATH=$HOME/development/rtems/compiler/4.12/bin:$PATH

linux/videodev.h: No such file or directory Ubuntu 14.04

Hi I run into a problem when setting up my web camera for use in Chrome, which needed FlashCam.
When following the installation guide at: http://www.swift-tools.net/Flashcam/
At the step when doing the "make" build I get:
adderollen#andreas-RC530:~/Downloads/flashcam-1.4.5$ make
(cd vloopback; make);
make[1]: Entering directory `/home/adderollen/Downloads/flashcam-1.4.5/vloopback'
make -C /lib/modules/3.13.0-37-generic/build SUBDIRS=/home/adderollen/Downloads/flashcam- 1.4.5/vloopback modules
make[2]: Entering directory `/usr/src/linux-headers-3.13.0-37-generic'
CC [M] /home/adderollen/Downloads/flashcam-1.4.5/vloopback/vloopback.o
/home/adderollen/Downloads/flashcam-1.4.5/vloopback/vloopback.c:166:28: fatal error:
linux/videodev.h: No such file or directory
#include <linux/videodev.h>
^
compilation terminated.
make[3]: *** [/home/adderollen/Downloads/flashcam-1.4.5/vloopback/vloopback.o] Error 1
make[2]: *** [_module_/home/adderollen/Downloads/flashcam-1.4.5/vloopback] Error 2
make[2]: Leaving directory `/usr/src/linux-headers-3.13.0-37-generic'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/home/adderollen/Downloads/flashcam-1.4.5/vloopback'
make: *** [vloopback/vloopback.ko] Error 2
So I googled some and found this: linux/videodev.h : no such file or directory - OpenCV on ubuntu 11.04
I followed the answer by bukzor, but I still got the same problem. Any one got a solution?
I run Ubuntu 14.04.
Don't you still have such a file on disk? If so, then may be the package which contains such a file was renamed, or may be file was renamed/removed.
find / -name 'videodev.h'
locate videodev.h
using the above commands to check whether you have the file.

Unable to compile GCC, but no specific error given

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.

Resources