LinuxQuestions.org
Visit Jeremy's Blog.
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 11-08-2015, 07:41 PM   #1
whiskyjack
LQ Newbie
 
Registered: Aug 2015
Location: Central U.S.
Distribution: Slackware 14.1
Posts: 13

Rep: Reputation: Disabled
Unhappy firefox not found after using upgradepkg


I'm trying to upgrade from Firefox 24.1 to the latest stable version of Firefox (42.0). Here's what I did:

#tar -xf firefox.tarball
#cd ./extracted/firefox/files
#makepkg -p -l y ../firefox42.tgz
#cd ..
#upgradepkg old.firefoxfirefox42.tgz

Afterwards, I'm informed that the upgrade is complete (I hesitate to say 'successful'), and firefox42 is listed in /var/log/packages.

When I run:

$firefox

in the terminal I get "command not found".

What gives?
 
Old 11-08-2015, 08:17 PM   #2
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-15.0
Posts: 11,057

Rep: Reputation: Disabled
Probably you packaged the source files but not the executable files, because you failed to run the SlackBuild.

You do not have to run makepkg yourself, that should be done by the SlackBuild.

I won't tell you more now (3:15 AM here) but hopefully others will come to help you.

PS I see know your other thread. Learn the Slackware way of doing things and make sure you are acquainted with Slackware before attempting to compile from source, otherwise you are going to make your system unusable very fast.

Read http://docs.slackware.com/howtos:mis...with_slackware.

Last edited by Didier Spaier; 11-08-2015 at 08:22 PM. Reason: PS added.
 
Old 11-09-2015, 07:32 AM   #3
bassmadrigal
LQ Guru
 
Registered: Nov 2003
Location: West Jordan, UT, USA
Distribution: Slackware
Posts: 8,792

Rep: Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656
A much simpler option would be to use forum member ruario's latest-firefox script. You just run it with the optional -i option, and it will download the official mozilla package, repackage it into a slackware package, and (optionally) install it for you. This will always keep you up to date with either the latest version, or just the latest ESR.

The other option is to grab the source from mozilla and then use Pat's SlackBuild for -current to compile the latest version into a Slackware package (since you're running 14.1, you can't get the pre-compiled package from -current since there will be mismatched libraries).

Personally, I prefer ruario's script, since it means I can be on the latest version offered by Mozilla (in case Pat gets behind), and I don't need to take the time to compile it myself, but I do realize some prefer to have packages compiled for Slackware rather than generic packages just repackaged for Slackware.

He also offers a script for Chrome and Opera.
 
Old 11-09-2015, 10:43 AM   #4
whiskyjack
LQ Newbie
 
Registered: Aug 2015
Location: Central U.S.
Distribution: Slackware 14.1
Posts: 13

Original Poster
Rep: Reputation: Disabled
M. Spaier,

Could you perhaps indicate what features of Slackware I ought to become familiar with before attempting to compile from source? I presume you're indicating some subtleties within the operating system's design which would not be obvious to an initiate such as myself. I did, after all, migrate to Slackware for the purposes of gaining competencies in low-level system control.

bassmadrigal: If I ever bump into either you or ruario, I owe you each several libations.

Cheers!
-wisakedjak
 
Old 11-09-2015, 10:58 AM   #5
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-15.0
Posts: 11,057

Rep: Reputation: Disabled
Quote:
Originally Posted by whiskyjack View Post
M. Spaier,

Could you perhaps indicate what features of Slackware I ought to become familiar with before attempting to compile from source?
Mostly the packages' management system, that allows the user to track the origin of each system file. As explained in the aforementioned document, not using (directly or through front ends) the basic commands for managing packages (i.e. installpkg, removepkg or upgradepkg) make you lose that benefit as the packages's database will not reflect the state of the system. That being said, it's obviously up to you to value or not that feature.

PS of course using the SlackBuilds you do compile the programs for source. But in addition the scripts put the results in packages easy to install, remove and track: that's the added value of using them.

Last edited by Didier Spaier; 11-09-2015 at 11:03 AM. Reason: PS added.
 
Old 11-09-2015, 11:12 AM   #6
whiskyjack
LQ Newbie
 
Registered: Aug 2015
Location: Central U.S.
Distribution: Slackware 14.1
Posts: 13

Original Poster
Rep: Reputation: Disabled
M.Spaier,

