Bug 241643 - www/node: Undefined symbol "nghttp2_option_set_max_outbound_ack" with libnghttp2-1.37.0 installed
Summary: www/node: Undefined symbol "nghttp2_option_set_max_outbound_ack" with libnght...
Status: Closed Overcome By Events
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Bradley T. Hughes
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-11-01 14:23 UTC by Marcin Cieślak
Modified: 2020-06-22 16:41 UTC (History)
4 users (show)

See Also:
bugzilla: maintainer-feedback? (bhughes)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Marcin Cieślak 2019-11-01 14:23:45 UTC
This is 11.3-STABLE on amd64.

With old libnghttp2-1.37.0 installed:

libnghttp2-1.37.0
Name           : libnghttp2
Version        : 1.37.0
Installed on   : Mon Apr  8 08:33:44 2019 UTC
Origin         : www/libnghttp2
Architecture   : FreeBSD:11:amd64
Prefix         : /usr/local
Categories     : net www
Licenses       : MIT
Maintainer     : sunpoet@FreeBSD.org
WWW            : https://nghttp2.org/
Comment        : HTTP/2.0 C Library
Shared Libs provided:
	libnghttp2.so.14
Annotations    :
	FreeBSD_version: 1102000
	repo_type      : binary
	repository     : FreeBSD
Flat size      : 624KiB
Description    :
nghttp2 is an implementation of HTTP/2 and its header compression algorithm
HPACK in C.

WWW: https://nghttp2.org/

node package will think that libnghttp2.so library is provided, but fails due to undefined symbol introduced in 1.39.2:

/usr/local/bin/node: Undefined symbol "nghttp2_option_set_max_outbound_ack"
/usr/local/bin/node: Undefined symbol "nghttp2_option_set_max_outbound_ack"

https://svnweb.freebsd.org/ports/head/www/libnghttp2/pkg-plist?r1=504103&r2=508943

Shared library minor version number has been changed from

lib/libnghttp2.so.14.17.4

to

lib/libnghttp2.so.14.18.0

Is it possible to require a minor number of a library in LIB_DEPENDS as a minimum requirement?
Comment 1 Marcin Cieślak 2019-11-01 14:28:01 UTC
Node 12 has been installed via pkg:

# pkg install node
Updating FreeBSD repository catalogue...
Fetching meta.txz: 100%    944 B   0.9kB/s    00:01    
Fetching packagesite.txz: 100%    6 MiB   2.2MB/s    00:03    
Processing entries: 100%
FreeBSD repository update completed. 32804 packages processed.
All repositories are up to date.
The following 4 package(s) will be affected (of 0 checked):

New packages to be INSTALLED:
	node: 12.13.0
	c-ares: 1.15.0_1
	libuv: 1.33.1

Installed packages to be UPGRADED:
	icu: 61.1,1 -> 65.1,1

Number of packages to be installed: 3
Number of packages to be upgraded: 1

The process will require 41 MiB more space.
18 MiB to be downloaded.

Proceed with this action? [y/N]: y
[1/4] Fetching node-12.13.0.txz: 100%    7 MiB   1.9MB/s    00:04    
[2/4] Fetching icu-65.1,1.txz: 100%   10 MiB   2.6MB/s    00:04    
[3/4] Fetching c-ares-1.15.0_1.txz: 100%  127 KiB 129.8kB/s    00:01    
[4/4] Fetching libuv-1.33.1.txz: 100%  113 KiB 115.4kB/s    00:01    
Checking integrity... done (0 conflicting)
[1/4] Upgrading icu from 61.1,1 to 65.1,1...
[1/4] Extracting icu-65.1,1: 100%
[2/4] Installing c-ares-1.15.0_1...
[2/4] Extracting c-ares-1.15.0_1: 100%
[3/4] Installing libuv-1.33.1...
[3/4] Extracting libuv-1.33.1: 100%
[4/4] Installing node-12.13.0...
[4/4] Extracting node-12.13.0: 100%
=====
Message from node-12.13.0:

--
Note: If you need npm (Node Package Manager), please install www/npm.


Of course the simple remedy is to do "pkg upgrade libnghttp2" but that should be automatic in that case.
Comment 2 Gleb Popov freebsd_committer freebsd_triage 2020-06-16 16:59:04 UTC
Just bumped into this problem on 13-CURRENT & latest www/node.
Comment 3 info 2020-06-18 16:22:40 UTC
I ran into this with freebsd 11.3 and node12. Is there a work around?
Comment 4 info 2020-06-18 16:23:48 UTC
(In reply to info from comment #3)
My apologies for the double post, I see that the work around is to "pkg upgrade libnghttp2"
Comment 5 Gleb Popov freebsd_committer freebsd_triage 2020-06-20 08:25:28 UTC
So, the problem is that www/node PORTREVISION is not bumped after www/libnghttp2 update. I'll contact libnghttp2 maintainer about that. The node port itself is fine.

When using binary packages, `pkg install -f node libnghttp2` can be used as workaround.
Comment 6 Po-Chuan Hsieh freebsd_committer freebsd_triage 2020-06-22 16:41:40 UTC
Thanks for reporting.

I've traced the issue but the root cause of this problem is not bumping PORTREVISION.

nghttp2_option_set_max_outbound_ack was added in nghttp2 1.39.2 [1].

The problem seems to be running a dependent package (www/node, which is built with newer libnghttp2 1.39.2) with an old libnghttp2 (1.37.0).
When using packages, it would be better to keep all installed ports up-to-date.

[1] https://github.com/nghttp2/nghttp2/releases/tag/v1.39.2