#54712 closed defect (fixed)
libftdi1 @1.4: won't compile when libftdi0 is installed
Reported by: | rufty (Bill Hill) | Owned by: | nerdling (Jeremy Lavergne) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | |
Keywords: | Cc: | ||
Port: | libftdi1 |
Description
Tried to upgrade libftdi1 and got errors "undeclared identifier 'TYPE_230X" on OSX 10.11.6
Attachments (1)
Change History (10)
Changed 7 years ago by rufty (Bill Hill)
comment:1 Changed 7 years ago by mf2k (Frank Schima)
Owner: | set to nerdling |
---|---|
Status: | new → assigned |
comment:2 Changed 7 years ago by mf2k (Frank Schima)
What is the output of the following?
xcodebuild -version
and
port installed boost
comment:3 Changed 7 years ago by rufty (Bill Hill)
$ xcodebuild -version Xcode 8.2.1 Build version 8C1002 $ port installed boost The following ports are currently installed: boost @1.59.0_3+no_single+no_static+python27 (active)
comment:4 Changed 7 years ago by mf2k (Frank Schima)
Remember to use WikiFormatting in your comments.
That all looks good. Hopefully the maintainer can find out the problem.
It builds fine for me on Sierra.
comment:5 Changed 7 years ago by ryandesign (Ryan Carsten Schmidt)
Summary: | libftdi1 won't compile → libftdi1 @1.4: won't compile when libftdi0 is installed |
---|
The problem is here:
:info:build [ 90%] Building CXX object test/CMakeFiles/test_libftdi1.dir/baudrate.cpp.o :info:build cd /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_devel_libftdi/libftdi1/work/build/test && /usr/bin/clang++ -I/opt/local/include -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_devel_libftdi/libftdi1/work/libftdi1-1.4/src -I/opt/local/include/libusb-1.0 -Os -DNDEBUG -arch x86_64 -mmacosx-version-min=10.11 -Wall -o CMakeFiles/test_libftdi1.dir/baudrate.cpp.o -c /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_devel_libftdi/libftdi1/work/libftdi1-1.4/test/baudrate.cpp :info:build /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_devel_libftdi/libftdi1/work/libftdi1-1.4/test/baudrate.cpp:105:14: error: use of undeclared identifier 'TYPE_230X'; did you mean 'TYPE_232H'? :info:build case TYPE_230X: :info:build ^~~~~~~~~ :info:build TYPE_232H :info:build /opt/local/include/ftdi.h:25:97: note: 'TYPE_232H' declared here
I am able to reproduce this build failure, if the libftdi0 port is installed when trying to build libftdi1. The workaround is to deactivate the libftdi0 port first.
baudrate.cpp contains the line #include <ftdi.h>
. The compiler is being told to look for that file first in /opt/local/include. If the file were not found there, it would look in the second location /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_devel_libftdi/libftdi1/work/libftdi1-1.4/src and find it there and everything would be fine. But because libftdi0 is installed, an older incompatible version of ftdi.h is present in /opt/local/include, causing the build failure.
The proper solution is to fix the order of the -I
arguments, but I haven't looked at the build system to see how that might be accomplished.
Until then, PortGroup conflicts_build 1.0
and conflicts_build libftdi0
could be added to the Portfile.
comment:6 Changed 7 years ago by ryandesign (Ryan Carsten Schmidt)
comment:7 Changed 7 years ago by nerdling (Jeremy Lavergne)
Status: | assigned → accepted |
---|
comment:8 Changed 7 years ago by nerdling (Jeremy Lavergne)
It looks like the incorrect order only occurs in a test.
One option is to disable tests (-DBUILD_TESTS=FALSE
) or editing the INCLUDE_DIRECTORIES()
to use AFTER
.
comment:9 Changed 7 years ago by nerdling (Jeremy Lavergne)
Resolution: | → fixed |
---|---|
Status: | accepted → closed |
Flipped tests' include order in 9355987a894f1df6ef2b334abaf5d3dffcd6caf9/macports-ports
logfile