LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 06-10-2017, 09:28 AM   #1
vonbiber
Member
 
Registered: Apr 2009
Distribution: slackware 14.1 64-bit, slackware 14.2 64-bit, SystemRescueCD
Posts: 447

Rep: Reputation: 99
glew.pc and glewmx.pc wrong libdir value


I just noticed this
Code:
cat /usr/lib64/pkgconfig/glew.pc
Code:
prefix=/usr
exec_prefix=${prefix}
libdir=/tmp/package-glew/usr/lib64
includedir=${prefix}/include

Name: glew
Description: The OpenGL Extension Wrangler library
Version: 1.13.0
Cflags: -I${includedir}
Libs: -L${libdir} -lGLEW
Requires: glu
Note the value of libdir: 'libdir=/tmp/package-glew/usr/lib64'

/usr/lib64/pkgconfig/glewmx.pc
should be edited too
 
Old 06-10-2017, 10:12 AM   #2
willysr
Senior Member
 
Registered: Jul 2004
Location: Jogja, Indonesia
Distribution: Slackware-Current
Posts: 3,647

Rep: Reputation: 958Reputation: 958Reputation: 958Reputation: 958Reputation: 958Reputation: 958Reputation: 958Reputation: 958
Try this patch
Code:
--- glew.SlackBuild.old 2017-06-10 22:02:03.666487724 +0700
+++ glew.SlackBuild     2017-06-10 22:09:33.997800480 +0700
@@ -24,7 +24,7 @@
 
 PKGNAM=glew
 VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
 
 # Automatically determine the architecture we're building on:
 if [ -z "$ARCH" ]; then
@@ -74,6 +74,8 @@
 fromdos < config/config.guess > $TEMPFILE
 cat $TEMPFILE > config/config.guess ; rm -f $TEMPFILE
 
+sed -i "s|@libdir@|/usr/lib${LIBDIRSUFFIX}|g" glew.pc.in
+
 make $NUMJOBS OPT="$SLKCFLAGS" || make OPT="$SLKCFLAGS" || exit 1
 make install.all GLEW_DEST=$PKG/usr || exit 1
 
1 members found this post helpful.
Old 06-10-2017, 10:58 AM   #3
vonbiber
Member
 
Registered: Apr 2009
Distribution: slackware 14.1 64-bit, slackware 14.2 64-bit, SystemRescueCD
Posts: 447

Original Poster
Rep: Reputation: 99
Quote:
Originally Posted by willysr View Post
Try this patch

...
I didn't build the package. It's the one that came with the installation of slackware (14.2 64-bit):
Code:
/var/log/packages/glew-1.13.0-x86_64-1
I just wanted to signal this to the author of the SlackBuild
 
2 members found this post helpful.
Old 06-10-2017, 11:23 AM   #4
phenixia2003
Member
 
Registered: May 2006
Location: France
Distribution: Slackware
Posts: 760

Rep: Reputation: 574Reputation: 574Reputation: 574Reputation: 574Reputation: 574Reputation: 574
Hello,

willysr's patch works well, and, the patch below (based on archlinux PKGBUILD) works too :

Code:
diff -u glew/glew.SlackBuild glew.SlackBuild 
--- glew/glew.SlackBuild        2015-11-23 20:32:15.000000000 +0100
+++ glew.SlackBuild     2017-06-10 18:14:57.236205976 +0200
@@ -74,6 +74,8 @@
 fromdos < config/config.guess > $TEMPFILE
 cat $TEMPFILE > config/config.guess ; rm -f $TEMPFILE
 
+sed -i '/^.PHONY: .*\.pc$/d' Makefile
+
 make $NUMJOBS OPT="$SLKCFLAGS" || make OPT="$SLKCFLAGS" || exit 1
 make install.all GLEW_DEST=$PKG/usr || exit 1
Code:
cat /tmp/package-glew/usr/lib64/pkgconfig/glew.pc 
prefix=/usr
exec_prefix=${prefix}
libdir=/usr/lib64
includedir=${prefix}/include

Name: glew
Description: The OpenGL Extension Wrangler library
Version: 1.13.0
Cflags: -I${includedir} 
Libs: -L${libdir} -lGLEW
Requires: glu
 
Old 06-15-2017, 01:25 AM   #5
vonbiber
Member
 
Registered: Apr 2009
Distribution: slackware 14.1 64-bit, slackware 14.2 64-bit, SystemRescueCD
Posts: 447

Original Poster
Rep: Reputation: 99
presence of /tmp/* in pkgconfig/*.pc files

After detecting a wrong value for libdir in glew*.pc, I thought of running
grep to see if there were other files
Code:
$ cd /usr/lib64/pkgconfig
$ grep -l /tmp/ *.pc
QtDesigner.pc
QtDesignerComponents.pc
QtUiTools.pc
Code:
$ grep /tmp/ QtDesigner.pc
Libs.private: -L/tmp/qt-everywhere-opensource-src-4.8.7/lib  -lQtScript -L/tmp/qt-everywhere-opensource-src-4.8.7/lib -lQtXml -lQtGui -L/usr/X11R6/lib64 -lQtCore -lpthread
Code:
$ grep /tmp/ QtDesignerComponents.pc
Libs.private: -L/tmp/qt-everywhere-opensource-src-4.8.7/lib  -lQtScript -L/tmp/qt-everywhere-opensource-src-4.8.7/lib -lQtXml -lQtGui -L/usr/X11R6/lib64 -lQtCore -lQtDesigner -lpthread
Code:
grep /tmp/ QtUiTools.pc
Libs.private: -L/tmp/qt-everywhere-opensource-src-4.8.7/lib  -lQtXml -L/tmp/qt-everywhere-opensource-src-4.8.7/lib -lQtGui -L/usr/X11R6/lib64 -lQtCore -lpthread
 
1 members found this post helpful.
  


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] What's @LIBDIR@ ? kabamaru Slackware 2 05-27-2012 05:43 AM
cmake: changing libdir hydraMax Programming 1 05-01-2012 11:01 PM
[SOLVED] GLEW won't build? marek3571 Linux - Software 2 08-21-2011 04:47 PM
Glew CentOS x64bit mitchell2345 Red Hat 8 09-23-2008 04:44 PM
Please also check that PKG_CONFIG_PATH contains ${libdir}/pkgconfig t1mc00per Linux - General 6 02-14-2003 10:58 AM

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

All times are GMT -5. The time now is 11:14 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration