Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Linker issues when compiling for ARM target + FEC detection question #90

Closed
ijustlovemath opened this issue May 15, 2017 · 5 comments
Closed

Comments

@ijustlovemath
Copy link

I'm a Linux dev for a university CubeSat team, and we hope to use your frontend to apply Reed-Solomon encoding to our radio transmissions for FEC.

  1. How can we detect the number of bit errors if we don't have the original message present on the receiving end? All of the example programs simply use the original message to do this, but I thought Reed-Solomon has some sort of built in "parity checking" that you can use to gauge if you're past the number of correctable errors.

  2. We're compiling libfec for the MitySOM335x and are seeing the following errors:

checking for stdlib.h... (cached) yes
checking for GNU libc compatible malloc... no
checking for stdlib.h... (cached) yes
checking for GNU libc compatible realloc... no
checking fec.h usability... no
checking fec.h presence... no
checking for fec.h... no
checking fftw3.h usability... no
checking fftw3.h presence... no
checking for fftw3.h... no
checking for fftwf_plan_dft_1d in -lfftw3f... no
configure: WARNING: fftw3 library useful but not required
checking for create_viterbi27 in -lfec... no
configure: WARNING: fec library useful but not required

Related to not finding malloc:

src/audio/src/cvsd.c: In function 'cvsd_create':
src/audio/src/cvsd.c:74:5: warning: implicit declaration of function 'rpl_malloc'
src/fec/src/fec_golay2412.c: In function 'fec_golay2412_create':
src/fec/src/fec_golay2412.c:240:5: warning: implicit declaration of function 'rpl_malloc'
src/fec/src/fec_hamming74.c: In function 'fec_hamming74_create':
src/fec/src/fec_hamming74.c:60:5: warning: implicit declaration of function 'rpl_malloc'
src/fec/src/fec_hamming84.c: In function 'fec_hamming84_create':
src/fec/src/fec_hamming84.c:76:5: warning: implicit declaration of function 'rpl_malloc'
src/fec/src/fec_hamming128.c: In function 'fec_hamming128_create':
src/fec/src/fec_hamming128.c:146:5: warning: implicit declaration of function 'rpl_malloc'
src/fec/src/fec_pass.c: In function 'fec_pass_create':
src/fec/src/fec_pass.c:34:5: warning: implicit declaration of function 'rpl_malloc'
src/fec/src/fec_rep3.c: In function 'fec_rep3_create':
src/fec/src/fec_rep3.c:35:5: warning: implicit declaration of function 'rpl_malloc'
src/fec/src/fec_rep5.c: In function 'fec_rep5_create':
src/fec/src/fec_rep5.c:35:5: warning: implicit declaration of function 'rpl_malloc'
src/fec/src/fec_secded2216.c: In function 'fec_secded2216_create':
src/fec/src/fec_secded2216.c:200:5: warning: implicit declaration of function 'rpl_malloc'
src/fec/src/fec_secded3932.c: In function 'fec_secded3932_create':
src/fec/src/fec_secded3932.c:216:5: warning: implicit declaration of function 'rpl_malloc'
src/fec/src/fec_secded7264.c: In function 'fec_secded7264_create':
src/fec/src/fec_secded7264.c:219:5: warning: implicit declaration of function 'rpl_malloc'
src/fec/src/interleaver.c: In function 'interleaver_create':
src/fec/src/interleaver.c:81:5: warning: implicit declaration of function 'rpl_malloc'
src/fec/src/packetizer.c: In function 'packetizer_create':
src/fec/src/packetizer.c:98:5: warning: implicit declaration of function 'rpl_malloc'
src/fec/src/packetizer.c: In function 'packetizer_realloc_buffers':
src/fec/src/packetizer.c:419:5: warning: implicit declaration of function 'rpl_realloc'
src/filter/src/firdespm.c: In function 'firdespm_create':
src/filter/src/firdespm.c:249:5: warning: implicit declaration of function 'rpl_malloc'
src/framing/src/bpacketgen.c: In function 'bpacketgen_create':
src/framing/src/bpacketgen.c:85:5: warning: implicit declaration of function 'rpl_malloc'
src/framing/src/bpacketgen.c: In function 'bpacketgen_recreate':
src/framing/src/bpacketgen.c:160:5: warning: implicit declaration of function 'rpl_realloc'
src/framing/src/bpacketsync.c: In function 'bpacketsync_create':
src/framing/src/bpacketsync.c:103:5: warning: implicit declaration of function 'rpl_malloc'
src/framing/src/bpacketsync.c: In function 'bpacketsync_reconfig':
src/framing/src/bpacketsync.c:449:5: warning: implicit declaration of function 'rpl_realloc'
src/framing/src/detector_cccf.c: In function 'detector_cccf_create':
src/framing/src/detector_cccf.c:124:5: warning: implicit declaration of function 'rpl_malloc'
src/framing/src/framegen64.c: In function 'framegen64_create':
src/framing/src/framegen64.c:53:5: warning: implicit declaration of function 'rpl_malloc'
src/framing/src/framesync64.c: In function 'framesync64_create':
src/framing/src/framesync64.c:125:5: warning: implicit declaration of function 'rpl_malloc'
src/framing/src/flexframegen.c: In function 'flexframegen_create':
src/framing/src/flexframegen.c:104:5: warning: implicit declaration of function 'rpl_malloc'
src/framing/src/flexframegen.c: In function 'flexframegen_reconfigure':
src/framing/src/flexframegen.c:390:5: warning: implicit declaration of function 'rpl_realloc'
src/framing/src/flexframesync.c: In function 'flexframesync_create':
src/framing/src/flexframesync.c:147:5: warning: implicit declaration of function 'rpl_malloc'
src/framing/src/flexframesync.c: In function 'flexframesync_decode_header':
src/framing/src/flexframesync.c:632:5: warning: implicit declaration of function 'rpl_realloc'
src/framing/src/gmskframegen.c: In function 'gmskframegen_create':
src/framing/src/gmskframegen.c:92:5: warning: implicit declaration of function 'rpl_malloc'
src/framing/src/gmskframegen.c: In function 'gmskframegen_assemble':
src/framing/src/gmskframegen.c:241:9: warning: implicit declaration of function 'rpl_realloc'
src/framing/src/gmskframesync.c: In function 'gmskframesync_create':
src/framing/src/gmskframesync.c:160:5: warning: implicit declaration of function 'rpl_malloc'
src/framing/src/gmskframesync.c: In function 'gmskframesync_decode_header':
src/framing/src/gmskframesync.c:832:9: warning: implicit declaration of function 'rpl_realloc'
src/framing/src/ofdmflexframegen.c: In function 'ofdmflexframegen_create':
src/framing/src/ofdmflexframegen.c:155:5: warning: implicit declaration of function 'rpl_malloc'
src/framing/src/ofdmflexframegen.c: In function 'ofdmflexframegen_reconfigure':
src/framing/src/ofdmflexframegen.c:441:5: warning: implicit declaration of function 'rpl_realloc'
src/framing/src/ofdmflexframesync.c: In function 'ofdmflexframesync_create':
src/framing/src/ofdmflexframesync.c:141:5: warning: implicit declaration of function 'rpl_malloc'
src/framing/src/ofdmflexframesync.c: In function 'ofdmflexframesync_decode_header':
src/framing/src/ofdmflexframesync.c:571:9: warning: implicit declaration of function 'rpl_realloc'
src/framing/src/qdetector_cccf.c: In function 'qdetector_cccf_create':
src/framing/src/qdetector_cccf.c:96:5: warning: implicit declaration of function 'rpl_malloc'
src/framing/src/qpacketmodem.c: In function 'qpacketmodem_create':
src/framing/src/qpacketmodem.c:55:5: warning: implicit declaration of function 'rpl_malloc'
src/framing/src/qpacketmodem.c: In function 'qpacketmodem_configure':
src/framing/src/qpacketmodem.c:148:5: warning: implicit declaration of function 'rpl_realloc'
src/framing/src/qpilotgen.c: In function 'qpilotgen_create':
src/framing/src/qpilotgen.c:63:5: warning: implicit declaration of function 'rpl_malloc'
src/framing/src/qpilotsync.c: In function 'qpilotsync_create':
src/framing/src/qpilotsync.c:74:5: warning: implicit declaration of function 'rpl_malloc'
In file included from src/matrix/src/smatrixb.c:48:0:
src/matrix/src/smatrix.c: In function 'smatrixb_create':
src/matrix/src/smatrix.c:71:5: warning: implicit declaration of function 'rpl_malloc'
src/matrix/src/smatrix.c: In function 'smatrixb_insert':
src/matrix/src/smatrix.c:325:5: warning: implicit declaration of function 'rpl_realloc'
In file included from src/matrix/src/smatrixf.c:48:0:
src/matrix/src/smatrix.c: In function 'smatrixf_create':
src/matrix/src/smatrix.c:71:5: warning: implicit declaration of function 'rpl_malloc'
src/matrix/src/smatrix.c: In function 'smatrixf_insert':
src/matrix/src/smatrix.c:325:5: warning: implicit declaration of function 'rpl_realloc'
In file included from src/matrix/src/smatrixi.c:48:0:
src/matrix/src/smatrix.c: In function 'smatrixi_create':
src/matrix/src/smatrix.c:71:5: warning: implicit declaration of function 'rpl_malloc'
src/matrix/src/smatrix.c: In function 'smatrixi_insert':
src/matrix/src/smatrix.c:325:5: warning: implicit declaration of function 'rpl_realloc'
src/modem/src/ampmodem.c: In function 'ampmodem_create':
src/modem/src/ampmodem.c:78:5: warning: implicit declaration of function 'rpl_malloc'
src/modem/src/cpfskdem.c: In function 'cpfskdem_create':
src/modem/src/cpfskdem.c:156:5: warning: implicit declaration of function 'rpl_malloc'
src/modem/src/cpfskmod.c: In function 'cpfskmod_create':
src/modem/src/cpfskmod.c:100:5: warning: implicit declaration of function 'rpl_malloc'
src/modem/src/fskdem.c: In function 'fskdem_create':
src/modem/src/fskdem.c:81:5: warning: implicit declaration of function 'rpl_malloc'
src/modem/src/fskmod.c: In function 'fskmod_create':
src/modem/src/fskmod.c:70:5: warning: implicit declaration of function 'rpl_malloc'
src/modem/src/gmskdem.c: In function 'gmskdem_create':
src/modem/src/gmskdem.c:88:5: warning: implicit declaration of function 'rpl_malloc'
src/modem/src/gmskmod.c: In function 'gmskmod_create':
src/modem/src/gmskmod.c:67:5: warning: implicit declaration of function 'rpl_malloc'
src/multichannel/src/ofdmframegen.c: In function 'ofdmframegen_create':
src/multichannel/src/ofdmframegen.c:105:5: warning: implicit declaration of function 'rpl_malloc'
src/multichannel/src/ofdmframesync.c: In function 'ofdmframesync_create':
src/multichannel/src/ofdmframesync.c:147:5: warning: implicit declaration of function 'rpl_malloc'
src/optim/src/chromosome.c: In function 'chromosome_create':
src/optim/src/chromosome.c:43:5: warning: implicit declaration of function 'rpl_malloc'
src/optim/src/gasearch.c: In function 'gasearch_create_advanced':
src/optim/src/gasearch.c:72:5: warning: implicit declaration of function 'rpl_malloc'
src/optim/src/gasearch.c: In function 'gasearch_set_population_size':
src/optim/src/gasearch.c:181:5: warning: implicit declaration of function 'rpl_realloc'
src/optim/src/gradsearch.c: In function 'gradsearch_create':
src/optim/src/gradsearch.c:59:5: warning: implicit declaration of function 'rpl_malloc'
src/optim/src/qnsearch.c: In function 'qnsearch_create':
src/optim/src/qnsearch.c:37:5: warning: implicit declaration of function 'rpl_malloc'
src/sequence/src/bsequence.c: In function 'bsequence_create':
src/sequence/src/bsequence.c:51:5: warning: implicit declaration of function 'rpl_malloc'
src/sequence/src/msequence.c: In function 'msequence_create':
src/sequence/src/msequence.c:77:5: warning: implicit declaration of function 'rpl_malloc'
src/utility/src/shift_array.c: In function 'liquid_lcircshift':
src/utility/src/shift_array.c:101:5: warning: implicit declaration of function 'rpl_malloc'
arm-arago-linux-gnueabi-ar: creating libliquid.a

