From help-octave-request at bevo dot che dot wisc dot edu Tue Jun 12 10:13:55 2001 Subject: clues to statically building octave w/extensions? From: "John W. Eaton" To: "A. Danial" Cc: help-octave at bevo dot che dot wisc dot edu Date: Tue, 12 Jun 2001 10:13:07 -0500 On 11-Jun-2001, A. Danial wrote: | In an earlier post (http://www.octave.org/mailing-lists/help-octave/2001/622) | I mentioned not being able to run mkoctfile (2.1.34) on an AIX | 4.3.2 system w/gcc 2.95.2. Although I don't know what the problem | is for sure, I think it has to do with gcc's not accepting the | -rdynamic flag. | | In any case I've gotten nowhere trying to build a gcc on AIX that | lets mkoctfile run. Since I'm tired of having my AIX systems lag my | linux boxes (where everything always works fine, first time), I | figured I should take another approach to adding extensions to | octave. Instead of building dynamically loaded executables I'm | willing to rebuild the entire octave install each time I want to | add a .oct file. | | Are there any instructions/hints/clues that explain what I need to | do to the octave sources to statically compile in my own | functions? If someone could explain how to do this with | oregonator.cc I'll try to figure it out from there, and also will | document the procedure for possible future inclusion in a future | release of the octave docs. -- Al I assume you are using 2.1.x. As Dirk said, you can drop the functions in with the sources, and that's about it. If you put the functions in the src/DLD-FUNCTIONS directory, then you would also need to add the names of the .cc files to the DLD_XSRC list in src/Makefile.in and then run CONFIG_FILES=src/Makefile ./config.status make in the top-level build directory. But a better solution would be to figure out why dynamic linking doesn't work, and fix the real problem. I don't think it is because -rdyanmic is not recognized, or anything wrong with your gcc. Since the trouble you mentioned earlier was that the linker was giving undefined symbol errors, I suspect that you need to either find a flag to tell the linker to ignore them. Then they are are resolved at run time when the object file is loaded, because the symbols are already available in the libraries that are linked with Octave. Another possibility is that there is no flag like that for the AIX linker, and you need to modify the mkoctfile script to link each .oct file with the same list of libraries that Octave itself is linked against. I no longer have access to a system running AIX 4.x, so can you please help us solve this problem? Thanks, jwe ------------------------------------------------------------- Octave is freely available under the terms of the GNU GPL. Octave's home on the web: http://www.octave.org How to fund new projects: http://www.octave.org/funding.html Subscription information: http://www.octave.org/archive.html -------------------------------------------------------------