libftdi Archives

Subject: Re: Building libftdi under Windows with MSYS2

From: Xiaofan Chen <xiaofanc@xxxxxxxxx>
To: libftdi@xxxxxxxxxxxxxxxxxxxxxxx
Date: Mon, 14 Dec 2015 22:52:25 +0800
On Mon, Dec 14, 2015 at 10:43 PM, Xiaofan Chen <xiaofanc@xxxxxxxxx> wrote:
> On Mon, Dec 14, 2015 at 10:23 PM, Xiaofan Chen <xiaofanc@xxxxxxxxx> wrote:
>> On Mon, Dec 14, 2015 at 10:09 PM, Xiaofan Chen <xiaofanc@xxxxxxxxx> wrote:
>>> Today I tried to build libftdi git under MSYS2 and it seems to be
>>> quite easy. Just need to install the necessary dependencies using
>>> MSYS2 pacman.
>>>
>>> The only problem seems to be with the Python 2.7 64bit. I think
>>> last time I spent quite sometime trying to get 64bit Python
>>> bindings to be built for Python 2.7.
>>>
>>> Therefore I think I do not need to publish the binaries. Users under
>>> Windows are encouraged to use MSYS2.
>>>
>>> MSYS2:
>>> https://msys2.github.io/
>>> http://sourceforge.net/projects/msys2/
>>
>> The previous run log is under MSYS2 MinGW-w64 64bit
>> environment and Windows 10 x64.
>>
>> The following run log is under MSYS2 MinGW-w64 32bit
>> environment and Windows 7 x86. Strangely there is still
>> a problem building the 32bit bindings for Python 2.7.
>>
>
> This is because of a conflict between MSYS2 python
> package and the Python.org Python 2.7 I installed on
> the same system. So I manually edited the
> CMakeCache.txt to correct the errors and point to
> Python.org installation, everything will be okay.
>

Another problem with building the Python binding is that
it can only find one installation. So I have to edit
CMakeCache.txt again to build for Python 3.5.

mcuee@mcuee-PC MINGW32 /c/work/libftdi/libftdi/build
$ cmake ..
-- Build type: RelWithDebInfo
-- Boost version: 1.59.0
-- Doxygen found.
-- Generating API documentation with Doxygen
-- Detected git snapshot version: v1.2-23-gc4c9f0a
-- Building libftdi1++
-- Found PythonLibs: C:/Python35/libs/libpython35.a (found version "3.5.1")
-- Found PythonInterp: C:/Python35/python.exe (found version "3.5.1")
-- Building python bindings via swig. Will be installed under
C:/Program Files/libftdi1/Lib/site-packages
-- Building ftdi_eeprom
-- Building example programs.
-- Building libftdi++ examples.
-- Boost version: 1.59.0
-- Found the following Boost libraries:
--   unit_test_framework
-- Building unit test
-- Configuring done
-- Generating done
-- Build files have been written to: C:/work/libftdi/libftdi/build

mcuee@mcuee-PC MINGW32 /c/work/libftdi/libftdi/build
$ make
[  2%] Built target docs
[  9%] Built target ftdi1
[ 16%] Built target ftdi1-static
[ 20%] Built target ftdipp1
[ 25%] Built target ftdipp1-static
[ 27%] Generating ftdi1_doc.i
[ 30%] Built target doc_i
[ 32%] Swig source
C:\work\libftdi\libftdi\src\ftdi_i.h(131) : Warning 451: Setting a
const char * variable may leak memory.
Scanning dependencies of target _ftdi1
[ 34%] Building C object python/CMakeFiles/_ftdi1.dir/ftdi1PYTHON_wrap.c.obj
[ 37%] Linking C shared module _ftdi1.pyd
[ 37%] Built target _ftdi1
[ 41%] Built target ftdi_eeprom
[ 46%] Built target baud_test
[ 51%] Built target bitbang
[ 55%] Built target bitbang2
[ 60%] Built target bitbang_cbus
[ 65%] Built target bitbang_ft2232
[ 69%] Built target eeprom
[ 74%] Built target find_all
[ 79%] Built target find_all_pp
[ 83%] Built target serial_test
[ 88%] Built target simple
[ 93%] Built target stream_test
[100%] Built target test_libftdi1



-- 
Xiaofan

--
libftdi - see http://www.intra2net.com/en/developer/libftdi for details.
To unsubscribe send a mail to libftdi+unsubscribe@xxxxxxxxxxxxxxxxxxxxxxx   

Current Thread