[CCC DEV] [pop-dev] Re: Ubuntu 12.04 AVR build broken?

Matt Jadud matt at jadud.com
Wed May 22 06:16:52 BST 2013


Hi Rick,

I've spent a lot of time barking up trees that turned out not to be trees.

It is possible that avr-gcc has "moved on," and our use of prog_void is no
longer acceptable to the compiler.

CFLAGS=-D__PROG_TYPES_COMPAT__ ../configure --prefix=$HOME/local/arduino
--with-toolchain=tvm --target=avr

seemed to get me through the build, and it then failed at an attempt to
compile the POSIX wrapper. (I think this is what it "should" do. That is,
we don't block it from attempting to build the POSIX wrapper, and then it
fails.)

"make install" puts the tools in the right place.

OK, that wasn't right. Or, it may have helped a bit, but it doesn't solve
all of my problems. avr-gcc has moved on.

https://code.google.com/p/arduino/issues/detail?id=795
http://www.avrfreaks.net/index.php?name=PNphpBB2&file=viewtopic&t=38003
http://www.avrfreaks.net/index.php?name=PNphpBB2&file=viewtopic&p=913910
http://gcc.gnu.org/onlinedocs/gcc/Named-Address-Spaces.html#AVR%20Named%20Address%20Spaces

and others will lead the way. I've changed "prog_char" to "const char,"
"prog_void" to "const void," and "prog_int16_t" to "const int6_t", all of
which seemed to do the trick. I have a firmware built that I cannot test.

This was on Debian 7.

reynoldsm at firefly:~/git/arduino/tvm/arduino$ avr-gcc --version
avr-gcc (GCC) 4.7.2
Copyright (C) 2012 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.

I will test this in the morning; if anyone else gets there before me,
that's great.

The build doesn't seem happy on 64-bit machines, but I'll end up revisiting
that at some point as well. For now, I've got things working on a 32-bit
Debian 7, which is a step. I'm not sure how I'm going to put that on the VM
that I have for serving up the compiler, though, because it's a 64-bit
machine. I'll get there.

Cheers,
M



On Thu, Apr 18, 2013 at 6:49 PM, Matt Jadud <matt at jadud.com> wrote:

