LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 12-27-2014, 12:41 PM   #1
metaschima
Senior Member
 
Registered: Dec 2013
Distribution: Slackware
Posts: 1,982

Rep: Reputation: 492Reputation: 492Reputation: 492Reputation: 492Reputation: 492
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.
 
Old 12-27-2014, 01:01 PM   #2
willysr
Senior Member
 
Registered: Jul 2004
Location: Jogja, Indonesia
Distribution: Slackware-Current
Posts: 4,661

Rep: Reputation: 1784Reputation: 1784Reputation: 1784Reputation: 1784Reputation: 1784Reputation: 1784Reputation: 1784Reputation: 1784Reputation: 1784Reputation: 1784Reputation: 1784
perhaps you are running multilib?
Code:
/usr/lib64/libglib-2.0.so.0: could not read symbols: Invalid operation
 
Old 12-27-2014, 01:29 PM   #3
metaschima
Senior Member
 
Registered: Dec 2013
Distribution: Slackware
Posts: 1,982

Original Poster
Rep: Reputation: 492Reputation: 492Reputation: 492Reputation: 492Reputation: 492
Not running multilib, it does the same thing on all my systems, only one of them has multilib and there is no difference.
 
Old 12-27-2014, 02:08 PM   #4
willysr
Senior Member
 
Registered: Jul 2004
Location: Jogja, Indonesia
Distribution: Slackware-Current
Posts: 4,661

Rep: Reputation: 1784Reputation: 1784Reputation: 1784Reputation: 1784Reputation: 1784Reputation: 1784Reputation: 1784Reputation: 1784Reputation: 1784Reputation: 1784Reputation: 1784
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
 
Old 12-27-2014, 02:15 PM   #5
metaschima
Senior Member
 
Registered: Dec 2013
Distribution: Slackware
Posts: 1,982

Original Poster
Rep: Reputation: 492Reputation: 492Reputation: 492Reputation: 492Reputation: 492
On my current machine I have no 32-bit packages and no 32-bit support enabled, the error also is not about 32-bit.
 
Old 12-27-2014, 02:20 PM   #6
55020
Senior Member
 
Registered: Sep 2009
Location: Yorks. W.R. 167397
Distribution: Slackware
Posts: 1,307
Blog Entries: 4

Rep: Reputation: Disabled
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...
 
Old 12-27-2014, 03:21 PM   #7
metaschima
Senior Member
 
Registered: Dec 2013
Distribution: Slackware
Posts: 1,982

Original Poster
Rep: Reputation: 492Reputation: 492Reputation: 492Reputation: 492Reputation: 492
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] pygobject3 slackbuild fails slacksam Slackware 8 05-08-2014 08:11 PM
[SOLVED] WebkitGtk Slackbuild fails pcelka Slackware 2 11-03-2012 04:50 AM
Trying to make libgdiplus from SlackBuilds for 13.37; compilation fails mostlyharmless Slackware 2 09-29-2012 03:18 PM
FBReader Slackbuild fails bogzab Slackware 3 04-08-2011 09:41 AM
[SOLVED] Conky SlackBuild fails agi93 Slackware 6 07-02-2010 05:21 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 06:48 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration