libftdi Archives

Subject: Re: Building libftdi under Windows with MSYS2

From: Xiaofan Chen <xiaofanc@xxxxxxxxx>
To: libftdi@xxxxxxxxxxxxxxxxxxxxxxx
Date: Mon, 14 Dec 2015 22:23:35 +0800
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.


mcuee@mcuee-PC MINGW32 /c/work/libftdi/libftdi/build
$ cmake -G "MSYS Makefiles" ..
-- The C compiler identification is GNU 5.2.0
-- The CXX compiler identification is GNU 5.2.0
-- Check for working C compiler: C:/msys32/mingw32/bin/gcc.exe
-- Check for working C compiler: C:/msys32/mingw32/bin/gcc.exe -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: C:/msys32/mingw32/bin/g++.exe
-- Check for working CXX compiler: C:/msys32/mingw32/bin/g++.exe -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Build type: RelWithDebInfo
-- Found PkgConfig: C:/msys32/mingw32/bin/pkg-config.exe (found version "0.29")
-- checking for module 'libusb-1.0'
--   found libusb-1.0, version 1.0.20
-- Found LIBUSB: C:/msys32/mingw32/lib/libusb-1.0.dll.a
-- Boost version: 1.59.0
-- Found Doxygen: C:/Program Files/doxygen/bin/doxygen.exe (found
version "1.8.0")
-- Doxygen found.
-- Generating API documentation with Doxygen
-- Detected git snapshot version: v1.2-23-gc4c9f0a
-- Building libftdi1++
-- Found SWIG: C:/msys32/mingw32/bin/swig.exe (found version "3.0.6")
-- Found PythonLibs: C:/Python27/libs/libpython27.a (found version "2.7.10")
-- Found PythonInterp: C:/msys32/usr/bin/python2.7.exe (found version "2.7.10")
-- Building python bindings via swig. Will be installed under
C:/Program Files/libftdi1/lib/python2.7/site-packages
-- Found Confuse: C:/msys32/mingw32/lib/libconfuse.dll.a
-- Looking for dgettext
-- Looking for dgettext - not found
-- Found Libintl: C:/msys32/mingw32/include
-- 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
Scanning dependencies of target docs
[  2%] Generating doc/html/index.html
warning: ignoring unsupported tag `AUTOLINK_SUPPORT       =' at line
291, file C:/work/libftdi/libftdi/build/Doxyfile
warning: ignoring unsupported tag `SHOW_GROUPED_MEMB_INC  =' at line
510, file C:/work/libftdi/libftdi/build/Doxyfile
warning: ignoring unsupported tag `USE_MDFILE_AS_MAINPAGE =' at line
883, file C:/work/libftdi/libftdi/build/Doxyfile
warning: ignoring unsupported tag `SOURCE_TOOLTIPS        =' at line
939, file C:/work/libftdi/libftdi/build/Doxyfile
warning: ignoring unsupported tag `HTML_EXTRA_STYLESHEET  =' at line
1072, file C:/work/libftdi/libftdi/build/Doxyfile
warning: ignoring unsupported tag `HTML_INDEX_NUM_ENTRIES =' at line
1141, file C:/work/libftdi/libftdi/build/Doxyfile
warning: ignoring unsupported tag `MATHJAX_FORMAT         =' at line
1421, file C:/work/libftdi/libftdi/build/Doxyfile
warning: ignoring unsupported tag `MATHJAX_CODEFILE       =' at line
1449, file C:/work/libftdi/libftdi/build/Doxyfile
warning: ignoring unsupported tag `EXTERNAL_SEARCH        =' at line
1498, file C:/work/libftdi/libftdi/build/Doxyfile
warning: ignoring unsupported tag `SEARCHENGINE_URL       =' at line
1509, file C:/work/libftdi/libftdi/build/Doxyfile
warning: ignoring unsupported tag `SEARCHDATA_FILE        =' at line
1517, file C:/work/libftdi/libftdi/build/Doxyfile
warning: ignoring unsupported tag `EXTERNAL_SEARCH_ID     =' at line
1525, file C:/work/libftdi/libftdi/build/Doxyfile
warning: ignoring unsupported tag `EXTRA_SEARCH_MAPPINGS  =' at line
1535, file C:/work/libftdi/libftdi/build/Doxyfile
warning: ignoring unsupported tag `LATEX_EXTRA_FILES      =' at line
1629, file C:/work/libftdi/libftdi/build/Doxyfile
warning: ignoring unsupported tag `GENERATE_DOCBOOK       =' at line
1822, file C:/work/libftdi/libftdi/build/Doxyfile
warning: ignoring unsupported tag `DOCBOOK_OUTPUT         =' at line
1830, file C:/work/libftdi/libftdi/build/Doxyfile
warning: ignoring unsupported tag `EXTERNAL_PAGES         =' at line
2003, file C:/work/libftdi/libftdi/build/Doxyfile
warning: ignoring unsupported tag `DIA_PATH               =' at line
2038, file C:/work/libftdi/libftdi/build/Doxyfile
warning: ignoring unsupported tag `DIAFILE_DIRS           =' at line
2244, file C:/work/libftdi/libftdi/build/Doxyfile
[  2%] Built target docs
Scanning dependencies of target ftdi1
[  4%] Building C object src/CMakeFiles/ftdi1.dir/ftdi.c.obj
[  6%] Building C object src/CMakeFiles/ftdi1.dir/ftdi_stream.c.obj
[  9%] Linking C shared library libftdi1.dll
[  9%] Built target ftdi1
Scanning dependencies of target ftdi1-static
[ 11%] Building C object src/CMakeFiles/ftdi1-static.dir/ftdi.c.obj
[ 13%] Building C object src/CMakeFiles/ftdi1-static.dir/ftdi_stream.c.obj
[ 16%] Linking C static library libftdi1.a
[ 16%] Built target ftdi1-static
Scanning dependencies of target ftdipp1
[ 18%] Building CXX object ftdipp/CMakeFiles/ftdipp1.dir/ftdi.cpp.obj
[ 20%] Linking CXX shared library libftdipp1.dll
[ 20%] Built target ftdipp1
Scanning dependencies of target ftdipp1-static
[ 23%] Building CXX object ftdipp/CMakeFiles/ftdipp1-static.dir/ftdi.cpp.obj
[ 25%] Linking CXX static library libftdipp1.a
[ 25%] Built target ftdipp1-static
Scanning dependencies of target doc_i
[ 27%] Generating ../doc/xml/ftdi_8c.xml
warning: ignoring unsupported tag `AUTOLINK_SUPPORT       =' at line
295, file Doxyfile
warning: ignoring unsupported tag `SHOW_GROUPED_MEMB_INC  =' at line
514, file Doxyfile
warning: ignoring unsupported tag `USE_MDFILE_AS_MAINPAGE =' at line
887, file Doxyfile
warning: ignoring unsupported tag `SOURCE_TOOLTIPS        =' at line
943, file Doxyfile
warning: ignoring unsupported tag `HTML_EXTRA_STYLESHEET  =' at line
1076, file Doxyfile
warning: ignoring unsupported tag `HTML_INDEX_NUM_ENTRIES =' at line
1145, file Doxyfile
warning: ignoring unsupported tag `MATHJAX_FORMAT         =' at line
1425, file Doxyfile
warning: ignoring unsupported tag `MATHJAX_CODEFILE       =' at line
1453, file Doxyfile
warning: ignoring unsupported tag `EXTERNAL_SEARCH        =' at line
1502, file Doxyfile
warning: ignoring unsupported tag `SEARCHENGINE_URL       =' at line
1513, file Doxyfile
warning: ignoring unsupported tag `SEARCHDATA_FILE        =' at line
1521, file Doxyfile
warning: ignoring unsupported tag `EXTERNAL_SEARCH_ID     =' at line
1529, file Doxyfile
warning: ignoring unsupported tag `EXTRA_SEARCH_MAPPINGS  =' at line
1539, file Doxyfile
warning: ignoring unsupported tag `LATEX_EXTRA_FILES      =' at line
1633, file Doxyfile
warning: ignoring unsupported tag `GENERATE_DOCBOOK       =' at line
1826, file Doxyfile
warning: ignoring unsupported tag `DOCBOOK_OUTPUT         =' at line
1834, file Doxyfile
warning: ignoring unsupported tag `EXTERNAL_PAGES         =' at line
2007, file Doxyfile
warning: ignoring unsupported tag `DIA_PATH               =' at line
2042, file Doxyfile
warning: ignoring unsupported tag `DIAFILE_DIRS           =' at line
2248, file Doxyfile
[ 30%] 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
In file included from C:/msys32/usr/include/python2.7/Python.h:58:0,
                 from
