[MacPorts] #54712: libftdi1 @1.4: won't compile when libftdi0 is installed (was: libftdi1 won't compile)
MacPorts
noreply at macports.org
Sat Sep 2 03:38:05 UTC 2017
#54712: libftdi1 @1.4: won't compile when libftdi0 is installed
-----------------------+----------------------
Reporter: rufty | Owner: nerdling
Type: defect | Status: assigned
Priority: Normal | Milestone:
Component: ports | Version:
Resolution: | Keywords:
Port: libftdi1 |
-----------------------+----------------------
Comment (by ryandesign):
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.
--
Ticket URL: <https://trac.macports.org/ticket/54712#comment:5>
MacPorts <https://www.macports.org/>
Ports system for macOS
More information about the macports-tickets
mailing list