Everything compiles and works fine natively, so it's possible that our CMake setup is not passing options appropriately to autoconf. Here's what we're using to pull in your project:

    ExternalProject_Add(${LIQUID_NAME}
        DEPENDS fec
        PREFIX ${LIQUID_NAME}
        GIT_REPOSITORY https://github.com/jgaeddert/liquid-dsp.git
        INSTALL_COMMAND ${CDH_SUDO} ${MAKE} install # ${CDH_INSTALL_CMD}
        INSTALL_DIR ${CDH_INSTALL_DIR}
        CMAKE_ARGS
            -DCMAKE_INSTALL_PREFIX=<INSTALL_DIR> ${CDH_CMAKE_ARGS}
        UPDATE_COMMAND ${LIQUID_LIB_BUILD_DIR}/bootstrap.sh
        CONFIGURE_COMMAND ${LIQUID_LIB_BUILD_DIR}/configure --prefix=<INSTALL_DIR> ${CDH_AUTOCONF_HOST} ${CDH_AUTOCONF_BUILD}
        BUILD_COMMAND ${MAKE}
    ##    CMAKE_ARGS -DCMAKE_INSTALL_PREFIX:PATH=${LIQUID_LIB_PREFIX_DIR}
    ##    CMAKE_GENERATOR ${CMAKE_GENERATOR}
         BUILD_IN_SOURCE 1
    ##    INSTALL_COMMAND ""
    #    UPDATE_COMMAND ""
        )

The important bit is the ${CDH_AUTOCONF_HOST} and ${CDH_AUTOCONF_BUILD} variables, which have respective values of --host=arm-arago-linux-gnueabi and --build=i386-pc-linux-gnu

I think this has something to do with the include directories used by cmake not being properly passed into autoconf, though that's just a guess. Have you all successfully built this library for ARM targets before?

@itdaniher
Copy link

Chiming in - I've built liquid-dsp (for windytan's redsea amongst others) just fine on Ubuntu 16.04 and Debian 8 and 9, on both 32b and 64b ARM platforms.

Cheers!

@ijustlovemath
Copy link
Author

ijustlovemath commented May 16, 2017 via email

@itdaniher
Copy link

Not that I recall. What distro are you targetting?

@ijustlovemath
Copy link
Author

ijustlovemath commented May 16, 2017 via email

@ijustlovemath
Copy link
Author

We fixed this by defining CPPFLAGS and CFLAGS to manually include the headers and static libraries required during the CONFIGURE_COMMAND part of our ExternalProject_Add()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants