LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
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-13-2014, 03:24 AM   #1
schmatzler
Member
 
Registered: Jan 2011
Location: Germany
Distribution: Slackware64 -current + Multilib
Posts: 411

Rep: Reputation: 181Reputation: 181
Rebuilding Firefox SlackBuild, problem with -rpath


Hi guys,

I need help again - obviously I am too dumb this time.

I tried building Firefox 30 with gstreamer 1.x support. gstreamer 1.x packages already exist, because I built them for Banshee a while ago.

The problem is: My gstreamer 1.x packages all reside in the prefix

Code:
/opt/gstreamer1-banshee/
So I modified the Firefox 30 Slackbuild and added these two lines:

Code:
export PKG_CONFIG_PATH=/opt/gstreamer1-banshee/usr/lib64/pkgconfig
export LDFLAGS="-L/opt/gstreamer1-banshee/usr/lib64" $LDFLAGS
Firefox builds and runs, BUT:

It can only find the gstreamer libraries if I start it up like this:

Code:
LD_LIBRARY_PATH=/opt/gstreamer1-banshee/usr/lib64 firefox
How can I modify the SlackBuild in order to start Firefox normally?

I also tried:

Code:
export LDFLAGS="-rpath,/opt/gstreamer1-banshee/usr/lib64"
which results in:

Code:
gcc: error: unrecognized command line option '-rpath,/opt/gstreamer1-banshee/usr/lib64'
Thanks for your help

Last edited by schmatzler; 06-13-2014 at 03:35 AM.
 
Old 06-13-2014, 04:22 AM   #2
ml4711
Member
 
Registered: Aug 2012
Location: Ryomgård, Danmark
Distribution: Slackware64
Posts: 146

Rep: Reputation: 103Reputation: 103
This works for me with several SlackBuild scripts.
Just add the line with the LDFLAGS, (notice the syntax for rpath).
You really want also to use the "-enable-new-dtags" option!

Code:
...
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
LDFLAGS="-Wl,-rpath,/opt/gstreamer1-banshee/usr/lib64,-enable-new-dtags" \
./configure \
...
To see the rpath:

Code:
readelf --dynamic /opt/Ocserv/lib64/libgnutls.so.28
...
0x000000000000000f (RPATH)              Bibliotekets rpath: [/opt/Ocserv/lib64]
0x000000000000001d (RUNPATH)            Bibliotekets runpath: [/opt/Ocserv/lib64]
...
Even with the rpath option,
you sometimes get som weird rpath/runpath, so if needed to repair them,
use chrpath (You find it on slackbuilds.org)

Code:
chrpath  -r  /opt/Ocserv/lib64 /opt/Ocserv/lib64/libgnutlsxx.so.28.1.0
Enjoy
 
1 members found this post helpful.
Old 06-13-2014, 04:32 AM   #3
55020
Senior Member
 
Registered: Sep 2009
Location: Yorks. W.R. 167397
Distribution: Slackware
Posts: 1,307
Blog Entries: 4

Rep: Reputation: Disabled
Quote:
Originally Posted by schmatzler View Post
So I modified the Firefox 30 Slackbuild and added these two lines:

Code:
export PKG_CONFIG_PATH=/opt/gstreamer1-banshee/usr/lib64/pkgconfig
export LDFLAGS="-L/opt/gstreamer1-banshee/usr/lib64" $LDFLAGS
Strictly speaking, there's a quote in the wrong place, though it doesn't seem to have upset your build:
Code:
export LDFLAGS="-L/opt/gstreamer1-banshee/usr/lib64 $LDFLAGS"
Quote:
Originally Posted by schmatzler View Post
Firefox builds and runs, BUT: It can only find the gstreamer libraries if I start it up like this:

Code:
LD_LIBRARY_PATH=/opt/gstreamer1-banshee/usr/lib64 firefox
Yes, that's right. If you do it this way, you can put a script into /etc/profile.d that sets LD_LIBRARY_PATH (some SlackBuilds add that to the package), or you can add /opt/gstreamer1-banshee/usr/lib64 to /etc/ld.so.conf (but it is often considered impolite for packages to do that), or you can create your own wrapper script for Firefox to set LD_LIBRARY_PATH (most packages that expect to live in /opt provide such a script to put into /usr/bin).

*Or*

You can set an rpath, like you already tried. Your build options are almost right, but, let's be honest, these gcc and ld control arguments (and environment variables) are *weird*, and there are several ways to do the same thing. If I've got it right, here are three possibilities:

Code:
export CFLAGS="-Wl,-rpath,/opt/gstreamer1-banshee/usr/lib64,-L/opt/gstreamer1-banshee/usr/lib64"
or
Code:
export LDFLAGS="-rpath=/opt/gstreamer1-banshee/usr/lib64 -L/opt/gstreamer1-banshee/usr/lib64"
or
Code:
export LDFLAGS="-L/opt/gstreamer1-banshee/usr/lib64"
export LD_RUN_PATH="/opt/gstreamer1-banshee/usr/lib64"
My choice would be the last one

To explain a bit more: (1) You need to set it as *both* a link path *and* a run path. (Probably). (2) This will work in a simple case, but Firefox is not a simple case, and if plugins etc. etc. don't work properly, it will need something more clever.
 
2 members found this post helpful.
Old 06-13-2014, 04:44 AM   #4
schmatzler
Member
 
Registered: Jan 2011
Location: Germany
Distribution: Slackware64 -current + Multilib
Posts: 411

Original Poster
Rep: Reputation: 181Reputation: 181
Thank you all! I am a lot wiser now.

I just did

Code:
LDFLAGS="-Wl,-rpath,/opt/gstreamer1-banshee/usr/lib64,-enable-new-dtags"
and that did the trick It is detecting gstreamer at startup now and I can enjoy music and videos without Flash.

Just out of curiosity: Am I doing anything wrong if I leave out the dtags option or LD_RUN_PATH?

Last edited by schmatzler; 07-31-2015 at 12:03 PM.
 
Old 06-13-2014, 05:14 AM   #5
55020
Senior Member
 
Registered: Sep 2009
Location: Yorks. W.R. 167397
Distribution: Slackware
Posts: 1,307
Blog Entries: 4

Rep: Reputation: Disabled
ml4711 is right, in general --enable-new-dtags is a good thing. It gets round lots of problems that you haven't had yet
LD_RUN_PATH=xxxx is just a different/easier way of saying -Wl,-rpath,xxxx
 
1 members found this post helpful.
Old 06-13-2014, 07:19 AM   #6
ml4711
Member
 
Registered: Aug 2012
Location: Ryomgård, Danmark
Distribution: Slackware64
Posts: 146

Rep: Reputation: 103Reputation: 103
If using -rpath,... without -enable-new-dtags,
it's not possible to use LD_LIBRARY_PATH to override the linker path!!

It's usefull in som cases, but it can give a lot of headache also.

Enjoy
 
2 members found this post helpful.
Old 06-13-2014, 09:16 AM   #7
1337_powerslacker
Member
 
Registered: Nov 2009
Location: Kansas, USA
Distribution: Slackware64-15.0
Posts: 862
Blog Entries: 9

Rep: Reputation: 592Reputation: 592Reputation: 592Reputation: 592Reputation: 592Reputation: 592
What would be the line to use in the SlackBuild if I were to use the GStreamer package which comes with Slackware?
 
Old 06-13-2014, 09:26 AM   #8
schmatzler
Member
 
Registered: Jan 2011
Location: Germany
Distribution: Slackware64 -current + Multilib
Posts: 411

Original Poster
Rep: Reputation: 181Reputation: 181
Quote:
Originally Posted by mattallmill View Post
What would be the line to use in the SlackBuild if I were to use the GStreamer package which comes with Slackware?
The whole fiddling with -rpath and LD_LIBRARY_PATH is only needed when you have gstreamer installed in a non-standard prefix like I did.

