[#6648] UrJTAG and gdbproxy don't link against D2XX

Document created by Aaronwu Employee on Oct 17, 2013
Version 1Show Document
  • View in full screen mode

[#6648] UrJTAG and gdbproxy don't link against D2XX

Submitted By: Peter Budny

Open Date

2011-06-15 10:14:38    

Priority:

Medium     Assignee:

Nobody

Board:

N/A     Silicon Revision:

Resolution:

N/A     Fixed In Release:

N/A

Processor:

ALL     

Host Operating System:

Linux

toolchain rev.:

    kernel rev.:

State:

Open     Found In Release:

snaps

Is this bug repeatable?:

yes     

Summary: UrJTAG and gdbproxy don't link against D2XX

Details:

 

When compiling UrJTAG and gdbproxy with D2XX support via ftd2xx.lib, they do not link against ftd2xx.lib, which causes the compile to fail.

 

I can add the library to Makefile.am in the appropriate places, but then libtool rearranges the .la files to come after ftd2xx.lib, which makes it not compile correctly. (This could be something I'm doing wrong; I'm not that familiar with autotools.)

 

Follow-ups

 

--- Mike Frysinger                                           2011-06-15 11:25:18

please post some actual details to what you're doing.  show actual commands

you're running and actual output/logs from doing so.

 

gdbproxy doesnt know anything about ftdi.  it simply asks for the libs required

by urjtag via pkg-config.

 

urjtag itself has configure tests to see if ftdi or ftd2xx is available.  if

you dont make these things available in the common search locations of the

toolchain, then you need to fix that.

 

the BuildToolChain script does not search random paths to try and find ftdi

libraries, nor should it.

 

--- Peter Budny                                              2011-06-15 13:01:21

For UrJTAG, I do:

./autogen.sh

./configure --host=i586-mingw32msvc --enable-lowlevel="ftd2xx"

--with-ftd2xx=/share/d2xx

 

which configures correctly (it shows "Detected libftd2xx: yes" and

"Lowlevel drivers: ftd2xx")

 

However, when I run make, it fails in src/apps/jtag. Here is the output:

Making all in src/apps/jtag

make[2]: Entering directory

`/home/unicoi/jtag/bug_report/urjtag/src/apps/jtag'

/bin/bash ../../../libtool  --tag=CC   --mode=link i586-mingw32msvc-gcc

-std=gnu99 -Wall -Wmissing-prototypes -Wstrict-prototypes -Wpointer-arith

-Werror -g -O2 -I/share/d2xx   -o jtag.exe jtag.o ../../../src/liburjtag.la

libtool: link: i586-mingw32msvc-gcc -std=gnu99 -Wall -Wmissing-prototypes

-Wstrict-prototypes -Wpointer-arith -Werror -g -O2 -I/share/d2xx -o

.libs/jtag.exe jtag.o ../../../src/.libs/liburjtag.a

../../../src/.libs/liburjtag.a(libftd2xx.o): In function

`usbconn_ftd2xx_close':

/home/unicoi/jtag/bug_report/urjtag/src/tap/usbconn/libftd2xx.c:566: undefined

reference to `__imp__FT_Close@4'

../../../src/.libs/liburjtag.a(libftd2xx.o): In function

`usbconn_ftd2xx_common_open':

/home/unicoi/jtag/bug_report/urjtag/src/tap/usbconn/libftd2xx.c:393: undefined

reference to `__imp__FT_OpenEx@12'

/home/unicoi/jtag/bug_report/urjtag/src/tap/usbconn/libftd2xx.c:401: undefined

reference to `__imp__FT_Open@8'

../../../src/.libs/liburjtag.a(libftd2xx.o): In function

`usbconn_ftd2xx_flush':

/home/unicoi/jtag/bug_report/urjtag/src/tap/usbconn/libftd2xx.c:123: undefined

reference to `__imp__FT_Write@16'

/home/unicoi/jtag/bug_report/urjtag/src/tap/usbconn/libftd2xx.c:159: undefined

reference to `__imp__FT_Read@16'

../../../src/.libs/liburjtag.a(libftd2xx.o): In function

`usbconn_ftd2xx_read':

/home/unicoi/jtag/bug_report/urjtag/src/tap/usbconn/libftd2xx.c:221: undefined

reference to `__imp__FT_Read@16'

../../../src/.libs/liburjtag.a(libftd2xx.o): In function

`usbconn_ftd2xx_mpsse_open':

/home/unicoi/jtag/bug_report/urjtag/src/tap/usbconn/libftd2xx.c:477: undefined

reference to `__imp__FT_ResetDevice@4'

/home/unicoi/jtag/bug_report/urjtag/src/tap/usbconn/libftd2xx.c:549: undefined

reference to `__imp__FT_Close@4'

/home/unicoi/jtag/bug_report/urjtag/src/tap/usbconn/libftd2xx.c:481: undefined

reference to `__imp__FT_Purge@8'

/home/unicoi/jtag/bug_report/urjtag/src/tap/usbconn/libftd2xx.c:486: undefined

reference to `__imp__FT_SetUSBParameters@12'

/home/unicoi/jtag/bug_report/urjtag/src/tap/usbconn/libftd2xx.c:493: undefined

reference to `__imp__FT_SetChars@20'

/home/unicoi/jtag/bug_report/urjtag/src/tap/usbconn/libftd2xx.c:501: undefined

reference to `__imp__FT_SetLatencyTimer@8'

/home/unicoi/jtag/bug_report/urjtag/src/tap/usbconn/libftd2xx.c:506: undefined

reference to `__imp__FT_SetBitMode@12'

/home/unicoi/jtag/bug_report/urjtag/src/tap/usbconn/libftd2xx.c:516: undefined

reference to `__imp__FT_Purge@8'

/home/unicoi/jtag/bug_report/urjtag/src/tap/usbconn/libftd2xx.c:543: undefined

reference to `__imp__FT_Purge@8'

../../../src/.libs/liburjtag.a(libftd2xx.o): In function

`usbconn_ftd2xx_open':

/home/unicoi/jtag/bug_report/urjtag/src/tap/usbconn/libftd2xx.c:430: undefined

reference to `__imp__FT_ResetDevice@4'

/home/unicoi/jtag/bug_report/urjtag/src/tap/usbconn/libftd2xx.c:450: undefined

reference to `__imp__FT_Close@4'

/home/unicoi/jtag/bug_report/urjtag/src/tap/usbconn/libftd2xx.c:434: undefined

reference to `__imp__FT_Purge@8'

/home/unicoi/jtag/bug_report/urjtag/src/tap/usbconn/libftd2xx.c:439: undefined

reference to `__imp__FT_SetLatencyTimer@8'

/home/unicoi/jtag/bug_report/urjtag/src/tap/usbconn/libftd2xx.c:444: undefined

reference to `__imp__FT_SetBaudRate@8'

../../../src/.libs/liburjtag.a(libftd2xx.o): In function

`usbconn_ftd2xx_connect':

/home/unicoi/jtag/bug_report/urjtag/src/tap/usbconn/libftd2xx.c:352: undefined

reference to `__imp__FT_Close@4'

collect2: ld returned 1 exit status

make[2]: *** [jtag.exe] Error 1

 

 

I know one problem is that @FTD2XXLIB@ is being added to liburjtag_la_LIBADD in

src/Makefile.am (where it does not help define any symbols) instead of

jtag_LDADD in src/apps/jtag/Makefile.am (where the EXE is linked). However, if I

edit both Makefile.am appropriately, re-run automake configure and make, it

instead fails because libtool turns

 

/bin/bash ../../../libtool  --tag=CC   --mode=link i586-mingw32msvc-gcc

-std=gnu99 -Wall -Wmissing-prototypes -Wstrict-prototypes -Wpointer-arith

-Werror -g -O2 -I/share/d2xx   -o jtag.exe jtag.o ../../../src/liburjtag.la

/share/d2xx/i386/ftd2xx.lib

 

into

 

libtool: link: i586-mingw32msvc-gcc -std=gnu99 -Wall -Wmissing-prototypes

-Wstrict-prototypes -Wpointer-arith -Werror -g -O2 -I/share/d2xx -o

.libs/jtag.exe jtag.o /share/d2xx/i386/ftd2xx.lib

../../../src/.libs/liburjtag.a

 

and the reordering means the lib file isn't used to deal with the unresolved

symbols in liburjtag.a.

 

The same applies for gdbproxy. It doesn't reference ftd2xx.lib, causing

undefined references, and if I try to add it, libtool reorders the command line

and the compile still fails.

 

--- Mike Frysinger                                           2011-06-15 13:35:54

if you're building urjtag from upstream svn, then you really should be posting

to the upstream urjtag development mailing list

 

--- Peter Budny                                              2011-06-15 14:10:38

I'm building both urjtag and gdbproxy from toolchain SVN. I'm new to the

project, so I'm not clear which things are in sync with upstream and which

aren't.

 

--- Mike Frysinger                                           2011-06-15 14:55:50

urjtag is fully synced.  certainly the issue you raise is entirely specific to

your system and/or an issue from upstream.

 

if you're checking out from svn, there's no point in regenerating autotools.

 

--- Peter Budny                                              2011-06-16 09:03:05

Okay, I'll see if upstream can help.

 

What about gdbproxy? Is there an upstream for that as well, or is this issue

specific to the blackfin toolchain?

 

--- Mike Frysinger                                           2011-06-16 17:22:33

gdbproxy is here, but as i said, it gets its linking info from urjtag.  it

doesnt know anything at all about ftdi.

 

 

 

    Files

    Changes

    Commits

    Dependencies

    Duplicates

    Associations

    Tags

 

File Name     File Type     File Size     Posted By

No Files Were Found

Attachments

    Outcomes