| Author |
Message |
|
|
Posted: Nov 01, 2009 - 02:53 AM |
|

Joined: Dec 15, 2008
Posts: 923
Location: Brisbane, Australia
|
|
Hello all,
Today I attempted to build the agv-gcc toolchain for Ubuntu 9.10 (Karmic) - file is build-avr-gcc-4.3.3-libc-1.6.7-insight6.8-arch25-fix.zip from thread http://www.avrfreaks.net/index.php?name ... mp;start=0
When executing ./buildavr-no-insight.sh , I get the following build error:
Code:
../../../source/avarice-2.10/src/jtag2.h: In constructor ‘jtag2::jtag2(const char*, char*, bool, bool, bool, bool)’:
../../../source/avarice-2.10/src/jtag2.h:155: warning: large integer implicitly truncated to unsigned type
mv -f .deps/jtag2misc.Tpo .deps/jtag2misc.Po
g++ -DHAVE_CONFIG_H -I. -I../../../source/avarice-2.10/src -g -O2 -MT jtag2prog.o -MD -MP -MF .deps/jtag2prog.Tpo -c -o jtag2prog.o ../../../source/avarice-2.10/src/jtag2prog.cc
In file included from ../../../source/avarice-2.10/src/jtag2prog.cc:43:
../../../source/avarice-2.10/src/jtag2.h: In constructor ‘jtag2::jtag2(const char*, char*, bool, bool, bool, bool)’:
../../../source/avarice-2.10/src/jtag2.h:155: warning: large integer implicitly truncated to unsigned type
../../../source/avarice-2.10/src/jtag2prog.cc: In member function ‘virtual void jtag2::downloadToTarget(const char*, bool, bool)’:
../../../source/avarice-2.10/src/jtag2prog.cc:250: warning: deprecated conversion from string constant to ‘char*’
mv -f .deps/jtag2prog.Tpo .deps/jtag2prog.Po
g++ -DHAVE_CONFIG_H -I. -I../../../source/avarice-2.10/src -g -O2 -MT jtag2run.o -MD -MP -MF .deps/jtag2run.Tpo -c -o jtag2run.o ../../../source/avarice-2.10/src/jtag2run.cc
In file included from ../../../source/avarice-2.10/src/jtag2run.cc:39:
../../../source/avarice-2.10/src/jtag2.h: In constructor ‘jtag2::jtag2(const char*, char*, bool, bool, bool, bool)’:
../../../source/avarice-2.10/src/jtag2.h:155: warning: large integer implicitly truncated to unsigned type
../../../source/avarice-2.10/src/jtag2run.cc: In member function ‘bool jtag2::eventLoop()’:
../../../source/avarice-2.10/src/jtag2run.cc:130: warning: ignoring return value of ‘ssize_t write(int, const void*, size_t)’, declared with attribute warn_unused_result
mv -f .deps/jtag2run.Tpo .deps/jtag2run.Po
g++ -DHAVE_CONFIG_H -I. -I../../../source/avarice-2.10/src -g -O2 -MT jtag2rw.o -MD -MP -MF .deps/jtag2rw.Tpo -c -o jtag2rw.o ../../../source/avarice-2.10/src/jtag2rw.cc
In file included from ../../../source/avarice-2.10/src/jtag2rw.cc:38:
../../../source/avarice-2.10/src/jtag2.h: In constructor ‘jtag2::jtag2(const char*, char*, bool, bool, bool, bool)’:
../../../source/avarice-2.10/src/jtag2.h:155: warning: large integer implicitly truncated to unsigned type
mv -f .deps/jtag2rw.Tpo .deps/jtag2rw.Po
g++ -DHAVE_CONFIG_H -I. -I../../../source/avarice-2.10/src -g -O2 -MT jtag2usb.o -MD -MP -MF .deps/jtag2usb.Tpo -c -o jtag2usb.o ../../../source/avarice-2.10/src/jtag2usb.cc
../../../source/avarice-2.10/src/jtag2usb.cc: In function ‘usb_dev_handle* opendev(const char*, emulator, int&)’:
../../../source/avarice-2.10/src/jtag2usb.cc:98: error: invalid conversion from ‘const char*’ to ‘char*’
../../../source/avarice-2.10/src/jtag2usb.cc: In function ‘void childhandler(int)’:
../../../source/avarice-2.10/src/jtag2usb.cc:249: warning: ignoring return value of ‘ssize_t write(int, const void*, size_t)’, declared with attribute warn_unused_result
make[2]: *** [jtag2usb.o] Error 1
make[2]: Leaving directory `/usr/local/avr/build/avarice-2.10/src'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/usr/local/avr/build/avarice-2.10/src'
make: *** [all-recursive] Error 1
It appears that it is building as C++, and therefore has the following two prototypes:
Code:
const char * strchr ( const char * str, int character );
char * strchr ( char * str, int character );
Since jtagDeviceName is a const char*, it expects that serno is also a const char*l which is isn't, hence the error.
The following trivial patch makes it build. I have no idea if it introduces any bugs:
Code:
damien@damien-desktop:~$ sudo diff -u /root/jtag2usb.cc /usr/local/avr/build/avarice-2.10/src/../../../source/avarice-2.10/src/jtag2usb.cc
--- /root/jtag2usb.cc 2009-11-01 12:21:42.000000000 +1000
+++ /usr/local/avr/build/avarice-2.10/src/../../../source/avarice-2.10/src/jtag2usb.cc 2009-11-01 12:23:52.000000000 +1000
@@ -95,7 +95,7 @@
* right-to-left, so only the least significant nibbles need to be
* specified.
*/
- if ((serno = strchr(jtagDeviceName, ':')) != NULL)
+ if ((serno = strchr(const_cast<char*>(jtagDeviceName), ':')) != NULL)
{
/* first, drop all colons there if any */
cp2 = ++serno;
Recently, I built the same script for 9.04 without issue on another box.
-- Damien |
|
|
| |
|
|
|
|
|
Posted: Nov 01, 2009 - 04:38 AM |
|


Joined: Mar 28, 2001
Posts: 20368
Location: Sydney, Australia (Gum trees, Koalas and Kangaroos, No Edelweiss)
|
|
Using "Bingo's Script" can be a bit of a gamble...  |
_________________ John Samperi
Ampertronics Pty. Ltd.
www.ampertronics.com.au
* Electronic Design * Custom Products * Contract Assembly
|
| |
|
|
|
|
|
Posted: Nov 01, 2009 - 06:39 PM |
|


Joined: Apr 25, 2004
Posts: 3809
Location: Denmark
|
|
|
|
|
|
|
Posted: Nov 01, 2009 - 07:21 PM |
|


Joined: Apr 25, 2004
Posts: 3809
Location: Denmark
|
|
|
|
|
|
|
Posted: Nov 01, 2009 - 10:08 PM |
|

Joined: Dec 15, 2008
Posts: 923
Location: Brisbane, Australia
|
|
|
Bingo600 wrote:
@OP
Are you using GCC 4.4.1 (native ubuntu gcc) to build the toolchain ?
Someone did hit a similar thing here
http://www.avrfreaks.net/index.php?name ... 640#629640
/Bingo
Yes, the native gcc for Ubuntu 9.10:
Code:
damien@damien-desktop:~/code$ gcc --version
gcc (Ubuntu 4.4.1-4ubuntu8) 4.4.1
Copyright (C) 2009 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
|
| |
|
|
|
|
|
Posted: Nov 02, 2009 - 07:25 AM |
|


Joined: Apr 25, 2004
Posts: 3809
Location: Denmark
|
|
|
damien_d wrote:
Bingo600 wrote:
@OP
Are you using GCC 4.4.1 (native ubuntu gcc) to build the toolchain ?
Someone did hit a similar thing here
http://www.avrfreaks.net/index.php?name ... 640#629640
/Bingo
Yes, the native gcc for Ubuntu 9.10:
Code:
damien@damien-desktop:~/code$ gcc --version
gcc (Ubuntu 4.4.1-4ubuntu8) 4.4.1
Copyright (C) 2009 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
@damien_d
Did you try the new buildscript ?
/Bingo |
|
|
| |
|
|
|
|
|
Posted: Nov 02, 2009 - 07:51 AM |
|

Joined: Dec 15, 2008
Posts: 923
Location: Brisbane, Australia
|
|
|
Bingo600 wrote:
Did you try the new buildscript ?
/Bingo
Just got home from work... yep, it built fine
Thank you very much.
-- Damien |
|
|
| |
|
|
|
|
|
Posted: Nov 02, 2009 - 08:39 AM |
|


Joined: Apr 25, 2004
Posts: 3809
Location: Denmark
|
|
|
damien_d wrote:
Bingo600 wrote:
Did you try the new buildscript ?
/Bingo
Just got home from work... yep, it built fine
Thank you very much.
-- Damien
Thanx
The script is now updated in the first post in the "sticky"
/Bingo |
|
|
| |
|
|
|
|
|
Posted: Dec 18, 2009 - 05:17 PM |
|

Joined: Dec 18, 2009
Posts: 1
|
|
|
|
|
|
|
Posted: Dec 18, 2009 - 05:23 PM |
|


Joined: Jul 18, 2005
Posts: 62299
Location: (using avr-gcc in) Finchingfield, Essex, England
|
|
|
gottymann wrote:
http://freewebcontents.blogspot.com/2009/11/ubuntu-910-display-problem.html
What on God's green earth has an ATI radeon graphics problem in Ubuntu got to do with the subject of this thread?
Or are you just joining fora and grapeshotting any mention of "Ubuntu" however irrelevant in the hope of finding someone with ATI experience? |
_________________
|
| |
|
|
|
|
|