Building Firefox against Slackwares gstreamer 0.10.x is much easier, but Slackware only comes with gst-plugins-good.

You need to build gst-plugins-ugly from slackbuilds.org for MP3 support and gst-ffmpeg + ffmpeg for HTML5 video support.

After that, you can add "--enable-gstreamer" to the options in the firefox Slackbuild to build it with gstreamer-0.10 support.

Considering that gstreamer 0.10.x is end-of-life, I would strongly advise building Firefox against the newest branch. You can find SlackBuilds and packages for Slackware64 -current in my signature.
 
1 members found this post helpful.
Old 06-13-2014, 11:25 AM   #9
1337_powerslacker
Member
 
Registered: Nov 2009
Location: Kansas, USA
Distribution: Slackware64-15.0
Posts: 862
Blog Entries: 9

Rep: Reputation: 592Reputation: 592Reputation: 592Reputation: 592Reputation: 592Reputation: 592
Quote:
Originally Posted by schmatzler View Post
The whole fiddling with -rpath and LD_LIBRARY_PATH is only needed when you have gstreamer installed in a non-standard prefix like I did.

Building Firefox against Slackwares gstreamer 0.10.x is much easier, but Slackware only comes with gst-plugins-good.

You need to build gst-plugins-ugly from slackbuilds.org for MP3 support and gst-ffmpeg + ffmpeg for HTML5 video support.

After that, you can add "--enable-gstreamer" to the options in the firefox Slackbuild to build it with gstreamer-0.10 support.

Considering that gstreamer 0.10.x is end-of-life, I would strongly advise building Firefox against the newest branch. You can find SlackBuilds and packages for Slackware64 -current in my signature.
Thanks much for the help. It is greatly appreciated.
 
Old 06-13-2014, 01:09 PM   #10
1337_powerslacker
Member
 
Registered: Nov 2009
Location: Kansas, USA
Distribution: Slackware64-15.0
Posts: 862
Blog Entries: 9

Rep: Reputation: 592Reputation: 592Reputation: 592Reputation: 592Reputation: 592Reputation: 592
I wonder why Pat hasn't upgraded gstreamer from the 0.x.x branch, given that it is end-of-life.

Just curious.

Does the newest branch of gstreamer offer any compelling features to warrant an upgrade? Because otherwise, I'm not inclined to modify what already works, lest I break it in the process.
 
Old 06-13-2014, 02:18 PM   #11
schmatzler
Member
 
Registered: Jan 2011
Location: Germany
Distribution: Slackware64 -current + Multilib
Posts: 411

Original Poster
Rep: Reputation: 181Reputation: 181
Quote:
Originally Posted by mattallmill View Post
Does the newest branch of gstreamer offer any compelling features to warrant an upgrade? Because otherwise, I'm not inclined to modify what already works, lest I break it in the process.
That's exactly why I installed gstreamer 1.x into /opt, so I can keep all official packages without breaking anything.

I don't know of any big changes. I think they made a lot of improvements using hardware decoding with libvdpau, but Firefox doesn't use these features yet. On Banshee I made a backport of GST1 because it is much more stable. Didn't experience any crashes anymore, seeking in files works every time etc.
 
  


Reply



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
try using -rpath or -rpath-link knobby67 Programming 5 11-12-2015 02:04 PM
[SOLVED] Vanilla Firefox (Aurora) Slackbuild storkus Slackware 4 01-09-2013 12:37 AM
[SOLVED] Another compilation error (plasma-runtime). -rpath -rpath-link davepi Gentoo 1 08-21-2012 09:04 AM
Problem with mozilla-firefox slackbuild Phorize Slackware 6 02-19-2012 08:49 AM
Rebuilding a Slackware Package With Slackbuild Scripts Woodsman Slackware 11 10-14-2006 05:08 AM

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

All times are GMT -5. The time now is 05:45 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
Open Source Consulting | Domain Registration