Linux ARM?

Started by petervh, May 04, 2017, 11:08:11 PM

Previous topic - Next topic

petervh

Hi,

Does anyone know offhand if CDP will build on ARM?
Specifically I would like to see if I can compile this on a raspberry pi running some flavour of Debian.

Thanks!

rwdobson

I do not expect any problems, assuming a standard gcc toolset is installed. I built a few CDP programs as an experiment when the first R-Pi came out. The Linux project files should "just work". The new build system uses Cmake, which might need to be installed first, but the sources on Github still include my original simplistic Makefiles.

petervh

Thanks! I'm going to give it a shot this weekend.
I'd prefer not to run a pi, but it's for a very particular use case.
I'll report back!

petervh

Hi Richard,

I've tried a number of strategies to compile CDP on Raspi3 (debian jessie lite), with no luck yet.

I tried the beta sources on unstablesound, & the sources available from the official CDP github. I think the problem may be related to libaaio or something missing in my toolchain, but I'm not sure.

Might you be able to offer me any advice based on the following? I apologize in advance, I am not really a linux expert.

First, installing libaaio

libaaio
./configure


creating cache ./config.cache
checking for a BSD compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking whether make sets ${MAKE}... yes
checking for working aclocal-1.4... found
checking for working autoconf... found
checking for working automake-1.4... missing
checking for working autoheader... found
checking for working makeinfo... found
checking for gcc... gcc
checking whether the C compiler (gcc  ) works... yes
checking whether the C compiler (gcc  ) is a cross-compiler... no
checking whether we are using GNU C... yes
checking whether gcc accepts -g... yes
checking for Cygwin environment... no
checking for mingw32 environment... no
checking how to run the C preprocessor... gcc -E
checking host system type... armv7l-unknown-linux-gnu
checking build system type... armv7l-unknown-linux-gnu
checking for ld used by GCC... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for /usr/bin/ld option to reload object files... -r
checking for BSD-compatible nm... /usr/bin/nm -B
checking for a sed that does not truncate output... /bin/sed
checking whether ln -s works... yes
checking how to recognise dependent libraries... file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )
checking for object suffix... o
checking for executable suffix... no
checking command to parse /usr/bin/nm -B output... ok
checking for dlfcn.h... yes
checking for file... /usr/bin/file
checking for ranlib... ranlib
checking for strip... strip
checking for objdir... .libs
checking for gcc option to produce PIC... -fPIC
checking if gcc PIC flag -fPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.lo... yes
checking if gcc supports -fno-rtti -fno-exceptions... yes
checking whether the linker (/usr/bin/ld) supports shared libraries... yes
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking dynamic linker characteristics... GNU/Linux ld.so
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking whether -lc should be explicitly linked in... no
creating libtool
checking for ANSI C header files... yes
checking for sys/wait.h that is POSIX.1 compatible... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for stdio.h... yes
checking for errno.h... yes
checking for sys/types.h... yes
checking for sys/wait.h... (cached) yes
checking for sys/ioctl.h... yes
checking for unistd.h... yes
checking for sys/filio.h... no
checking for termios.h... yes
checking for working const... yes
checking for pid_t... yes
checking whether gcc needs -traditional... no
checking for malloc... yes
checking for fork... yes
checking for pipe... yes
checking for dup2... yes
checking for system... yes
checking for ioctl... yes
updating cache ./config.cache
creating ./config.status
creating Makefile
creating man/Makefile
creating man/man3/Makefile


I'm not sure if "checking for working automake-1.4... missing" is a problem. I have already run 'apt-get install automake1.4'.

libaaio
sudo make install


Making install in man
make[1]: Entering directory '/home/anony/src/cdp/CDPrelease7src/libaaio/libaaio-0.3.1/man'
Making install in man3
make[2]: Entering directory '/home/anony/src/cdp/CDPrelease7src/libaaio/libaaio-0.3.1/man/man3'
make[3]: Entering directory '/home/anony/src/cdp/CDPrelease7src/libaaio/libaaio-0.3.1/man/man3'
make[3]: Nothing to be done for 'install-exec-am'.
make  install-man3
make[4]: Entering directory '/home/anony/src/cdp/CDPrelease7src/libaaio/libaaio-0.3.1/man/man3'
/bin/sh ../../mkinstalldirs /usr/local/man/man3
/usr/bin/install -c -m 644 ./aaio_grant_tty_lock.3 /usr/local/man/man3/aaio_grant_tty_lock.3
/usr/bin/install -c -m 644 ./aaio_hard_reset.3 /usr/local/man/man3/aaio_hard_reset.3
/usr/bin/install -c -m 644 ./getche.3 /usr/local/man/man3/getche.3
/usr/bin/install -c -m 644 ./aaio.h.3 /usr/local/man/man3/aaio.h.3
/usr/bin/install -c -m 644 ./aaio_reset.3 /usr/local/man/man3/aaio_reset.3
/usr/bin/install -c -m 644 ./getch.3 /usr/local/man/man3/getch.3
/usr/bin/install -c -m 644 ./kbhit.3 /usr/local/man/man3/kbhit.3
/usr/bin/install -c -m 644 ./aaio_flush.3 /usr/local/man/man3/aaio_flush.3
make[4]: Leaving directory '/home/anony/src/cdp/CDPrelease7src/libaaio/libaaio-0.3.1/man/man3'
make[3]: Leaving directory '/home/anony/src/cdp/CDPrelease7src/libaaio/libaaio-0.3.1/man/man3'
make[2]: Leaving directory '/home/anony/src/cdp/CDPrelease7src/libaaio/libaaio-0.3.1/man/man3'
make[2]: Entering directory '/home/anony/src/cdp/CDPrelease7src/libaaio/libaaio-0.3.1/man'
make[3]: Entering directory '/home/anony/src/cdp/CDPrelease7src/libaaio/libaaio-0.3.1/man'
make[3]: Nothing to be done for 'install-exec-am'.
make[3]: Nothing to be done for 'install-data-am'.
make[3]: Leaving directory '/home/anony/src/cdp/CDPrelease7src/libaaio/libaaio-0.3.1/man'
make[2]: Leaving directory '/home/anony/src/cdp/CDPrelease7src/libaaio/libaaio-0.3.1/man'
make[1]: Leaving directory '/home/anony/src/cdp/CDPrelease7src/libaaio/libaaio-0.3.1/man'
make[1]: Entering directory '/home/anony/src/cdp/CDPrelease7src/libaaio/libaaio-0.3.1'
/bin/sh ./libtool --mode=compile gcc -DPACKAGE=\"libaaio\" -DVERSION=\"0.3.1\" -DHAVE_DLFCN_H=1 -DSTDC_HEADERS=1 -DHAVE_SYS_WAIT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_STDIO_H=1 -DHAVE_ERRNO_H=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_WAIT_H=1 -DHAVE_SYS_IOCTL_H=1 -DHAVE_UNISTD_H=1 -DHAVE_TERMIOS_H=1 -DHAVE_MALLOC=1 -DHAVE_FORK=1 -DHAVE_PIPE=1 -DHAVE_DUP2=1 -DHAVE_SYSTEM=1 -DHAVE_IOCTL=1  -I. -I.      -Wall -pedantic -std=c99 -c aaio.c
mkdir .libs
gcc -DPACKAGE=\"libaaio\" -DVERSION=\"0.3.1\" -DHAVE_DLFCN_H=1 -DSTDC_HEADERS=1 -DHAVE_SYS_WAIT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_STDIO_H=1 -DHAVE_ERRNO_H=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_WAIT_H=1 -DHAVE_SYS_IOCTL_H=1 -DHAVE_UNISTD_H=1 -DHAVE_TERMIOS_H=1 -DHAVE_MALLOC=1 -DHAVE_FORK=1 -DHAVE_PIPE=1 -DHAVE_DUP2=1 -DHAVE_SYSTEM=1 -DHAVE_IOCTL=1 -I. -I. -Wall -pedantic -std=c99 -c aaio.c  -fPIC -DPIC -o .libs/aaio.lo
gcc -DPACKAGE=\"libaaio\" -DVERSION=\"0.3.1\" -DHAVE_DLFCN_H=1 -DSTDC_HEADERS=1 -DHAVE_SYS_WAIT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_STDIO_H=1 -DHAVE_ERRNO_H=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_WAIT_H=1 -DHAVE_SYS_IOCTL_H=1 -DHAVE_UNISTD_H=1 -DHAVE_TERMIOS_H=1 -DHAVE_MALLOC=1 -DHAVE_FORK=1 -DHAVE_PIPE=1 -DHAVE_DUP2=1 -DHAVE_SYSTEM=1 -DHAVE_IOCTL=1 -I. -I. -Wall -pedantic -std=c99 -c aaio.c -o aaio.o >/dev/null 2>&1
mv -f .libs/aaio.lo aaio.lo
/bin/sh ./libtool --mode=link gcc  -Wall -pedantic -std=c99  -o libaaio.la -rpath /usr/local/lib -version-info 1:1:1 aaio.lo 
rm -fr .libs/libaaio.la .libs/libaaio.* .libs/libaaio.*
gcc -shared  aaio.lo   -Wl,-soname -Wl,libaaio.so.0 -o .libs/libaaio.so.0.1.1
(cd .libs && rm -f libaaio.so.0 && ln -s libaaio.so.0.1.1 libaaio.so.0)
(cd .libs && rm -f libaaio.so && ln -s libaaio.so.0.1.1 libaaio.so)
ar cru .libs/libaaio.a  aaio.o
ranlib .libs/libaaio.a
creating libaaio.la
(cd .libs && rm -f libaaio.la && ln -s ../libaaio.la libaaio.la)
make[2]: Entering directory '/home/anony/src/cdp/CDPrelease7src/libaaio/libaaio-0.3.1'
/bin/sh ./mkinstalldirs /usr/local/lib
/bin/sh ./libtool  --mode=install /usr/bin/install -c libaaio.la /usr/local/lib/libaaio.la
/usr/bin/install -c .libs/libaaio.so.0.1.1 /usr/local/lib/libaaio.so.0.1.1
(cd /usr/local/lib && rm -f libaaio.so.0 && ln -s libaaio.so.0.1.1 libaaio.so.0)
(cd /usr/local/lib && rm -f libaaio.so && ln -s libaaio.so.0.1.1 libaaio.so)
/usr/bin/install -c .libs/libaaio.lai /usr/local/lib/libaaio.la
/usr/bin/install -c .libs/libaaio.a /usr/local/lib/libaaio.a
ranlib /usr/local/lib/libaaio.a
chmod 644 /usr/local/lib/libaaio.a
PATH="$PATH:/sbin" ldconfig -n /usr/local/lib
----------------------------------------------------------------------
Libraries have been installed in:
   /usr/local/lib

