octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

linking (DLD_FUCTION)s give .dll files but not .oct files. (MinGW build


From: John W. Eaton
Subject: linking (DLD_FUCTION)s give .dll files but not .oct files. (MinGW build 3.3.50+)
Date: Fri, 15 Jan 2010 22:06:03 -0500

On 10-Jan-2010, Tatsuro MATSUOKA wrote:

| In linking (DLD_FUCTION)s in MinGW environments using development source 
trees, I found that link
| processes give .dll files but not .oct files.  In version 3.2 or before, the 
link precesses give .oct
| files.
| 
| Are these correct?

We are still creating .oct files, but they are just links (or copies,
if your system cannot create symbolic links) to the .dll or .so or
whatever files that your system can load with dlopen or similar
library function.

Since we are using libtool, the targets in the Makefile are not the
libraries themselves, but are instead libtool .la files, which are
simple text files that contain information about what files have been
compiled.  When libtool creates the .la file, it also generates the
actual library files.  For example, on my system the
src/DLD-FUNCTIONS/svd.la file contains the following lines

  # svd.la - a libtool library file
  # Generated by ltmain.sh (GNU libtool) 2.2.6b Debian-2.2.6b-2
  #
  # Please DO NOT delete this file!
  # It is necessary for linking the library.

  # The name that we can dlopen(3).
  dlname='svd.so.0'

  [...]

The svd.so.0 file is stored in the directory src/DLD-FUNCTIONS/.libs.
Then there are some rules generated at configure time and saved to the
file src/DLD-FUNCTIONS/module.mk that say how to create the
corresponding .oct file.  For example, for svd.oct, the rule is

  DLD-FUNCTIONS/svd.oct: DLD-FUNCTIONS/svd.la
          rm -f $@
          la=`echo $< | $(SED) 's,DLD-FUNCTIONS/,,'` && \
            of=`echo $@ | $(SED) 's,DLD-FUNCTIONS/,,'` && \
            cd DLD-FUNCTIONS && \
            $(LN_S) .libs/`$(SED) -n -e "s/dlname='\([^']*\)'/\1/p" < $$la` $$of

This rule extracts the name of the library (.so, .dll, or whatever)
from the .la file and creates a link to (or copy of) it with the name
svd.oct.

So yes, after a successful build, your system should have a set of
.oct files.  But I think the links (copies) are made last, after all
the libraries have been compiled and linked.  So if the build process
stops early, the .oct files might not be present.

jwe


reply via email to

[Prev in Thread] Current Thread [Next in Thread]