> Hi Rick,
>
> The 64-bitness is, I suspect, tricky. It might be easier in the
> experimental compiler (tock), but the legacy compiler would take more work
> (I think).
>
> I'm downloading a 64 bit ubutnu now, and will bring up a VM to try a cross
> build in and see if I can shed any light.
>
> Cheers,
> Matt
>
>
> On Wed, Apr 17, 2013 at 4:39 PM, Rick Beton <rick.beton at gmail.com> wrote:
>
>> Hi Fred,
>>
>> Thanks for the suggestion. I switched to the Git tip and moved on to two
>> new failures.  The first was that I couldn't build the normal Kroc on my
>> 64bit Ubuntu.  The instructions say that 64bit is not yet supported so this
>> outcome is not a surprise.  However, I'm wondering ... have you got a
>> roadmap for adding 64bit support?
>>
>> The second problem was with the Avr version (CrossBuilding).  After
>> successfully 'configure'-ing, the build feel over part-way through, ending
>> with the following
>>
>> make  all-am
>> make[2]: Entering directory
>> `/home/rick/pkg/kent-cs/KRoC-git-avr/obj-avr/runtime/libtvm'
>> avr-gcc -DHAVE_CONFIG_H -I. -I../../../runtime/libtvm
>> -I../../../runtime/libtvm -DTVM_INTERNALS -Wall -g -O2 -MT interpreter.o
>> -MD -MP -MF .deps/interpreter.Tpo -c -o interpreter.o
>> ../../../runtime/libtvm/interpreter.c
>> In file included from ../../../runtime/libtvm/tvm_mem_intf.h:69:0,
>>                  from ../../../runtime/libtvm/tvm_mem.h:40,
>>                  from ../../../runtime/libtvm/tvm.h:32,
>>                  from ../../../runtime/libtvm/interpreter.c:21:
>> /usr/lib/gcc/avr/4.7.0/../../../avr/include/avr/io.h:428:6: warning:
>> #warning "device type not defined" [-Wcpp]
>> In file included from ../../../runtime/libtvm/tvm_mem.h:40:0,
>>                  from ../../../runtime/libtvm/tvm.h:32,
>>                  from ../../../runtime/libtvm/interpreter.c:21:
>> ../../../runtime/libtvm/tvm_mem_intf.h:73:38: error: unknown type name
>> ‘prog_void’
>> In file included from ../../../runtime/libtvm/interpreter.c:32:0:
>> ../../../runtime/libtvm/ins_mobile.c: In function ‘mt_io_update_array’:
>> ../../../runtime/libtvm/ins_mobile.c:475:5: warning: passing argument 1
>> of ‘read_word’ from incompatible pointer type [enabled by default]
>> In file included from ../../../runtime/libtvm/tvm_mem.h:40:0,
>>                  from ../../../runtime/libtvm/tvm.h:32,
>>                  from ../../../runtime/libtvm/interpreter.c:21:
>> ../../../runtime/libtvm/tvm_mem_intf.h:75:13: note: expected ‘WORDPTR’
>> but argument is of type ‘WORD **’
>> In file included from ../../../runtime/libtvm/interpreter.c:32:0:
>> ../../../runtime/libtvm/ins_mobile.c: In function ‘mt_chan_io’:
>> ../../../runtime/libtvm/ins_mobile.c:544:7: warning: variable ‘type’ set
>> but not used [-Wunused-but-set-variable]
>> ../../../runtime/libtvm/interpreter.c: In function ‘disconnect_channel’:
>> ../../../runtime/libtvm/interpreter.c:372:5: warning: passing argument 1
>> of ‘read_word’ from incompatible pointer type [enabled by default]
>> In file included from ../../../runtime/libtvm/tvm_mem.h:40:0,
>>                  from ../../../runtime/libtvm/tvm.h:32,
>>                  from ../../../runtime/libtvm/interpreter.c:21:
>> ../../../runtime/libtvm/tvm_mem_intf.h:75:13: note: expected ‘WORDPTR’
>> but argument is of type ‘BYTEPTR’
>> make[2]: *** [interpreter.o] Error 1
>> make[2]: Leaving directory
>> `/home/rick/pkg/kent-cs/KRoC-git-avr/obj-avr/runtime/libtvm'
>> make[1]: *** [all] Error 2
>> make[1]: Leaving directory
>> `/home/rick/pkg/kent-cs/KRoC-git-avr/obj-avr/runtime/libtvm'
>> make: *** [all-recursive] Error 1
>>
>> Any ideas what cases this?
>>
>> Rick
>>
>>
>>
>>
>>
>> On 8 April 2013 23:12, Fred Barnes <F.R.M.Barnes at kent.ac.uk> wrote:
>>
>>>
>>> Hi Rick,
>>>
>>> Rick Beton writes:
>>> > Small correction - I'm using Ubuntu 12.10, not 12.04 fwiw.
>>> >
>>> > On 8 April 2013 22:56, Rick Beton <rick.beton at gmail.com> wrote:
>>> >
>>> > > Hi,
>>> > >
>>> > > I tried getting the AVR Kroc for my shiny new Arduino Mega (yes, I
>>> know,
>>> > > they've been around for years...). But alas there doesn't appear to
>>> be a
>>> > > working cross-compiler toolchain at the moment.
>>> > >
>>> > > * I tried getting the binaries but couldn't find them.
>>> > >
>>> > > * I tried building the sources (
>>> > > http://projects.cs.kent.ac.uk/projects/kroc/trac/wiki/CrossBuilding)
>>> but
>>> > > ended up with a compilation error during 'make' thusly:
>>> > >
>>> > >[snip compile error]
>>>
>>> Without digging too deep, my first thought would be to try the trunk
>>> version
>>> of KRoC, which has [un]officially moved over to Github:
>>>
>>>     git://github.com/concurrency/KRoC.git
>>>
>>> (we're slowly getting there with migration!) -- but the 'trunk'
>>> subversion
>>> copy should be just as recent.
>>>
>>>
>>> Cheers,
>>>
>>> -- Fred
>>>
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.concurrency.cc/pipermail/developers/attachments/20130522/88155762/attachment-0001.htm>


More information about the developers mailing list