Go to Post I for one think this kind of robot "love" is absolutely inappropriate for children and both teams should have been condemned for such graphic displays. - Chris is me [more]
Home
Go Back   Chief Delphi > Technical > Programming > C/C++
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
 
Thread Tools Rating: Thread Rating: 6 votes, 5.00 average. Display Modes
  #1   Spotlight this post!  
Unread 19-01-2011, 16:20
mikets's Avatar
mikets mikets is offline
Software Engineer
FRC #0492 (Titan Robotics)
Team Role: Mentor
 
Join Date: Jan 2010
Rookie Year: 2008
Location: Bellevue, WA
Posts: 667
mikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of light
Re: Wind River build environment

Thank you for the pointer. That may be the document I am looking for. I will scan through it tonight to see if it contains information that will solve our issues.
__________________
Reply With Quote
  #2   Spotlight this post!  
Unread 21-01-2011, 01:42
mikets's Avatar
mikets mikets is offline
Software Engineer
FRC #0492 (Titan Robotics)
Team Role: Mentor
 
Join Date: Jan 2010
Rookie Year: 2008
Location: Bellevue, WA
Posts: 667
mikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of light
Re: Wind River build environment

I finally figured out what caused all the errors. Apparently, Wind River by default enabled multiple platforms (PPC32diab, PPC32gnu, PPC603diab and PPC603gnu). If I unchecked everything except for PPC603gnu. All the wierd errors are gone. BTW, is there a document showing me what to pick on the million configurations Project Properties offered me? I used to assume if no document tells me anything, it must be okay to take the default. But apparently not for this case.
After fixing some typos in the code. I was able to compile the project almost error free. However, I still got a few errors that got me scratching my head. For example, it complained about the line: START_ROBOT_CLASS(MyRobot); with the following errors.
Code:
Logomotion_partialImage/Debug/Objects/main.o(.text+0x0): In function `FRC_userClassFactory()':
C:/Documents and Settings/Administrator/Frc/2011/code/Logomotion/main.cpp:347: multiple definition of `FRC_userClassFactory()'
Logomotion_partialImage/Debug/Objects/Logomotion/main.o(.text+0x0):C:/Documents and Settings/Administrator/Frc/2011/code/Logomotion/main.cpp:347: first defined here
Logomotion_partialImage/Debug/Objects/main.o(.text+0x134): In function `FRC_UserProgram_StartupLibraryInit':
C:/Documents and Settings/Administrator/Frc/2011/code/Logomotion/main.cpp:471: multiple definition of `FRC_UserProgram_StartupLibraryInit'
Logomotion_partialImage/Debug/Objects/Logomotion/main.o(.text+0x134):C:/Documents and Settings/Administrator/Frc/2011/code/Logomotion/main.cpp:471: first defined here
Logomotion_partialImage/Debug/Objects/main.o(.text+0x224): In function `global constructors keyed to FRC_userClassFactory()':
C:/Documents and Settings/Administrator/Frc/2011/code/Logomotion/main.cpp:472: multiple definition of `global constructors keyed to FRC_userClassFactory()'
Logomotion_partialImage/Debug/Objects/Logomotion/main.o(.text+0x224):C:/Documents and Settings/Administrator/Frc/2011/code/Logomotion/main.cpp:472: first defined here
Logomotion_partialImage/Debug/Objects/main.o(.text+0x26c): In function `global destructors keyed to FRC_userClassFactory()':
C:/Documents and Settings/Administrator/Frc/2011/code/Logomotion/main.cpp:473: multiple definition of `global destructors keyed to FRC_userClassFactory()'
Logomotion_partialImage/Debug/Objects/Logomotion/main.o(.text+0x26c):C:/Documents and Settings/Administrator/Frc/2011/code/Logomotion/main.cpp:473: first defined here
collect2: ld returned 256 exit status
if [ ! -d "`dirname "Logomotion/Debug/Logomotion.out"`" ]; then mkdir -p "`dirname "Logomotion/Debug/Logomotion.out"`"; fi;echo "building Logomotion/Debug/Logomotion.out";rm -f "Logomotion/Debug/Logomotion.out";nmppc Logomotion_partialImage/Debug/Logomotion_partialImage.o  | tclsh C:/WindRiver/vxworks-6.3/host/resource/hutils/tcl/munch.tcl -c ppc > Logomotion/Debug/ctdt.c; ccppc -g -mcpu=603 -mstrict-align -mno-implicit-fp -mlongcall -fdollars-in-identifiers -Wall  -IC:/WindRiver/vxworks-6.3/target/h -IC:/WindRiver/vxworks-6.3/target/h/wrn/coreip -IC:/WindRiver/vxworks-6.3/target/h/WPIlib   -DCPU=PPC603 -DTOOL_FAMILY=gnu -DTOOL=gnu -D_WRS_KERNEL     -o Logomotion/Debug/ctdt.o -c Logomotion/Debug/ctdt.c;%l  inkerprefix% ccppc -r -nostdlib -Wl,-X -T C:/WindRiver/vxworks-6.3/target/h/tool/gnu/ldscripts/link.OUT -o "Logomotion/Debug/Logomotion.out" Logomotion/Debug/ctdt.o Logomotion_partialImage/Debug/Logomotion_partialImage.o       && if [ "0" = "1" ]; then plink "Logomotion/Debug/Logomotion.out";fi
building Logomotion/Debug/Logomotion.out
nmppc: 'Logomotion_partialImage/Debug/Logomotion_partialImage.o': No such file
C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\make209613.sh: %l: command not found
C:\WindRiver\vxworks-6.3\host\x86-win32\bin\make.exe: *** [Logomotion/Debug/Logomotion.out] Error 127
Build Failed in Project 'Logomotion' (Process Exit Value was 2):   2011-01-20 22:28:32   (Elapsed Time: 00:04)
If I commented out the line, I got the following error that it couldn't generate the out file (probably because I commented out the START_ROBOT_CLASS line:
Code:
Build Started in Project 'Logomotion':   2011-01-20 22:41:39
Generation of makefiles started.
Generation of makefiles finished (Elapsed Time: 00:00).
Platform: Wind River VxWorks 6.3
Command: make --no-print-directory BUILD_SPEC=PPC603gnu DEBUG_MODE=1 TRACE=1
Working Directory: C:/Documents and Settings/Administrator/Frc/2011/code/Logomotion/PPC603gnu
if [ ! -d "`dirname "Logomotion_partialImage/Debug/Objects/Logomotion/main.o"`" ]; then mkdir -p "`dirname "Logomotion_partialImage/Debug/Objects/Logomotion/main.o"`"; fi;echo "building Logomotion_partialImage/Debug/Objects/Logomotion/main.o"; ccppc -g -mcpu=603 -mstrict-align -mno-implicit-fp -mlongcall -ansi -Wall  -MD -MP  -IC:/WindRiver/vxworks-6.3/target/h -IC:/WindRiver/vxworks-6.3/target/h/wrn/coreip -IC:/WindRiver/vxworks-6.3/target/h/WPIlib   -DCPU=PPC603 -DTOOL_FAMILY=gnu -DTOOL=gnu -D_WRS_KERNEL    -o "Logomotion_partialImage/Debug/Objects/Logomotion/main.o" -c "C:/Documents and Settings/Administrator/Frc/2011/code/Logomotion/main.cpp"
building Logomotion_partialImage/Debug/Objects/Logomotion/main.o
if [ ! -d "`dirname "Logomotion_partialImage/Debug/Objects/main.o"`" ]; then mkdir -p "`dirname "Logomotion_partialImage/Debug/Objects/main.o"`"; fi;echo "building Logomotion_partialImage/Debug/Objects/main.o"; ccppc -g -mcpu=603 -mstrict-align -mno-implicit-fp -mlongcall -ansi -Wall  -MD -MP  -IC:/WindRiver/vxworks-6.3/target/h -IC:/WindRiver/vxworks-6.3/target/h/wrn/coreip -IC:/WindRiver/vxworks-6.3/target/h/WPIlib   -DCPU=PPC603 -DTOOL_FAMILY=gnu -DTOOL=gnu -D_WRS_KERNEL    -o "Logomotion_partialImage/Debug/Objects/main.o" -c "C:/Documents and Settings/Administrator/Frc/2011/code/Logomotion/main.cpp"
building Logomotion_partialImage/Debug/Objects/main.o
if [ ! -d "`dirname "Logomotion_partialImage/Debug/Logomotion_partialImage.o"`" ]; then mkdir -p "`dirname "Logomotion_partialImage/Debug/Logomotion_partialImage.o"`"; fi;echo "building Logomotion_partialImage/Debug/Logomotion_partialImage.o"; ccppc -r -nostdlib -Wl,-X  -o "Logomotion_partialImage/Debug/Logomotion_partialImage.o" Logomotion_partialImage/Debug/Objects/Logomotion/DashboardDataFormat.o Logomotion_partialImage/Debug/Objects/Logomotion/main.o Logomotion_partialImage/Debug/Objects/main.o      && if [ "0" = "1" ]; then plink "Logomotion_partialImage/Debug/Logomotion_partialImage.o";fi
building Logomotion_partialImage/Debug/Logomotion_partialImage.o
if [ ! -d "`dirname "Logomotion/Debug/Logomotion.out"`" ]; then mkdir -p "`dirname "Logomotion/Debug/Logomotion.out"`"; fi;echo "building Logomotion/Debug/Logomotion.out";rm -f "Logomotion/Debug/Logomotion.out";nmppc Logomotion_partialImage/Debug/Logomotion_partialImage.o  | tclsh C:/WindRiver/vxworks-6.3/host/resource/hutils/tcl/munch.tcl -c ppc > Logomotion/Debug/ctdt.c; ccppc -g -mcpu=603 -mstrict-align -mno-implicit-fp -mlongcall -fdollars-in-identifiers -Wall  -IC:/WindRiver/vxworks-6.3/target/h -IC:/WindRiver/vxworks-6.3/target/h/wrn/coreip -IC:/WindRiver/vxworks-6.3/target/h/WPIlib   -DCPU=PPC603 -DTOOL_FAMILY=gnu -DTOOL=gnu -D_WRS_KERNEL     -o Logomotion/Debug/ctdt.o -c Logomotion/Debug/ctdt.c;%l  inkerprefix% ccppc -r -nostdlib -Wl,-X -T C:/WindRiver/vxworks-6.3/target/h/tool/gnu/ldscripts/link.OUT -o "Logomotion/Debug/Logomotion.out" Logomotion/Debug/ctdt.o Logomotion_partialImage/Debug/Logomotion_partialImage.o       && if [ "0" = "1" ]; then plink "Logomotion/Debug/Logomotion.out";fi
building Logomotion/Debug/Logomotion.out
C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\make32928.sh: %l: command not found
C:\WindRiver\vxworks-6.3\host\x86-win32\bin\make.exe: *** [Logomotion/Debug/Logomotion.out] Error 127
Build Failed in Project 'Logomotion' (Process Exit Value was 2):   2011-01-20 22:41:43   (Elapsed Time: 00:03)
Anybody understands what's going on?
__________________
Reply With Quote
  #3   Spotlight this post!  
