Opened 6 months ago

Last modified 6 months ago

#70015 new defect

ettercap opportunistically uses libtapi if it is installed

Reported by: barracuda156 Owned by:
Priority: Normal Milestone:
Component: ports Version: 2.9.3
Keywords: leopard, snowleopard, powerpc Cc:
Port: ettercap

Description

I do not really get why this happens, since nothing in the source seems to ask for it, but if libtapi is installed and active, build picks it, which breaks compilation at least on PowerPC:

:info:build [ 19%] Linking C shared library libettercap-ui.dylib
:info:build cd /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_net_ettercap/ettercap/work/build/src/interfaces && /opt/local/bin/cmake -E cmake_link_script CMakeFiles/ec_interfaces.dir/link.txt --verbose=ON
:info:build /usr/bin/gcc-4.2 -pipe -Os -O2 -w -D_FORTIFY_SOURCE=2 -arch ppc -mmacosx-version-min=10.6 -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -current_version 0.8.3 -o libettercap-ui.0.8.3.1.dylib -install_name /opt/local/lib/libettercap-ui.0.dylib CMakeFiles/ec_interfaces.dir/__/ec_interfaces.c.o CMakeFiles/ec_interfaces.dir/text/ec_text.c.o CMakeFiles/ec_interfaces.dir/text/ec_text_conn.c.o CMakeFiles/ec_interfaces.dir/text/ec_text_display.c.o CMakeFiles/ec_interfaces.dir/text/ec_text_plugin.c.o CMakeFiles/ec_interfaces.dir/text/ec_text_profile.c.o CMakeFiles/ec_interfaces.dir/text/ec_text_redirect.c.o CMakeFiles/ec_interfaces.dir/daemon/ec_daemon.c.o CMakeFiles/ec_interfaces.dir/curses/widgets/wdg.c.o CMakeFiles/ec_interfaces.dir/curses/widgets/wdg_compound.c.o CMakeFiles/ec_interfaces.dir/curses/widgets/wdg_debug.c.o CMakeFiles/ec_interfaces.dir/curses/widgets/wdg_dialog.c.o CMakeFiles/ec_interfaces.dir/curses/widgets/wdg_dynlist.c.o CMakeFiles/ec_interfaces.dir/curses/widgets/wdg_error.c.o CMakeFiles/ec_interfaces.dir/curses/widgets/wdg_file.c.o CMakeFiles/ec_interfaces.dir/curses/widgets/wdg_input.c.o CMakeFiles/ec_interfaces.dir/curses/widgets/wdg_list.c.o CMakeFiles/ec_interfaces.dir/curses/widgets/wdg_menu.c.o CMakeFiles/ec_interfaces.dir/curses/widgets/wdg_panel.c.o CMakeFiles/ec_interfaces.dir/curses/widgets/wdg_percentage.c.o CMakeFiles/ec_interfaces.dir/curses/widgets/wdg_scroll.c.o CMakeFiles/ec_interfaces.dir/curses/widgets/wdg_window.c.o CMakeFiles/ec_interfaces.dir/curses/ec_curses.c.o CMakeFiles/ec_interfaces.dir/curses/ec_curses_filters.c.o CMakeFiles/ec_interfaces.dir/curses/ec_curses_help.c.o CMakeFiles/ec_interfaces.dir/curses/ec_curses_hosts.c.o CMakeFiles/ec_interfaces.dir/curses/ec_curses_live.c.o CMakeFiles/ec_interfaces.dir/curses/ec_curses_logging.c.o CMakeFiles/ec_interfaces.dir/curses/ec_curses_mitm.c.o CMakeFiles/ec_interfaces.dir/curses/ec_curses_offline.c.o CMakeFiles/ec_interfaces.dir/curses/ec_curses_plugins.c.o CMakeFiles/ec_interfaces.dir/curses/ec_curses_start.c.o CMakeFiles/ec_interfaces.dir/curses/ec_curses_targets.c.o CMakeFiles/ec_interfaces.dir/curses/ec_curses_view.c.o CMakeFiles/ec_interfaces.dir/curses/ec_curses_view_connections.c.o CMakeFiles/ec_interfaces.dir/curses/ec_curses_view_profiles.c.o CMakeFiles/ec_interfaces.dir/gtk3/ec_gtk3.c.o CMakeFiles/ec_interfaces.dir/gtk3/ec_gtk3_conf.c.o CMakeFiles/ec_interfaces.dir/gtk3/ec_gtk3_filters.c.o CMakeFiles/ec_interfaces.dir/gtk3/ec_gtk3_help.c.o CMakeFiles/ec_interfaces.dir/gtk3/ec_gtk3_hosts.c.o CMakeFiles/ec_interfaces.dir/gtk3/ec_gtk3_live.c.o CMakeFiles/ec_interfaces.dir/gtk3/ec_gtk3_logging.c.o CMakeFiles/ec_interfaces.dir/gtk3/ec_gtk3_menus.c.o CMakeFiles/ec_interfaces.dir/gtk3/ec_gtk3_mitm.c.o CMakeFiles/ec_interfaces.dir/gtk3/ec_gtk3_offline.c.o CMakeFiles/ec_interfaces.dir/gtk3/ec_gtk3_plugins.c.o CMakeFiles/ec_interfaces.dir/gtk3/ec_gtk3_redirect.c.o CMakeFiles/ec_interfaces.dir/gtk3/ec_gtk3_start.c.o CMakeFiles/ec_interfaces.dir/gtk3/ec_gtk3_targets.c.o CMakeFiles/ec_interfaces.dir/gtk3/ec_gtk3_view.c.o CMakeFiles/ec_interfaces.dir/gtk3/ec_gtk3_view_connections.c.o CMakeFiles/ec_interfaces.dir/gtk3/ec_gtk3_view_profiles.c.o CMakeFiles/ec_interfaces.dir/gtk3/ec_gtk3_shortcuts.c.o  -Wl,-rpath,/opt/local/lib /opt/local/lib/libncurses.dylib /opt/local/lib/libform.dylib /opt/local/lib/libncurses.dylib /opt/local/lib/libform.dylib /opt/local/lib/libpanel.dylib /opt/local/lib/libmenu.dylib /opt/local/lib/libfreetype.dylib /opt/local/lib/libglib-2.0.dylib /opt/local/lib/libgthread-2.0.dylib /opt/local/lib/libgobject-2.0.dylib /opt/local/lib/libgio-2.0.dylib /opt/local/lib/libgdk_pixbuf-2.0.dylib /opt/local/lib/libgdk-3.0.dylib /opt/local/lib/libgtk-3.0.dylib /opt/local/lib/libcairo.dylib /opt/local/lib/libpango-1.0.dylib /opt/local/lib/libatk-1.0.dylib /opt/local/lib/libgthread-2.0.dylib /opt/local/lib/libpcap.dylib /opt/local/libexec/openssl3/lib/libssl.dylib /opt/local/libexec/openssl3/lib/libcrypto.dylib /opt/local/lib/libz.dylib /opt/local/lib/libiconv.dylib /opt/local/lib/libGeoIP.dylib /opt/local/lib/libnet.dylib //usr/lib/libresolv.dylib /opt/local/lib/libpcre.dylib /opt/local/lib/libgobject-2.0.dylib /opt/local/lib/libgio-2.0.dylib /opt/local/lib/libgdk_pixbuf-2.0.dylib /opt/local/lib/libgdk-3.0.dylib /opt/local/lib/libgtk-3.0.dylib /opt/local/lib/libcairo.dylib /opt/local/lib/libpango-1.0.dylib /opt/local/lib/libatk-1.0.dylib /opt/local/lib/libpcap.dylib /opt/local/libexec/openssl3/lib/libssl.dylib /opt/local/libexec/openssl3/lib/libcrypto.dylib /opt/local/lib/libz.dylib /opt/local/lib/libiconv.dylib /opt/local/lib/libGeoIP.dylib /opt/local/lib/libnet.dylib //usr/lib/libresolv.dylib /opt/local/lib/libpcre.dylib
:info:build cd /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_net_ettercap/ettercap/work/build/src/interfaces && /opt/local/bin/cmake -E cmake_symlink_library libettercap-ui.0.8.3.1.dylib libettercap-ui.0.dylib libettercap-ui.dylib
:info:build cd /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_net_ettercap/ettercap/work/build/src/interfaces && /opt/local/bin/tapi stubify -isysroot / -o libettercap-ui.0.8.3.1.tbd libettercap-ui.0.8.3.1.dylib
:info:build error: cannot read file '/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_net_ettercap/ettercap/work/build/src/interfaces/libettercap-ui.0.8.3.1.dylib': unknown/unsupported architecture
:info:build make[2]: *** [src/interfaces/libettercap-ui.0.8.3.1.tbd] Error 1
:info:build make[2]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_net_ettercap/ettercap/work/build'
:info:build make[1]: *** [src/interfaces/CMakeFiles/ec_interfaces.dir/all] Error 2
:info:build make[1]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_net_ettercap/ettercap/work/build'
:info:build make: *** [all] Error 2
:info:build make: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_net_ettercap/ettercap/work/build'
:info:build Command failed:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_net_ettercap/ettercap/work/build" && /usr/bin/make -j6 -w all VERBOSE=ON 
:info:build Exit code: 2
:error:build Failed to build ettercap: command execution failed
:debug:build Error code: CHILDSTATUS 90528 2

While in complains about libettercap-ui.0.8.3.1.dylib, in fact it is built correctly:

36-244% file /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_net_ettercap/ettercap/work/build/src/interfaces/libettercap-ui.0.8.3.1.dylib
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_net_ettercap/ettercap/work/build/src/interfaces/libettercap-ui.0.8.3.1.dylib: Mach-O ppc_7400 dynamically linked shared library, flags:<NOUNDEFS|DYLDLINK|TWOLEVEL|NO_REEXPORTED_DYLIBS>

The real issue is this: /opt/local/bin/tapi stubify -isysroot / -o libettercap-ui.0.8.3.1.tbd. libtapi is untested on PowerPC and may not work as expected, but why is the build even trying to produce .tbd version? That is unneeded.

Deactivating libtapi lets the port build normally (with same compiler, linker and cctools being used).

Change History (2)

comment:1 Changed 6 months ago by kencu (Ken)

It would be best if libtapi was prevented from ever installing on powerpc as it is completely useless there and can only cause trouble.

comment:2 Changed 6 months ago by barracuda156

In 84d924afd29f489871d7e39e0d5b35f5ad9e29b3/macports-ports (master):

ettercap: declare build conflict with libtapi on powerpc

See: #70015

Note: See TracTickets for help on using tickets.