[DONE] name conflict in console.c

ChibiOS public support forum for all topics not covered by a specific support forum.

Moderators: utzig, lbednarz, tfAteba, barthess, RoccoMarco

User avatar
lilvinz
Posts: 130
Joined: Sat Dec 21, 2013 2:56 pm
Has thanked: 1 time
Been thanked: 6 times

[DONE] name conflict in console.c

Postby lilvinz » Wed Mar 12, 2014 9:16 am

Hi,

i am getting the following name conflicts when building console.c on ubuntu LTS 32bit:

Code: Select all

ChibiOS//os/hal/platforms/Posix/console.c: In function ‘putt’:
ChibiOS//os/hal/platforms/Posix/console.c:77:50: error: declaration of ‘time’ shadows a global declaration [-Werror=shadow]
ChibiOS//os/hal/platforms/Posix/console.c: In function ‘gett’:
ChibiOS//os/hal/platforms/Posix/console.c:86:39: error: declaration of ‘time’ shadows a global declaration [-Werror=shadow]
ChibiOS//os/hal/platforms/Posix/console.c: In function ‘writet’:
ChibiOS//os/hal/platforms/Posix/console.c:93:71: error: declaration of ‘time’ shadows a global declaration [-Werror=shadow]
ChibiOS//os/hal/platforms/Posix/console.c: In function ‘readt’:
ChibiOS//os/hal/platforms/Posix/console.c:103:64: error: declaration of ‘time’ shadows a global declaration [-Werror=shadow]
ChibiOS//os/kernel/src/chvt.c: In function ‘chVTSetI’:
ChibiOS//os/kernel/src/chvt.c:76:44: error: declaration of ‘time’ shadows a global declaration
ChibiOS//os/kernel/src/chschd.c: In function ‘chSchGoSleepTimeoutS’:
ChibiOS//os/kernel/src/chschd.c:189:57: error: declaration of ‘time’ shadows a global declaration
cc1: all warnings being treated as errors


Building on linux mint 15 amd64 doesn't produce this error.
It looks like libc is exporting "time" as a global symbol.

Cheers,

Vinz

theShed
Posts: 50
Joined: Tue Feb 26, 2013 3:43 pm
Location: The flatlands of East Anglia

Re: name conflict in console.c

Postby theShed » Wed Mar 12, 2014 8:59 pm

could you post the gcc version for the two systems?
> gcc --version

thanks
--
mike

User avatar
Giovanni
Site Admin
Posts: 13074
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 758 times
Been thanked: 637 times
Contact:

Re: [TODO] name conflict in console.c

Postby Giovanni » Wed Mar 12, 2014 9:02 pm

Hi,

Forgot this thread... added it to the TODO list.

Giovanni

User avatar
lilvinz
Posts: 130
Joined: Sat Dec 21, 2013 2:56 pm
Has thanked: 1 time
Been thanked: 6 times

Re: [TODO] name conflict in console.c

Postby lilvinz » Wed Mar 12, 2014 9:24 pm

Please note that a lot more files are affected by this.
I added a patch which you may use as you see fit.
Attachments
name_conflict.diff.gz
(6.41 KiB) Downloaded 66 times

User avatar
Giovanni
Site Admin
Posts: 13074
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 758 times
Been thanked: 637 times
Contact:

Re: [DONE] name conflict in console.c

Postby Giovanni » Sun Mar 16, 2014 11:22 am

Hi,

Sorry, not fixing this, I would have to change 2.4.x, 2.6.x, 3.0.0 and the trunk for a warning affecting just the simulator.

You may suppress that specific warning in the makefile when building the simulator. I may perform the changes in 3.0.0 only at a later time.

Giovanni


Return to “General Support”

Who is online

Users browsing this forum: No registered users and 5 guests