lilypond-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Build problem with binutils 2.3.2 / gcc 8.3.1: "DSO missing from command


From: Knut Petersen
Subject: Build problem with binutils 2.3.2 / gcc 8.3.1: "DSO missing from command line"
Date: Thu, 30 May 2019 11:31:06 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1

Hi everybody!

After some time without building lilypond I realized that my openSuSE 
Tumbleweed system had changed enough to be unable to build lilypond with my old 
and proven script. The problem is that some required libraries are missing from 
the g++ command line that should produce the lilypond executable:

   make[2]: Leaving directory `/home/knut/sources/lily/build/flower
   g++ -o out/lilypond  [...] ./out/general-scheme.o [...]./out/pango-font.o 
[...]  ./out/../../flower/out/library.a -ldl -lgobject-2.0  -pthread 
-L/home/knut/sources/lilybuilt/share/lilypond/lib64 -lguile -lltdl -lgmp 
-lcrypt -lm -lltdl -lgobject-2.0 -lpangoft2-1.0 -lpango-1.0 -lfontconfig
   -lfreetype -lfontconfig -lfreetype -lfreetype 
-Wl,-rpath,/home/knut/sources/lilybuilt/share/lilypond/lib64 
-Wl,-rpath,/home/knut/sources/lilybuilt/share/lilypond/lib64 
-Wl,-rpath,/home/knut/sources/lilybuilt/share/lilypond/lib64
   /usr/lib64/gcc/x86_64-suse-linux/8/../../../../x86_64-suse-linux/bin/ld: 
./out/general-scheme.o: undefined reference to symbol 'g_spawn_sync'
   /usr/lib64/gcc/x86_64-suse-linux/8/../../../../x86_64-suse-linux/bin/ld: 
/usr/lib64/libglib-2.0.so.0: error adding symbols: DSO missing from command line
   collect2: error: ld returned 1 exit status
   make[1]: *** [out/lilypond] Error 1
   make[1]: Target `all' not remade because of errors.
   make[1]: Leaving directory `/home/knut/sources/lily/build/lily'
   make: *** [all] Error 2

g_spawn_sync is used in lily/general-scheme.cc, it is provided by 
libglib-2.0.so.0, the linker finds that library but it complains because the 
library dependency is not explicitly provided on the command line.

An easy way to tell ld to use some additional libraries is to export a LIBS environment 
variable before ./configure is executed. So I added "export LIBS='-lglib-2.0'" 
at the top of my build script. But ld complained again:

   /usr/lib64/gcc/x86_64-suse-linux/8/../../../../x86_64-suse-linux/bin/ld: 
./out/pango-font.o: undefined reference to symbol 'g_object_unref'
   /usr/lib64/gcc/x86_64-suse-linux/8/../../../../x86_64-suse-linux/bin/ld: 
/usr/lib64/libgobject-2.0.so.0: error adding symbols: DSO missing from command 
line

I added libgobject-2.0 to LIBS: "export LIBS='-lglib-2.0 -lgobject-2.0'", and 
after that building the lilypond executable succeeded again.

   ||

ld is:

   GNU ld (GNU Binutils; openSUSE Tumbleweed) 2.32
   Copyright (C) 2019 Free Software Foundation, Inc.
   This program is free software; you may redistribute it under the terms of
   the GNU General Public License version 3 or (at your option) a later version.
   This program has absolutely no warranty.

g++ is:

   g++ (SUSE Linux) 8.3.1 20190226 [gcc-8-branch revision 269204]
   Copyright (C) 2018 Free Software Foundation, Inc.
   This is free software; see the source for copying conditions. There is NO
   warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Knut





reply via email to

[Prev in Thread] Current Thread [Next in Thread]