Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 29 Nov 2015 12:42:56 -0800
From:      Mark Millard <markmi@dsl-only.net>
To:        FreeBSD PowerPC ML <freebsd-ppc@freebsd.org>, FreeBSD Toolchain <freebsd-toolchain@freebsd.org>
Subject:   - j 6 buildworld: -lcapsicum use before libcapsicum.so.0 /usr/obj/usr/src/tmp/lib/ install
Message-ID:  <E507F9AF-2818-4E6D-9538-A8670B079C8A@dsl-only.net>
In-Reply-To: <106D9CB0-D9AE-4463-A03E-3AB16583CDA7@dsl-only.net>
References:  <01BA3FF2-F362-48FA-B9E2-112E05CC00ED@dsl-only.net> <6AA244B9-DE60-4D8B-A08E-AADD73F9D856@dsl-only.net> <106D9CB0-D9AE-4463-A03E-3AB16583CDA7@dsl-only.net>

next in thread | previous in thread | raw e-mail | index | archive | help
This is a -j 6 buildworld context.

In the following sequence the -lcapsicum use when linking =
libcasper.so.0.full does not use /usr/obj/usr/src/tmp/lib/libcapsicum.so =
because that file and the link to it at =
/usr/obj/usr/src/tmp/usr/lib/libcapsicum.so are only created (installed) =
later. (See the sequence later below.)

This can lead to use of /lib/libcapsicum.so instead if it is found, =
which for my context it is. In my case of updating from 11.0-CURRENT =
from back on 2015-Apr-18 /lib/libcapsicum.so use ends up complaining =
about undefined references, such as to nvlist_getf_binary that existed =
back then but do not now. That is what exposed the time-order problem.


> --- all_subdir_libcasper ---
> /usr/local/bin/powerpc64-portbld-freebsd11.0-gcc  =
-L/usr/obj/usr/src/tmp/usr/lib/. -L/usr/obj/usr/src/lib/libc++/. =
-L/usr/lib/. -fstack-protector-strong -shared -Wl,-x =
-Wl,--fatal-warnings -Wl,--warn-shared-textrel  -o libcasper.so.0.full =
-Wl,-soname,libcasper.so.0  `NM=3D'/usr/local/powerpc64-freebsd/bin/nm' =
NMFLAGS=3D'' lorder libcasper.So | tsort -q`  -lcapsicum  -lnv  -lpjdlog
. . .
> =3D=3D=3D> lib/libcapsicum (install)
> --- _libinstall ---
> --- _INCSINS ---
> --- _libinstall ---
> sh /usr/src/tools/install.sh -C -o root -g wheel -m 444   =
libcapsicum.a /usr/obj/usr/src/tmp/usr/lib/
> --- _INCSINS ---
> sh /usr/src/tools/install.sh -C -o root -g wheel -m 444  =
/usr/src/lib/libcapsicum/libcapsicum.h =
/usr/src/lib/libcapsicum/libcapsicum_dns.h =
/usr/src/lib/libcapsicum/libcapsicum_grp.h =
/usr/src/lib/libcapsicum/libcapsicum_pwd.h =
/usr/src/lib/libcapsicum/libcapsicum_random.h =
/usr/src/lib/libcapsicum/libcapsicum_service.h =
/usr/src/lib/libcapsicum/libcapsicum_sysctl.h =
/usr/obj/usr/src/tmp/usr/include/
> --- _libinstall ---
> sh /usr/src/tools/install.sh -s -o root -g wheel -m 444     =
libcapsicum.so.0 /usr/obj/usr/src/tmp/lib/
> sh /usr/src/tools/install.sh -T debug -o root -g wheel -m 444    =
libcapsicum.so.0.debug /usr/obj/usr/src/tmp/usr/lib/debug/lib/
> sh /usr/src/tools/install.sh -l rs =
/usr/obj/usr/src/tmp/lib/libcapsicum.so.0  =
/usr/obj/usr/src/tmp/usr/lib/libcapsicum.so

The -L's ending with /.'s are from my /etc/src.conf . They are =
associated with trying to self-build on a powerpc64 PowerMac using only =
powerpc64-xtoolchain-gcc's powerpc64-gcc WITH_LIBCPLUSPLUS: =
powerpc64-gcc is acting as both the host toolchain and the =
CROSS_TOOLCHAIN. No 4.2.1 gcc is present. I know this is not a usual way =
of doing things. There may be better ways. But if I manage to expose =
some missing dependency tracking some good came of it.

