This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Zbar on Beaglebone

Genius 5785 points

Hello,

I'd like to run the application below. It's working using the prebuilt images from the wiki. I want the application to run on latest Processor SDK. I think I need to make and install the application on the root file system. I can configure Makefile by invoking the configure operation with "--without-imagemagick" option. But I see some errors by invoking the make operation. How do I resolve the problem? Please give me some advise.

http://processors.wiki.ti.com/index.php/Barcode_and_QR_Code_with_Beaglebone

zbar/processor/posix.h:49:5: error: unknown type name 'poll_handler_t'
zbar/processor/posix.c: In function 'proc_cache_polling':
zbar/processor/posix.c:208:18: error: 'processor_state_t' has no member named 'thr_polling'
zbar/processor/posix.c:208:43: error: 'processor_state_t' has no member named 'polling'
zbar/processor/posix.c:209:5: error: implicit declaration of function 'alloc_polls' [-Werror=implicit-function-declaration]
zbar/processor/posix.c:209:23: error: 'processor_state_t' has no member named 'thr_polling'
zbar/processor/posix.c:210:17: error: 'processor_state_t' has no member named 'thr_polling'
zbar/processor/posix.c:210:41: error: 'processor_state_t' has no member named 'polling'
zbar/processor/posix.c:211:23: error: invalid application of 'sizeof' to incomplete type 'struct pollfd'
zbar/processor/posix.c:212:17: error: 'processor_state_t' has no member named 'thr_polling'
zbar/processor/posix.c:212:46: error: 'processor_state_t' has no member named 'polling'
zbar/processor/posix.c:213:23: error: 'poll_handler_t' undeclared (first use in this function)
zbar/processor/posix.c:213:23: note: each undeclared identifier is reported only once for each function it appears in
zbar/processor/posix.c:213:38: error: expected expression before ')' token
zbar/processor/posix.c: In function 'proc_kick_handler':
zbar/processor/posix.c:220:5: error: 'processor_state_t' has no member named 'polling'
zbar/processor/posix.c: In function 'proc_poll_inputs':
zbar/processor/posix.c:237:32: error: called object 'state->pre_poll_handler' is not a function
zbar/processor/posix.c:239:5: error: unknown type name 'poll_desc_t'
zbar/processor/posix.c:239:28: error: 'processor_state_t' has no member named 'thr_polling'
zbar/processor/posix.c:240:5: error: request for member 'num' in something not a structure or union
zbar/processor/posix.c:241:5: error: implicit declaration of function 'poll' [-Werror=implicit-function-declaration]
zbar/processor/posix.c:241:20: error: request for member 'fds' in something not a structure or union
zbar/processor/posix.c:241:28: error: request for member 'num' in something not a structure or union
zbar/processor/posix.c:246:14: error: request for member 'num' in something not a structure or union
zbar/processor/posix.c:247:13: error: request for member 'fds' in something not a structure or union
zbar/processor/posix.c:248:17: error: request for member 'handlers' in something not a structure or union
zbar/processor/posix.c:249:18: error: request for member 'handlers' in something not a structure or union
zbar/processor/posix.c:250:14: error: request for member 'fds' in something not a structure or union
zbar/processor/posix.c: In function '_zbar_processor_input_wait':
zbar/processor/posix.c:262:13: error: 'processor_state_t' has no member named 'thr_polling'
zbar/processor/posix.c: In function '_zbar_processor_init':
zbar/processor/posix.c:286:9: error: implicit declaration of function 'add_poll' [-Werror=implicit-function-declaration]
zbar/processor/posix.c: In function '_zbar_processor_cleanup':
zbar/processor/posix.c:300:13: error: 'processor_state_t' has no member named 'polling'
zbar/processor/posix.c:301:19: error: 'processor_state_t' has no member named 'polling'
zbar/processor/posix.c:302:14: error: 'processor_state_t' has no member named 'polling'
zbar/processor/posix.c:304:18: error: 'processor_state_t' has no member named 'thr_polling'
zbar/processor/posix.c:306:13: error: 'processor_state_t' has no member named 'polling'
zbar/processor/posix.c:307:19: error: 'processor_state_t' has no member named 'polling'
zbar/processor/posix.c:308:14: error: 'processor_state_t' has no member named 'polling'
zbar/processor/posix.c:310:18: error: 'processor_state_t' has no member named 'thr_polling'
zbar/processor/posix.c:312:13: error: 'processor_state_t' has no member named 'thr_polling'
zbar/processor/posix.c:313:19: error: 'processor_state_t' has no member named 'thr_polling'
zbar/processor/posix.c:314:14: error: 'processor_state_t' has no member named 'thr_polling'
zbar/processor/posix.c:316:13: error: 'processor_state_t' has no member named 'thr_polling'
zbar/processor/posix.c:317:19: error: 'processor_state_t' has no member named 'thr_polling'
zbar/processor/posix.c:318:14: error: 'processor_state_t' has no member named 'thr_polling'
zbar/processor/posix.c: In function '_zbar_processor_enable':
zbar/processor/posix.c:334:9: error: implicit declaration of function 'remove_poll' [-Werror=implicit-function-declaration]
cc1: all warnings being treated as errors
make[2]: *** [zbar/processor/zbar_libzbar_la-posix.lo] Error 1
make[2]: Leaving directory `/home/user/temp/zbar-code'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/user/temp/zbar-code'
make: *** [all] Error 2

Regards,
Kazu

  • Hi,
    For what SDK version are you building ?
  • Hello Titus,

    I'm trying to make it with SDKv6 first because kernel version is similar. (SDKv6 is v3.2.0. Wiki is v3.1.0.) The combination of the boot binaries of SDKv6 and the saral-zbar.tgz rootfs of Wiki is working. I want to try it with complete Processor SDKv1 finally.

    I found my mistake to do the make and the configure. The compiler was selected gcc by the configure. I think the compiler is needed to select arm-linux-gnueabihf-gcc. So I operate the source command , but I see the error message during the configure below. It seems the compiler can't run. My host is Ubuntu 12.04 on VMware.

    Regards,
    Kazu

    user@ubuntu:~/temp/zbar-code$ pwd
    /home/user/temp/zbar-code
    user@ubuntu:~/temp/zbar-code$ ls
    1               COPYING      Makefile.in     zbar-gtk.pc
    2               doc          NEWS            zbar-gtk.pc.in
    3               examples     perl            zbar.ico
    4               gtk          plugin          zbarimg
    aclocal.m4      HACKING      pygtk           zbar.nsi
    android         include      python          zbar.pc
    autom4te.cache  INSTALL      qt              zbar.pc.in
    ChangeLog       iphone       README          zbar-qt.pc
    config          java         README.windows  zbar-qt.pc.in
    config.log      libtool      test            zbar.spec.in
    config.status   LICENSE      TODO            zbar-src-patches.tgz
    configure       Makefile     zbar
    configure.ac    Makefile.am  zbarcam
    user@ubuntu:~/temp/zbar-code$ source /home/user/ti-sdk-am335x-evm-06.00.00.00/linux-devkit/environment-setup
    [linux-devkit]:~/temp/zbar-code>  autoreconf --install
    configure.ac:142: warning: macro `AM_ICONV' not found in library
    libtoolize: `config/config.guess' is newer: use `--force' to overwrite
    libtoolize: `config/config.sub' is newer: use `--force' to overwrite
    configure.ac:142: warning: macro `AM_ICONV' not found in library
    [linux-devkit]:~/temp/zbar-code> ./configure --prefix=/usr --without-gtk --without-python --without-qt
    configure: loading site script /home/user/ti-sdk-am335x-evm-06.00.00.00/linux-devkit/site-config-armv7ahf-vfp-neon-3.2-oe-linux-gnueabi
    checking for a BSD-compatible install... /usr/bin/install -c
    checking whether build environment is sane... yes
    checking for a thread-safe mkdir -p... /bin/mkdir -p
    checking for gawk... no
    checking for mawk... mawk
    checking whether make sets $(MAKE)... yes
    checking build system type... i686-pc-linux-gnu
    checking host system type... i686-pc-linux-gnu
    checking how to print strings... printf
    checking for style of include used by make... GNU
    checking for gcc... arm-linux-gnueabihf-gcc
    checking whether the C compiler works... yes
    checking for C compiler default output file name... a.out
    checking for suffix of executables...
    checking whether we are cross compiling... configure: error: in `/home/user/temp/zbar-code':
    configure: error: cannot run C compiled programs.
    If you meant to cross compile, use `--host'.
    See `config.log' for more details
    [linux-devkit]:~/temp/zbar-code>

  • Hello Titus,

    Would it be possible for you to resolve the problem?

    Regards,
    Kazu