It's not that I don't value the tools, but how I interpret your document (http://docs.slackware.com/howtos:mis...with_slackware) is that I shouldn't attempt to install any program for which a SlackBuild script has not already been written.

And now I will say something that might seem preposterously obvious! **One should learn to write SlackBuild scripts!**

Last edited by whiskyjack; 11-09-2015 at 11:14 AM. Reason: better URL formatting
 
Old 11-09-2015, 11:29 AM   #7
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-15.0
Posts: 11,057

Rep: Reputation: Disabled
Quote:
Originally Posted by whiskyjack View Post
It's not that I don't value the tools, but how I interpret your document (http://docs.slackware.com/howtos:mis...with_slackware) is that I shouldn't attempt to install any program for which a SlackBuild script has not already been written.
Yes, unless you can't use a SlackBuild to do te compilation because the source of the program is not available. But even then it is oftentimes possible to "re-package" it. In some cases the SlackBuild just repackage the binaries.

Quote:
And now I will say something that might seem preposterously obvious! **One should learn to write SlackBuild scripts!**
Yes, and that is not a daunting task: I am sure that you will learn that very fast. For instance you could have a look to these templates: http://www.slackbuilds.org/templates/ and study some of the SlackBuilds provided @ http://slackbuilds.org or just included in the /source directory of the Slackware mirrors.

Looking forward to your contributions to http://slackbuilds.org, see http://www.slackbuilds.org/guidelines/

Last edited by Didier Spaier; 11-09-2015 at 11:34 AM.
 
Old 11-09-2015, 01:05 PM   #8
bassmadrigal
LQ Guru
 
Registered: Nov 2003
Location: West Jordan, UT, USA
Distribution: Slackware
Posts: 8,792

Rep: Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656
Quote:
Originally Posted by whiskyjack View Post
It's not that I don't value the tools, but how I interpret your document (http://docs.slackware.com/howtos:mis...with_slackware) is that I shouldn't attempt to install any program for which a SlackBuild script has not already been written.

And now I will say something that might seem preposterously obvious! **One should learn to write SlackBuild scripts!**
I will humbly admit that I did a bunch of "bad" things when I first started with Slackware. I would grab random packages, sometimes grabbing for a different Slackware version than I was running (which I now know is a big no no, due to the high possibility of mismatched libs) and I would compile and install things directly from source without creating Slackware packages. My system had so many things that the package manager never knew about (I installed mplayer, with a HUGE list of dependencies all this way). I'm sure I created plenty of problems that gave me many headaches over the years. But, I also gained a knowledge I wouldn't have learned (at least not as quickly) on how programs work in Linux, how to manage dependencies manually, how to find fixes for compile errors, and how to track down causes from programs not starting up. I wouldn't trade my experience for anything.

That being said, I now wouldn't install anything on my system that isn't a Slackware package. If the programs are available on SBo, or someone's github, it certainly makes life easier, but even if it isn't, I'll still figure out what I need to compile it and either generate a SlackBuild, or just create a makepkg command to create my own package without a SlackBuild. I just value my stability too much to not be installing things that are difficult or timeconsuming to remove.

With all that out there, we can certainly work to figure out what you did that caused your problem, rather than just giving you alternatives around it. From your output and Didier's first post, it looks like you downloaded the Firefox source, extracted it, and then packaged it back up. If this is the actual sourceball, it won't work, because before you run makepkg, you need to compile the source and install it into a temporary directory. This typically includes running ./configure, make, and make install DESTDIR=$PKG. The key with making a Slackware package is the flag you throw to the make install command, namely the DESTDIR. This tells make install to install everything, replacing the root folder "/" $PKG variable (usually set to /tmp/package-program-name for official SlackBuilds and /tmp/SBo/package-program-name for SlackBuilds from SBo). Then, you take that folder, and create a Slackware package with it, using the makepkg command. This folder will have the same structure as your filesystem, and will include all the directories from the root up that contain files (just extract a Slackware package to see what I mean). Pat has quite the expansive firefox.SlackBuild file, including a number of options for the ./configure. Digging through that file (which is likely daunting at first, however, it is still just a bash script, and if you go slow enough, you can work your way logically through it) can give you insight on the best way to compile it to mirror how Pat makes them available. Or, you can just grab all the files in the folder that contains the firefox.SlackBuild, and you can just run the script yourself. [url=http://slackbuilds.org/mirror/slackware/slackware-current/source/xap/mozilla-firefox/]Here's the folder containing the source, and all the files needed to build Firefox v42. And if you want to build a newer version, just remove the tarball for v42 and replace it with the latest version at the time. The script will use whatever firefox source is in the directory.

The other possibility, is that you downloaded a prebuilt binary and then did a makepkg on the wrong folder. If you look at /var/log/packages/firefox42.tgz (or whatever it is actually called), you'll see all the files and where they're installed. If you don't see a firefox file in one of the locations found within your $PATH variable (typically, /usr/bin, /usr/local/bin, or /opt/bin), then even if you have the correct file installed, the system doesn't know where to look for it. Ruario's scripts just repackage the prebuilt binary. This binary might be larger than if you compiled it directly, because Mozilla will include some static dependencies so it'll work on the widest range of distros and versions.

If there are further questions, feel free to ask.
 
1 members found this post helpful.
Old 11-09-2015, 02:02 PM   #9
whiskyjack
LQ Newbie
 
Registered: Aug 2015
Location: Central U.S.
Distribution: Slackware 14.1
Posts: 13

Original Poster
Rep: Reputation: Disabled
M. Spaier,

Quote:
I am sure that you will learn that very fast.
You flatter me, sir.

Incidentally, for those who have stumbled upon this thread at a future date, the Slackware Wiki has a tutorial (http://www.slackwiki.com/Writing_A_SlackBuild_Script) that appears to be quite useful.

And bassmadrigal:

Ah! I was wondering at what this meant:
Quote:
...you packaged the source files but not the executable files...
And now it is mostly clear. There is one minor point in your last post that I'm uncertain on.

You mention that I should cd into my build environment and then
Code:
./configure && make && make install DESTDIR=$PKG
Is $PKG an environment variable set by ./configure, or is it set in the Makefile, or is it something that could be either?

Last edited by whiskyjack; 11-09-2015 at 02:04 PM. Reason: ridding this post of uneccessary tags
 
Old 11-09-2015, 02:48 PM   #10
bassmadrigal
LQ Guru
 
Registered: Nov 2003
Location: West Jordan, UT, USA
Distribution: Slackware
Posts: 8,792

Rep: Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656
Quote:
Originally Posted by whiskyjack View Post
You mention that I should cd into my build environment and then
Code:
./configure && make && make install DESTDIR=$PKG
Is $PKG an environment variable set by ./configure, or is it set in the Makefile, or is it something that could be either?
It is whatever you set it to. By default, SlackBuild scripts will usually set it to /tmp/package-program_name (for official Slackware packages) or /tmp/SBo/package-program_name (for scripts from slackbuilds.org). But, you can set this to any location you want. In fact, you don't need to set it beforehand, if you want to manually specify a location.

You could set it to something like make install DESTDIR=~/my_self_compiled_package. This is just used to override where make install will place the files (basically, if you didn't change it, it would be equivalent to make install DESTDIR=/. You just want to override it to a special directory, so you can then package those resulting files into a Slackware package.

./configure is used to specify where you eventually want the files installed. Options like --prefix=/usr would override the default /usr/local, but whatever DESTDIR is set to, will be placed before the prefixes specified in --prefix. I'll set up a very simplified version of a SlackBuild. This may help increase your knowledge.

PHP Code:
# This sets the program name, version, and build number (you can increase
# these as needed to allow for easy upgrades)

PRGNAM=firefox
VERSION
=42.0
BUILD
=1

# This is just used to determine if it's being built on a 32bit or 64bit
# computer.

MARCH=$( uname -)
if [ -
"$ARCH]; then
  
case "$MARCHin
    i
?86)    export ARCH=i586 ;;
    *)       
export ARCH=$MARCH ;;
  
esac
fi

# This stores the current directory (needed for the location of the source
# tarball), and sets the temporary directories for compiling and creating
# the package

CWD=$(pwd)
TMP=${TMP:-/tmp}
PKG=$TMP/pkg-$PRGNAM

#First, we'll remove the directory if it already exists so it can start
# fresh, then create the needed directories and cd to them, followed by
# extracting the source to that directory and cd to that.

rm -rf $PKG
mkdir 
-p $TMP $PKG
cd $TMP
rm 
-rf $PRGNAM-$VERSION
tar xvf $CWD
/$PRGNAM-$VERSION.tar.?z* || exit 1
cd $PRGNAM
-$VERSION || exit 1

# Now we run the configure with any needed options. It's best to check it
# yourself before you finalize the SlackBuild so you know what options you
# might need. 

./configure \
  --
prefix=/usr

# Start the compiling, and then, when finished, install all the files to
# $PKG, which is /tmp/pkg-firefox that was set and created earlier

make
make install DESTDIR
=$PKG

# Finally, change into the directory and then run the makepkg command,
# which will take all the files and create a slackware package, in this
# case, firefox-42.0-x86_64-1.txz

cd $PKG
/sbin/makepkg -l y -c n $TMP/$PRGNAM-$VERSION-$ARCH-$BUILD.txz 
There's a lot more that is actually needed to make sure you have a properly functioning Slackware package (the howtos should help you with that), but this should hopefully help break down what the SlackBuild can help you do, and that is make it extremely easy to duplicate your work. This is really handy if, for example, firefox comes out with v43, but Pat doesn't have a package out yet. You just do a quick modification of the version in the script, and then run it. It will keep all your configure options the same, run any patches you have set, run any sed lines, etc. It allows you to not waste your time digging through the ./configure --help output every time you need to upgrade your program.

Hopefully I haven't muddied the waters further. If you have any questions, feel free to ask.
 
  


Reply

Tags
firefox, package management, upgradepkg



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
ldconfig: command not found upon sudo upgradepkg of glibc-zoneinfo thirdm Slackware 4 10-29-2014 11:20 AM
anyone know why upgradepkg did this? dimm0k Slackware 7 08-10-2011 07:54 PM
[SOLVED] upgradepkg worked; now Firefox won't start BrutalMusic Linux - Newbie 9 06-28-2010 02:01 PM
how to use upgradepkg somae Slackware 4 06-07-2007 06:04 AM
upgradepkg -- what is it used for? arcanex Slackware 3 04-06-2007 02:46 AM

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

All times are GMT -5. The time now is 11:43 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