On Tue, Dec 30, 2008 at 9:52 AM, Steve Franks <[email protected]> wrote:
> On Mon, Dec 29, 2008 at 5:30 PM, Duane Ellis <[email protected]> wrote:
>> Steve Franks wrote:
>>>>
>>>> I wonder how many other bumps we will find :-(
>>>>
>>>> --- Duane.
>>
>>
>> steve>  I just want to "port" OOCD into the 'standard' freebsd  port build
>> system.  steve> I want no special toys, ftd2xx or whatever.  steve> I'd like
>> minimal support for all dongles .... [urjtag porter did
>> Please - look at the *NEW* version of the user manual.
>> I just added some things to Section 2 (not on line yet)
>>
>> ===========
>>
>>
>> To be useful: You must have LIBFTDI support, which uses "libusb" -without it
>> I would not even bother.
>> LIBFTDI builds some number of test apps - try them - they need to work some
>> how.
>>
>> Again - I can't say it enough. Without "libftdi + libusb" - do not even
>> start.
>>
>>   http://www.freshports.org/devel/libusb/
>> and:
>>   http://www.freshports.org/devel/libftdi
>>
>> Seems to exist.. and should work..
>>
>> The Issue #1 i see is this:
>>
>>   http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/129636
>>
>> Get clarity on which version of "libftdi" - current version is 0.14.
>> Solve that problem first. DO NOT go backwards from 0.14.
>>
>> =======================
>>
>>>>  If I should be just mangling the CFLAGS,
>>
>> You mention: "CFLAGS"
>>
>> Why?  Does GCC not by default look in: '/usr/local/include' by default?
>> And does "LD" not look in /usr/local/lib ...
>>
>> If so - then it is a non-issue.
>>
>> Then plain:
>>   ./configure --enable-<a-fewthings-see-below>
>>
>> The key to this is to look at the contents of "config.log" - when it fails.
>> It is a treasure trove of useful information. Start from the end and of the
>> file and work backwards.
>>
>>
>> ==========================
>>
>> I would suggest these options:
>>   ./configure \
>>       --enable-dummy \
>>
>> PRINTER PORTS
>>
>>       --enable-parport  --enable-parport-giveio \
>>      --enable-gw16012 --enable-parport-giveio --enable-amtjtagaccel
>>
>> LIBFTDI + LIBUSB - give these:
>>   --enable-ft2232_libftdi --enable-presto_libftdi
>> LIBUSB - add these:
>>   --enable-jlink  --enable-usbprog --enable-rlink  --enable-vsllink
>> --enable-usbprog
>>
>> ==========================
>> *END*
>> ==========================
>>
>> -Duane.
>>
>>
>>
>
> Here's the nutshell.  I've gotten it to build fine on my system (yes,
> we do have libusb and libftdi).  The big thing is that I had to go
> hack the makefiles manually after configure to add a
> -I/usr/local/include to the build steps, and -L/usr/local/lib to the
> linker in order to find libftdi.  Obviously the people who commit
> FreeBSD build scripts to the official distribution are not going to
> stand for that, but I don't know how to fix it without manually
> buggering up the makefiles after configure has run.  Getting OOCD to
> build on my system is the first time I've ever been aware of the
> existence and usage of configure, so admittedly, I have no clue what
> I'm doing ;)
>
> The funny thing (that I completely forgot until now), is that I've
> also been trying to bring urjtag to FreeBSD, and whatever magic their
> configure script goes thru, it finds libftdi automatically!  OOCD is
> the only thing I've had to tweak the makefiles for, again, no idea why
> as I'm new to configure.  I download both urjtag and OOCD from their
> respective SVN's, then bootstrap/configure/gmake them.  I think urjtag
> has an 'autogen.sh' script as well, perhaps that is where the magic
> happens.
>

I don't think that the test for existence of libftdi is correct in the
configure.in file. On my Ubuntu system, there is no ftdi_new()
function, so the test fails.

Attached is a patch against svn-1293 which allows my run of configure
to pass again.

Ted Roth
Index: configure.in
===================================================================
--- configure.in	(revision 1293)
+++ configure.in	(working copy)
@@ -611,12 +611,11 @@
 int
 main( int argc, char **argv )
 {
-	struct ftdi_context *p;
-	p = ftdi_new();
-	if( p != NULL ){
+	struct ftdi_context p;
+	if( ftdi_init(&p) == 0 )
 	    return 0;
 	} else {
-	    fprintf( stderr, "calling ftdi_new() failed\n");
+	    fprintf( stderr, "calling ftdi_init() failed\n");
 	    return 1;
         }
 }
_______________________________________________
Openocd-development mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/openocd-development

Reply via email to