C:/work/libftdi/libftdi/build/python/ftdi1PYTHON_wrap.c:143:
C:/msys32/usr/include/python2.7/pyport.h:351:24: fatal error:
sys/select.h: No such file or directory
compilation terminated.
python/CMakeFiles/_ftdi1.dir/build.make:70: recipe for target
'python/CMakeFiles/_ftdi1.dir/ftdi1PYTHON_wrap.c.obj' failed
make[2]: *** [python/CMakeFiles/_ftdi1.dir/ftdi1PYTHON_wrap.c.obj] Error 1
CMakeFiles/Makefile2:346: recipe for target
'python/CMakeFiles/_ftdi1.dir/all' failed
make[1]: *** [python/CMakeFiles/_ftdi1.dir/all] Error 2
Makefile:149: recipe for target 'all' failed
make: *** [all] Error 2

mcuee@mcuee-PC MINGW32 /c/work/libftdi/libftdi/build
$ make -i
[  2%] Built target docs
[  9%] Built target ftdi1
[ 16%] Built target ftdi1-static
[ 20%] Built target ftdipp1
[ 25%] Built target ftdipp1-static
[ 30%] Built target doc_i
[ 32%] Building C object python/CMakeFiles/_ftdi1.dir/ftdi1PYTHON_wrap.c.obj
In file included from C:/msys32/usr/include/python2.7/Python.h:58:0,
                 from