If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the `-LLIBDIR'
flag during linking and do at least one of the following:
   - add LIBDIR to the `LD_LIBRARY_PATH' environment variable
     during execution
   - add LIBDIR to the `LD_RUN_PATH' environment variable
     during linking
   - use the `-Wl,--rpath -Wl,LIBDIR' linker flag
   - have your system administrator add LIBDIR to `/etc/ld.so.conf'

See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------
/bin/sh ./mkinstalldirs /usr/local/include
/usr/bin/install -c -m 644 aaio.h /usr/local/include/aaio.h
make[2]: Leaving directory '/home/anony/src/cdp/CDPrelease7src/libaaio/libaaio-0.3.1'
make[1]: Leaving directory '/home/anony/src/cdp/CDPrelease7src/libaaio/libaaio-0.3.1'


ls /usr/local/lib
&
ls /usr/local/include


anony@raspberrypi:~/src/cdp/CDP7-master/build $ ls    /usr/local/lib
libaaio.a   libaaio.so    libaaio.so.0.1.1  libportaudio.la  libportaudio.so.2      pkgconfig
libaaio.la  libaaio.so.0  libportaudio.a    libportaudio.so  libportaudio.so.2.0.0  python2.7
anony@raspberrypi:~/src/cdp/CDP7-master/build $ ls    /usr/local/include
aaio.h  pa_jack.h  portaudio.h


Continued in next post due to max length. . .


petervh

#4
& then I try to run the shell scripts
cd dev
./makeprograms.sh

see http://petervanhaaften.com/files/makeprogramsoutput.txt
(too long to post here)

Alternatively, I also tried the CMake build options (with github sources, CMakeLists.txt is not included in sources on unstablesound.net)

mkdir build
cd build
make ..



-- The C compiler identification is GNU 4.9.2
-- The CXX compiler identification is GNU 4.9.2
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- /home/anony/src/cdp/CDP7-master
-- installing to /usr/local
-- building to /home/anony/src/cdp/CDP7-master/Release
-- LIBRARY INSTALL DIR: lib
CMake Error at CMakeLists.txt:76 (include):
  include could not find load file:

    cmake/CompilerOptimizations.cmake


-- Not using Custom.cmake file.
-- Performing Test HAS_VISIBILITY_HIDDEN
-- Performing Test HAS_VISIBILITY_HIDDEN - Success
-- Performing Test HAS_CXX_VISIBILITY_HIDDEN
-- Performing Test HAS_CXX_VISIBILITY_HIDDEN - Success
-- BUILD_BIN_DIR set to
-- BUILD_LIB_DIR set to /home/anony/src/cdp/CDP7-master/build/lib
-- Check if the system is big endian
-- Searching 16 bit integer
-- Looking for sys/types.h
-- Looking for sys/types.h - found
-- Looking for stdint.h
-- Looking for stdint.h - found
-- Looking for stddef.h
-- Looking for stddef.h - found
-- Check size of unsigned short
-- Check size of unsigned short - done
-- Using unsigned short
-- Check if the system is big endian - little endian
-- paprogs to be built
-- Looking for unistd.h
-- Looking for unistd.h - found
-- Looking for io.h
-- Looking for io.h - not found
-- Looking for fcntl.h
-- Looking for fcntl.h - found
-- Looking for sys/time.h
-- Looking for sys/time.h - found
-- Looking for termios.h
-- Looking for termios.h - found
-- Looking for values.h
-- Looking for values.h - found
-- Looking for winsock.h
-- Looking for winsock.h - not found
-- Looking for sys/socket.h
-- Looking for sys/socket.h - found
-- Looking for dirent.h
-- Looking for dirent.h - found
-- Building on Linux
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
AAIOLIB
    linked by target "fracture" in directory /home/anony/src/cdp/CDP7-master/dev/new
    linked by target "iterfof" in directory /home/anony/src/cdp/CDP7-master/dev/new
    linked by target "newsynth" in directory /home/anony/src/cdp/CDP7-master/dev/new
    linked by target "newtex" in directory /home/anony/src/cdp/CDP7-master/dev/new

-- Configuring incomplete, errors occurred!
See also "/home/anony/src/cdp/CDP7-master/build/CMakeFiles/CMakeOutput.log".
See also "/home/anony/src/cdp/CDP7-master/build/CMakeFiles/CMakeError.log".


Thank you, I will keep trying things here but I definitely appreciate any tips you may be able to offer!

Peter