Skip to content

Unable to compile on Book #339

@pi3rrot

Description

@pi3rrot

Hello,

I can not success the compilation of the project, it look like i'm using an up-to-date Rapsbian version.

Description:    Raspbian GNU/Linux 11 (bullseye)
cc/c++ (Raspbian 10.2.1-6+rpi1) 10.2.1 20210110

and the result of the make :

cc -Wall -g -O2 -Wno-unused-variable -Wno-unused-function  -o rpidatv rpidatv.c rpigpio.c dvbsenco8.s fec100.c mailbox.c rpidma.c raspberry_pi_revision.c -lm -lrt -lpthread  
rpidatv.c: In function ‘main’:
rpidatv.c:1539:4: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation]
 1539 |    if (free_slots < 0) // WARNING : ORIGINAL CODE WAS < strictly
      |    ^~
rpidatv.c:1542:5: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’
 1542 |     TimeToSleep=((NUM_SAMPLES-free_slots-204*2*4)*1000*16)/((float)SymbolRate*2); // 22ms de Switch process
      |     ^~~~~~~~~~~
rpidatv.c:1842:4: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation]
 1842 |    if (free_slots < 0) // WARNING : ORIGINAL CODE WAS < strictly
      |    ^~
rpidatv.c:1846:5: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’
 1846 |     TimeToSleep=2000+KERNEL_GRANULARITY;
      |     ^~~~~~~~~~~
rpidatv.c: In function ‘CalibrateSystem’:
rpidatv.c:924:2: warning: ‘ppm’ may be used uninitialized in this function [-Wmaybe-uninitialized]
  924 |  printf("Clock PPM = %d\n",ppm);
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/bin/ld: /tmp/ccFaw7sX.o:/root/rpidatv/src/rpigpio.h:25: multiple definition of `pad_gpios_reg'; /tmp/ccCmRK4X.o:/root/rpidatv/src/rpigpio.h:25: first defined here
/usr/bin/ld: /tmp/ccFaw7sX.o:/root/rpidatv/src/rpigpio.h:24: multiple definition of `pcm_reg'; /tmp/ccCmRK4X.o:/root/rpidatv/src/rpigpio.h:24: first defined here
/usr/bin/ld: /tmp/ccFaw7sX.o:/root/rpidatv/src/rpigpio.h:23: multiple definition of `gpio_reg'; /tmp/ccCmRK4X.o:/root/rpidatv/src/rpigpio.h:23: first defined here
/usr/bin/ld: /tmp/ccFaw7sX.o:/root/rpidatv/src/rpigpio.h:22: multiple definition of `dma_reg'; /tmp/ccCmRK4X.o:/root/rpidatv/src/rpigpio.h:22: first defined here
/usr/bin/ld: /tmp/ccFaw7sX.o:/root/rpidatv/src/rpigpio.h:21: multiple definition of `clk_reg'; /tmp/ccCmRK4X.o:/root/rpidatv/src/rpigpio.h:21: first defined here
/usr/bin/ld: /tmp/ccFaw7sX.o:/root/rpidatv/src/rpigpio.h:20: multiple definition of `pwm_reg'; /tmp/ccCmRK4X.o:/root/rpidatv/src/rpigpio.h:20: first defined here
/usr/bin/ld: /tmp/ccFaw7sX.o:/root/rpidatv/src/rpigpio.h:18: multiple definition of `mem_flag'; /tmp/ccCmRK4X.o:/root/rpidatv/src/rpigpio.h:18: first defined here
/usr/bin/ld: /tmp/ccFaw7sX.o:/root/rpidatv/src/rpigpio.h:17: multiple definition of `model'; /tmp/ccCmRK4X.o:/root/rpidatv/src/rpigpio.h:17: first defined here
/usr/bin/ld: /tmp/ccKhNThX.o:/root/rpidatv/src/rpigpio.h:25: multiple definition of `pad_gpios_reg'; /tmp/ccCmRK4X.o:/root/rpidatv/src/rpigpio.h:25: first defined here
/usr/bin/ld: /tmp/ccKhNThX.o:/root/rpidatv/src/rpigpio.h:24: multiple definition of `pcm_reg'; /tmp/ccCmRK4X.o:/root/rpidatv/src/rpigpio.h:24: first defined here
/usr/bin/ld: /tmp/ccKhNThX.o:/root/rpidatv/src/rpigpio.h:23: multiple definition of `gpio_reg'; /tmp/ccCmRK4X.o:/root/rpidatv/src/rpigpio.h:23: first defined here
/usr/bin/ld: /tmp/ccKhNThX.o:/root/rpidatv/src/rpigpio.h:22: multiple definition of `dma_reg'; /tmp/ccCmRK4X.o:/root/rpidatv/src/rpigpio.h:22: first defined here
/usr/bin/ld: /tmp/ccKhNThX.o:/root/rpidatv/src/rpigpio.h:21: multiple definition of `clk_reg'; /tmp/ccCmRK4X.o:/root/rpidatv/src/rpigpio.h:21: first defined here
/usr/bin/ld: /tmp/ccKhNThX.o:/root/rpidatv/src/rpigpio.h:20: multiple definition of `pwm_reg'; /tmp/ccCmRK4X.o:/root/rpidatv/src/rpigpio.h:20: first defined here
/usr/bin/ld: /tmp/ccKhNThX.o:/root/rpidatv/src/rpigpio.h:18: multiple definition of `mem_flag'; /tmp/ccCmRK4X.o:/root/rpidatv/src/rpigpio.h:18: first defined here
/usr/bin/ld: /tmp/ccKhNThX.o:/root/rpidatv/src/rpigpio.h:17: multiple definition of `model'; /tmp/ccCmRK4X.o:/root/rpidatv/src/rpigpio.h:17: first defined here
/usr/bin/ld: /tmp/ccKhNThX.o:/root/rpidatv/src/rpidma.h:92: multiple definition of `ctl'; /tmp/ccCmRK4X.o:/root/rpidatv/src/rpidma.h:92: first defined here
/usr/bin/ld: /tmp/ccKhNThX.o:/root/rpidatv/src/rpidma.h:81: multiple definition of `virtbase'; /tmp/ccCmRK4X.o:/root/rpidatv/src/rpidma.h:81: first defined here
/usr/bin/ld: /tmp/ccKhNThX.o:/root/rpidatv/src/rpidma.h:79: multiple definition of `page_map'; /tmp/ccCmRK4X.o:/root/rpidatv/src/rpidma.h:79: first defined here
/usr/bin/ld: /tmp/ccKhNThX.o:/root/rpidatv/src/rpidma.h:59: multiple definition of `mbox'; /tmp/ccCmRK4X.o:/root/rpidatv/src/rpidma.h:59: first defined here
/usr/bin/ld: /tmp/ccKhNThX.o:/root/rpidatv/src/rpidma.h:27: multiple definition of `NUM_SAMPLES'; /tmp/ccCmRK4X.o:/root/rpidatv/src/rpidma.h:27: first defined here
collect2: error: ld returned 1 exit status
make: *** [Makefile:8: rpidatv] Error 1

I don't know how to change definitions in .h files, and i don't find where are multiples déclarations.
73'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions