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.
I installed a new version of Slackware, installed GCC:
Code:
slackpkg install gcc-4.8.2-x86_64-1
Then, when trying to install ocaml with:
Code:
sbopkg -i "ocaml ocaml-findlib"
the install fails with this message:
Code:
ocaml-4.01.0/yacc/symtab.c
ocaml-4.01.0/yacc/verbose.c
ocaml-4.01.0/yacc/warshall.c
patching file configure
Configuring for a x86_64-slackware-linux-gnu ...
gcc found
Unable to compile the test program.
Make sure the C compiler gcc -O is properly installed.
I'm new to Slackware and cannot discern where the GCC package is located to see if the optimize capability for GCC was turned off.
Is optimization for GCC usually turned off? Is there a global setting I can use to activate it?
Was this a clean install or an upgrade from a previous system? Did you do a full install? Slackware works best when you do a full install. All Slackbuilds have been tested against the version of Slackware they are cleared for to make sure it works. Something is off with your box.
It was an image from stacklet.com that I installed on my Debian Xen server.
Code:
Xen 3/Xen 4 Slackware 14.1 242 x86-64 Slackware 14.1 Lightweight for Xen on x86-64
I had tried installing arch-linux and frankly in the last two days, I have found it difficult to segregate what distribution offers what. Given your suggestion about a "full" installation and that the image above is titled "Lightweight", I wonder if there is a method one can use to take a minimial install and load it up? I think it was arch-linux that had various flavors you could upgrade to, e.g. Emacs, "X" &etc., but I didn't find such categorization for Slackware. Is there such?
Just use slackpkg to upgrade and/or install all the packages. You'll need to edit /etc/slackpkg/mirrors and pick a mirror that holds Slackware64 14.1 (make sure you select a 64bit version!). To use that mirror, just remove the "#" in front of it. Then run the following. Once you're done and install-new is completed, you should be able to compile that program.
Code:
slackpkg update gpg #only needed to run the first time you use the program
slackpkg update #updates the internal system to know what packages and versions are available
slackpkg upgrade-all #upgrades any outdated packages with the latest version
slackpkge install-new #installs any packages in the official repo that aren't currently installed
One big difference between Arch and Slackware is Arch operates on a rolling release, which means they'll update various packages at various times never culminating in a release. Slackware has a -current tree which will run newer programs and is generally the testing ground for Slackware users, but it'll eventually lead to a release, the latest being 14.1. There is speculation that 14.2 is on the horizon, but only Pat knows when that may happen.
Slackware does have various categories that software falls into. You can see it during installation. But they not designed to be like Arch's. The categories include kernel, kde, xorg, libraries, development, etc
(I had selected several and then found the instruction that said "ONLY ONE" -- this differs from Gentoo's approach.)
I then executed the steps you provided and tried installing ocaml and got the same error message that caused me to create this posting. Perhaps the problem is with the installer sbopkg? Where would I find the packages being staged so I can go in and manually try ./configure and make to duplicate the error?
That's weird, I just checked remotely (I love JuiceSSH on my phone) and both packages compiled successfully using the command you posted. Something is still wrong with your box :/ (I'm running 14.1 64bit)
Unless you changed the defaults, sbopkg programs are decompressed and compiled under /tmp/SBo/$PROGRAM-$VERSION and then the packages are "installed" under /tmp/SBo/package-$PROGRAM which is then used to create the package you install. The packages are then stored in the root /tmp directory (they'll be labelled as $PROGRAM-$VERSION-$ARCH-1_SBo.txz
If you continue to have issues, it may be worth just installing a full version of Slackware in your VM from the DVD iso. It isn't too difficult (contrary to popular belief -- text-based =/= difficult), and if you run into any issues, we can certainly help you out. See the wiki for a good tutorial (http://docs.slackware.com/slackware:install)
jlpoole,
please see /tmp/SBo/ocaml-4.01.0/status.log for real cause of error, this file usually has the test source which doesn't compile, the full compile command and the compiler error message.
Often it is missing binutils package or something similar from d/.
jlpoole,
please see /tmp/SBo/ocaml-4.01.0/status.log for real cause of error, this file usually has the test source which doesn't compile, the full compile command and the compiler error message.
Often it is missing binutils package or something similar from d/.
Thank you, at least I now know where things are happening -- that is very helpful.
The Sbo session log shows (nothing new):
Code:
root@localhost:/tmp# tail -n 30 /var/log/sbopkg/sbopkg-build-log
patching file configure
Configuring for a x86_64-slackware-linux-gnu ...
gcc found
Unable to compile the test program.
Make sure the C compiler gcc -O is properly installed.
ocaml:
Would you like to continue processing the rest of the
queue or would you like to abort? If this failed
package is a dependency of another package in the queue
then it may not make sense to continue.
(Y)es to continue, (N)o to abort, (R)etry the build?: n
+++++++++++++++++++++++++++++++++++++++++++
SUMMARY LOG
Using the SBo repository for Slackware 14.1
Queue Process: Download, build, and install
ocaml:
MD5SUM check for ocaml-4.01.0.tar.xz ... OK
MD5SUM check for ocaml-4.01-refman-html.tar.gz ... OK
Error occurred with build. Please check the log.
+++++++++++++++++++++++++++++++++++++++++++
###########################################
Queue process complete!
###########################################
root@localhost:/tmp#
There are no logs under /tmp:
Code:
root@localhost:/tmp# pwd
/tmp
root@localhost:/tmp# find . -type f -name "*.log"
root@localhost:/tmp# ls
SBo/
root@localhost:/tmp# ls SBo/
ocaml-4.01.0/ package-ocaml/
root@localhost:/tmp#
Armed with the helpful leads from other posters, I now know where the work area is and can commence a meaningful inquiry.
Here's the possible code sections that are complaining:
Code:
root@localhost:/tmp/SBo/ocaml-4.01.0# cat configure |grep -n -B 15 -A 3 Unable
351-esac
352-
353-# Configure compiler to use in further tests
354-
355-cc="$bytecc -O $bytecclinkopts"
356-export cc cclibs verbose
357-
358-# Check C compiler
359-
360-sh ./runtest ansi.c
361-case $? in
362- 0) echo "The C compiler is ANSI-compliant.";;
363- 1) echo "The C compiler $cc is not ANSI-compliant."
364- echo "You need an ANSI C compiler to build OCaml."
365- exit 2;;
366: *) echo "Unable to compile the test program."
367- echo "Make sure the C compiler $cc is properly installed."
368- exit 2;;
369-esac
370-
371-# Check the sizes of data types
372-
373-echo "Checking the sizes of integers and pointers..."
374-set `sh ./runtest sizes.c`
375-case "$2,$3" in
376- 4,4) echo "OK, this is a regular 32 bit architecture."
377- echo "#undef ARCH_SIXTYFOUR" >> m.h
378- arch64=false;;
379- *,8) echo "Wow! A 64 bit architecture!"
380- echo "#define ARCH_SIXTYFOUR" >> m.h
381- arch64=true;;
382- *,*) echo "This architecture seems to be neither 32 bits nor 64 bits."
383- echo "OCaml won't run on this architecture."
384- exit 2;;
385: *) echo "Unable to compile the test program."
386- echo "Make sure the C compiler $cc is properly installed."
387- exit 2;;
388-esac
root@localhost:/tmp/SBo/ocaml-4.01.0#
So I tried this and see now what may be the cause of the problem:
Code:
root@localhost:/tmp/SBo/ocaml-4.01.0# ./configure --verbose
Configuring for a x86_64-unknown-linux-gnu ...
gcc found
runtest: gcc -O -o tst ansi.c
/usr/libexec/gcc/x86_64-slackware-linux/4.8.2/cc1: error while loading shared libraries: libmpc.so.2: cannot open shared object file: No such file or directory
Unable to compile the test program.
Make sure the C compiler gcc -O is properly installed.
root@localhost:/tmp/SBo/ocaml-4.01.0#
That seems to have fixed that error/ommission, to wit the error that brought me to creating this thread. Now I have another hurdle to face:
Code:
root@localhost:/tmp/SBo/ocaml-4.01.0# ./configure --verbose
Configuring for a x86_64-unknown-linux-gnu ...
gcc found
runtest: gcc -O -o tst ansi.c
gcc: error trying to exec 'as': execvp: No such file or directory
Unable to compile the test program.
Make sure the C compiler gcc -O is properly installed.
root@localhost:/tmp/SBo/ocaml-4.01.0#
Please note that gcc cannot execute "as", and it is part of binutils, as I remember. If
ls /var/adm/packages/binutils-*
says that no this file,
# slackpkg install binutils
does the trick.
Bingo! The problem is, indeed, my environment is incomplete.
bormant's suggestion proved valuable:
Code:
root@localhost:/tmp/SBo/ocaml-4.01.0/config/auto-aux# slackpkg search binutil
Looking for binutil in package list. Please wait... DONE
The list below shows all packages with name matching "binutil".
[uninstalled] - binutils-2.23.52.0.1-x86_64-2
You can search specific files using "slackpkg file-search file".
root@localhost:/tmp/SBo/ocaml-4.01.0/config/auto-aux# slackpkg install binutils
...
I then proceeded with the original install:
Code:
root@localhost:/tmp# sbopkg -i "ocaml ocaml-findlib"
... [good things happening] ...
** OCaml configuration completed successfully **
ocaml.SlackBuild.build: line 80: make: command not found
ocaml:
Shoot... not even "make" was installed. At this point I'm going to roll up my sleeves and do what had been earlier suggested: build a complete environment from scratch. <sigh, but at least I've determined the problem thanks to the collective help of everyone who contributed here.>
Shoot... not even "make" was installed. At this point I'm going to roll up my sleeves and do what had been earlier suggested: build a complete environment from scratch.
Why from scratch?
# slackpkg install d
and unselect unneeded, may be objc, ada, cobol and so on if you know what are you doing :-)
# slackpkg install l
and don't unselect anything, if you know what I mean.
PS. "l" is lowcase L, not i. d and l is the series names, so slackpkg will offer uninstalled packages from these series. If you feel brave you can specify more than one series (or package name) at a time and sort things out by hands...
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.