Slackware This 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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
|
|
12-27-2014, 12:41 PM
|
#1
|
Senior Member
Registered: Dec 2013
Distribution: Slackware
Posts: 1,982
|
libgdiplus (2.10.9) Slackbuild fails
So I'm trying to compile this mono dependency and I'm having problems on Slackware64 14.1.
http://slackbuilds.org/repository/14...es/libgdiplus/
Code:
make[2]: Leaving directory `/tmp/SBo/libgdiplus-2.10.9/src'
Making all in tests
make[2]: Entering directory `/tmp/SBo/libgdiplus-2.10.9/tests'
gcc -DHAVE_CONFIG_H -I. -I.. -I.. -I../src -I../src -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng14 -I/usr/include/libdrm -I/usr/include/freetype2 -I/usr/include/libexif -O2 -fPIC -pthread -MT testgdi.o -MD -MP -MF .deps/testgdi.Tpo -c -o testgdi.o testgdi.c
mv -f .deps/testgdi.Tpo .deps/testgdi.Po
/bin/sh ../libtool --tag=CC --mode=link gcc -O2 -fPIC -pthread -o testgdi testgdi.o ../src/libgdiplus.la -lpthread -lfontconfig -lm -ldl
libtool: link: gcc -O2 -fPIC -pthread -o .libs/testgdi testgdi.o ../src/.libs/libgdiplus.so -lpthread /usr/lib64/libfontconfig.so -lm -ldl -pthread
/usr/lib64/gcc/x86_64-slackware-linux/4.8.2/../../../../x86_64-slackware-linux/bin/ld: testgdi.o: undefined reference to symbol 'g_free'
/usr/lib64/gcc/x86_64-slackware-linux/4.8.2/../../../../x86_64-slackware-linux/bin/ld: note: 'g_free' is defined in DSO /usr/lib64/libglib-2.0.so.0 so try adding it to the linker command line
/usr/lib64/libglib-2.0.so.0: could not read symbols: Invalid operation
collect2: error: ld returned 1 exit status
make[2]: *** [testgdi] Error 1
make[2]: Leaving directory `/tmp/SBo/libgdiplus-2.10.9/tests'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/tmp/SBo/libgdiplus-2.10.9'
make: *** [all] Error 2
I propose the following patch
Code:
--- libgdiplus.SlackBuild 2014-12-27 12:39:07.360499783 -0600
+++ libgdiplus.SlackBuild.new 2014-12-27 12:39:46.785006909 -0600
@@ -71,6 +71,7 @@
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+LIBS="$LIBS -lglib-2.0 -lX11"
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
./configure \
@@ -83,11 +84,6 @@
--disable-static \
--build=$ARCH-slackware-linux
-# Quick fix borrowed from:
-# https://www.slacky.eu/asche64/pkgreports/
-sed -i "s/^LIBS = -lpthread -lfontconfig $/\
- LIBS = -lpthread -lfontconfig -lglib-2.0 -lX11/" tests/Makefile
-
make
make install-strip DESTDIR=$PKG
This seems to work fine.
|
|
|
12-27-2014, 01:01 PM
|
#2
|
Senior Member
Registered: Jul 2004
Location: Jogja, Indonesia
Distribution: Slackware-Current
Posts: 4,742
|
perhaps you are running multilib?
Code:
/usr/lib64/libglib-2.0.so.0: could not read symbols: Invalid operation
|
|
|
12-27-2014, 01:29 PM
|
#3
|
Senior Member
Registered: Dec 2013
Distribution: Slackware
Posts: 1,982
Original Poster
|
Not running multilib, it does the same thing on all my systems, only one of them has multilib and there is no difference.
|
|
|
12-27-2014, 02:08 PM
|
#4
|
Senior Member
Registered: Jul 2004
Location: Jogja, Indonesia
Distribution: Slackware-Current
Posts: 4,742
|
can you check if you have x86 packages installed on your x86_64 machine?
i have just successfuly build libgdiplus on slackware64-14.1 VM
Code:
libgdiplus:
MD5SUM check for libgdiplus-2.10.9.tar.bz2 ... OK
Building package libgdiplus-2.10.9-x86_64-2_SBo.tgz ... OK
|
|
|
12-27-2014, 02:15 PM
|
#5
|
Senior Member
Registered: Dec 2013
Distribution: Slackware
Posts: 1,982
Original Poster
|
On my current machine I have no 32-bit packages and no 32-bit support enabled, the error also is not about 32-bit.
|
|
|
12-27-2014, 02:20 PM
|
#6
|
Senior Member
Registered: Sep 2009
Location: Yorks. W.R. 167397
Distribution: Slackware
Posts: 1,307
Rep:
|
It builds fine here, and that patch does not do what you think it does.
When you set LIBS="$LIBS -lglib-2.0 -lX11", LIBS is a bash variable that is ignored by the Makefile. The Makefile ignores any environment variable named LIBS, but your bash variable is not even an environment variable. You probably wanted to say LDFLAGS instead of LIBS, and you should have put a backslash at the end of the line to make it an environment variable, and if you had done all that... it would have had the same effect as the sed command in the original SlackBuild.
In fact, the sed command exists to solve your real problem, which is this classic "underlinking" error:
Quote:
/usr/lib64/gcc/x86_64-slackware-linux/4.8.2/../../../../x86_64-slackware-linux/bin/ld: testgdi.o: undefined reference to symbol 'g_free'
/usr/lib64/gcc/x86_64-slackware-linux/4.8.2/../../../../x86_64-slackware-linux/bin/ld: note: 'g_free' is defined in DSO /usr/lib64/libglib-2.0.so.0 so try adding it to the linker command line
|
... and the original SlackBuild with the sed command works fine here. It's almost as if you were not using the original SlackBuild to begin with...
|
|
|
12-27-2014, 03:21 PM
|
#7
|
Senior Member
Registered: Dec 2013
Distribution: Slackware
Posts: 1,982
Original Poster
|
I think I found something relevant, if I unset LIBS, the slackbuild works. I set
Code:
export LIBS="-lm -ldl"
in .bashrc. This is to fix some builds that don't export these, kinda like this one, but in this case it is a different library.
Either way I don't like the quick fix in this slackbuild, a better fix is needed.
Last edited by metaschima; 12-27-2014 at 03:22 PM.
|
|
|
All times are GMT -5. The time now is 06:16 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|