simulavr-devel
[Top][All Lists]
Advanced

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

Re: [Simulavr-devel] Patches for recent avr-libc and Mac OSX build


From: Lars Immisch
Subject: Re: [Simulavr-devel] Patches for recent avr-libc and Mac OSX build
Date: Thu, 19 Apr 2012 23:56:19 +0200

Dear Petr,

> I use hand-written makefile when compiling on Linux, so I cannot very
> your patch even on Linux. I tried to use autoconf generated files
> before but I ran into some problems.
> 
> These are my notes in my diary I wrote in December, if anyone is interested:

Ah, thanks.

> It did not find libbfd (it is in /usr/include/ and
> /usr/i686-pc-linux-gnu/lib/), libiberty (I did not bother to check)
> and Python.

On OS X, I compiled binutils from source and had to go into the bfd folder in 
the binutils source tree and do:

./configure --enable-install-libbfd --target=avr
make
sudo make install

libiberty was installed when I installed binutils, but into a location that the 
simulavr configure script did not find, so in the simulavr source folder, I had 
to do:

./configure --with-libiberty=/usr/local/lib/x86_64

All went well on Debian/Ubuntu, though.

All I needed was:

apt-get binutils-dev python-dev

(And of course apt-get install build-essentials if you haven't done this 
already)

When I get around to it, I'll write a documentation patch for bfd/libiberty.

> It complained about SWIG being too old or too new (I did not
> understood the message). I think someone reported the problem to this
> list or our bug tracker before.
> It failed to find libbfd on several machines I have access to, various
> distributions.
> I did not find how to configure it without the libraries, so had to do
> some surgery.
> It took me 3 hours and I did not learn anything - except to not trust the 
> tools.
> 
> configure.ac - comment out lines AC_PROG_SWIG(1.3.18),
> SWIG_ENABLE_CXX, SWIG_MULTI_MODULE_SUPPORT, and lines
> AZ_PYTHON_ENABLE, AZ_PYTHON_VERSION_ENSURE, SWIG_PYTHON,
> AM_PATH_PYTHON.
> m4/AX_AVR_ENVIRON.m4 - comment out BFD and LIBIBERTY stuff
> src/avrerror.h - comment out attributes (#define) and their usage near
> function prototypes
> src/avrdevice.cpp - in AvrDevice::Load() enable the `#ifdef _MSVC' branch.
> make - run make; when it fails at link step, copy the command line
> containing "../libtool", remove the " -L -l bfd -L -liberty" and run
> it

Hmm. I did consider that. Is there any downside to using the builtin elf reader?

Also, it sounds like the libiberty dependency could also be dropped. I must try 
that.

In any case, my autoconf patch is not going to make matters worse.

I see now that I sent the patches into the wrong tracker. Should I recommit 
them in the patches tracker?

Can you write to the savannah git repository?

- Lars


reply via email to

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