jbentham / rpi

Source code for the Raspberry Pi
108 stars 30 forks source link

Can't compile #10

Closed Pejosonic closed 2 years ago

Pejosonic commented 2 years ago

Hi! i'm trying to compile for the first time using the instructions on your blog post. I have almost no experience in C.

when running in a Rpi 3B+ gcc -Wall -o rpi_pixleds rpi_pixleds.c rpi_dma_utils.c the output is:

/usr/bin/ld: /tmp/ccpEUIpK.o:(.bss+0x48): multiple definition of `clk_regs'; /tmp/ccSOHYlH.o:(.bss+0x18): first defined here
collect2: error: ld returned 1 exit status

I'm trying to understand where are the both deffinitions of clk_regs but having no luck by now. Any help with this issue will be apreciated. Maybe some problem with gcc version or flags?

cpinkham commented 2 years ago

I have a forked copy which fixes this issue, allows compiling under g++, and includes a simple Makefile to make compiling easier. I submitted a pull request but I know Jeremy is busy so it may be a while before the pull request gets merged.

Pejosonic commented 2 years ago

There has been very bussy weeks. @cpinkham I'm testing the branch from your repo and it's working on RPI 3 b+. Thank you very much