avrdudes / avarice

AVaRICE is a program for interfacing the Atmel JTAG ICE to GDB to allow users to debug their embedded AVR target.
GNU General Public License v2.0
39 stars 12 forks source link

[bug #14] Unable to build on Fedora x64 without -ldl #14

Closed avrs-admin closed 2 years ago

avrs-admin commented 2 years ago

jescombe 2011-12-30 10:36:29

Building on Fedora 16 x64 results in the following error;

g++ -g -O2 -o avarice crc16.o devdescr.o ioreg.o jtag2bp.o jtag2io.o jtag2misc.o jtag2prog.o jtag2run.o jtag2rw.o jtag2usb.o jtagbp.o jtaggeneric.o jtagio.o jtagmisc.o jtagprog.o jtagrun.o jtagrw.o main.o remote.o utils.o gnu_getopt.o gnu_getopt1.o -lusb -lbfd -liberty -lz /usr/lib64/libbfd.a(plugin.o): In function `try_load_plugin': (.text+0x3bb): undefined reference to `dlopen' /usr/lib64/libbfd.a(plugin.o): In function `try_load_plugin': (.text+0x3da): undefined reference to `dlsym' /usr/lib64/libbfd.a(plugin.o): In function `try_load_plugin': (.text+0x47b): undefined reference to `dlerror' collect2: ld returned 1 exit status make[2]: *** [avarice] Error 1

So it appears that libbfd on Fedora also requires libdl, adding LIBS="$LIBS -ldl" to the configure script results in a successful build.

This issue was migrated from https://sourceforge.net/p/avarice/bugs/14/

avrs-admin commented 2 years ago

joerg_wunsch 2011-12-30 14:22:53

The problem is that we cannot simply add -ldl globally. There are systems that simply don't have this library (FreeBSD, probably also Cygwin and MacOS X). So we have to extend configure.ac to autodetect this situation.

Are you able to pick up a snapshot from SVN, run ./Bootstrap and then configure and compile it? If so, I'll try crafting such a test, and then ask you to give it a try.

avrs-admin commented 2 years ago

jescombe 2011-12-30 14:44:44

Yes sure, I can build from svn to test... thanks.

avrs-admin commented 2 years ago

joerg_wunsch 2012-01-18 15:02:33

Fixed in SVN r295 (configure.ac).

avrs-admin commented 2 years ago

joerg_wunsch 2012-01-18 15:02:33