simulavr-devel
[Top][All Lists]
Advanced

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

Re: [Simulavr-devel] binutils2.19 bug [was:Getting Started with simulavr


From: Klaus Rudolph
Subject: Re: [Simulavr-devel] binutils2.19 bug [was:Getting Started with simulavrxx]
Date: Mon, 23 Feb 2009 10:58:13 +0100
User-agent: Thunderbird 2.0.0.19 (X11/20081227)


> address@hidden anacomp]$ tclsh check.tcl
> couldn't load file "../../src/simulavr.so": ../../src/simulavr.so:
> undefined symbol: inflateInit_
>    while executing
> "load ../../src/simulavr.so"
>    (file "check.tcl" line 8)
> 

This seems to be a bug of binutils 2.19 version. I found a hint in:
http://sourceware.org/ml/binutils/2008-07/msg00129.html

The thing seems to be that libbfd needs zlib but is not linked in from
binutils which is a bug in binutils!!!

As this is a bug in binutils I will not apply changes to simulavr. But
this is a "temporary" patch for the Makefile:

--------------

 --- Makefile    2009-02-23 10:54:26.000000000 +0100
+++ ../../avrsim204la/src/Makefile      2008-09-08 08:59:03.000000000 +0200
@@ -24,7 +24,7 @@


 simulavr: $(OBJECTS)
-       $(CXX) $(CFLAGS) $(OBJECTS) $(BFD)/bfd/libbfd.a
$(BFD)/libiberty/libiberty.a /usr/lib/libz.a -lncurses -lc -lm -o  simulavr
+       $(CXX) $(CFLAGS) $(OBJECTS)  $(BFD)/bfd/libbfd.a
$(BFD)/libiberty/libiberty.a -lncurses -lc -lm -o  simulavr

 # pull in dependency info for *existing* .o files
 -include $(OBJECTS:.o=.d)
@@ -89,7 +89,7 @@
        $(CXX) $(CXXFLAGS) simulavr_wrap.cxx -c

 simulavr.so: $(TCL_OBJECTS)
-       $(CXX) $(CXXFLAGS) $(TCL_OBJECTS) /usr/lib/libz.a
-ltcl$(TCL_VERSION) $(BFD)/bfd/libbfd.a $(BFD)/libiberty/libiberty.a -lc
-lm -lncurses -shared -o simulavr.so
+       $(CXX) $(CXXFLAGS) $(TCL_OBJECTS) -ltcl$(TCL_VERSION)
$(BFD)/bfd/libbfd.a $(BFD)/libiberty/libiberty.a -lc -lm -lncurses
-shared -o simulavr.so

 BFDOBJECTS= /home/zfrdh/binutils_tmp/binary.o \
        /home/zfrdh/binutils_tmp/splay-tree.o \


----------------

Bye
 Klaus




reply via email to

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