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 use Slackware64-current.
I have a working nvidia/cudatoolkit/cudnn setup.
I have this in my .bashrc:
Code:
CUDA_HOME=/usr/share/cuda
I installed those deps from sbopkg (may have a few others previously installed not listed here):
openblas
protobuf
hdf5
gflags
glog
lmdb
leveldb
snappy
I did:
Code:
git clone https://github.com/BVLC/caffe.git
sed -e "s/# USE_CUDNN := 1/USE_CUDNN := 1/" caffe/Makefile.config.example > caffe/Makefile.config
sed -i -e "s/CUDA_DIR := \/usr\/local\/cuda/CUDA_DIR := \/usr\/share\/cuda/" caffe/Makefile.config
sed -i -e "s/BLAS := atlas/BLAS := open/" caffe/Makefile.config
sed -i -e "s/\/usr\/lib/\/usr\/lib64/" caffe/Makefile.config
sed -i -e "s/\/usr\/local\/include/\/usr\/include/" caffe/Makefile.config
sed -i -e "s/# OPENCV_VERSION := 3/OPENCV_VERSION := 3/" caffe/Makefile.config
# to get rid of => nvcc fatal : Unsupported gpu architecture 'compute_20'
sed -i -e "s/-gencode arch=compute_20,code=sm_20//" caffe/Makefile.config
sed -i -e "s/-gencode arch=compute_20,code=sm_21//" caffe/Makefile.config
make all -j8
make test
make runtest
Everything is ok, but now I have no idea how to make a package from this.
Neither do I, frankly, because the information is a bit garbled and the make procedure a bit odd. Some of those appear to have non standard make systems.
The usual thing I do is grep the Makefile for DESTDIR
Code:
grep DESTDIR Makefile*
If the DESTDIR is there, simply use an install directory. I use /tmp/pack. Run
Code:
make DESTDIR=/tmp/pack install
at the install stage
If there's a non standard make system, you may have to copy files into /tmp/pack. /tmp/pack is the / for your package, so you would use /tmp/pack/usr/lib64 or whatever.
It's simple. Create the package directories manually, copy the built binaries and other stuff you need into those directories, add a slack-desc file and some documentation, then call makepkg.
If you think that that's not simple then simply search slackbuilds.org for a SlackBuild script that does roughly the same and use that for your own package.
I would expect replacements for libGL.so and other libraries, and a few executable binaries. Nvidia is a reasonably orderly in their packages. Is there a Makefile? It will have an install section. Otherwise, it's in the bash script.Includes are usually given, not made. Check subdirectories.
I have this in the Makefile:
LIB_BUILD_DIR := $(BUILD_DIR)/lib
I searched the folders, there's only empty bin and lib folders in ./distribute
Something also annoying is that the CMake build doesn't seem to use the Makefile.config
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.