I am currently trying to install OSVR-Core on my Debian 9.1 system. I installed all the prerequisites and followed this tutorial. Now I am stuck at making the project. I created a build-directory and tried running
cmake -DCMAKE_PREFIX_PATH="/usr/local/stow/libfunctionality" ~/src/OSVR-Core
but I get the error, that my binary directory should be different from my source directory. My source directory (with the make-files) should be ~/src/OSVR-Core and since I am in ~/src/OSVR-Core/build, I thought this was enough.
How (and where) do I change the location of the binary directory? I tried the command line option -D CMAKE_BINARY_DIR= "path/to/OSVR-Core/build but that did not work. I read online, that you should not set the Binary directory manually, but that it is created/calculated.
This is the CMakeError.log file:
Determining if the pthread_create exist failed with the following output:
Change Dir: /home/lenala/src/OSVR-Core/CMakeFiles/CMakeTmp
Run Build Command:"/usr/bin/make" "cmTC_42e59/fast"
/usr/bin/make -f CMakeFiles/cmTC_42e59.dir/build.make CMakeFiles/cmTC_42e59.dir/build
make[1]: Entering directory '/home/lenala/src/OSVR-Core/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_42e59.dir/CheckSymbolExists.c.o
/usr/bin/cc -o CMakeFiles/cmTC_42e59.dir/CheckSymbolExists.c.o -c /home/lenala/src/OSVR-Core/CMakeFiles/CMakeTmp/CheckSymbolExists.c
Linking C executable cmTC_42e59
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_42e59.dir/link.txt --verbose=1
/usr/bin/cc CMakeFiles/cmTC_42e59.dir/CheckSymbolExists.c.o -o cmTC_42e59 -rdynamic
CMakeFiles/cmTC_42e59.dir/CheckSymbolExists.c.o: In function `main':
CheckSymbolExists.c:(.text+0x1b): undefined reference to `pthread_create'
collect2: error: ld returned 1 exit status
CMakeFiles/cmTC_42e59.dir/build.make:97: recipe for target 'cmTC_42e59' failed
make[1]: *** [cmTC_42e59] Error 1
make[1]: Leaving directory '/home/lenala/src/OSVR-Core/CMakeFiles/CMakeTmp'
Makefile:126: recipe for target 'cmTC_42e59/fast' failed
make: *** [cmTC_42e59/fast] Error 2
File /home/lenala/src/OSVR-Core/CMakeFiles/CMakeTmp/CheckSymbolExists.c:
/* */
#include <pthread.h>
int main(int argc, char** argv)
{
(void)argv;
#ifndef pthread_create
return ((int*)(&pthread_create))[argc];
#else
(void)argc;
return 0;
#endif
}
Determining if the function pthread_create exists in the pthreads failed with the following output: Change Dir: /home/lenala/src/OSVR-Core/CMakeFiles/CMakeTmp
Run Build Command:"/usr/bin/make" "cmTC_f2984/fast"
/usr/bin/make -f CMakeFiles/cmTC_f2984.dir/build.make CMakeFiles/cmTC_f2984.dir/build
make[1]: Entering directory '/home/lenala/src/OSVR-Core/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_f2984.dir/CheckFunctionExists.c.o
/usr/bin/cc -DCHECK_FUNCTION_EXISTS=pthread_create -o CMakeFiles/cmTC_f2984.dir/CheckFunctionExists.c.o -c /usr/share/cmake-3.7/Modules/CheckFunctionExists.c
Linking C executable cmTC_f2984
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_f2984.dir/link.txt --verbose=1
/usr/bin/cc -DCHECK_FUNCTION_EXISTS=pthread_create CMakeFiles/cmTC_f2984.dir/CheckFunctionExists.c.o -o cmTC_f2984 -rdynamic -lpthreads
/usr/bin/ld: cannot find -lpthreads
collect2: error: ld returned 1 exit status
CMakeFiles/cmTC_f2984.dir/build.make:97: recipe for target 'cmTC_f2984' failed
make[1]: *** [cmTC_f2984] Error 1
make[1]: Leaving directory '/home/lenala/src/OSVR-Core/CMakeFiles/CMakeTmp'
Makefile:126: recipe for target 'cmTC_f2984/fast' failed
make: *** [cmTC_f2984/fast] Error 2
Have you used the
cmake .. -DJSONCPP_WITH_CMAKE_PACKAGE=ON -DJSONCPP_LIB_BUILD_SHARED=OFF -DCMAKE_CXX_FLAGS=-fPIC
since that's what the tutorial says to use to build the project and that the CMakaList.txt will handle all the paths.
I managed to get it to work. I reinstalled libfunctionality in my ~/src directory. Then I removed the github repository of OSVR-core and cloned it again. After that it worked, using:
$ cmake .. -DJSONCPP_WITH_CMAKE_PACKAGE=ON -DJSONCPP_LIB_BUILD_SHARED=OFF -DCMAKE_CXX_FLAGS=-fPIC
$ make
Related
I am using an iMX8MQ EVK board with Linux. I want to install the apache2 server and MySQL database from the source. Started installing apache2 using this
Here is the Linux version:
root#imx8mqevk:~# cat /etc/os-release
ID=fsl-imx-wayland
NAME="NXP i.MX Release Distro"
VERSION="5.10-hardknott (hardknott)"
VERSION_ID=5.10-hardknott
PRETTY_NAME="NXP i.MX Release Distro 5.10-hardknott (hardknott)"
Here is the output of configure
Facing issue with make as crypto is not found. I am not able to resolve the issue.
I have tried installing glibc but the issue is not resolved.
make error
Making all in support
make[1]: Entering directory '/home/root/httpd-2.4.53/support'
make[2]: Entering directory '/home/root/httpd-2.4.53/support'
/usr/local/apr/build-1/libtool --silent --mode=link gcc -g -O2 -pthread -o htpasswd htpasswd.lo passwd_common.lo /usr/local/apr/lib/libaprutil-1.la -lexpat /usr/local/apr/lib/libapr-1.la -lrt -lpthread -ldl
/usr/lib/gcc/aarch64-poky-linux/10.2.0/../../../../aarch64-poky-linux/bin/ld: passwd_common.o: in function `mkhash':
/home/root/httpd-2.4.53/support/passwd_common.c:228: undefined reference to `crypt'
/usr/lib/gcc/aarch64-poky-linux/10.2.0/../../../../aarch64-poky-linux/bin/ld: /home/root/httpd-2.4.53/support/passwd_common.c:240: undefined reference to `crypt'
collect2: error: ld returned 1 exit status
make[2]: *** [Makefile:48: htpasswd] Error 1
make[2]: Leaving directory '/home/root/httpd-2.4.53/support'
make[1]: *** [/home/root/httpd-2.4.53/build/rules.mk:75: all-recursive] Error 1
make[1]: Leaving directory '/home/root/httpd-2.4.53/support'
make: *** [/home/root/httpd-2.4.53/build/rules.mk:75: all-recursive] Error 1
Im trying to compile for a project debian for this device: https://www.engicam.com/vis-prod/PX30-Core/PX30-Core-EDIMM-SOM-based-on-RockChip--PX30 which has an aarch64 architecture. I'm using a VM provided by them which should already have all the tools and configurations ready, but I'm running into some issues. If I've understood correctly I have to build buildroot to build Debian, after adding a couple packages with make menuconfig and running make I get this error:
PATH="/home/user/px30/buildroot/output/host/bin:/home/user/px30/buildroot/output/host/sbin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin" /usr/bin/make -j9 CXXFLAGS+="-DRKDEVICEIO -I/home/user/px30/buildroot/../external/deviceio_release/DeviceIO/include" LFLAGS+=" -lDeviceIo -lasound" -C /home/user/px30/buildroot/output/build/qsetting-1.0
make[1]: Entering directory '/home/user/px30/buildroot/output/build/qsetting-1.0'
/home/user/px30/buildroot/output/host/bin/aarch64-buildroot-linux-gnu-g++ -lDeviceIo -lasound -o qsetting main.o mainwindow.o qtaudio.o qtbt.o qtfactory.o qtinputdialog.o qtkeyboard.o qtupdate.o qtwifi.o qrc_res.o moc_mainwindow.o moc_qtaudio.o moc_qtbt.o moc_qtfactory.o moc_qtinputdialog.o moc_qtkeyboard.o moc_qtupdate.o moc_qtwifi.o -lQt5Widgets -lQt5Multimedia -lQt5Gui -lQt5Network -lQt5Core -latomic -lrt -ldl /home/user/px30/buildroot/output/host/aarch64-buildroot-linux-gnu/sysroot/usr/lib/libGLESv2.so -lpthread -lrt -lpthread -ldl
/home/user/px30/buildroot/output/host/lib/gcc/aarch64-buildroot-linux-gnu/6.5.0/../../../../aarch64-buildroot-linux-gnu/bin/ld:/home/user/px30/buildroot/output/host/aarch64-buildroot-linux-gnu/sysroot/usr/lib/../lib64/libDeviceIo.so: file format not recognized; treating as linker script
/home/user/px30/buildroot/output/host/lib/gcc/aarch64-buildroot-linux-gnu/6.5.0/../../../../aarch64-buildroot-linux-gnu/bin/ld:/home/user/px30/buildroot/output/host/aarch64-buildroot-linux-gnu/sysroot/usr/lib/../lib64/libDeviceIo.so:0: syntax error
collect2: error: ld returned 1 exit status
Makefile:214: recipe for target 'qsetting' failed
make[1]: *** [qsetting] Error 1
make[1]: Leaving directory '/home/user/px30/buildroot/output/build/qsetting-1.0'
package/pkg-generic.mk:254: recipe for target '/home/user/px30/buildroot/output/build/qsetting-1.0/.stamp_built' failed
make: *** [/home/user/px30/buildroot/output/build/qsetting-1.0/.stamp_built] Error 2
I tried to open /px30/buildroot/output/host/aarch64-buildroot-linux-gnu/sysroot/usr/lib/libDeviceIo.so and it's an ASCII file
user#ubuntu:~/px30/buildroot/output/host/aarch64-buildroot-linux-gnu/sysroot/usr/lib$ cat libDeviceIo.so
fake
user#ubuntu:~/px30/buildroot/output/host/aarch64-buildroot-linux-gnu/sysroot/usr/lib$ file libDeviceIo.so
libDeviceIo.so: ASCII text
EDIT: I did not find a solution, I solved it by removing the package qsetting from the target packages
I'm attempting to compile efivars on LFS for UEFI when I get the following output, even after I've compiled libpopt (attempted with and without sed -i -e "s/#MARK64#//" Makefile.am as noted in http://wiki.linuxfromscratch.org/blfs/wiki/popt):
root:/sources/efivar-28# make libdir="/usr/lib/" bindir="/usr/bin/" mandir="/usr/share/man/" includedir="/usr/include/" V=1 -j1
make[1]: Entering directory '/sources/efivar-28/src'
make -f /sources/efivar-28/src/Make.deps deps SOURCES="crc32.c creator.c disk.c gpt.c linux.c loadopt.c dp.c dp-acpi.c dp-hw.c dp-media.c dp-message.c efivarfs.c error.c export.c guid.c guids.S guid-symbols.c lib.c vars.c makeguids.c guid.c include/efivar/efivar-guids.h include/efivar/efivar.h include/efivar/efiboot.h include/efivar/efiboot-loadopt.h include/efivar/efivar-dp.h include/efivar/efiboot-creator.h include/efivar/efivar-guids.h guid-symbols.c efivar.c"
make[2]: Entering directory '/sources/efivar-28/src'
make[2]: Nothing to be done for 'deps'.
make[2]: Leaving directory '/sources/efivar-28/src'
gcc -O2 -g3 -I/sources/efivar-28/src/include/efivar/ -specs=/sources/efivar-28/gcc.specs -L. -static -o efivar-static efivar.c dp.static.o dp-acpi.static.o dp-hw.static.o dp-media.static.o dp-message.static.o efivarfs.static.o error.static.o export.static.o guid.static.o guids.static.o guid-symbols.static.o lib.static.o vars.static.o -ldl -lpopt
/usr/bin/ld: cannot find -lpopt
collect2: error: ld returned 1 exit status
make[1]: *** [/sources/efivar-28/Make.rules:17: efivar-static] Error 1
make[1]: Leaving directory '/sources/efivar-28/src'
make: *** [Makefile:11: all] Error 2
Here is the output of ld -lpopt:
OUTPUT_ARCH(i386:x86-64)
ENTRY(_start)
SEARCH_DIR("/usr/x86_64-pc-linux-gnu/lib64"); SEARCH_DIR("/usr/local/lib64"); SEARCH_DIR("/lib64"); SEARCH_DIR("/usr/lib64"); SEARCH_DIR("/usr/x86_64-pc-linux-gnu/lib"); SEARCH_DIR("/usr/local/lib"); SEARCH_DIR("/lib"); SEARCH_DIR("/usr/lib");
<ld linker script here>
==================================================
attempt to open /usr/x86_64-pc-linux-gnu/lib64/libpopt.so failed
attempt to open /usr/x86_64-pc-linux-gnu/lib64/libpopt.a failed
attempt to open /usr/local/lib64/libpopt.so failed
attempt to open /usr/local/lib64/libpopt.a failed
attempt to open /lib64/libpopt.so failed
attempt to open /lib64/libpopt.a failed
attempt to open /usr/lib64/libpopt.so succeeded
-lpopt (/usr/lib64/libpopt.so)
libc.so.6 needed by /usr/lib64/libpopt.so
found libc.so.6 at /lib64/libc.so.6
ld-linux-x86-64.so.2 needed by /lib64/libc.so.6
found ld-linux-x86-64.so.2 at /lib64/ld-linux-x86-64.so.2
ld: warning: cannot find entry symbol _start; not setting start address
The issue is that LFS disabled static library's in their popt recipe. Enabling this solved the issue.
I use gfortran on cygwin and want to install the FGSL package, then I try
xxx#xxx-PC ~
$wget http://www.lrz.de/services/software/mathematik/gsl/fortran/download/fgsl-1.0.0.tar.gz
$tar zxvf fgsl-1.0.0.tar.gz
$cd fgsl-1.0.0
$./configure
so far so good, then what next should I do?
https://de.wikibooks.org/wiki/Fortran:_FGSL
My apologies. Under Vladimir's guidance, I try
xxx#xxx-PC ~/fgsl-1.0.0
$ make
make all-recursive
make[1]: Entering directory '/cygdrive/d/CygwinWorkshop/fgsl-1.0.0'
Making all in .
make[2]: Entering directory '/cygdrive/d/CygwinWorkshop/fgsl-1.0.0'
/bin/sh ./libtool --tag=FC --mode=link gfortran -g -O2 -version-info 0:0:0 -o libfgsl.la -rpath /usr/local/lib fgsl.lo libfgsl_la-fgsl_utils.lo -lgsl -lgslcblas -lblas
/usr/bin/grep: /usr/lib/libblas.la: No such file or directory
/usr/bin/sed: can't read /usr/lib/libblas.la: No such file or directory
libtool: link: `/usr/lib/libblas.la' is not a valid libtool archive
Makefile:531: recipe for target 'libfgsl.la' failed
make[2]: *** [libfgsl.la] Error 1
make[2]: Leaving directory '/cygdrive/d/CygwinWorkshop/fgsl-1.0.0'
Makefile:636: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/cygdrive/d/CygwinWorkshop/fgsl-1.0.0'
Makefile:437: recipe for target 'all' failed
make: *** [all] Error 2
and
xxx#xxx-PC ~/fgsl-1.0.0
$ make install
Making install in .
make[1]: Entering directory '/cygdrive/d/CygwinWorkshop/fgsl-1.0.0'
/bin/sh ./libtool --tag=FC --mode=link gfortran -g -O2 -version-info 0:0:0 -o libfgsl.la -rpath /usr/local/lib fgsl.lo libfgsl_la-fgsl_utils.lo -lgsl -lgslcblas -lblas
/usr/bin/grep: /usr/lib/libblas.la: No such file or directory
/usr/bin/sed: can't read /usr/lib/libblas.la: No such file or directory
libtool: link: `/usr/lib/libblas.la' is not a valid libtool archive
Makefile:531: recipe for target 'libfgsl.la' failed
make[1]: *** [libfgsl.la] Error 1
make[1]: Leaving directory '/cygdrive/d/CygwinWorkshop/fgsl-1.0.0'
Makefile:636: recipe for target 'install-recursive' failed
make: *** [install-recursive] Error 1
Some errors that I don't know how to handle occur.
According to the hints by screen, I next check
$ apt-cyg install lapack
Package lapack is already installed, skipping
$ apt-cyg install liblapack-devel
Package liblapack-devel is already installed, skipping
A fortran code named bsp.f03 given by https://de.wikibooks.org/wiki/Fortran:_FGSL
is used for testing purpose
program bsp
use fgsl
implicit none
real( kind = fgsl_double ) :: a
real( kind = fgsl_double ) :: d = 5.0_fgsl_double
a = d ** 2 * m_pi_4
write( *, * ) "Kreisflaeche = ", a
end program bsp
then I compile and link
$g95 bsp.f03 -I/usr/local/include/g95 -L/usr/local/lib -lgsl -lfgsl_g95 -lgslcblas
-bash: g95: command not found
I use R for statistical
computing on windows a lot and I'm a total newcomer to fortran and cygwin, so please forgive my very basic and naive questions about the above.
You are missing the configure step.The source package was configured for a different system.
In general, for any build, you should run
autoreconf -ivf
./configure
make
In addition before these steps, replace in Makefile.am
libfgsl_la_LDFLAGS = -version-info #LIB_CURRENT#:#LIB_REVISION#:#LIB_AGE# #FGSL_LDFLAGS#
with
libfgsl_la_LDFLAGS = -version-info #LIB_CURRENT#:#LIB_REVISION#:#LIB_AGE# #FGSL_LDFLAGS# -no-undefined
to build the shared library.
I am attempting to build the AR Drone SDK on Ubuntu. When compiling the libraries I get the error:
//lib/x86_64-linux-gnu/libm.so.6: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
I dont understand what the problem is. I am following this tutorial and the problem occurs when I run make. I have run ARDroneLib/Soft/Build/check_dependencies.sh and it outputs ok.
Any ideas what the problem is? Below is the full output from running make.
soribo#soribo-vm:~/Projects/ARDrone/ARDrone_SDK_2_0_1/Examples/Linux$ make
make[1]: Entering directory `/home/soribo/Projects/ARDrone/ARDrone_SDK_2_0_1/ARDroneLib/Soft/Build'
Libs already extracted
Building target static
Architecture x86_64 is already built
Creating universal static lib file from architectures x86_64
Build done.
Checking required Ubuntu packages ...
ok.
Building ARDroneTool/Lib
Building ARDroneTool/Lib
make[1]: Leaving directory `/home/soribo/Projects/ARDrone/ARDrone_SDK_2_0_1/ARDroneLib/Soft/Build'
make[1]: Entering directory `/home/soribo/Projects/ARDrone/ARDrone_SDK_2_0_1/Examples/Linux/Navigation/Build'
-- Building ardrone_navigation --
Libs already extracted
Building target static
Architecture x86_64 is already built
Creating universal static lib file from architectures x86_64
Build done.
Checking required Ubuntu packages ...
ok.
Building ARDroneTool/Lib
Building ARDroneTool/Lib
-- Linking ardrone_navigation --
ld common/mobile_main
/usr/bin/ld: ../../Soft/Build/targets_versions/ffmpeg_static_PROD_MODE_Linux_3.19.0-25-generic_GNU_Linux_usrbingcc_4.8.4/libavutil.a(eval.o): undefined reference to symbol 'fabs##GLIBC_2.2.5'
//lib/x86_64-linux-gnu/libm.so.6: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
make[4]: *** [/home/soribo/Projects/ARDrone/ARDrone_SDK_2_0_1/Examples/Linux/Navigation/Build/../../Build/Release/common/mobile_main] Error 1
make[3]: *** [all] Error 2
make[2]: *** [build_app] Error 2
make[1]: *** [ardrone_navigation] Error 2
make[1]: Leaving directory `/home/soribo/Projects/ARDrone/ARDrone_SDK_2_0_1/Examples/Linux/Navigation/Build'
make: *** [all] Error 2
I had the same problem. I found the solution here:
http://jderobot.org/Varribas-tfm/ARDrone:starting_up#Building_Examples
Looking for undefined reference to symbol 'fabs##GLIBC_2.2.5', I reached to [2], that confirms an unmeet dependency problem [1].
What happened here?
libavutil.a(eval.o): undefined reference to symbol 'fabs##GLIBC_2.2.5'
libm.so.6: error adding symbols: DSO missing from command line
First line say us that libavutil is using fabs. It is declared into libm library, but -lm is missed in command line (Makefile).
ARDrone_SDK_2_0_1/Examples/Linux/Navigation/Build/Makefile:131
GENERIC_LIBS+=-liw -lpc_ardrone -lgthread-2.0 -lgtk-x11-2.0 -lrt -lxml2 -ludev -lswscale -lSDL -lm
Then, Navigation will compile successfully.