SlackwareThis 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.
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.
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.
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.
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.
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.
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
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.
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.
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 -m ) if [ -z "$ARCH" ]; then case "$MARCH" in 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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.