On 5/13/20 6:09 PM, Ken Moffat via blfs-support wrote:
On Wed, May 13, 2020 at 01:40:58PM -0400, Richard via blfs-support wrote:
I am stuck at the first phase of building glib-2.62.4
in blfs-9.1 (i.e. the first compilation before installing
desktop-file-utils-0.24 and shared-mime-info-1.15
in order to do the tests). I applied both patches and
followed the instructions in the blfs-9.1 book. Here
is the output I get after issuing the "ninja" command:

rkm:/sources/glib-2.62.4/build$ ninja
[775/1157] Linking target gio/tests/gdbus-serialization.
FAILED: gio/tests/gdbus-serialization
cc  -o gio/tests/gdbus-serialization
'gio/tests/bcb7ac7@@gdbus-serialization@exe/gdbus-serialization.c.o'
'gio/tests/bcb7ac7@@gdbus-serialization@exe/gdbus-tests.c.o' -Wl,--as-needed
-Wl,--no-undefined -Wl,--start-group glib/libglib-2.0.so.0.6200.4
gmodule/libgmodule-2.0.so.0.6200.4 gobject/libgobject-2.0.so.0.6200.4
gio/libgio-2.0.so.0.6200.4 -pthread -ldbus-1 -Wl,--end-group 
'-Wl,-rpath,$ORIGIN/../../glib:$ORIGIN/../../gmodule:$ORIGIN/../../gobject:$ORIGIN/..'
-Wl,-rpath-link,/sources/glib-2.62.4/build/glib
-Wl,-rpath-link,/sources/glib-2.62.4/build/gmodule
-Wl,-rpath-link,/sources/glib-2.62.4/build/gobject
-Wl,-rpath-link,/sources/glib-2.62.4/build/gio
/usr/bin/ld: cannot find -ldbus-1
   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
collect2: error: ld returned 1 exit status
[776/1157] Compiling C object 'gio/tests/bcb7ac7@@file@exe/file.c.o'.
ninja: build stopped: subcommand failed.

Whenever you get a failed build while trying to build a package, you
should assume that you will not be able to install it (there may
occasionally be exceptions).

In this case, your build *needs* the library from dbus.

I have no idea whether that is nowadays always true, in which case
we need to correct the book, or whether it is a result of e.g. which
dependencies are present.  What I can tell you is nowadays almost
everyone will install dbus before glib.

Before the sysv book moved to using elogind to enable rootless Xorg,
I can remember that I used to build glib after I'd got Xorg working,
but even then I built dbus a couple of packages before I built glib.

For current sysv I build glib on the way to building Xorg.  Some of
the order in which I build things.

