Opened 5 months ago

Closed 7 weeks ago

#69760 closed defect (fixed)

libnice fails to build

Reported by: Fut1l3 Owned by: dbevans (David B. Evans)
Priority: Normal Milestone:
Component: ports Version: 2.9.3
Keywords: Cc: qwertychouskie (QwertyChouskie)
Port: libnice

Description (last modified by ryandesign (Ryan Carsten Schmidt))

Several attempts to upgrade libnice via ports upgrade outdated fails. Details from log below:-

:info:archivefetch --->  libnice-0.1.22_0.darwin_23.arm64.tbz2 doesn't seem to exist in /opt/local/var/macports/incoming/verified
:msg:archivefetch --->  Attempting to fetch libnice-0.1.22_0.darwin_23.arm64.tbz2 from https://packages.macports.org/libnice
:debug:archivefetch Fetching archive failed: The requested URL returned error: 404
:msg:archivefetch --->  Attempting to fetch libnice-0.1.22_0.darwin_23.arm64.tbz2 from https://mse.uk.packages.macports.org/libnice
:debug:archivefetch Fetching archive failed: The requested URL returned error: 404
:msg:archivefetch --->  Attempting to fetch libnice-0.1.22_0.darwin_23.arm64.tbz2 from https://fra.de.packages.macports.org/libnice
:debug:archivefetch Fetching archive failed: The requested URL returned error: 404

Change History (14)

comment:1 Changed 5 months ago by ryandesign (Ryan Carsten Schmidt)

Description: modified (diff)
Keywords: Archive page does not exist. removed
Owner: set to dbevans
Port: libnice added
Status: newassigned

An archive not existing is not a bug (see #68869).

Please attach the main.log file so that we can see what the real problem is.

comment:2 Changed 5 months ago by ryandesign (Ryan Carsten Schmidt)

In this case the archive is not on the server because we do not believe we are legally allowed to distribute it.

% macports-infrastructure/jobs/port_binary_distributable.tcl -v libnice
"libnice" is not distributable because its license "mpl" conflicts with license "GPL-3+" of dependency "gnutls"

comment:3 Changed 2 months ago by qwertychouskie (QwertyChouskie)

Compilation seems to be flaky, which is causing issues with CI: https://github.com/macports/macports-ports/pull/24912#issuecomment-2240826804

A failed libnice installation:

Executing:  cd "/opt/local/var/macports/build/_Users_runner_work_macports-ports_macports-ports_ports_net_libnice/libnice/work/build" && /opt/local/bin/meson install 
DEBUG: system:  cd "/opt/local/var/macports/build/_Users_runner_work_macports-ports_macports-ports_ports_net_libnice/libnice/work/build" && /opt/local/bin/meson install 
ninja: Entering directory `/opt/local/var/macports/build/_Users_runner_work_macports-ports_macports-ports_ports_net_libnice/libnice/work/build'
ninja: no work to do.
Installing stun/tools/stund to /opt/local/var/macports/build/_Users_runner_work_macports-ports_macports-ports_ports_net_libnice/libnice/work/destroot/opt/local/bin
Installing stun/tools/stunbdc to /opt/local/var/macports/build/_Users_runner_work_macports-ports_macports-ports_ports_net_libnice/libnice/work/destroot/opt/local/bin
Installing nice/libnice.10.dylib to /opt/local/var/macports/build/_Users_runner_work_macports-ports_macports-ports_ports_net_libnice/libnice/work/destroot/opt/local/lib
Installing nice/Nice-0.1.gir to /opt/local/var/macports/build/_Users_runner_work_macports-ports_macports-ports_ports_net_libnice/libnice/work/destroot/opt/local/share/gir-1.0
Installing nice/Nice-0.1.typelib to /opt/local/var/macports/build/_Users_runner_work_macports-ports_macports-ports_ports_net_libnice/libnice/work/destroot/opt/local/lib/girepository-1.0
Installing gst/libgstnice.dylib to /opt/local/var/macports/build/_Users_runner_work_macports-ports_macports-ports_ports_net_libnice/libnice/work/destroot/opt/local/lib/gstreamer-1.0
Command '['install_name_tool', '/opt/local/var/macports/build/_Users_runner_work_macports-ports_macports-ports_ports_net_libnice/libnice/work/destroot/opt/local/lib/gstreamer-1.0/libgstnice.dylib', '-delete_rpath', '@loader_path/../nice', '-delete_rpath', '/opt/local/lib', '-delete_rpath', '/opt/local/lib', '-id', '/opt/local/lib/gstreamer-1.0/libgstnice.dylib', '-change', '@rpath/libnice.10.dylib', '/opt/local/lib/libnice.10.dylib', '-change', '@rpath/libgstnice.dylib', '/opt/local/lib/gstreamer-1.0/libgstnice.dylib']' returned non-zero exit status 1.
Command failed:  cd "/opt/local/var/macports/build/_Users_runner_work_macports-ports_macports-ports_ports_net_libnice/libnice/work/build" && /opt/local/bin/meson install 
Exit code: 1
Error: Failed to destroot libnice: command execution failed
DEBUG: Error code: CHILDSTATUS 7315 1
DEBUG: Backtrace: command execution failed
    while executing
"system {*}$notty {*}$callback {*}$nice $fullcmdstring"
    invoked from within
"command_exec -callback portprogress::target_progress_callback destroot"
    (procedure "portdestroot::destroot_main" line 2)
    invoked from within
"$procedure $targetname"
DEBUG: dropping privileges: euid changed to 502, egid changed to 501.
Error: See /opt/local/var/macports/logs/_Users_runner_work_macports-ports_macports-ports_ports_net_libnice/libnice/main.log for details.
Build of dependency 'libnice' with variants '' failed, aborting.
Processing dependencies for 'gnome-calculator' failed, aborting.
/Users/runner/work/macports-ports/macports-ports/mpbb/mpbb: error: `install-dependencies' failed to run successfully

A successful one:

Executing:  cd "/opt/local/var/macports/build/_Users_runner_work_macports-ports_macports-ports_ports_net_libnice/libnice/work/build" && /opt/local/bin/meson install 
DEBUG: system:  cd "/opt/local/var/macports/build/_Users_runner_work_macports-ports_macports-ports_ports_net_libnice/libnice/work/build" && /opt/local/bin/meson install 
ninja: Entering directory `/opt/local/var/macports/build/_Users_runner_work_macports-ports_macports-ports_ports_net_libnice/libnice/work/build'
ninja: no work to do.
Installing stun/tools/stund to /opt/local/var/macports/build/_Users_runner_work_macports-ports_macports-ports_ports_net_libnice/libnice/work/destroot/opt/local/bin
Installing stun/tools/stunbdc to /opt/local/var/macports/build/_Users_runner_work_macports-ports_macports-ports_ports_net_libnice/libnice/work/destroot/opt/local/bin
Installing nice/libnice.10.dylib to /opt/local/var/macports/build/_Users_runner_work_macports-ports_macports-ports_ports_net_libnice/libnice/work/destroot/opt/local/lib
Installing nice/Nice-0.1.gir to /opt/local/var/macports/build/_Users_runner_work_macports-ports_macports-ports_ports_net_libnice/libnice/work/destroot/opt/local/share/gir-1.0
Installing nice/Nice-0.1.typelib to /opt/local/var/macports/build/_Users_runner_work_macports-ports_macports-ports_ports_net_libnice/libnice/work/destroot/opt/local/lib/girepository-1.0
Installing gst/libgstnice.dylib to /opt/local/var/macports/build/_Users_runner_work_macports-ports_macports-ports_ports_net_libnice/libnice/work/destroot/opt/local/lib/gstreamer-1.0
Installing /opt/local/var/macports/build/_Users_runner_work_macports-ports_macports-ports_ports_net_libnice/libnice/work/libnice-0.1.22/agent/address.h to /opt/local/var/macports/build/_Users_runner_work_macports-ports_macports-ports_ports_net_libnice/libnice/work/destroot/opt/local/include/nice
Installing /opt/local/var/macports/build/_Users_runner_work_macports-ports_macports-ports_ports_net_libnice/libnice/work/libnice-0.1.22/agent/agent.h to /opt/local/var/macports/build/_Users_runner_work_macports-ports_macports-ports_ports_net_libnice/libnice/work/destroot/opt/local/include/nice
Installing /opt/local/var/macports/build/_Users_runner_work_macports-ports_macports-ports_ports_net_libnice/libnice/work/libnice-0.1.22/agent/candidate.h to /opt/local/var/macports/build/_Users_runner_work_macports-ports_macports-ports_ports_net_libnice/libnice/work/destroot/opt/local/include/nice
Installing /opt/local/var/macports/build/_Users_runner_work_macports-ports_macports-ports_ports_net_libnice/libnice/work/libnice-0.1.22/agent/debug.h to /opt/local/var/macports/build/_Users_runner_work_macports-ports_macports-ports_ports_net_libnice/libnice/work/destroot/opt/local/include/nice
Installing /opt/local/var/macports/build/_Users_runner_work_macports-ports_macports-ports_ports_net_libnice/libnice/work/libnice-0.1.22/agent/interfaces.h to /opt/local/var/macports/build/_Users_runner_work_macports-ports_macports-ports_ports_net_libnice/libnice/work/destroot/opt/local/include/nice
Installing /opt/local/var/macports/build/_Users_runner_work_macports-ports_macports-ports_ports_net_libnice/libnice/work/libnice-0.1.22/agent/pseudotcp.h to /opt/local/var/macports/build/_Users_runner_work_macports-ports_macports-ports_ports_net_libnice/libnice/work/destroot/opt/local/include/nice
Installing /opt/local/var/macports/build/_Users_runner_work_macports-ports_macports-ports_ports_net_libnice/libnice/work/libnice-0.1.22/stun/stunagent.h to /opt/local/var/macports/build/_Users_runner_work_macports-ports_macports-ports_ports_net_libnice/libnice/work/destroot/opt/local/include/stun
Installing /opt/local/var/macports/build/_Users_runner_work_macports-ports_macports-ports_ports_net_libnice/libnice/work/libnice-0.1.22/stun/stunmessage.h to /opt/local/var/macports/build/_Users_runner_work_macports-ports_macports-ports_ports_net_libnice/libnice/work/destroot/opt/local/include/stun
Installing /opt/local/var/macports/build/_Users_runner_work_macports-ports_macports-ports_ports_net_libnice/libnice/work/libnice-0.1.22/stun/win32_common.h to /opt/local/var/macports/build/_Users_runner_work_macports-ports_macports-ports_ports_net_libnice/libnice/work/destroot/opt/local/include/stun
Installing /opt/local/var/macports/build/_Users_runner_work_macports-ports_macports-ports_ports_net_libnice/libnice/work/libnice-0.1.22/stun/debug.h to /opt/local/var/macports/build/_Users_runner_work_macports-ports_macports-ports_ports_net_libnice/libnice/work/destroot/opt/local/include/stun
Installing /opt/local/var/macports/build/_Users_runner_work_macports-ports_macports-ports_ports_net_libnice/libnice/work/libnice-0.1.22/stun/constants.h to /opt/local/var/macports/build/_Users_runner_work_macports-ports_macports-ports_ports_net_libnice/libnice/work/destroot/opt/local/include/stun
Installing /opt/local/var/macports/build/_Users_runner_work_macports-ports_macports-ports_ports_net_libnice/libnice/work/libnice-0.1.22/stun/usages/bind.h to /opt/local/var/macports/build/_Users_runner_work_macports-ports_macports-ports_ports_net_libnice/libnice/work/destroot/opt/local/include/stun/usages
Installing /opt/local/var/macports/build/_Users_runner_work_macports-ports_macports-ports_ports_net_libnice/libnice/work/libnice-0.1.22/stun/usages/ice.h to /opt/local/var/macports/build/_Users_runner_work_macports-ports_macports-ports_ports_net_libnice/libnice/work/destroot/opt/local/include/stun/usages
Installing /opt/local/var/macports/build/_Users_runner_work_macports-ports_macports-ports_ports_net_libnice/libnice/work/libnice-0.1.22/stun/usages/turn.h to /opt/local/var/macports/build/_Users_runner_work_macports-ports_macports-ports_ports_net_libnice/libnice/work/destroot/opt/local/include/stun/usages
Installing /opt/local/var/macports/build/_Users_runner_work_macports-ports_macports-ports_ports_net_libnice/libnice/work/libnice-0.1.22/stun/usages/timer.h to /opt/local/var/macports/build/_Users_runner_work_macports-ports_macports-ports_ports_net_libnice/libnice/work/destroot/opt/local/include/stun/usages
Installing /opt/local/var/macports/build/_Users_runner_work_macports-ports_macports-ports_ports_net_libnice/libnice/work/libnice-0.1.22/nice/nice.h to /opt/local/var/macports/build/_Users_runner_work_macports-ports_macports-ports_ports_net_libnice/libnice/work/destroot/opt/local/include/nice
Installing /opt/local/var/macports/build/_Users_runner_work_macports-ports_macports-ports_ports_net_libnice/libnice/work/build/nice/nice-version.h to /opt/local/var/macports/build/_Users_runner_work_macports-ports_macports-ports_ports_net_libnice/libnice/work/destroot/opt/local/include/nice
Installing /opt/local/var/macports/build/_Users_runner_work_macports-ports_macports-ports_ports_net_libnice/libnice/work/build/meson-private/nice.pc to /opt/local/var/macports/build/_Users_runner_work_macports-ports_macports-ports_ports_net_libnice/libnice/work/destroot/opt/local/lib/pkgconfig
Installing symlink pointing to libnice.10.dylib to /opt/local/var/macports/build/_Users_runner_work_macports-ports_macports-ports_ports_net_libnice/libnice/work/destroot/opt/local/lib/libnice.dylib
DEBUG: Executing portdestroot::destroot_finish
DEBUG: Fixing glibtool .la files in destroot for libnice
DEBUG: checking for mtree violations
DEBUG: dropping privileges: euid changed to 502, egid changed to 501.
DEBUG: Privilege de-escalation not attempted as not running as root.
DEBUG: install phase started at Sun Jul 21 08:50:07 UTC 2024

comment:4 in reply to:  2 ; Changed 2 months ago by qwertychouskie (QwertyChouskie)

Replying to ryandesign:

In this case the archive is not on the server because we do not believe we are legally allowed to distribute it.

% macports-infrastructure/jobs/port_binary_distributable.tcl -v libnice
"libnice" is not distributable because its license "mpl" conflicts with license "GPL-3+" of dependency "gnutls"

According to this, libnice is dual-licensed as both MPLv1.1 and LGPLv2.1: https://gitlab.freedesktop.org/libnice/libnice/-/blob/master/COPYING?ref_type=heads

LGPL2.1 should be fully compatible with GPL3+ as far as I understand, so it should be fine distribute binaries.

comment:5 in reply to:  3 Changed 2 months ago by ryandesign (Ryan Carsten Schmidt)

Cc: qwertychouskie added

Replying to qwertychouskie:

Command '['install_name_tool', '/opt/local/var/macports/build/_Users_runner_work_macports-ports_macports-ports_ports_net_libnice/libnice/work/destroot/opt/local/lib/gstreamer-1.0/libgstnice.dylib', '-delete_rpath', '@loader_path/../nice', '-delete_rpath', '/opt/local/lib', '-delete_rpath', '/opt/local/lib', '-id', '/opt/local/lib/gstreamer-1.0/libgstnice.dylib', '-change', '@rpath/libnice.10.dylib', '/opt/local/lib/libnice.10.dylib', '-change', '@rpath/libgstnice.dylib', '/opt/local/lib/gstreamer-1.0/libgstnice.dylib']' returned non-zero exit status 1.

So when the build fails, it is because of install_name_tool. Can we discover what install_name_tool is having a problem with?

comment:6 in reply to:  4 ; Changed 2 months ago by ryandesign (Ryan Carsten Schmidt)

Replying to qwertychouskie:

According to this, libnice is dual-licensed as both MPLv1.1 and LGPLv2.1: https://gitlab.freedesktop.org/libnice/libnice/-/blob/master/COPYING?ref_type=heads

LGPL2.1 should be fully compatible with GPL3+ as far as I understand, so it should be fine distribute binaries.

The link you provided does not say the project is dual-licensed. It says:

"The Nice Glib ICE library is licensed under both the Mozilla Public License version 1.1 and the GNU Lesser General Public License version 2.1. For the full text of these licenses, see the files COPYING.MPL and COPYING.LGPL respectively."

Dual-licensed would mean the user could choose to use one license or the other one. But it does not say that it is dual-licensed. It does not say that the user may choose one or the other. It says that it is licensed under both licenses: MPL and LGPL, suggesting that the user must comply with the terms of both licenses, and this is what is expressed in the MacPorts portfile. You could file a bug report with the developers of libnice to ask if they intended it to be dual-licensed and to give the user a choice of license. If that's what they intended, they should clarify the wording. If and when they do, let us know here so we can update the portfile.

comment:7 in reply to:  6 Changed 2 months ago by qwertychouskie (QwertyChouskie)

Replying to ryandesign:

Replying to qwertychouskie:

According to this, libnice is dual-licensed as both MPLv1.1 and LGPLv2.1: https://gitlab.freedesktop.org/libnice/libnice/-/blob/master/COPYING?ref_type=heads

LGPL2.1 should be fully compatible with GPL3+ as far as I understand, so it should be fine distribute binaries.

The link you provided does not say the project is dual-licensed. It says:

"The Nice Glib ICE library is licensed under both the Mozilla Public License version 1.1 and the GNU Lesser General Public License version 2.1. For the full text of these licenses, see the files COPYING.MPL and COPYING.LGPL respectively."

Dual-licensed would mean the user could choose to use one license or the other one. But it does not say that it is dual-licensed. It does not say that the user may choose one or the other. It says that it is licensed under both licenses: MPL and LGPL, suggesting that the user must comply with the terms of both licenses, and this is what is expressed in the MacPorts portfile. You could file a bug report with the developers of libnice to ask if they intended it to be dual-licensed and to give the user a choice of license. If that's what they intended, they should clarify the wording. If and when they do, let us know here so we can update the portfile.

Issue opened upstream: https://gitlab.freedesktop.org/libnice/libnice/-/issues/193

Perhaps it should be noted that Arch uses the "or" interpretation: https://archlinux.org/packages/extra/x86_64/libnice/

comment:8 Changed 2 months ago by qwertychouskie (QwertyChouskie)

Projects that seem to use the "or" interpretation:

Projects that seem to use the "and" interpretation:

comment:9 in reply to:  3 Changed 2 months ago by ryandesign (Ryan Carsten Schmidt)

Replying to qwertychouskie:

Compilation seems to be flaky

I would not characterize it as "flaky" which implies intermittency. I would characterize it as failing.

It did not used to fail. We successfully built it on the buildbot workers.

Command '['install_name_tool', '/opt/local/var/macports/build/_Users_runner_work_macports-ports_macports-ports_ports_net_libnice/libnice/work/destroot/opt/local/lib/gstreamer-1.0/libgstnice.dylib', '-delete_rpath', '@loader_path/../nice', '-delete_rpath', '/opt/local/lib', '-delete_rpath', '/opt/local/lib', '-id', '/opt/local/lib/gstreamer-1.0/libgstnice.dylib', '-change', '@rpath/libnice.10.dylib', '/opt/local/lib/libnice.10.dylib', '-change', '@rpath/libgstnice.dylib', '/opt/local/lib/gstreamer-1.0/libgstnice.dylib']' returned non-zero exit status 1.

I see the same when I try to build on my macOS 12 system today. Running the command manually we see what the problem is:

% sudo -u macports install_name_tool /opt/local/var/macports/build/_Volumes_Shared_macports-ports_net_libnice/libnice/work/destroot/opt/local/lib/gstreamer-1.0/libgstnice.dylib -delete_rpath @loader_path/../nice -delete_rpath /opt/local/lib -delete_rpath /opt/local/lib -id /opt/local/lib/gstreamer-1.0/libgstnice.dylib -change @rpath/libnice.10.dylib /opt/local/lib/libnice.10.dylib -change @rpath/libgstnice.dylib /opt/local/lib/gstreamer-1.0/libgstnice.dylib
error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/install_name_tool: "-delete_rpath /opt/local/lib" specified more than once
Usage: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/install_name_tool [-change old new] ... [-rpath old new] ... [-add_rpath new] ... [-delete_rpath old] ... [-id name] input

comment:10 Changed 2 months ago by ryandesign (Ryan Carsten Schmidt)

I don't know why meson is asking install_name_tool to delete the same rpath twice.

Here is the meson bug report: https://github.com/mesonbuild/meson/pull/13426

Last edited 2 months ago by ryandesign (Ryan Carsten Schmidt) (previous) (diff)

comment:11 Changed 2 months ago by qwertychouskie (QwertyChouskie)

comment:12 Changed 2 months ago by ryandesign (Ryan Carsten Schmidt)

In 643f25b1bb1f8c7370fdd8dc7693235f76c834d1/macports-ports (master):

libnice: Correct license

Upstream has confirmed that the software is dual-licensed: only one of
the two licenses needs to be followed, not the combination of both.

See: #69760

Also switch to path:-based depspec for pkgconfig and escape periods in
regular expressions.

comment:13 in reply to:  10 Changed 2 months ago by ryandesign (Ryan Carsten Schmidt)

Replying to ryandesign:

I don't know why meson is asking install_name_tool to delete the same rpath twice.

Here is the meson bug report: https://github.com/mesonbuild/meson/pull/13426

This is #70394, apparently only happening since the upgrade to meson 1.5.0 a few days ago, so it's not the reason for the failure originally reported in this ticket three months ago; if the reporter doesn't attach their main.log we may never know what the original problem was.

comment:14 Changed 7 weeks ago by ryandesign (Ryan Carsten Schmidt)

Resolution: fixed
Status: assignedclosed

I'm going to close this now because we've already muddled this issue up with discussions of two different problems which are not the problem the reporter originally had. Fut1l3, if you are still experiencing problems building libnice after running sudo port selfupdate, please file a new ticket and attach the main.log file there.

Note: See TracTickets for help on using tickets.