C:/work/libftdi/libftdi/build/python/ftdi1PYTHON_wrap.c:143:
C:/msys32/usr/include/python2.7/pyport.h:351:24: fatal error:
sys/select.h: No such file or directory
compilation terminated.
[ 34%] Linking C shared module _ftdi1.pyd
C:\msys32\mingw32\bin\ar.exe:
CMakeFiles/_ftdi1.dir/ftdi1PYTHON_wrap.c.obj: No such file or
directory
[ 37%] Built target _ftdi1
Scanning dependencies of target ftdi_eeprom
[ 39%] Building C object ftdi_eeprom/CMakeFiles/ftdi_eeprom.dir/main.c.obj
[ 41%] Linking C executable ftdi_eeprom.exe
[ 41%] Built target ftdi_eeprom
Scanning dependencies of target baud_test
[ 44%] Building C object examples/CMakeFiles/baud_test.dir/baud_test.c.obj
[ 46%] Linking C executable baud_test.exe
[ 46%] Built target baud_test
Scanning dependencies of target bitbang
[ 48%] Building C object examples/CMakeFiles/bitbang.dir/bitbang.c.obj
C:/work/libftdi/libftdi/examples/bitbang.c: In function 'main':
C:/work/libftdi/libftdi/examples/bitbang.c:64:16: warning: unknown
conversion type character 'h' in format [-Wformat=]
         printf("%02hhx ",buf[0]);
                ^
C:/work/libftdi/libftdi/examples/bitbang.c:64:16: warning: too many
arguments for format [-Wformat-extra-args]
[ 51%] Linking C executable bitbang.exe
[ 51%] Built target bitbang
Scanning dependencies of target bitbang2
[ 53%] Building C object examples/CMakeFiles/bitbang2.dir/bitbang2.c.obj
[ 55%] Linking C executable bitbang2.exe
[ 55%] Built target bitbang2
Scanning dependencies of target bitbang_cbus
[ 58%] Building C object examples/CMakeFiles/bitbang_cbus.dir/bitbang_cbus.c.obj
[ 60%] Linking C executable bitbang_cbus.exe
[ 60%] Built target bitbang_cbus
Scanning dependencies of target bitbang_ft2232
[ 62%] Building C object
examples/CMakeFiles/bitbang_ft2232.dir/bitbang_ft2232.c.obj
[ 65%] Linking C executable bitbang_ft2232.exe
[ 65%] Built target bitbang_ft2232
Scanning dependencies of target eeprom
[ 67%] Building C object examples/CMakeFiles/eeprom.dir/eeprom.c.obj
[ 69%] Linking C executable eeprom.exe
[ 69%] Built target eeprom
Scanning dependencies of target find_all
[ 72%] Building C object examples/CMakeFiles/find_all.dir/find_all.c.obj
[ 74%] Linking C executable find_all.exe
[ 74%] Built target find_all
Scanning dependencies of target find_all_pp
[ 76%] Building CXX object
examples/CMakeFiles/find_all_pp.dir/find_all_pp.cpp.obj
[ 79%] Linking CXX executable find_all_pp.exe
[ 79%] Built target find_all_pp
Scanning dependencies of target serial_test
[ 81%] Building C object examples/CMakeFiles/serial_test.dir/serial_test.c.obj
[ 83%] Linking C executable serial_test.exe
[ 83%] Built target serial_test
Scanning dependencies of target simple
[ 86%] Building C object examples/CMakeFiles/simple.dir/simple.c.obj
[ 88%] Linking C executable simple.exe
[ 88%] Built target simple
Scanning dependencies of target stream_test
[ 90%] Building C object examples/CMakeFiles/stream_test.dir/stream_test.c.obj
C:/work/libftdi/libftdi/examples/stream_test.c: In function 'readCallback':
C:/work/libftdi/libftdi/examples/stream_test.c:86:36: warning: unknown
conversion type character 'l' in format [-Wformat=]
                    fprintf(stderr, "Skip %7d blocks from 0x%08x to
0x%08x at blocks %10llu\n",
                                    ^
C:/work/libftdi/libftdi/examples/stream_test.c:86:36: warning: too
many arguments for format [-Wformat-extra-args]
C:/work/libftdi/libftdi/examples/stream_test.c:101:36: warning:
unknown conversion type character 'l' in format [-Wformat=]
                    fprintf(stderr, "Skip %7d blocks from 0x%08x to
0x%08x at blocks %10llu\n",
                                    ^
C:/work/libftdi/libftdi/examples/stream_test.c:101:36: warning: too
many arguments for format [-Wformat-extra-args]
C:/work/libftdi/libftdi/examples/stream_test.c: In function 'main':
C:/work/libftdi/libftdi/examples/stream_test.c:250:23: warning:
unknown conversion type character 'l' in format [-Wformat=]
        fprintf(stderr,"%d errors of %llu blocks (%Le), %d (%Le)
blocks skipped\n",
                       ^
C:/work/libftdi/libftdi/examples/stream_test.c:250:23: warning:
unknown conversion type character 'L' in format [-Wformat=]
C:/work/libftdi/libftdi/examples/stream_test.c:250:23: warning: format
'%d' expects argument of type 'int', but argument 4 has type 'long
long unsigned int' [-Wformat=]
C:/work/libftdi/libftdi/examples/stream_test.c:250:23: warning:
unknown conversion type character 'L' in format [-Wformat=]
C:/work/libftdi/libftdi/examples/stream_test.c:250:23: warning: too
many arguments for format [-Wformat-extra-args]
C:/work/libftdi/libftdi/examples/stream_test.c: In function 'check_outfile':
C:/work/libftdi/libftdi/examples/stream_test.c:339:37: warning:
unknown conversion type character 'l' in format [-Wformat=]
                     fprintf(stderr, "Skip %7d blocks from 0x%08x to
0x%08x at blocks %10llu \n",
                                     ^
C:/work/libftdi/libftdi/examples/stream_test.c:339:37: warning: too
many arguments for format [-Wformat-extra-args]
C:/work/libftdi/libftdi/examples/stream_test.c:353:29: warning:
unknown conversion type character 'l' in format [-Wformat=]
             fprintf(stderr, "%d blocks wrong from %llu blocks read\n",
                             ^
C:/work/libftdi/libftdi/examples/stream_test.c:353:29: warning: too
many arguments for format [-Wformat-extra-args]
C:/work/libftdi/libftdi/examples/stream_test.c:356:29: warning:
unknown conversion type character 'l' in format [-Wformat=]
             fprintf(stderr, "%llu blocks all fine\n", (unsigned long
long) blocks);
                             ^
C:/work/libftdi/libftdi/examples/stream_test.c:356:29: warning: too
many arguments for format [-Wformat-extra-args]
[ 93%] Linking C executable stream_test.exe
[ 93%] Built target stream_test
Scanning dependencies of target test_libftdi1
[ 95%] Building CXX object test/CMakeFiles/test_libftdi1.dir/basic.cpp.obj
[ 97%] Building CXX object test/CMakeFiles/test_libftdi1.dir/baudrate.cpp.obj
[100%] Linking CXX executable test_libftdi1.exe
[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