Building libjepeg-turbo from source doesn't build the library libturbojpeg.so* - c

I'm trying to build libjpeg-turbo from source to include 12 bit support. I downloaded the source code from here (2.0.1) then followed instruction given in Building.md
cd libjpeg-turbo-2.0.1
mkdir build && cd build
cmake -G"Unix Makefiles" -D WITH_12BIT=1 -D WITH_TURBOJPEG=1 ..
make -j8
sudo make install
The compilation is successful and generates only libjpeg.so, libjpeg.so.62 and libjpeg.so.62.3.0 along with bunch of other binary files. But its not building the lib files libturbojpeg.so.0.2.0, libturbojpeg.a and libturbojpeg.so which i need. I'm not sure where I am going wrong. i have also tried without the -D WITH_TURBOJPEG flag.
I'm trying this on Ubuntu 16.04 on Nvidia Tx2.
Any help is greatly appreciated.
Thanks

Line 201 of CMakeLists.txt turns WITH_TURBOJPEG off when building with WITH_12BIT enabled.
Don't enable WITH_12BIT and then WITH_TURBOJPEG will be default enabled and should build those libraries.

Related

Error while configuring CMake project: Running 'nmake' '-?' failed

I'm following this tutorial for building GLFW on Windows, and I'm getting the error when running cmake -S . -B Build:
PS ~\glfw-3.3.2\GLFW> cmake -S . -B Build
CMake Error at CMakeLists.txt:3 (project):
Running
'nmake' '-?'
failed with:
The system cannot find the file specified
-- Configuring incomplete, errors occurred!
See also "~/glfw-3.3.2/GLFW/Build/CMakeFiles/CMakeOutput.log".
Output log is almost completely empty containing only one line with my windows version.
I haven't found any discussions or problems matching mine. And I don't even know does nmake have -? flag since it's not listed on microsoft docs site.
I've tried positioning in other folder because maybe that's the case. But with no luck.
I tried solving it with other error solution's but to no avail.
The solution was to append -G "MinGW Makefiles" to cmake -S . -B Build command. As Tsyvarev suggested I looked more into generators and found out that setting the flags doesn't imply which generator will be used. So manually setting the flags solved the problem for me.
The error is about absent nmake utility, which is a build tool for CMake projects configured with "NMake Makefiles" generator.
You need either to install nmake, or specify (with -G option) other generator, which is available on your platform (Windows) and for which you have a built tool. Possible selection of other generators includes e.g. "MinGW Makefiles" and "Visual Studio" family.

Demo needs OpenCV for webcam images.(opencv is installed and set opencv4=1)

I am trying to do object detection from a video file by using https://github.com/pjreddie/darknet.
I've installed libopencv-dev for opencv.
I've set opencv4=1 in Makefile.
And run this code.
./darknet detector demo cfg/coco.data cfg/yolo-tiny-obj.cfg yolov3.weights data/1.mp4
And got error
Demo needs OpenCV for webcam images.
Could anyone help me?
Thanks.
Try to clean make file and recompile darknet
make clean
make
You can load OpenCV from git and install sources
git clone https://github.com/opencv/opencv
cd opencv
mkdir build
cd build
cmake -D CMAKE_BUILD_TYPE=Release -D CMAKE_INSTALL_PREFIX=/usr/local ..
make -j7
sudo make install
And after recompile the darknet with
make clean
make

Eigen3 fails to install with cmake : RegexUtils not found

I try to install eigen3.3.7 with cmake on ubuntu 16 but cmake fails.
I follow the INSTALL file hints :
1) I extract the tar archive
2) Make a "build" dir named buildDir
3) Go to build dir : cd buildDir
4) Start cmake : cmake ../Eigen
Then the cmake process ends up with the error :
CMake Error at CMakeLists.txt:1 (include):
include could not find load file:
RegexUtils
CMake Error at CMakeLists.txt:2 (test_escape_string_as_regex):
Unknown CMake command "test_escape_string_as_regex".
May I ask you some hints please ?
Regards
Sylvain
I followed the advices of chtz, but it still fails, see below the console output :
syl#spica:~/tmp/eigen/eigen-eigen-323c052e1731$ cat INSTALL
Installation instructions for Eigen
***********************************
Method 2. Installing using CMake
********************************
Let's call this directory 'source_dir' (where this INSTALL file is).
Before starting, create another directory which we will call 'build_dir'.
Do:
cd build_dir
cmake source_dir
make install
syl#spica:~/tmp/eigen/eigen-eigen-323c052e1731$ mkdir build && cd build
syl#spica:~/tmp/eigen/eigen-eigen-323c052e1731/build$ cmake ../
CMake Error at CMakeLists.txt:1 (include):
include could not find load file:
RegexUtils
CMake Error at CMakeLists.txt:2 (test_escape_string_as_regex):
Unknown CMake command "test_escape_string_as_regex".
CMake Warning (dev) in CMakeLists.txt:
No cmake_minimum_required command is present. A line of code such as
cmake_minimum_required(VERSION 3.5)
should be added at the top of the file. The version specified may be lower
if you wish to support older CMake versions for this project. For more
information run "cmake --help-policy CMP0000".
This warning is for project developers. Use -Wno-dev to suppress it.
-- Configuring incomplete, errors occurred!
See also "/home/syl/tmp/eigen/eigen-eigen-323c052e1731/CMakeFiles/CMakeOutput.log".
syl#spica:~/tmp/eigen/eigen-eigen-323c052e1731/build$ vim ../CMakeFiles/CMakeOutput.log
Thanks for helping.
This sequence of commands seems to work properly after downloading (in my case the currently latest version eigen-3.3.7):
bunzip2 eigen-3.3.7.tar.bz2
tar -xvf eigen-3.3.7.tar
cd eigen-3.3.7/
mkdir build
cd build
cmake ../.
sudo make install