Unread 21-01-2011, 02:42
mikets's Avatar
mikets mikets is offline
Software Engineer
FRC #0492 (Titan Robotics)
Team Role: Mentor
 
Join Date: Jan 2010
Rookie Year: 2008
Location: Bellevue, WA
Posts: 667
mikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of light
Re: Wind River build environment

I made more progress. I finally got rid of the multiple definitions of FRC_userClassFactory() error. The way I got rid of it is that since I firmly believe it is the build environment that screwed me up, I created the Line Follower example project. It compiled perfectly. Then I compared the its .wrproject file with my own .wrproject file and did some minor fixes to make them as similar as possible. That works. But don't ask me which change fixed it. It's seems a black box to me. But now I still have one last error:
Code:
C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\make21408.sh: %l: command not found
C:\WindRiver\vxworks-6.3\host\x86-win32\bin\make.exe: *** [Logomotion/NonDebug/Logomotion.out] Error 127
Build Failed in Project 'Logomotion' (Process Exit Value was 2):   2011-01-20 23:41:19   (Elapsed Time: 00:03)
It looks like it cannot find a "make21408.sh" file in my temp directory. I assume this is some sort of shell script generated by WorkBench but it's not there. Any suggestions?
__________________
Reply With Quote
  #4   Spotlight this post!  
