Bug 215278 - www/apache24 requires /usr/local/bin/nm
Summary: www/apache24 requires /usr/local/bin/nm
Status: Closed Overcome By Events
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: amd64 Any
: --- Affects Only Me
Assignee: freebsd-apache (Nobody)
URL:
Keywords: needs-qa
Depends on:
Blocks:
 
Reported: 2016-12-13 13:37 UTC by jako.andras
Modified: 2017-01-06 16:09 UTC (History)
3 users (show)

See Also:
bugzilla: maintainer-feedback? (apache)
koobs: merge-quarterly?


Attachments
output of the failed build (193.46 KB, text/plain)
2016-12-13 14:26 UTC, jako.andras
no flags Details
build log (211.83 KB, text/plain)
2016-12-14 09:11 UTC, jako.andras
no flags Details
test /usr/bin/nm (1.62 KB, text/plain)
2016-12-14 13:42 UTC, jako.andras
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description jako.andras 2016-12-13 13:37:44 UTC
I cannot build www/apache24 without /usr/local/bin/nm, but devel/binutils is not listed as a build dependency. Compilation stops at mod_sed. Installing devel/binutils before apache24 made it work for me.
Comment 1 Olli Hauer freebsd_committer 2016-12-13 14:02:41 UTC
Can you describe your build environment?
OS release, synth, poudriere or portmaster ...

Reason behind:
mod_sed is a default module and I haven't seen any build issues without binutils until now.
Comment 2 jako.andras 2016-12-13 14:26:46 UTC
Created attachment 177942 [details]
output of the failed build

It's a jail. I use portmaster.

FreeBSD palferi.eik.bme.hu 11.0-RELEASE-p5 FreeBSD 11.0-RELEASE-p5 #40: Mon Dec 12 16:01:28 CET 2016     root@swing.eik.bme.hu:/usr/obj/usr/src/sys/SWING  amd64
Comment 3 Olli Hauer freebsd_committer 2016-12-13 19:40:40 UTC
Hm, I've just build a fresh 11(amd64) system and haven't run into this issue, I even see a reason why nm should be used in the build except in the QA stages.

Can you run a build similar to the next lines and log it even with the script command?

# uname -a
FreeBSD f11-rel 11.0-RELEASE-p2 FreeBSD 11.0-RELEASE-p2 #0: Mon Oct 24 06:55:27 UTC 2016     root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC  amd64

# script /tmp/ap24_build.log
# freebsd-version -ku
11.0-RELEASE-p2
11.0-RELEASE-p5

# cat /etc/make.conf
WRKDIRPREFIX=          /data/wrk
DISTDIR?=              /mirror/distfiles
PACKAGES?=             /data/packages

# cat /etc/src.conf
cat: /etc/src.conf: No such file or directory

# pkg info -qoa | grep bin
-> no output

# cd /usr/ports/www/apache24
# make rmconfig
# make -DBATCH
... 
mkdir /data/wrk/usr/ports/www/apache24/work/stage/usr/local/share/apache24/build
Installing man pages and online manual
mkdir /data/wrk/usr/ports/www/apache24/work/stage/usr/local/share/doc/apache24
cd /data/wrk/usr/ports/www/apache24/work/httpd-2.4.23/docs/manual && cp -rp * /data/wrk/usr/ports/www/apache24/work/stage/usr/local/share/doc/apache24
install  -m 0644 /usr/ports/www/apache24/files/no-accf.conf /data/wrk/usr/ports/www/apache24/work/stage/usr/local/etc/apache24/Includes/
install  -m 0644 /usr/ports/www/apache24/files/README_modules.d /data/wrk/usr/ports/www/apache24/work/stage/usr/local/etc/apache24/modules.d/
/usr/bin/strip /data/wrk/usr/ports/www/apache24/work/stage/usr/local/sbin/* 2>/dev/null
*** Error code 1 (ignored)
/usr/bin/strip /data/wrk/usr/ports/www/apache24/work/stage/usr/local/bin/*
/usr/bin/strip /data/wrk/usr/ports/www/apache24/work/stage/usr/local/libexec/apache24/mod_*.so
install  -m 555 /data/wrk/usr/ports/www/apache24/work/httpd-2.4.23/support/check_forensic /data/wrk/usr/ports/www/apache24/work/stage/usr/local/sbin
====> Compressing man pages (compress-man)
===> Staging rc.d startup script(s)
====> Running Q/A tests (stage-qa)
# exit
Comment 4 Olli Hauer freebsd_committer 2016-12-13 19:42:13 UTC
correction:
s/I even see a reason/I even cannot see a reason/
Comment 5 jako.andras 2016-12-14 09:11:19 UTC
Created attachment 177959 [details]
build log

I attached the script output. It still tries to use /usr/local/bin/nm, as far as I can tell.

'freebsd-version -ku' run on the host gives:
[root@swing ~]# freebsd-version -ku
11.0-RELEASE-p5
11.0-RELEASE-p5
Comment 6 Olli Hauer freebsd_committer 2016-12-14 12:50:42 UTC
I found the place where nm is called, but nm is also in the base OS and I suspect it is not in the path of your jail or not correct working.

Can you check if /usr/bin/nm does exist and is working e.g. with a small hello world program?

I've seen the issue only after renaming /usr/bin/nm but then with the same error message.
Comment 7 jako.andras 2016-12-14 13:42:15 UTC
Created attachment 177963 [details]
test /usr/bin/nm

If you're sure that this is a local problem on my machine, then please don't waste your time on it, I can live with it.

Anyway, I tested /usr/bin/nm. Please note that it's been quite a few years since I wrote C code last time. I've attached the output, /usr/bin/nm seems to do something.
Comment 8 Olli Hauer freebsd_committer 2016-12-15 05:12:20 UTC
Thanks for testing the base 'nm' util, until now I have no idea why it is not recognized during the build.
Comment 9 jako.andras 2017-01-02 15:47:25 UTC
Reinstalling devel/apr1 solved the problem. I don't know how and what got messed up, but it's OK now.

Thanks for your help!
Comment 10 Babak Farrokhi freebsd_committer 2017-01-04 12:52:19 UTC
(In reply to jako.andras from comment #9)

I ran into the exact same problem on 11-STABLE today. Re-installing apr resolved the issue. It is not a jail environment. and I use portmaster.
Comment 11 Olli Hauer freebsd_committer 2017-01-06 16:09:02 UTC
Ah, devel/apr1 was the right hint!

I suspect in your case apr was build with devel/binutils instlled and so autoconf recorded the wrong nm in /usr/local/share/apr/build-1/libtool.

If I remember correct, there was a similar issue years before with gnu sed, editing /usr/local/share/apr/build-1/libtool solved it.

Btw. that's a good example why none of the porters could verify the issue, most of them are using poudriere (or synth with a clean dedicated OS jail)