Compiling PDCurses on Windows with MinGW - c++

I'm getting the weirdest error when I do ./configure when building nmcurses-5.9
The issue is when I try to run
CC="gcc -m32" LD="ld -m32" ./configure \
--prefix=/mingw \
--without-cxx-binding \
--without-ada \
--enable-warnings \
--enable-assertions \
--enable-reentrant \
--with-debug \
--with-normal \
--disable-home-terminfo \
--enable-sp-funcs \
--enable-term-driver \
--enable-interop \
--with-pthread
and the error I get is
./configure: line 21016: D:\Program: No such file or directory
on that line is
${MAKE:-make} preinstall
I am building this in MinGW using msys.
any help would be apreciated.

In ${MAKE:-make} preinstall, the expression ${MAKE:-make} expands to the
value of the shell variable MAKE, if it is set, and otherwise to make.
So MAKE is set and expands to something probably of the form D:\Program Files\...,
i.e. a path with embedded spaces, which is construed as distinct tokens
D:\Program and Files\... by the shell when attempting to execute the
intended command:
\path\to\make preinstall
Instead it attempts to execute a program D:\Program with arguments Files\... preinstall
and complains that no such program exists.
With GNU autotools is advisable to install tools in paths that are free of
embedded spaces.

Related

Building LLVM toolchain Stops midway through

So I am atempting to build the ARA-RISCV build and it requires a RISC-V LLVM toolchain and they give you a "make toolchain-llvm" command and it starts off ok but midway through the build around 2500/3500 it stops and the terminal closes without pointing out any error while it builds.
The command that are used are the ones below:
mkdir -p /.../rvv/install/riscv-llvm
cd /.../rvv/toolchain/riscv-llvm && rm -rf build && mkdir -p build && cd build && \
cmake -G Ninja \
-DCMAKE_INSTALL_PREFIX=/home/alex/Documents/Project/rvv/install/riscv-llvm \
-DLLVM_ENABLE_PROJECTS="clang;lld" \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_C_COMPILER=gcc \
-DCMAKE_CXX_COMPILER=g++ \
-DLLVM_DEFAULT_TARGET_TRIPLE=riscv64-unknown-elf \
-DLLVM_TARGETS_TO_BUILD="RISCV" \
../llvm
cd /.../rvv/toolchain/riscv-llvm && \
cmake --build build --target install
After everything the build is incomplete and a lot of files have not been downloaded.I dont know what is causing this can anybody help?
Please and thank you.
EDIT:It worked by adding -j8 to the last instruction aka
cmake --build build --target install -j8

building c++ opencv 4 with cuda ubuntu 16/04

I'm trying to build opencv' with cuda 10.2. When the following command :
cmake -DCMAKE_BUILD_TYPE=RELEASE \
-DOPENCV_EXTRA_MODULES_PATH=../../opencv_contrib/modules \
-DWITH_TBB=ON -DWITH_CUDA=ON \
-DBUILD_opencv_cudacodec=OFF \
-DENABLE_FAST_MATH=1 \
-DWITH_CUBLAS=1 \
-DWITH_V4L=ON \
-DWITH_OPENGL=ON \
-DWITH_GSTREAMER=ON \
-DOPENCV_GENERATE_PKGCONFIG=ON \
-DOPENCV_ENABLE_NONFREE=ON \
-DBUILD_EXAMPLES=TRUE \
-DBUILD_PERF_TESTS=FALSE \
-DEBUILD_TESTS=FALSE ../../opencv
I have the following issue :
Could NOT find CUDNN (missing: CUDNN_LIBRARY CUDNN_INCLUDE_DIR) (Required is at least version "6")
of course I have installed cudnn7 corresponding to cuda 10.2, I the installation test passed.
Can someone help ?
To fix the problem I added the following options for cmake :
-DCUDNN_INCLUDE_DIR=/usr/local/cuda/include \
-DCUDNN_LIBRARY=/usr/local/cuda/lib64/libcudnn.so.7.6.5 \
You may also need to add:
-DCUDNN_VERSION='7.6'
Or in my case it was:
-DCUDNN_VERSION='8.0'