The make command was:

> make -j 6 WITH_FAST_DEPEND=3D CROSS_TOOLCHAIN=3Dpowerpc64-gcc =
WITH_LIBCPLUSPLUS=3D WITHOUT_CLANG_BOOTSTRAP=3D WITH_CLANG=3D =
WITH_CLANG_IS_CC=3D WITH_LLDB=3D WITHOUT_GCC_BOOTSTRAP=3D WITHOUT_GCC=3D =
WITHOUT_GNUCXX=3D WITHOUT_BOOT=3D WITHOUT_LIB32=3D buildworld =
buildkernel KERNCONF=3DGENERIC64vtsc-NODEBUG TARGET=3Dpowerpc =
TARGET_ARCH=3Dpowerpc64


Context details if you care:

> # freebsd-version -ku; uname -aKU
> 11.0-CURRENT
> 11.0-CURRENT
> FreeBSD FBSDG5C0 11.0-CURRENT FreeBSD 11.0-CURRENT #12 r281630M: Sat =
Apr 18 01:15:13 PDT 2015     =
root@FBSDG5C0:/usr/obj/usr/src/sys/GENERIC64vtsc-NODEBUG  powerpc =
1100070 1100070

I am attempting an update after having been away from the PowerMacs for =
months.

> # svnlite info /usr/src
> Path: /usr/src
> Working Copy Root Path: /usr/src
> URL: https://svn0.us-west.freebsd.org/base/head
> Relative URL: ^/head
> Repository Root: https://svn0.us-west.freebsd.org/base
> Repository UUID: ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
> Revision: 291443
> Node Kind: directory
> Schedule: normal
> Last Changed Author: nwhitehorn
> Last Changed Rev: 291442
> Last Changed Date: 2015-11-28 23:16:08 -0800 (Sat, 28 Nov 2015)

> # more /etc/src.conf
> NO_WERROR=3D
> WITH_DEBUG=3D
> WITH_DEBUG_FILES=3D
> MALLOC_PRODUCTION=3D
> CC=3D/usr/local/bin/powerpc64-portbld-freebsd11.0-gcc
> CXX=3D/usr/local/bin/powerpc64-portbld-freebsd11.0-g++
> CPP=3D/usr/local/bin/powerpc64-portbld-freebsd11.0-cpp
> CROSS_BINUTILS_PREFIX=3D/usr/local/powerpc64-freebsd/bin/
> X_COMPILER_TYPE=3Dgcc
> DEPFLAGS+=3D-isystem /usr/obj/usr/src/tmp/usr/include/. =
-I/usr/obj/usr/src/tmp/usr/include/c++/v1/. -I/usr/include/c++/v1/.
> L/usr/obj/usr/src/tmp/usr/lib/lib32/.
> CFLAGS+=3D-isystem /usr/obj/usr/src/tmp/usr/include/. =
-L/usr/obj/usr/src/tmp/usr/lib/. -L/usr/obj/usr/src/tmp/lib/.
> LDFLAGS+=3D-L/usr/obj/usr/src/tmp/usr/lib/. =
-L/usr/obj/usr/src/tmp/lib/.
> CXXFLAGS+=3D-isystem /usr/obj/usr/src/tmp/usr/include/. =
-I/usr/obj/usr/src/tmp/usr/include/c++/v1/. -std=3Dgnu++11 =
-L/usr/obj/usr/src/lib/libc++/.
> LDFLAGS+=3D-L/usr/obj/usr/src/lib/libc++/.
> CXXFLAGS+=3D-I/usr/include/c++/v1/. -std=3Dgnu++11 -L/usr/lib/.
> LDFLAGS+=3D-L/usr/lib/.

> # svnlite info /usr/ports/
> Path: /usr/ports
> Working Copy Root Path: /usr/ports
> URL: https://svn0.us-west.freebsd.org/ports/head
> Relative URL: ^/head
> Repository Root: https://svn0.us-west.freebsd.org/ports
> Repository UUID: 35697150-7ecd-e111-bb59-0022644237b5
> Revision: 402562
> Node Kind: directory
> Schedule: normal
> Last Changed Author: rene
> Last Changed Rev: 402562
> Last Changed Date: 2015-11-28 15:08:03 -0800 (Sat, 28 Nov 2015)

=3D=3D=3D
Mark Millard
markmi at dsl-only.net





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?E507F9AF-2818-4E6D-9538-A8670B079C8A>