freetype
fontconfig
XML-Simple
xorgproto
libXau, libXdmcp, xcb-proto, libxcb
dbus and its bootscript
elogind and the PAM files
(I've already built PAM before this)
xtrans ... libxshmfence
dbus, second time
xcb-util*
pixman
libdrm
[ some Python stuff for Sphinx ]
llvm
libvdpau
wayland
Mako
wayland-protocols
libva
Mesa
libva second build (might not be necessary)
glu
xbitmaps
iceauth
some of the Xorg applications
xcursor-themes
  sometimes, enough of the legacy fonts:
   font-util, font-alias, bdftopcf, font-adobe-100dpi
   If you use xterm, I guess you will want these.
xkeyboard-config
libepoxy

And now: glib.

Since I've started listing my build, I'll contine -

gobject-introspection
autoconf-1.23
zip
nspr
JS60
polkit
xorg-server
mtdev
libevdev
libinput
xf86-input-libinput

Then the video driver (for me, amdgpu or ati or intel)
If intel, libva-intel-driver

xcalc
xclock
xinit

Here, I build rxvt-unicode, if you follow the book you'll want xterm
and its dep.

(Now I do the createfiles part and configure my keyboard to my own
desires)

After this, some useful fonts.  At a minimum:
dejavu
freefont
liberation-fonts

Now, my initial WM (I cannot get on with twm!)
fluxbox

I also rebuild links so it will work in X (I built it long before
this, along with most of the graphics libs).

And after that, I reboot to find out whether elogind is working (if
it isn't, no mouse or keyboard in Xorg, need to power cycle).

ĸen
Thanks for your help. I did install dbus before attempting to build glib,
but from your comments I went back to look at my installation, and
I think I found the problem. It is related to the following instructions
in the blfs-9.1 book:

mv -v /usr/lib/libdbus-1.so.* /lib ln -sfv ../../lib/$(readlink /usr/lib/libdbus-1.so) /usr/lib/libdbus-1.so The first line moved the actual dbus library to the /lib directory, but the second line sets up the following link: ls -l /usr/lib/libdbus-1.so lrwxrwxrwx 1 root root 25 May 14 16:05 usr/lib/libdbus-1.so -> libdbus-1.so.3.19.11 which I think indicates that the actual library should still be found in the /usr/lib directory. But since it is now in the /lib directory, the glib build could not find it. I don't know why the second line didn't work, but I replaced it with: ln -sfv /lib/libdbus-1.so.3.19.11 /usr/lib/libdbus-1.so

which yields the following link:

ls -l /usr/lib/libdbus-1.so
lrwxrwxrwx 1 root root 25 May 14 16:05 usr/lib/libdbus-1.so -> 
/lib/libdbus-1.so.3.19.11

After making this change, the glib build was able to complete.
However the following error messages occurred:

root:/sources/glib-2.62.4/build# ninja
[1145/1157] Generating glib-compile-schemas-man with a custom command.
Error: no ID for constraint linkend: "GSettings".
Error: no ID for constraint linkend: "GSettings".
[1146/1157] Generating glib-compile-resources-man with a custom command.
Error: no ID for constraint linkend: "GResource".
Error: no ID for constraint linkend: "GResource".
Error: no ID for constraint linkend: "G-GNUC-INTERNAL:CAPS".
[1147/1157] Generating gsettings-man with a custom command.
Error: no ID for constraint linkend: "GSettings".
Error: no ID for constraint linkend: "GVariant".
Error: no ID for constraint linkend: "GVariant".
Error: no ID for constraint linkend: "GVariant".
[1148/1157] Generating gresource-man with a custom command.
Error: no ID for constraint linkend: "GResource".
[1149/1157] Generating gdbus-man with a custom command.
Error: no ID for constraint linkend: "GVariant".
Error: no ID for constraint linkend: "GVariant".
Error: no ID for constraint linkend: "GVariant".
[1152/1157] Generating gdbus-codegen-man with a custom command.
Error: no ID for constraint linkend: "g-main-context-push-thread-default".
Error: no ID for constraint linkend: "G-VARIANT-TYPE-BOOLEAN:CAPS".
Error: no ID for constraint linkend: "G-VARIANT-TYPE-BYTE:CAPS".
Error: no ID for constraint linkend: "G-VARIANT-TYPE-INT16:CAPS".
Error: no ID for constraint linkend: "G-VARIANT-TYPE-UINT16:CAPS".
Error: no ID for constraint linkend: "G-VARIANT-TYPE-INT32:CAPS".
Error: no ID for constraint linkend: "G-VARIANT-TYPE-UINT32:CAPS".
Error: no ID for constraint linkend: "G-VARIANT-TYPE-INT64:CAPS".
Error: no ID for constraint linkend: "G-VARIANT-TYPE-UINT64:CAPS".
Error: no ID for constraint linkend: "G-VARIANT-TYPE-DOUBLE:CAPS".
Error: no ID for constraint linkend: "G-VARIANT-TYPE-STRING:CAPS".
Error: no ID for constraint linkend: "G-VARIANT-TYPE-BYTESTRING:CAPS".
Error: no ID for constraint linkend: "G-VARIANT-TYPE-OBJECT-PATH:CAPS".
Error: no ID for constraint linkend: "G-VARIANT-TYPE-SIGNATURE:CAPS".
Error: no ID for constraint linkend: "G-VARIANT-TYPE-STRING-ARRAY:CAPS".
Error: no ID for constraint linkend: "G-VARIANT-TYPE-OBJECT-PATH-ARRAY:CAPS".
Error: no ID for constraint linkend: "G-VARIANT-TYPE-BYTESTRING-ARRAY:CAPS".
Error: no ID for constraint linkend: "gchararray".
Error: no ID for constraint linkend: "GStrv".
Error: no ID for constraint linkend: "G-VARIANT-TYPE-BYTESTRING:CAPS".
[1157/1157] Generating gobject-query-man with a custom command.
root:/sources/glib-2.62.4/build#

The blfs-9.1 book says that these errors are harmless, although
it says that they occur with the "ninja install" command.
Anyway, it looks as though fixing the link allowed the build
to succcessfully complete.

Thanks,

Richard

--
http://lists.linuxfromscratch.org/listinfo/blfs-support
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page

Reply via email to