On Mon, Feb 15, 2010 at 12:43 AM, Xiaofan Chen <xiaof...@gmail.com> wrote:
> On Mon, Feb 15, 2010 at 8:35 AM, CeDeROM <tomek.ce...@gmail.com> wrote:
>> Xiao, the port is a some kind of a program plug into a FreeBSD system
>> - for a program to work on a FreeBSD it must have its own Port, also
>> any change in the program code may be done only within its Port - what
>> you get from a binary is a result of Port build. No direct download,
>> compilation and installation is advised as it can compromise system
>> integrity. The latest port for OpenOCD in the FreeBSD system is 0.2.0.
>> The new port will be 0.4.0 ans its on its way :-)
>
> I should have the freedom to build from source and not use package
> system, right? Why should I stick to an old version and wait for the
> port maintainer?

Well, you have that freedom, but sometimes there are details that
maintainer chekcs for you - ie. dependencies (includes/libraries),
patches, etc. Ports are not against users - they help simply
build/install and use the program in a straight and painless way. If
you want to build and test is yourself - then surely you are the best
candidate for a port maintainer! :-)

>> If you want to test the latest 0.4.0-rc2 source code, please download
>> this unapproved port package and uncompress it into /usr/ports/devel:
>> http://files.tomek.cedro.info/stuff/openocd-040-rc2.tar.gz
>
> I will try.

Ok, I should have make it an openocd-devel Port and probably it will
become one shortly, I just have to verify this with the developers if
the GIT approach is more convenient. Noone wanted/requested to use
that port before you :-)

> I just want to use plain git if possible without using the port system.
> But if that is not possible, I will try the devel port. I see that there
> are some precedence here (lang/sdcc and lang/sdcc-devel).
>
> [mc...@myfreebsd /usr/home/mcuee/build/openocd/build]$
> ../openocd/configure --enable-maintainer-mode --enable-jlink
> --enable-ft2232_libftdi --enable-dummy
> checking for a BSD-compatible install... /usr/bin/install -c
> (...)
> checking whether to enable ZY1000 minidriver... no
> checking whether to enable dummy minidriver... no
> checking whether standard drivers can be built... yes
> checking Build & Link with libftdi...... configure: error: Cannot
> build & run test program using libftdi

With the port provided you should get:

amd64# make
===>  Vulnerability check disabled, database not found
===>  Found saved configuration for openocd-0.4.0
===>  Extracting for openocd-0.4.0.r2
=> No checksum file (/usr/ports/devel/openocd-040-rc2/distinfo).
===>  Patching for openocd-0.4.0.r2
===>   openocd-0.4.0.r2 depends on executable: gmake - found
===>   openocd-0.4.0.r2 depends on shared library: ftdi - found
===>  Configuring for openocd-0.4.0.r2
checking for a BSD-compatible install... /usr/bin/install -c -o root -g wheel
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... ./install-sh -c -d
checking for gawk... no
checking for mawk... no
(...)
checking whether to enable malloc free space logging... no
checking whether to enable ZY1000 minidriver... no
checking whether to enable dummy minidriver... no
checking whether standard drivers can be built... yes
checking Build & Link with libftdi...... Success       <-- here it is
checking for libftdi highspeed device support... yes
checking usb.h usability... yes

That is probably because port got requested dependencies:
===>   openocd-0.4.0.r2 depends on executable: gmake - found
===>   openocd-0.4.0.r2 depends on shared library: ftdi - found

and there are some addtional libraries/includes passed to the compiler
in the Makefile:
CFLAGS+=        -I${LOCALBASE}/include -L${LOCALBASE}/lib

Wow, Ive just realised that using FreeBSD is somehow like programming
in assembly language =)


Please use the provided port for RC2 (and verify if it works fine for
you), or analyze the Makefile and apply the environment for your need
:-)

Best regards,
Tomek Cedro

-- 
CeDeROM, SQ7MHZ, http://www.tomek.cedro.info
_______________________________________________
Openocd-development mailing list
Openocd-development@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/openocd-development

Reply via email to