simulavr-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Simulavr-devel] simulavr-1.0.0 Build Fails.


From: Georg-Johann Lay
Subject: Re: [Simulavr-devel] simulavr-1.0.0 Build Fails.
Date: Tue, 11 Jul 2017 10:29:01 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1

On 11.07.2017 09:16, Klaus Rudolph wrote:
I can't reproduce your problems. And what is meant by "No avail." ?

git clone ...
cd simulavr
./bootstrap
./configure
make

works fine on my box.

Doesn't help here though...


Don't clone over an existing tar or something else. Do a fresh checkout.

I did a fresh checkout to a different source path.

And as always I did completely remove $(builddir) before running
configure.

Moreover, I used --prefix as I don't want to be admin for anything
involving simulavr.


Regards
  Klaus

The problem is that in several places, implicit usage of $(builddir)
where $(srcdir) must be used.  You won't see such problems when you
are using builddir=srcdir, of course.

The patch below fixes these problems, but maybe there are more
such places that suffer from similar problems.

With that patch applied, the build passes.  However, after installing
1.2dev, -M is still nor recognized as a valid option:

$ ~/gnu/install/simulavr/bin/simulavr -d atmega8 -f a.out -M
simulavr: invalid option -- 'M'
AVR-Simulator Version 1.2dev
...
-M                    disable messages for bad I/O and memory references
...


Finally, I got bunch of build warnings that don't increase
confidence into simulavr...  Allow me to propose to use C99 types
that are also known to C++ like uint32_t and print modifiers like
PRIu32 and friends from inttypes.h.  At least for ELF this is
reasonable.  If you don't want to use these types, you'll have
configure to find out for you what sizes int, long and long long
have (for the HOST platform, not for the BUILD platform).

My current BUILD (and also HOST) is x86_64, I didn't even try to
cross-build simulavr, e.g. for mingw32 host...


In file included from ../../../source/simulavr/src/rwmem.h:34:0,
                 from ../../../source/simulavr/src/decoder.h:31,
                 from ../../../source/simulavr/src/flash.h:32,
                 from ../../../source/simulavr/src/avrdevice_impl.h:5,
                 from ../../../source/simulavr/src/avrreadelf.cpp:37:
../../../source/simulavr/src/avrreadelf.cpp: In function ‘void ELFLoad(const AvrDevice*)’: ../../../source/simulavr/src/avrerror.h:131:84: warning: format ‘%llx’ expects argument of type ‘long long unsigned int’, but argument 6 has type ‘ELFIO::Elf64_Addr {aka long unsigned int}’ [-Wformat=] #define avr_warning(...) sysConHandler.vfwarning(__FILE__, __LINE__, ## __VA_ARGS__)

            ^
