From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: a07f3367d7,222ed89632aabb93 X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.180.105.38 with SMTP id gj6mr181818wib.0.1343090605710; Mon, 23 Jul 2012 17:43:25 -0700 (PDT) Path: q11ni52173613wiw.1!nntp.google.com!volia.net!news2.volia.net!feed-A.news.volia.net!border1.nntp.ams2.giganews.com!border2.nntp.ams2.giganews.com!border4.nntp.ams.giganews.com!border2.nntp.ams.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!ctu-peer!news.nctu.edu.tw!goblin2!goblin.stu.neva.ru!aioe.org!eternal-september.org!feeder.eternal-september.org!mx04.eternal-september.org!.POSTED!not-for-mail From: Ludovic Brenta Newsgroups: comp.lang.ada Subject: Re: Free AMD Core Math Library (BLAS/LAPACK) + Ada Date: Sun, 15 Jul 2012 19:42:10 +0200 Organization: A noiseless patient Spider Message-ID: <87txx8yl8t.fsf@ludovic-brenta.org> References: <41b74e89-f112-4791-883d-236080652dbf@googlegroups.com> <37b4ba31-245e-44d1-9183-5c3367c88101@googlegroups.com> <2db42c1b-cfd4-4a6f-9e0c-ce269ddf00c5@googlegroups.com> <7cadf109-e24a-45eb-9d7c-354d8899eec4@googlegroups.com> <3f14ee5a-d055-4252-ab45-7ca512a23fac@googlegroups.com> <9cc53435-3c7f-4443-8209-5137b9377aca@googlegroups.com> <583b29e2-3f75-4b0a-8f1a-802b3d6e502c@googlegroups.com> <34139f6f-5905-4c9e-a873-0b2445a1fccd@googlegroups.com> Mime-Version: 1.0 Injection-Info: mx04.eternal-september.org; posting-host="82e29ee268e884fcdafe06006538d3eb"; logging-data="13266"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19EomrKRM3jeWApBjPK2KeQ" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.4 (gnu/linux) Cancel-Lock: sha1:wG+QwMe9hKhiCem6Po6L+2x4Nq4= sha1:ZEA8dL/FeP2Flkejez3Zw9Tflks= Content-Type: text/plain; charset=us-ascii Date: 2012-07-15T19:42:10+02:00 List-Id: Simon Wright writes on comp.lang.ada > Ada novice writes: > >> locate libblas >> /etc/alternatives/libblas.so.3gf >> /usr/lib/libblas >> /usr/lib/libblas.so.3gf >> /usr/lib/atlas-base/atlas/libblas.so.3gf >> /usr/lib/atlas-base/atlas/libblas.so.3gf.0 >> /usr/lib/libblas/libblas.so.3gf >> /usr/lib/libblas/libblas.so.3gf.0 > >> Simon, I do not have libblas.a and libblas.so as you wrote in your >> last post that I should. > > I have no idea how they got into my system! but that's what's missing. If you don't know what package provides a file: dpkg -S /full/path/to/the/file > When you say '-lblas' that tells the linker to look for libblas.so (or > maybe libblas.a, I'm not sure of the rules). It looks in various places; > the default will certainly include /usr/lib/. The compiler looks only for libblas.so. If you want to link statically against libblas.a, you don't say -lblas but /usr/lib/libblas.a instead. > I think we should create libblas.so there. You will need to do this as > root; be very careful! (if anyone else is listening and knows a better > way, please say so ...) Install the -dev package corresponding to the runtime library package containing libblas.so.3gf, per Debian Policy section 8.4[1] and as discussed at excruciating length in the Debian Policy for Ada[2], section 3, "Ada and shared libraries". [1] http://www.debian.org/doc/debian-policy/ch-sharedlibs.html#s-sharedlibs-dev [2] http://people.debian.org/~lbrenta/debian-ada-policy.html#Ada-and-shared-libraries libblas is a little special because there are two different libblases. On the one hand: * libblas3 provides /usr/lib/libblas/libblas.so.3gf -> libblas.so.3gf.0 * libblas-dev provides /usr/lib/libblas/libblas.so -> libblas.so.3gf On the other hand: * libatlas3-base provides /usr/lib/libblas/libblas.so.3 -> libblas.so.3.0 * libatlas-base-dev provides /usr/lib/atlas-base/atlas/libblas.so -> libblas.so.3 [3] http://packages.debian.org/search?searchon=contents&keywords=libblas.so&mode=exactfilename&suite=testing&arch=any The reason why neither package provides /usr/lib/liblas.so* is so you can install them both simultaneously and select which one provides the canonical /usr/lib/libblas.so.* using the alternatives system, which exists for just this purpose. Note that the two libraries have different sonames (libblas.so.3gf as opposed to libblas.so.3) and are therefore probably incompatible. This means that after you've selected one of the two libraries, using the alternatives system, you will create a binary executable program that depends on that library and will not work with the other. > This sequence will create a symbolic link or symlink in /usr/lib/ so > that when the linker looks for libblas.so it finds it, and when it > opens it the system chases the symlink(s) until it finds a real file, > which is what gets opened. 'ln -s' creates a symlink; 'man ln' for > more info. It is bad advice to modify anything under / or /usr by hand; these directories are under sole control of the Debian packaging system (or whichever distribution you use). If you're going to mess with files manually, do that under /usr/local, which exists for this very purpose. As a general rule, do not interfere with dpkg! > Again, be careful. You may want to practice first, using your normal > account in some scratch directory. > > $ cd /usr/lib > $ su > Password: enter root's password here > # ln -s libblas.so.3gf libblas.so > # exit > $ As I said: don't do that. Ever. Let the alternatives system do that for you in a controlled way. If you don't know about the alternatives system, read the update-alternatives(8) man page. You should use update-alternatives manually only in very rare cases; most often, installing one of libatlas-base-dev or libblas-dev should update the alternatives automatically for you, possibly with an interactive menu asking you which one to use; read carefully what dpkg says when it installs the packages. Hope this helps -- Ludovic Brenta.