Installing gcc manually redhat

I am working on a system on which I am a non-root user.
While trying to install gcc 5.1 in a custom directory as the present shared version of gcc isn't working for postgresql installation, I started out by
wget gcc 5.1.
After unzipping the folder, ran the commands below:
cd /seq/genome_portal/lib
mkdir bld
mkdir gcc
cd bld
/seq/genome_portal/lib/gcc-5.1/configure --prefix=/seq/genome_portal/lib/gcc
However config.log still shows this error:
/../../redhat_6_x86_64/pkgs/gcc_4.9.0/libexec/gcc/x86_64-redhat-linux/4.9.0/cc1: error while loading shared libraries: libmpfr.so.4: cannot open shared object file: No such file or directory
The prerequisites that come after
./contrib/download_prerequisites
are gmp,mpfr and mpc. I started with gmp and ended up in the same error as above. I somehow need to tell these programs that I do not want to use the existing gcc.
But I get the same error as mentioned before. Any advice as to how I can proceed to install it?
Building a compiler is much more complicated that building a straightforward utility; just running configure is not enough.
Primarily, you need to read the instructions; they are provided in the GCC source directory in the INSTALL subdirectory. They are in HTML so point your browser at it.
I know you didn't do this yet because the step on configuration makes very clear you should be using an out-of-source configuration; e.g., something like:
mkdir ../bld
cd ../bld
../gcc-5.1/configure ...
rather than running ./configure.
Regarding the missing dependencies, there's a "prerequisites" section in the docs. To get MPFR and other helpful things you can run:
cd gcc-5.1
./contrib/download_prerequisites
ETA: This should work:
rm -rf newgcc
mkdir newgcc
cd newgcc
tar xzf gcc-5.1.tar.gz
cd gcc-5.1
./contrib/download_prerequisites
mkdir ../bld
cd ../bld
../gcc-5.1/configure <configopts>
make -j8
make install
(or whatever -j you prefer).

Issue Statically Compiling Thrift 0.9.0 on Centos 6.5

I'm working to compile the Thrift 0.9.0 binary statically in a CentOS VM. I get the issue that the libthrift.a binary is not being created. I am using a vagrant box to run centos:
https://github.com/2creatives/vagrant-centos/releases/download/v6.5.1/centos65-x86_64-20131205.box
Once I ssh to the vagrant box I run the following commands:
wget https://archive.apache.org/dist/thrift/0.9.0/thrift-0.9.0.tar.gz
tar -zxvf thrift-0.9.0.tar.gz
cd thrift-0.9.0
./configure --enable-static
make
This will run but I ran a find command (sudo find / -name "*.a") on the system to see if there was any ".a" files made and the only file that was made was "libparse.a" which doesn't seem right. From my understanding it should be "libthrift.a".
Searching through the config.log file it says that it does want to build the static libraries:
configure:11944: checking whether to build static libraries
configure:11948: result: yes
Looking at more locations in the log file that has the keyword "static" reveals potential places that may be errors.
configure:9028: checking if gcc static flag -static works
configure:9056: result: no
configure:13915: checking if g++ static flag -static works
configure:13943: result: no
lt_cv_prog_compiler_static_works=no
lt_cv_prog_compiler_static_works_CXX=no
The full log file is here: http://www.filehosting.org/file/details/449460/staticThriftErrorLog.rtf
Any help is appreciated
I was able to generate the libthrift.a file. After running the command for the extra dependancies mentioned in my comment I forgot to run the make command. So after doing the make command I found the libthrift.a file in "thrift-0.9.0/lib/cpp/.libs/". Interestingly enough, even after fixing the dependencies, config.log still had the same potential problem areas regarding the gcc/g++ static flag and static compiler.
Specifically the dependency command is as follows:
sudo yum install automake libtool flex bison pkgconfig gcc-c++ boost-devel libevent-devel zlib-devel python-devel ruby-devel openssl-devel.x86_64
Edit: After getting advice on the Jira ticket, it turns out the specific vagrant box I was using was causing the errors. Using the VM he linked I was able to successfully build Thrift using the provided instructions. (Jira ticket https://issues.apache.org/jira/browse/THRIFT-2559)

Resources