../../../source/simulavr/src/avrreadelf.cpp:208:21: note: in expansion of macro ‘avr_warning’ avr_warning("Unknown symbol address range found! (symbol='%s', address=0x%llx)",
                     ^
../../../source/simulavr/src/avrerror.h:133:82: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 5 has type ‘ELFIO::Elf_Xword {aka long unsigned int}’ [-Wformat=] #define avr_error(...) sysConHandler.vffatal(__FILE__, __LINE__, ## __VA_ARGS__)

          ^
../../../source/simulavr/src/avrreadelf.cpp:251:21: note: in expansion of macro ‘avr_error’ avr_error("wrong device signature size in elf file, expected=3, given=%llu",
                     ^
../../../source/simulavr/src/avrreadelf.cpp: In function ‘unsigned int ELFGetSignature(const char*)’: ../../../source/simulavr/src/avrerror.h:133:82: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 5 has type ‘ELFIO::Elf_Xword {aka long unsigned int}’ [-Wformat=] #define avr_error(...) sysConHandler.vffatal(__FILE__, __LINE__, ## __VA_ARGS__)

          ^
../../../source/simulavr/src/avrreadelf.cpp:293:21: note: in expansion of macro ‘avr_error’ avr_error("wrong device signature size in elf file, expected=3, given=%llu",
                     ^



In file included from ../../../source/simulavr/src/cmd/gdbserver.cpp:41:0:
../../../source/simulavr/src/cmd/gdbserver.cpp: In member function ‘virtual void GdbServerSocketUnix::Write(const void*, size_t)’: ../../../source/simulavr/src/avrerror.h:133:82: warning: format ‘%d’ expects argument of type ‘int’, but argument 6 has type ‘size_t {aka long unsigned int}’ [-Wformat=] #define avr_error(...) sysConHandler.vffatal(__FILE__, __LINE__, ## __VA_ARGS__)

          ^
../../../source/simulavr/src/cmd/gdbserver.cpp:239:9: note: in expansion of macro ‘avr_error’
         avr_error("write only wrote %d of %d bytes", res, count);
         ^

Johann


Gesendet: Montag, 10. Juli 2017 um 10:06 Uhr
Von: "Georg-Johann Lay" <address@hidden>
An: Klaus <address@hidden>
Cc: address@hidden
Betreff: Re: [Simulavr-devel] simulavr-1.0.0 Build Fails.

On 10.07.2017 10:02, Georg-Johann Lay wrote:
On 07.07.2017 22:29, Klaus wrote:
Please use git master. Version 1.0.0 is broken in so many things...

This message is posted also on the main page of the project ;)

Regards
   Klaus

No avail.

After figuring out that I hat to run "bootstrap" in the sources...

$ ../../source/simulavr/configure --prefix /local/gnu/install/simulavr
$ make -j 8

libtool: compile:  g++ -DHAVE_CONFIG_H -I.
-I../../../source/simulavr/src -Ielfio -g -O2 -fPIC -Icmd -Iui -Ihwtimer
-g -O2 -MT externalirq.lo -MD -MP -MF .deps/externalirq.Tpo -c
../../../source/simulavr/src/externalirq.cpp  -fPIC -DPIC -o
.libs/externalirq.o
In file included from ../../../source/simulavr/src/attiny2313.h:38:0,
                   from ../../../source/simulavr/src/attiny2313.cpp:26:
../../../source/simulavr/src/hwusi.h:36:21: fatal error: hwtimer.h: No
such file or directory
compilation terminated.
libtool: compile:  g++ -DHAVE_CONFIG_H -I.
-I../../../source/simulavr/src -Ielfio -g -O2 -fPIC -Icmd -Iui -Ihwtimer
-g -O2 -MT atmega1284abase.lo -MD -MP -MF .deps/atmega1284abase.Tpo -c
../../../source/simulavr/src/atmega1284abase.cpp  -fPIC -DPIC -o
.libs/atmega1284abase.o
libtool: compile:  g++ -DHAVE_CONFIG_H -I.
-I../../../source/simulavr/src -Ielfio -g -O2 -fPIC -Icmd -Iui -Ihwtimer
-g -O2 -MT application.lo -MD -MP -MF .deps/application.Tpo -c
../../../source/simulavr/src/application.cpp  -fPIC -DPIC -o
.libs/application.o
Makefile:926: recipe for target 'attiny2313.lo' failed
make[3]: *** [attiny2313.lo] Error 1
make[3]: *** Waiting for unfinished jobs....
In file included from ../../../source/simulavr/src/attiny25_45_85.h:39:0,
                   from ../../../source/simulavr/src/attiny25_45_85.cpp:26:
../../../source/simulavr/src/hwusi.h:36:21: fatal error: hwtimer.h: No
such file or directory
compilation terminated.

In addition, I also tried non-parallel make after clean:

$ make

Same error:

libtool: compile:  g++ -DHAVE_CONFIG_H -I.
-I../../../source/simulavr/src -Ielfio -g -O2 -fPIC -Icmd -Iui -Ihwtimer
-g -O2 -MT attiny25_45_85.lo -MD -MP -MF .deps/attiny25_45_85.Tpo -c
../../../source/simulavr/src/attiny25_45_85.cpp  -fPIC -DPIC -o
.libs/attiny25_45_85.o
In file included from ../../../source/simulavr/src/attiny25_45_85.h:39:0,
                   from ../../../source/simulavr/src/attiny25_45_85.cpp:26:
../../../source/simulavr/src/hwusi.h:36:21: fatal error: hwtimer.h: No
such file or directory
compilation terminated.


Johann

Attachment: simulavr-srcdir.diff
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]