Bug 247817 - lang/ruby26 and lang/ruby27: fails to build with poudriere when unavailable
Summary: lang/ruby26 and lang/ruby27: fails to build with poudriere when una...
Status: New
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Koichiro Iwao
Depends on:
Reported: 2020-07-07 04:25 UTC by bugs.freebsd
Modified: 2021-01-03 15:20 UTC (History)
2 users (show)

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

Logfile of a failed build with poudriere. (58.07 KB, text/plain)
2020-07-07 04:25 UTC, bugs.freebsd
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description bugs.freebsd 2020-07-07 04:25:38 UTC
Created attachment 216274 [details]
Logfile of a failed build with poudriere.

Both lang/ruby26 and lang/ruby27 fail to build with a jailed poudriere where the loopback interface has an address other than "".

How to reproduce:
* On a FreeBSD 11.3 system, create a jail with a non-standard address on the loopback interface (such as
* Install poudriere inside the jail.
* Build ruby26 using poudriere. The build-jails created by poudriere should also use some IP other than

With this setup, Ruby fails to build succesfully with "poudriere bulk -j default -p default lang/ruby26". See the attached logfile for details of a recent attempt.

When poudriere is run in 'interactive' mode with "poudriere bulk -j default -p default -i lang/ruby26", it is possible to simply compile the port by running "make" inside the build-jail. Manually building the port inside a jail (even without a loopback address) also works. It only seems to fail whenever poudriere is used to perform the build.

Expected cause:
The "configuring socket" stage of the build compiles and runs a test program with getaddrinfo. At this point, a check is made if "" exists (which isn't the case).
Such hardcoded loopback addresses are used in "ext/socket/extconf.rb":
    if (strcmp(straddr, "") != 0) {
      goto bad;

If I understand correctly, this results in the build script trying to compile its own version of getaddrinfo (instead of using the one provided by the OS), which ultimately fails due to a conflicting function name (see the log).

Credits to RhodiumToad on freenode, who helped diagnosing the problem and pointing out the likely culprit.