centos 7 make FFmpeg /libavutil/common.h:33:19: fatal error: errno.h: No such file or directory

ndk build ffmpeg 3.4.2 configure success ,but when I make it .fatal error like this
configure script is
I make it in CentOS Linux release 7.4.1708 (Core)
similar, I make fdkaac fatal error too like this
I don't know I what is the problem of system
I think you should change android ndk version
I use the ndk r16b I get the problem also
so I use the ndk r15c
I success
I holp this can help you
this is my .sh file
#!/bin/bash
rm -rf android/arm
echo "stone"
NDK=/xxxxxxx/android-ndk-r15c
NDK_VERSION=android-14
ARCH=arm
SYSROOT=$NDK/platforms/$NDK_VERSION/arch-$ARCH
TOOLCHAIN=$NDK/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64
CROSS_COMPILE=$TOOLCHAIN/bin/arm-linux-androideabi-
CPU=arm
PREFIX=$(pwd)/android/$CPU
ADDI_CFLAGS="-marm"
function build_one
{
./configure \
--prefix=$PREFIX \
--enable-shared \
--disable-static \
--disable-doc \
--disable-ffmpeg \
--disable-ffplay \
--disable-ffprobe \
--disable-ffserver \
--disable-symver \
--cross-prefix=$CROSS_COMPILE \
--target-os=android \
--arch=$ARCH \
--enable-cross-compile \
--sysroot=$SYSROOT \
--extra-cflags="-Os -fpic $ADDI_CFLAGS" \
--extra-ldflags="$ADDI_LDFLAGS" \
$ADDITIONAL_CONFIGURE_FLAG
make clean
make -j8
make install
}
build_one
~~~~~~~~~~~~

Crosscompile OpenCV with FFMPEG support

I am trying to cross compile opencv with ffmpeg support for an arm board with a buildroot based custom linux. The host is an ubuntu PC.
I want static opencv libraries.
I have downloaded ffmpeg source and crosscompiled it with the following configuration
./configure \
--enable-cross-compile \
--cross-prefix=arm-linux-gnueabihf- \
--target-os=linux \
--arch=arm \
--disable-static \
--enable-shared \
--enable-nonfree \
--enable-ffmpeg \
--enable-gpl \
--enable-swscale \
--enable-pthreads \
--disable-yasm \
--disable-stripping \
--prefix=../build \
--extra-cflags=-I../build/include --extra-ldflags=-L../build/lib
The paths are all correct and ffmpeg is built successfully. Then when I try to configure opencv with cmake-gui, I have to manually specify all paths.
But despite this, opencv configuration is unable to resolve FFMPEG correctly
I have attached the screen shot below
It cannot resolve ffmpeg versions. I tried to ignore it and build but it fails with linker error
Linking CXX static library ../../lib/libopencv_features2d.a
[ 49%] Built target opencv_features2d
make: *** [all] Error 2

Failed to link osmesa correctly

Mesa version = 12.0.1
Tried version before this as well.
At link time this error comes up: /usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../lib64/libGL.so: undefined reference to _glapi_tls_Dispatch'.
The script i am using to install mesa:
#!/bin/bash
make -j4 distclean # if in an existing build
autoreconf -fi
./configure \
CXXFLAGS="-O2 -g -DDEFAULT_SOFTWARE_DEPTH_BITS=31" \
CFLAGS="-O2 -g -DDEFAULT_SOFTWARE_DEPTH_BITS=31" \
--disable-xvmc \
--disable-glx \
--disable-dri \
--with-dri-drivers="" \
--with-gallium-drivers="swrast" \
--enable-texture-float \
--enable-shared-glapi \
--disable-egl \
--with-egl-platforms="" \
--enable-gallium-osmesa \
--enable-llvm-shared-libs=yes \
--enable-gallium-llvm=yes \
--prefix=/home/ec2-user/new-mesa/mesaBuild/
make -j2
make -j4 install
After installation :
Added prefix(defined in script) to /etc/ld.so.conf' and ran ldconfig
Then in link command: -Lprefix -lOSMesa
What am i doing wrong?