[SOLVED] error when compile libdbus-c++-0.9.0 using sbo slackbuild
SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I just built it without a hitch on Slackware x86_64 (Actually on Slint but all tools and deps come from Slackware). Should be something missing, added or not to the version shipped in 14.2 in your installation, I guess.
I can be wrong, but it seems you're using a modified slackbuild. In Didier's build output, the link command includes options -O2, -fPIC and -lpthread :
I can be wrong, but it seems you're using a modified slackbuild. In Didier's build output, the link command includes options -O2, -fPIC and -lpthread :
bash-4.3$ cat *.SlackBuild
#!/bin/sh
# Slackware build script for libdbus-c++
# Copyright 2013-2016 Heinz Wiesinger, Amsterdam, The Netherlands
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
# permitted provided that the following conditions are met:
#
# 1. Redistributions of this script must retain the above copyright
# notice, this list of conditions and the following disclaimer.
#
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ''AS IS'' AND ANY EXPRESS OR IMPLIED
# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
PRGNAM=libdbus-c++
VERSION=0.9.0
BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
i?86) ARCH=i486 ;;
arm*) ARCH=arm ;;
*) ARCH=$( uname -m ) ;;
esac
fi
CWD=$(pwd)
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
if [ "$ARCH" = "i486" ]; then
SLKCFLAGS="-O2 -march=i486 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "x86_64" ]; then
SLKCFLAGS="-O2 -fPIC"
LIBDIRSUFFIX="64"
else
SLKCFLAGS="-O2"
LIBDIRSUFFIX=""
fi
set -e
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM-$VERSION
chown -R root:root .
find -L . \
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
-o -perm 511 \) -exec chmod 755 {} \; -o \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
# Fix compiling with newer gcc versions
patch -p0 -i $CWD/gcc47.patch
# Fix https://sourceforge.net/p/dbus-cplusplus/bugs/5/
patch -p1 -i $CWD/nested_variant_map.patch
LDFLAGS="-lpthread" \
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
./configure \
--prefix=/usr \
--libdir=/usr/lib${LIBDIRSUFFIX} \
--sysconfdir=/etc \
--localstatedir=/var \
--mandir=/usr/man \
--disable-static \
--disable-ecore \
--disable-examples \
--build=$ARCH-slackware-linux
make
make install-strip DESTDIR=$PKG
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a AUTHORS ChangeLog COPYING INSTALL NEWS README TODO \
$PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cd $PKG
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
bash-4.3$
Did you installed Slackware-14.2 or upgraded from 14.1 ?
If you have upgraded from 14.1, can you post the output of commands below :
Code:
$ ls /var/log/packages/gcc*
$ ls /var/log/packages/glibc*
$ ls /var/log/packages/*dbus*
Below is the output of ./configure executed by libdbus-c++.slackbuilds which builds fine on a Slackware64/14.2 (VM). Can you check if there are difference on your side and report it, if any.
Code:
checking for a BSD-compatible install... /bin/ginstall -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking build system type... x86_64-slackware-linux-gnu
checking host system type... x86_64-slackware-linux-gnu
checking for style of include used by make... GNU
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking dependency style of gcc... gcc3
checking for clock_gettime... yes
checking for gcc... (cached) gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to accept ISO C89... (cached) none needed
checking dependency style of gcc... (cached) gcc3
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking dependency style of g++... gcc3
checking for a sed that does not truncate output... /bin/sed
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for fgrep... /bin/grep -F
checking for ld used by gcc... /usr/x86_64-slackware-linux/bin/ld
checking if the linker (/usr/x86_64-slackware-linux/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking for /usr/x86_64-slackware-linux/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for ar... ar
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking how to run the C preprocessor... gcc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking whether we are using the GNU C++ compiler... (cached) yes
checking whether g++ accepts -g... (cached) yes
checking dependency style of g++... (cached) gcc3
checking how to run the C++ preprocessor... g++ -E
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/usr/x86_64-slackware-linux/bin/ld -m elf_x86_64) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... no
checking for ld used by g++... /usr/x86_64-slackware-linux/bin/ld -m elf_x86_64
checking if the linker (/usr/x86_64-slackware-linux/bin/ld -m elf_x86_64) is GNU ld... yes
checking whether the g++ linker (/usr/x86_64-slackware-linux/bin/ld -m elf_x86_64) supports shared libraries... yes
checking for g++ option to produce PIC... -fPIC -DPIC
checking if g++ PIC flag -fPIC -DPIC works... yes
checking if g++ static flag -static works... yes
checking if g++ supports -c -o file.o... yes
checking if g++ supports -c -o file.o... (cached) yes
checking whether the g++ linker (/usr/x86_64-slackware-linux/bin/ld -m elf_x86_64) supports shared libraries... yes
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking whether g++ supports symbol visibility... yes
checking for dbus... yes
checking for glib... yes
checking for gtkmm... yes
checking for XML_ParserCreate_MM in -lexpat... yes
checking expat.h usability... yes
checking expat.h presence... yes
checking for expat.h... yes
checking for the pthreads library -lpthreads... no
checking whether pthreads work without any flags... yes
checking for joinable pthread attribute... PTHREAD_CREATE_JOINABLE
checking if more special flags are required for pthreads... no
checking for doxygen... /usr/bin/doxygen
checking whether to build Doxygen documentation... configure: creating ./config.status
config.status: creating Makefile
config.status: creating src/Makefile
config.status: creating src/integration/Makefile
config.status: creating src/integration/ecore/Makefile
config.status: creating src/integration/glib/Makefile
config.status: creating tools/Makefile
config.status: creating test/Makefile
config.status: creating test/generator/Makefile
config.status: creating test/functional/Makefile
config.status: creating test/functional/Test1/Makefile
config.status: creating data/Makefile
config.status: creating doc/Makefile
config.status: creating doc/Doxyfile
config.status: creating examples/Makefile
config.status: creating examples/properties/Makefile
config.status: creating examples/echo/Makefile
config.status: creating examples/ecore/Makefile
config.status: creating examples/hal/Makefile
config.status: creating examples/glib/Makefile
config.status: creating examples/echo_ecore/Makefile
config.status: creating dbus-c++-1.pc
config.status: creating dbus-c++-1-uninstalled.pc
config.status: creating dbus-c++-ecore-1.pc
config.status: creating dbus-c++-ecore-1-uninstalled.pc
config.status: creating dbus-c++-glib-1.pc
config.status: creating dbus-c++-glib-1-uninstalled.pc
config.status: creating libdbus-c++.spec
config.status: creating config.h
config.status: executing depfiles commands
config.status: executing libtool commands
Build configuration:
--------------------
Mainloop integration support:
ecore ......................... no
glib........................... yes
Optional build items:
build tests.................... yes
build examples................. no
build doxygen documentation.... no
Cross Compiling activated...... no
PThread support found.......... yes
Did you installed Slackware-14.2 or upgraded from 14.1 ?
--
SeB
i installed slackware 14.2
Quote:
Originally Posted by phenixia2003
Hello,
Can you check if there are difference on your side and report it, if any.
--
SeB
yes, there are few differences:
in your:
Code:
checking whether pthreads work without any flags... yes
in my:
Code:
checking whether pthreads work without any flags... no
checking whether pthreads work with -Kthread... no
checking whether pthreads work with -kthread... no
checking for the pthreads library -llthread... no
checking whether pthreads work with -pthread... yes
checking whether pthreads work without any flags... no
checking whether pthreads work with -Kthread... no
checking whether pthreads work with -kthread... no
checking for the pthreads library -llthread... no
checking whether pthreads work with -pthread... yes
So, edit libdbus-c++.SlackBuild, and pass LDFLAGS="-pthread" instead of LDFLAGS="-lpthread".
but if i disable patches and use -pthread in ldflags in slackbuild it is compile successfully. thank you a lot for your help!
Good. have you disabled both patches, or only one ? Because on my side libdbus-c++ builds if I disable nested_variant_map.patch, and fails when I disable gcc47.patch or both patches.
PS: Note that archlinux applies gcc47.patch only, and pass LDFLAGS="-lexpat -lpthread".
Good. have you disabled both patches, or only one ? Because on my side libdbus-c++ builds if I disable nested_variant_map.patch, and fails when I disable gcc47.patch or both patches.
PS: Note that archlinux applies gcc47.patch only, and pass LDFLAGS="-lexpat -lpthread".
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.