Unread 21-01-2011, 02:54
davidalln's Avatar
davidalln davidalln is offline
World's Worst Coder
AKA: David Allen
FRC #2415 (The Westminster Wiredcats)
Team Role: Programmer
 
Join Date: Mar 2009
Rookie Year: 2008
Location: Atlanta, GA
Posts: 108
davidalln is on a distinguished road
Send a message via AIM to davidalln
Re: Wind River build environment

Here's what I'm guessing happened. You copied over your 2010 code after installing the Workbench update. Therefore, all the header references in the code to the WPILib were still trying to point to the 2010 version of WPILib, where the Workbench update updated the WPILib to a newer, 2011 version. This is why the Line Follower example worked, it pointed to the correct WPILib.

If you're having to hack away at WPILib to get rid of errors, then something is going wrong.

My suggestion is to delete the project you're on and start from scratch. It's a pain, but the day or so it takes to copy over the old code to the new project will save you loads of time and errors in the future.
__________________
SANTOSH ANDREW DECKER RICK WYNNIE SEAN DEREK MATT
(alamo (semis), p'tree (CHAMPS!), nc (CHAMPS!), newton (quarters))


Best four years of my life. Thanks to everyone who made it happen.
Reply With Quote
  #5   Spotlight this post!  
Unread 21-01-2011, 03:09
mikets's Avatar
mikets mikets is offline
Software Engineer
FRC #0492 (Titan Robotics)
Team Role: Mentor
 
Join Date: Jan 2010
Rookie Year: 2008
Location: Bellevue, WA
Posts: 667
mikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of light
Re: Wind River build environment

Thanks. It does work. Should have done this a lot earlier Basically, I move the project directory to somewhere else. Did a "New->kernel downloadable module" and created the project. Copy only the source files back, added the WPIlib path and compiled. It worked!
__________________
Reply With Quote
  #6   Spotlight this post!  
Unread 21-01-2011, 07:58
gvarndell's Avatar
gvarndell gvarndell is offline
Software Engineer
AKA: Addi's and Georgie's Dad
FRC #1629 (GaCo)
Team Role: Parent
 
Join Date: Jan 2009
Rookie Year: 2008
Location: Grantsville, Maryland
Posts: 350
gvarndell has a reputation beyond reputegvarndell has a reputation beyond reputegvarndell has a reputation beyond reputegvarndell has a reputation beyond reputegvarndell has a reputation beyond reputegvarndell has a reputation beyond reputegvarndell has a reputation beyond reputegvarndell has a reputation beyond reputegvarndell has a reputation beyond reputegvarndell has a reputation beyond reputegvarndell has a reputation beyond repute
Re: Wind River build environment

Quote:
Originally Posted by mikets View Post
I finally figured out what caused all the errors. Apparently, Wind River by default enabled multiple platforms (PPC32diab, PPC32gnu, PPC603diab and PPC603gnu). If I unchecked everything except for PPC603gnu. All the wierd errors are gone.
You deserve a big 'atta-boy' for persevering and figuring this out.
Atta-boy!
For future reference, when you have a project that just won't build, and you have another similar project that does (an unmodified example project), compare them with a directory/file compare tool.
All the project files are just XML and plain text.
Beyond Compare is, by far, the best tool I've found for things like that.


Quote:
BTW, is there a document showing me what to pick on the million configurations Project Properties offered me?
Yes, many actually.
They're in the Workbench help facility, which nobody ever seems to look at. ;-)
__________________
Robots never, ever, ever, ever break -- The Robot Repairman (Backyardigans)
Reply With Quote
  #7   Spotlight this post!  
Unread 21-01-2011, 12:20
mikets's Avatar
mikets mikets is offline
Software Engineer
FRC #0492 (Titan Robotics)
Team Role: Mentor
 
Join Date: Jan 2010
Rookie Year: 2008
Location: Bellevue, WA
Posts: 667
mikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of light
Re: Wind River build environment

Quote:
Originally Posted by gvarndell View Post
For future reference, when you have a project that just won't build, and you have another similar project that does (an unmodified example project), compare them with a directory/file compare tool.
Yes, I did that. That's how I fixed most of the errors. But at the end, I still couldn't fix all because I don't understand all the different build options. You will see many differences but without understanding them, you would just guess and experiment. That takes a lot of time. So instead of struggling with understanding what options to tweak to make it build, starting over and creating a clean project is the way to go.
Thank you for all your advices.
__________________
Reply With Quote
  #8   Spotlight this post!  
Unread 11-02-2013, 18:23
ronbaer ronbaer is offline
Registered User
FRC #0612 (Chantilly Robotics)
Team Role: Mentor
 
Join Date: Jan 2013
Rookie Year: 2012
Location: Chantilly, VA
Posts: 8
ronbaer is an unknown quantity at this point
Re: Wind River build environment

While this is an old post, the answer is still useful. (And I had the same problem today.)
Answer: Set the build environment to PPC603gnu. All other build platforms need to be unchecked.
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 14:15.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi