Quantcast

Building libftdi under Windows with MSYS2

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Building libftdi under Windows with MSYS2

Xiaofan Chen
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/

mcuee@Win7HomeX64_PC MINGW64 /h/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: H:/MSys64/mingw64/bin/gcc.exe
-- Check for working C compiler: H:/MSys64/mingw64/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: H:/MSys64/mingw64/bin/g++.exe
-- Check for working CXX compiler: H:/MSys64/mingw64/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: H:/MSys64/mingw64/bin/pkg-config.exe (found version "0.29")
-- checking for module 'libusb-1.0'
--   found libusb-1.0, version 1.0.20
-- Found LIBUSB: H:/MSys64/mingw64/lib/libusb-1.0.dll.a
-- Boost version: 1.59.0
-- Found Doxygen: H:/Programs/doxygen/bin/doxygen.exe (found version "1.8.10")
-- Doxygen found.
-- Generating API documentation with Doxygen
-- Detected git snapshot version: v1.2-23-gc4c9f0a
-- Building libftdi1++
-- Found SWIG: H:/MSys64/mingw64/bin/swig.exe (found version "3.0.6")
-- Found PythonLibs: H:/Python27_x64/libs/libpython27.a (found version "2.7.11")
-- Found PythonInterp: H:/Python27_x64/python.exe (found version "2.7.11")
-- Building python bindings via swig. Will be installed under
C:/Program Files (x86)/libftdi1/Lib/site-packages
-- Found Confuse: H:/MSys64/mingw64/lib/libconfuse.dll.a
-- Looking for dgettext
-- Looking for dgettext - not found
-- Found Libintl: H:/MSys64/mingw64/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: H:/work/libftdi/libftdi/build


mcuee@Win7HomeX64_PC MINGW64 /h/work/libftdi/libftdi/build
$ make
Scanning dependencies of target docs
[  2%] Generating doc/html/index.html
warning: Tag `XML_SCHEMA' at line 1797 of file
`H:/work/libftdi/libftdi/build/Doxyfile' has become obsolete.
         To avoid this warning please remove this line from your
configuration file or upgrade it using "doxygen -u"
warning: Tag `XML_DTD' at line 1803 of file
`H:/work/libftdi/libftdi/build/Doxyfile' has become obsolete.
         To avoid this warning please remove this line from your
configuration file or upgrade it using "doxygen -u"
[  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: Tag `XML_SCHEMA' at line 1801 of file `Doxyfile' has become obsolete.
         To avoid this warning please remove this line from your
configuration file or upgrade it using "doxygen -u"
warning: Tag `XML_DTD' at line 1807 of file `Doxyfile' has become obsolete.
         To avoid this warning please remove this line from your
configuration file or upgrade it using "doxygen -u"
[ 30%] Generating ftdi1_doc.i
[ 30%] Built target doc_i
[ 32%] Swig source
H:\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
CMakeFiles/_ftdi1.dir/objects.a(ftdi1PYTHON_wrap.c.obj): In function
`init_ftdi1':
H:/work/libftdi/libftdi/build/python/ftdi1PYTHON_wrap.c:16293:
undefined reference to `__imp_Py_InitModule4'
collect2.exe: error: ld returned 1 exit status
python/CMakeFiles/_ftdi1.dir/build.make:104: recipe for target
'python/_ftdi1.pyd' failed
make[2]: *** [python/_ftdi1.pyd] 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@Win7HomeX64_PC MINGW64 /h/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%] Linking C shared module _ftdi1.pyd
CMakeFiles/_ftdi1.dir/objects.a(ftdi1PYTHON_wrap.c.obj): In function
`init_ftdi1':
H:/work/libftdi/libftdi/build/python/ftdi1PYTHON_wrap.c:16293:
undefined reference to `__imp_Py_InitModule4'
collect2.exe: error: ld returned 1 exit status
[ 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
H:/work/libftdi/libftdi/examples/bitbang.c: In function 'main':
H:/work/libftdi/libftdi/examples/bitbang.c:64:16: warning: unknown
conversion type character 'h' in format [-Wformat=]
         printf("%02hhx ",buf[0]);
                ^
H:/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
H:/work/libftdi/libftdi/examples/stream_test.c: In function 'readCallback':
H:/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",
                                    ^
H:/work/libftdi/libftdi/examples/stream_test.c:86:36: warning: too
many arguments for format [-Wformat-extra-args]
H:/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",
                                    ^
H:/work/libftdi/libftdi/examples/stream_test.c:101:36: warning: too
many arguments for format [-Wformat-extra-args]
H:/work/libftdi/libftdi/examples/stream_test.c: In function 'main':
H:/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",
                       ^
H:/work/libftdi/libftdi/examples/stream_test.c:250:23: warning:
unknown conversion type character 'L' in format [-Wformat=]
H:/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=]
H:/work/libftdi/libftdi/examples/stream_test.c:250:23: warning:
unknown conversion type character 'L' in format [-Wformat=]
H:/work/libftdi/libftdi/examples/stream_test.c:250:23: warning: too
many arguments for format [-Wformat-extra-args]
H:/work/libftdi/libftdi/examples/stream_test.c: In function 'check_outfile':
H:/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",
                                     ^
H:/work/libftdi/libftdi/examples/stream_test.c:339:37: warning: too
many arguments for format [-Wformat-extra-args]
H:/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",
                             ^
H:/work/libftdi/libftdi/examples/stream_test.c:353:29: warning: too
many arguments for format [-Wformat-extra-args]
H:/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);
                             ^
H:/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 [hidden email]  

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Building libftdi under Windows with MSYS2

Xiaofan Chen
On Mon, Dec 14, 2015 at 10:09 PM, Xiaofan Chen <[hidden email]> 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 [hidden email]  

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Building libftdi under Windows with MSYS2

Xiaofan Chen
On Mon, Dec 14, 2015 at 10:23 PM, Xiaofan Chen <[hidden email]> wrote:

> On Mon, Dec 14, 2015 at 10:09 PM, Xiaofan Chen <[hidden email]> 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.

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:/Python27/libs/libpython27.a (found version "2.7.11")
-- Found PythonInterp: C:/Python27/python.exe (found version "2.7.11")
-- 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
[ 30%] Built target doc_i
[ 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 [hidden email]  

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Building libftdi under Windows with MSYS2

Xiaofan Chen
On Mon, Dec 14, 2015 at 10:43 PM, Xiaofan Chen <[hidden email]> wrote:

> On Mon, Dec 14, 2015 at 10:23 PM, Xiaofan Chen <[hidden email]> wrote:
>> On Mon, Dec 14, 2015 at 10:09 PM, Xiaofan Chen <[hidden email]> 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 [hidden email]  

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Building libftdi under Windows with MSYS2

Xiaofan Chen
In reply to this post by Xiaofan Chen
On Mon, Dec 14, 2015 at 10:09 PM, Xiaofan Chen <[hidden email]> 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.

Today I tried again to use latest version of MSYS2 to build libftdi git
and it is still quite smooth.

Other than the basic development packages, git, cmake, doxygen
are also necessary. Of course they may not need to be from MSYS2
as long as they are in the PATH.

Then Boost, Python, Swig, libusb, libconfuse, pkg-config need to be
installed for
the respective 32bit or 64bit target.

mcuee@Win7HomeX64_PC MINGW64 /h/work/libftdi/libftdi/build_mingw64
$ pacman -Qs boost
local/mingw-w64-i686-boost 1.62.0-1
    Free peer-reviewed portable C++ source libraries (mingw-w64)
local/mingw-w64-x86_64-boost 1.62.0-1
    Free peer-reviewed portable C++ source libraries (mingw-w64)

mcuee@Win7HomeX64_PC MINGW64 /h/work/libftdi/libftdi/build_mingw64
$ pacman -Qs python3
local/mingw-w64-i686-python3 3.5.2-4
    A high-level scripting language (mingw-w64)
local/mingw-w64-x86_64-python3 3.5.2-4
    A high-level scripting language (mingw-w64)

mcuee@Win7HomeX64_PC MINGW64 /h/work/libftdi/libftdi/build_mingw64
$ pacman -Qs swig
local/mingw-w64-i686-swig 3.0.6-1
    Generate scripting interfaces to C/C++ code
local/mingw-w64-x86_64-swig 3.0.6-1
    Generate scripting interfaces to C/C++ code

mcuee@Win7HomeX64_PC MINGW64 /h/work/libftdi/libftdi/build_mingw64
$ pacman -Qs libusb
local/mingw-w64-i686-libusb 1.0.20-1
    Library that provides generic access to USB devices (mingw-w64)
local/mingw-w64-i686-libusb-compat-git r60.072a5e4-3
    libusb provides generic access to USB devices (mingw-w64)
local/mingw-w64-x86_64-libusb 1.0.20-1
    Library that provides generic access to USB devices (mingw-w64)
local/mingw-w64-x86_64-libusb-compat-git r60.072a5e4-3
    libusb provides generic access to USB devices (mingw-w64)

mcuee@Win7HomeX64_PC MINGW64 /h/work/libftdi/libftdi/build_mingw64
$ pacman -Qs confuse
local/mingw-w64-i686-confuse 2.8-1
    Library for parsing configuration files (mingw-w64)
local/mingw-w64-x86_64-confuse 2.8-1
    Library for parsing configuration files (mingw-w64)

The following shows the build log under 64bit MinGW-w64.

mcuee@Win7HomeX64_PC MINGW64 /h/work/libftdi/libftdi/build_mingw64
$ cmake .. -G "MSYS Makefiles"
-- The C compiler identification is GNU 6.2.0
-- The CXX compiler identification is GNU 6.2.0
-- Check for working C compiler: H:/MSys64/mingw64/bin/gcc.exe
-- Check for working C compiler: H:/MSys64/mingw64/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: H:/MSys64/mingw64/bin/g++.exe
-- Check for working CXX compiler: H:/MSys64/mingw64/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: H:/MSys64/mingw64/bin/pkg-config.exe (found
version "0.29.1")
-- Checking for module 'libusb-1.0'
--   Found libusb-1.0, version 1.0.20
-- Found LIBUSB: H:/MSys64/mingw64/lib/libusb-1.0.dll.a
-- Boost version: 1.62.0
-- Found Doxygen: H:/Programs/doxygen/bin/doxygen.exe (found version "1.8.10")
-- Doxygen found.
-- Generating API documentation with Doxygen
-- Detected git snapshot version: v1.3-11-g95f6828
-- Building libftdi1++
-- Found SWIG: H:/MSys64/mingw64/bin/swig.exe (found version "3.0.6")
-- Found PythonLibs: H:/Python35_x64/libs/libpython35.a (found version "3.5.2")
-- Found PythonInterp: H:/MSys64/mingw64/bin/python3.5.exe (found
version "3.5.2")
-- Building python bindings via swig. Will be installed under
C:/Program Files (x86)/libftdi1/lib/python3.5/site-packages
-- Found Confuse: H:/MSys64/mingw64/lib/libconfuse.dll.a
-- Looking for dgettext
-- Looking for dgettext - not found
-- Found Libintl: H:/MSys64/mingw64/include
-- Building ftdi_eeprom
-- Building example programs.
-- Building libftdi++ examples.
-- Boost version: 1.62.0
-- Found the following Boost libraries:
--   unit_test_framework
-- Building unit test
-- Configuring done
-- Generating done
-- Build files have been written to: H:/work/libftdi/libftdi/build_mingw64

mcuee@Win7HomeX64_PC MINGW64 /h/work/libftdi/libftdi/build_mingw64
$ make
Scanning dependencies of target docs
[  2%] Generating doc/html/index.html
warning: ignoring unsupported tag `LATEX_TIMESTAMP        =' at line
1735, file H:/work/libftdi/libftdi/build_mingw64/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
H:/work/libftdi/libftdi/src/ftdi_stream.c: In function 'ftdi_readstream':
H:/work/libftdi/libftdi/src/ftdi_stream.c:234:5: warning: implicit
declaration of function 'gettimeofday'
[-Wimplicit-function-declaration]
     gettimeofday(&state.progress.first.time, NULL);
     ^~~~~~~~~~~~
[  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
H:/work/libftdi/libftdi/src/ftdi_stream.c: In function 'ftdi_readstream':
H:/work/libftdi/libftdi/src/ftdi_stream.c:234:5: warning: implicit
declaration of function 'gettimeofday'
[-Wimplicit-function-declaration]
     gettimeofday(&state.progress.first.time, NULL);
     ^~~~~~~~~~~~
[ 16%] Linking C static library libftdi1.a
[ 16%] Built target ftdi1-static
Scanning dependencies of target ftdipp1-static
[ 18%] Building CXX object ftdipp/CMakeFiles/ftdipp1-static.dir/ftdi.cpp.obj
[ 20%] Linking CXX static library libftdipp1.a
[ 20%] Built target ftdipp1-static
Scanning dependencies of target ftdipp1
[ 23%] Building CXX object ftdipp/CMakeFiles/ftdipp1.dir/ftdi.cpp.obj
[ 25%] Linking CXX shared library libftdipp1.dll
[ 25%] Built target ftdipp1
Scanning dependencies of target doc_i
[ 27%] Generating ../doc/xml/ftdi_8c.xml
warning: ignoring unsupported tag `LATEX_TIMESTAMP        =' at line
1739, file Doxyfile
[ 30%] Generating ftdi1_doc.i
[ 30%] Built target doc_i
[ 32%] Swig source
H:\work\libftdi\libftdi\src\ftdi.h(270) : Warning 451: Setting a const
char * variable may leak memory.
H:\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
H:/work/libftdi/libftdi/build_mingw64/python/ftdi1PYTHON_wrap.c: In
function '_wrap_read_data':
H:/work/libftdi/libftdi/build_mingw64/python/ftdi1PYTHON_wrap.c:3676:3:
warning: this 'if' clause does not guard... [-Wmisleading-indentation]
   if(result<0) arg3=0; resultobj =
SWIG_Python_AppendOutput(resultobj, charp2str((char*)arg2, arg3));
free(arg2);
   ^~
H:/work/libftdi/libftdi/build_mingw64/python/ftdi1PYTHON_wrap.c:3676:24:
note: ...this statement, but the latter is misleadingly indented as if
it is guarded by the 'if'
   if(result<0) arg3=0; resultobj =
SWIG_Python_AppendOutput(resultobj, charp2str((char*)arg2, arg3));
free(arg2);
                        ^~~~~~~~~
H:/work/libftdi/libftdi/build_mingw64/python/ftdi1PYTHON_wrap.c: In
function '_wrap_get_eeprom_buf':
H:/work/libftdi/libftdi/build_mingw64/python/ftdi1PYTHON_wrap.c:3918:3:
warning: this 'if' clause does not guard... [-Wmisleading-indentation]
   if(result<0) arg3=0; resultobj =
SWIG_Python_AppendOutput(resultobj, charp2str((char*)arg2, arg3));
free(arg2);
   ^~
H:/work/libftdi/libftdi/build_mingw64/python/ftdi1PYTHON_wrap.c:3918:24:
note: ...this statement, but the latter is misleadingly indented as if
it is guarded by the 'if'
   if(result<0) arg3=0; resultobj =
SWIG_Python_AppendOutput(resultobj, charp2str((char*)arg2, arg3));
free(arg2);
                        ^~~~~~~~~
[ 37%] Linking C shared module _ftdi1.pyd
[ 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 find_all_pp
[ 44%] Building CXX object
examples/CMakeFiles/find_all_pp.dir/find_all_pp.cpp.obj
[ 46%] Linking CXX executable find_all_pp.exe
[ 46%] Built target find_all_pp
Scanning dependencies of target stream_test
[ 48%] Building C object examples/CMakeFiles/stream_test.dir/stream_test.c.obj
H:/work/libftdi/libftdi/examples/stream_test.c: In function 'readCallback':
H:/work/libftdi/libftdi/examples/stream_test.c:86:89: warning: unknown
conversion type character 'l' in format [-Wformat=]
                    fprintf(stderr, "Skip %7d blocks from 0x%08x to
0x%08x at blocks %10llu\n",

                  ^
H:/work/libftdi/libftdi/examples/stream_test.c:86:36: warning: too
many arguments for format [-Wformat-extra-args]
                    fprintf(stderr, "Skip %7d blocks from 0x%08x to
0x%08x at blocks %10llu\n",

^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
H:/work/libftdi/libftdi/examples/stream_test.c:86:89: warning: unknown
conversion type character 'l' in format [-Wformat=]
                    fprintf(stderr, "Skip %7d blocks from 0x%08x to
0x%08x at blocks %10llu\n",

                  ^
H:/work/libftdi/libftdi/examples/stream_test.c:86:36: warning: too
many arguments for format [-Wformat-extra-args]
                    fprintf(stderr, "Skip %7d blocks from 0x%08x to
0x%08x at blocks %10llu\n",

^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
H:/work/libftdi/libftdi/examples/stream_test.c:101:89: warning:
unknown conversion type character 'l' in format [-Wformat=]
                    fprintf(stderr, "Skip %7d blocks from 0x%08x to
0x%08x at blocks %10llu\n",

                  ^
H:/work/libftdi/libftdi/examples/stream_test.c:101:36: warning: too
many arguments for format [-Wformat-extra-args]
                    fprintf(stderr, "Skip %7d blocks from 0x%08x to
0x%08x at blocks %10llu\n",

^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
H:/work/libftdi/libftdi/examples/stream_test.c:101:89: warning:
unknown conversion type character 'l' in format [-Wformat=]
                    fprintf(stderr, "Skip %7d blocks from 0x%08x to
0x%08x at blocks %10llu\n",

                  ^
H:/work/libftdi/libftdi/examples/stream_test.c:101:36: warning: too
many arguments for format [-Wformat-extra-args]
                    fprintf(stderr, "Skip %7d blocks from 0x%08x to
0x%08x at blocks %10llu\n",

^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
H:/work/libftdi/libftdi/examples/stream_test.c: In function 'main':
H:/work/libftdi/libftdi/examples/stream_test.c:250:39: warning:
unknown conversion type character 'l' in format [-Wformat=]
        fprintf(stderr,"%d errors of %llu blocks (%Le), %d (%Le)
blocks skipped\n",
                                       ^
H:/work/libftdi/libftdi/examples/stream_test.c:250:51: warning:
unknown conversion type character 'L' in format [-Wformat=]
        fprintf(stderr,"%d errors of %llu blocks (%Le), %d (%Le)
blocks skipped\n",
                                                   ^
H:/work/libftdi/libftdi/examples/stream_test.c:250:57: warning: format
'%d' expects argument of type 'int', but argument 4 has type 'long
long unsigned int' [-Wformat=]
        fprintf(stderr,"%d errors of %llu blocks (%Le), %d (%Le)
blocks skipped\n",
                                                         ^
H:/work/libftdi/libftdi/examples/stream_test.c:250:61: warning:
unknown conversion type character 'L' in format [-Wformat=]
        fprintf(stderr,"%d errors of %llu blocks (%Le), %d (%Le)
blocks skipped\n",
                                                             ^
H:/work/libftdi/libftdi/examples/stream_test.c:250:23: warning: too
many arguments for format [-Wformat-extra-args]
        fprintf(stderr,"%d errors of %llu blocks (%Le), %d (%Le)
blocks skipped\n",

^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
H:/work/libftdi/libftdi/examples/stream_test.c:250:39: warning:
unknown conversion type character 'l' in format [-Wformat=]
        fprintf(stderr,"%d errors of %llu blocks (%Le), %d (%Le)
blocks skipped\n",
                                       ^
H:/work/libftdi/libftdi/examples/stream_test.c:250:51: warning:
unknown conversion type character 'L' in format [-Wformat=]
        fprintf(stderr,"%d errors of %llu blocks (%Le), %d (%Le)
blocks skipped\n",
                                                   ^
H:/work/libftdi/libftdi/examples/stream_test.c:250:57: warning: format
'%d' expects argument of type 'int', but argument 4 has type 'long
long unsigned int' [-Wformat=]
        fprintf(stderr,"%d errors of %llu blocks (%Le), %d (%Le)
blocks skipped\n",
                                                         ^
H:/work/libftdi/libftdi/examples/stream_test.c:250:61: warning:
unknown conversion type character 'L' in format [-Wformat=]
        fprintf(stderr,"%d errors of %llu blocks (%Le), %d (%Le)
blocks skipped\n",
                                                             ^
H:/work/libftdi/libftdi/examples/stream_test.c:250:23: warning: too
many arguments for format [-Wformat-extra-args]
        fprintf(stderr,"%d errors of %llu blocks (%Le), %d (%Le)
blocks skipped\n",

^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
H:/work/libftdi/libftdi/examples/stream_test.c: In function 'check_outfile':
H:/work/libftdi/libftdi/examples/stream_test.c:339:90: warning:
unknown conversion type character 'l' in format [-Wformat=]
                     fprintf(stderr, "Skip %7d blocks from 0x%08x to
0x%08x at blocks %10llu \n",

                   ^
H:/work/libftdi/libftdi/examples/stream_test.c:339:37: warning: too
many arguments for format [-Wformat-extra-args]
                     fprintf(stderr, "Skip %7d blocks from 0x%08x to
0x%08x at blocks %10llu \n",

^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
H:/work/libftdi/libftdi/examples/stream_test.c:339:90: warning:
unknown conversion type character 'l' in format [-Wformat=]
                     fprintf(stderr, "Skip %7d blocks from 0x%08x to
0x%08x at blocks %10llu \n",

                   ^
H:/work/libftdi/libftdi/examples/stream_test.c:339:37: warning: too
many arguments for format [-Wformat-extra-args]
                     fprintf(stderr, "Skip %7d blocks from 0x%08x to
0x%08x at blocks %10llu \n",

^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
H:/work/libftdi/libftdi/examples/stream_test.c:353:53: warning:
unknown conversion type character 'l' in format [-Wformat=]
             fprintf(stderr, "%d blocks wrong from %llu blocks read\n",
                                                     ^
H:/work/libftdi/libftdi/examples/stream_test.c:353:29: warning: too
many arguments for format [-Wformat-extra-args]
             fprintf(stderr, "%d blocks wrong from %llu blocks read\n",
                             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
H:/work/libftdi/libftdi/examples/stream_test.c:353:53: warning:
unknown conversion type character 'l' in format [-Wformat=]
             fprintf(stderr, "%d blocks wrong from %llu blocks read\n",
                                                     ^
H:/work/libftdi/libftdi/examples/stream_test.c:353:29: warning: too
many arguments for format [-Wformat-extra-args]
             fprintf(stderr, "%d blocks wrong from %llu blocks read\n",
                             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
H:/work/libftdi/libftdi/examples/stream_test.c:356:32: warning:
unknown conversion type character 'l' in format [-Wformat=]
             fprintf(stderr, "%llu blocks all fine\n", (unsigned long
long) blocks);
                                ^
H:/work/libftdi/libftdi/examples/stream_test.c:356:29: warning: too
many arguments for format [-Wformat-extra-args]
             fprintf(stderr, "%llu blocks all fine\n", (unsigned long
long) blocks);
                             ^~~~~~~~~~~~~~~~~~~~~~~~
H:/work/libftdi/libftdi/examples/stream_test.c:356:32: warning:
unknown conversion type character 'l' in format [-Wformat=]
             fprintf(stderr, "%llu blocks all fine\n", (unsigned long
long) blocks);
                                ^
H:/work/libftdi/libftdi/examples/stream_test.c:356:29: warning: too
many arguments for format [-Wformat-extra-args]
             fprintf(stderr, "%llu blocks all fine\n", (unsigned long
long) blocks);
                             ^~~~~~~~~~~~~~~~~~~~~~~~
[ 51%] Linking C executable stream_test.exe
[ 51%] Built target stream_test
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
[ 58%] Building C object examples/CMakeFiles/bitbang.dir/bitbang.c.obj
H:/work/libftdi/libftdi/examples/bitbang.c: In function 'main':
H:/work/libftdi/libftdi/examples/bitbang.c:64:21: warning: unknown
conversion type character 'h' in format [-Wformat=]
         printf("%02hhx ",buf[0]);
                     ^
H:/work/libftdi/libftdi/examples/bitbang.c:64:16: warning: too many
arguments for format [-Wformat-extra-args]
         printf("%02hhx ",buf[0]);
                ^~~~~~~~~
H:/work/libftdi/libftdi/examples/bitbang.c:64:21: warning: unknown
conversion type character 'h' in format [-Wformat=]
         printf("%02hhx ",buf[0]);
                     ^
H:/work/libftdi/libftdi/examples/bitbang.c:64:16: warning: too many
arguments for format [-Wformat-extra-args]
         printf("%02hhx ",buf[0]);
                ^~~~~~~~~
[ 60%] Linking C executable bitbang.exe
[ 60%] Built target bitbang
Scanning dependencies of target serial_test
[ 62%] Building C object examples/CMakeFiles/serial_test.dir/serial_test.c.obj
[ 65%] Linking C executable serial_test.exe
[ 65%] Built target serial_test
Scanning dependencies of target bitbang_ft2232
[ 67%] Building C object
examples/CMakeFiles/bitbang_ft2232.dir/bitbang_ft2232.c.obj
[ 69%] Linking C executable bitbang_ft2232.exe
[ 69%] Built target bitbang_ft2232
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 simple
[ 76%] Building C object examples/CMakeFiles/simple.dir/simple.c.obj
[ 79%] Linking C executable simple.exe
[ 79%] Built target simple
Scanning dependencies of target baud_test
[ 81%] Building C object examples/CMakeFiles/baud_test.dir/baud_test.c.obj
[ 83%] Linking C executable baud_test.exe
[ 83%] Built target baud_test
Scanning dependencies of target bitbang_cbus
[ 86%] Building C object examples/CMakeFiles/bitbang_cbus.dir/bitbang_cbus.c.obj
[ 88%] Linking C executable bitbang_cbus.exe
[ 88%] Built target bitbang_cbus
Scanning dependencies of target eeprom
[ 90%] Building C object examples/CMakeFiles/eeprom.dir/eeprom.c.obj
[ 93%] Linking C executable eeprom.exe
[ 93%] Built target eeprom
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 [hidden email]  

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Building libftdi under Windows with MSYS2

Paul Fertser
Hello,

On Mon, Jan 02, 2017 at 09:51:34AM +0800, Xiaofan Chen wrote:
> On Mon, Dec 14, 2015 at 10:09 PM, Xiaofan Chen <[hidden email]> 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.
>
> Today I tried again to use latest version of MSYS2 to build libftdi git
> and it is still quite smooth.

As a sidenote, they already include libftdi1-1.2 in their repository
[1] so MSYS2 users do not need to compile anything if they do not need
the latest code. The PKGBUILD file claims it's getting built with
python2 bindings (and it has a build time dependency on python2) but
probably if python3 is installed before libftdi1 gets built, it'll
pick up that instead.

[1] https://github.com/Alexpux/MINGW-packages/blob/master/mingw-w64-libftdi/PKGBUILD

--
Be free, use free (http://www.gnu.org/philosophy/free-sw.html) software!
mailto:[hidden email]

--
libftdi - see http://www.intra2net.com/en/developer/libftdi for details.
To unsubscribe send a mail to [hidden email]  

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Building libftdi under Windows with MSYS2

Xiaofan Chen
On Mon, Jan 2, 2017 at 2:28 PM, Paul Fertser <[hidden email]> wrote:

> As a sidenote, they already include libftdi1-1.2 in their repository
> [1] so MSYS2 users do not need to compile anything if they do not need
> the latest code. The PKGBUILD file claims it's getting built with
> python2 bindings (and it has a build time dependency on python2) but
> probably if python3 is installed before libftdi1 gets built, it'll
> pick up that instead.
>
> [1] https://github.com/Alexpux/MINGW-packages/blob/master/mingw-w64-libftdi/PKGBUILD

Thanks. I just tried it and indeed it works well. Since I installed Python 3.5
and not Python 2.7 under MSYS2, actually Python 3 binding is installed.

mcuee@Win7HomeX64_PC MINGW64 /mingw64/lib/python3.5/site-packages
$ ls
_ftdi1.pyd  ftdi1.py  README

mcuee@Win7HomeX64_PC MINGW64 /h/work/libftdi/libftdi1-1.2/python/examples
$ python3 simple.py
[FTDI version] major: 1, minor: 2, micro: 0, version_str: 1.2,
snapshot_str: unknown
ftdi.usb_open(): 0
ftdi.set_baudrate(): 0

mcuee@Win7HomeX64_PC MINGW64 /h/work/libftdi/libftdi1-1.2/python/examples
$ python3 complete.py
version: 1.2

devices: 1
#0: manufacturer="FTDI" description="FT232R USB UART" serial="A8007Ub5"

turning everything on
turning everything off

enabling bit #0 (0x01)
enabling bit #1 (0x02)
enabling bit #2 (0x04)
enabling bit #3 (0x08)
enabling bit #4 (0x10)
enabling bit #5 (0x20)
enabling bit #6 (0x40)
enabling bit #7 (0x80)

pins: 0xff
chip id: 30b7ef1

eeprom @ 1: 0x0403

eeprom:
00 40 03 04 01 60 00 00
a0 2d 08 00 00 00 98 0a
a2 20 c2 12 23 10 05 00
0a 03 46 00 54 00 44 00
49 00 20 03 46 00 54 00
32 00 33 00 32 00 52 00
20 00 55 00 53 00 42 00
20 00 55 00 41 00 52 00
54 00 12 03 41 00 38 00
30 00 30 00 37 00 55 00
62 00 35 00 c9 bf 1c 80
00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00
00 00 00 00 00 00 0f 23

device closed




--
Xiaofan

--
libftdi - see http://www.intra2net.com/en/developer/libftdi for details.
To unsubscribe send a mail to [hidden email]  

Loading...