Compiles no longer successful

137 views
Skip to first unread message

Bill Barnett

unread,
May 28, 2021, 5:56:21 PM5/28/21
to bcm2835
Compiles that were completing successful no longer do so.  Using gcc
gcc GPIO_test.c -O GPIO_test -l bcm2835

tracback:

/usr/bin/ld: GPIO_test: in function `_fini':
:(.fini+0x0): multiple definition of `_fini'; /usr/lib/gcc/arm-linux-gnueabihf/8/../../../arm-linux-gnueabihf/crti.o:(.fini+0x0): first defined here
/usr/bin/ld: GPIO_test: in function `__data_start':
:(.data+0x0): multiple definition of `__data_start'; /usr/lib/gcc/arm-linux-gnueabihf/8/../../../arm-linux-gnueabihf/crt1.o:(.data+0x0): first defined here
/usr/bin/ld: GPIO_test: in function `__data_start':
:(.data+0x4): multiple definition of `__dso_handle'; /usr/lib/gcc/arm-linux-gnueabihf/8/crtbegin.o:(.data+0x0): first defined here
/usr/bin/ld: GPIO_test:(.rodata+0x0): multiple definition of `_IO_stdin_used'; /usr/lib/gcc/arm-linux-gnueabihf/8/../../../arm-linux-gnueabihf/crt1.o:(.rodata.cst4+0x0): first defined here
/usr/bin/ld: GPIO_test: in function `_start':
:(.text+0x0): multiple definition of `_start'; /usr/lib/gcc/arm-linux-gnueabihf/8/../../../arm-linux-gnueabihf/crt1.o:(.text+0x0): first defined here
/usr/bin/ld: GPIO_test: in function `main':
:(.text+0xf0): multiple definition of `main'; /tmp/ccwquZxu.o:GPIO_test.c:(.text+0x0): first defined here
/usr/bin/ld: GPIO_test: in function `_init':
:(.init+0x0): multiple definition of `_init'; /usr/lib/gcc/arm-linux-gnueabihf/8/../../../arm-linux-gnueabihf/crti.o:(.init+0x0): first defined here
/usr/bin/ld: /usr/lib/gcc/arm-linux-gnueabihf/8/crtend.o:(.tm_clone_table+0x0): multiple definition of `__TMC_END__'; GPIO_test::(.data+0x40): first defined here
collect2: error: ld returned 1 exit status

Mike McCauley

unread,
May 28, 2021, 8:00:13 PM5/28/21
to bcm...@googlegroups.com, Bill Barnett
Hello,


On Saturday, 29 May 2021 07:56:21 AEST Bill Barnett wrote:
> Compiles that were completing successful no longer do so. Using gcc
> gcc GPIO_test.c -O GPIO_test -l bcm2835

Hmmm, are you sure that is the command line?

The -O flag would normally be followed by an optimisation level, not the name
of a file. Perhaps you meant -o?

Also, GPIO_test.c is not part of the bcm2835 distribution, so I cant tell what
it is you are compiling. Where did it come from?

But it looks to me like there is a problem with the libraries or gcc on your
system. What has changed since it used to work?

Cheers.
--
Mike McCauley VK4AMM mi...@airspayce.com
Airspayce Pty Ltd 9 Bulbul Place Currumbin Waters QLD 4223 Australia
http://www.airspayce.com 5R3MRFM2+X6
Phone +61 7 5598-7474



Bill Barnett

unread,
May 28, 2021, 8:04:20 PM5/28/21
to bcm2835
'-o'  corrected it.. thank you..
Reply all
Reply to author
Forward
0 new messages