Re: CURRENT: buildworld fails to compile: cannot find -lctf cc: error: linker command failed [libproc.so.3]

From: O. Hartmann <ohartman_at_zedat.fu-berlin.de>
Date: Sun, 5 Oct 2014 10:18:57 +0200
Am Sat, 4 Oct 2014 15:58:48 -0700
Mark Johnston <markj_at_freebsd.org> schrieb:

> On Sat, Oct 4, 2014 at 3:40 PM, Mark Johnston <markj_at_freebsd.org> wrote:
> > On Sat, Oct 04, 2014 at 04:39:37PM -0400, Ryan Stone wrote:
> >> On Sat, Oct 4, 2014 at 2:33 PM, Mark Johnston <markj_at_freebsd.org> wrote:
> >> > On Sat, Oct 04, 2014 at 07:47:56PM +0200, O. Hartmann wrote:
> >> >> Recent sources (Revision: 272529) fail to compile:
> >> >>
> >> >> [...]
> >> >> cc -m32 -march=native -DCOMPAT_32BIT  -isystem /usr/obj/usr/src/lib32/usr/include/
> >> >> -L/usr/obj/usr/src/lib32/usr/lib32  -B/usr/obj/usr/src/lib32/usr/lib32  -O2 -pipe
> >> >> -O3 -O3 -pipe  -DYP -I/usr/obj/usr/src/lib32/usr/include/rpcsvc -std=gnu99
> >> >> -fstack-protector -Wsystem-headers -Werror -Wno-pointer-sign -Wno-empty-body
> >> >> -Wno-string-plus-int -Wno-unused-const-variable -Wno-tautological-compare
> >> >> -Wno-unused-value -Wno-parentheses-equality -Wno-unused-function
> >> >> -Wno-enum-conversion -Wno-switch -Wno-switch-enum -Wno-knr-promoted-parameter
> >> >> -Wno-parentheses -Qunused-arguments -c /usr/src/lib/librpcsvc/yp_passwd.c -o
> >> >> yp_passwd.o --- all_subdir_libproc --- --- libproc.so.3
> >> >> --- /usr/obj/usr/src/tmp/usr/bin/ld: skipping
> >> >> incompatible /usr/obj/usr/src/tmp/usr/lib/libctf.so when searching for
> >> >
> >> > I'm confused by this message. Are you building with -DNO_CLEAN? Do you
> >> > have anything in make.conf or src.conf, especially anything that's
> >> > changed since libctf was rebuilt?
> >> >
> >> > You might try rebuilding libctf with
> >> >
> >> > $ cd /usr/src
> >> > $ make -C cddl/lib/libctf clean all
> >> >
> >> > but I'm not sure why ld is ignoring the existing libctf.so.
> >>
> >> The failure is coming while building the lib32 compat libraries.  Are
> >> we not currently building a lib32 libctf.so?
> >
> > No, we do. One thing I've noticed is that cddl/lib is built after lib/
> > when compiling 32-bit libs, whereas cddl/lib is built first when building
> > natively.
> 
> Sorry, that's not even true. I misread a part of Makefile.inc1.
> 
> I'm still not able to reproduce the problem, but it seems that the
> patch here is appropriate:
> http://people.freebsd.org/~markj/patches/libctf_prebuild.diff
> 
> Oliver, could you give this a try?

This patch doesn't apply with sources at rev. 272559, as it bails out. Investigating the
situation shows, that my top-level Makefile.inc seems different from what the patch is
supposed to expect:

root_at_gate [src] patch -p1 < /tmp/libctf_prebuild.diff
Hmm...  Looks like a unified diff to me...
The text leading up to this was:
--------------------------
|diff --git a/Makefile.inc1 b/Makefile.inc1
|index 3b92aef..9350339 100644
|--- a/Makefile.inc1
|+++ b/Makefile.inc1
--------------------------
Patching file Makefile.inc1 using Plan A...
Hunk #1 succeeded at 1536 with fuzz 1 (offset 2 lines).
Hunk #2 failed at 1584.
1 out of 2 hunks failed--saving rejects to Makefile.inc1.rej
done



The patch at line 1530 ff:

[...]
                lib/libgeom \
                ${_cddl_lib_libumem} ${_cddl_lib_libnvpair} \
                ${_cddl_lib_libuutil} \
                ${_cddl_lib_libavl} \
                ${_cddl_lib_libzfs_core} \
                ${_cddl_lib_libctf} \
                lib/libutil lib/libpjdlog ${_lib_libypclnt} lib/libz lib/msun \
                ${_secure_lib_libcrypto} ${_lib_libldns} \
                ${_secure_lib_libssh} ${_secure_lib_libssl}

My source tree is clean and sober as "svn status" reports.

A bit spooky, isn't it?

Oliver

Received on Sun Oct 05 2014 - 06:19:06 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:52 UTC