octave-maintainers
[Top][All Lists]
Advanced

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

Re: Distinguish MEX files for different architectures


From: Przemek Klosowski
Subject: Re: Distinguish MEX files for different architectures
Date: Tue, 28 Jun 2011 13:14:22 -0400
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.17) Gecko/20110428 Fedora/3.1.10-1.fc15 Lightning/1.0b2 Thunderbird/3.1.10

On 06/28/2011 10:35 AM, Jordi GutiƩrrez Hermoso wrote:

The filename extension thing to me seems like an ugly hack. I've only
ever seen it done with mex files. There aren't .exe64 or .dll64 or
.so64 filename extensions in common use, so why does Matlab do it?
Surely it suffices to compile the code for the architecture you're
going to run it in?

Linux deals with this type of stuff by separate directory trees:
/usr/lib and /usr/lib64, for instance. The executables have hardwired
the correct path and pick up the appropriate binary. It definitely is a
better system when you have multiple packages sharing the disk space,
but even for private MEX files it's probably better to set up an
architecture-dependent path.

octave_config_info has a bunch of arch-dependent flags: archlibdir, for
instance, and the -march options on the *FLAGS* lines. It would be nice
to be able to write

   addpath(["./lib" octave_config_info.architecture])

to get a 64-bit octave to load MEX from the ./lib64 subdirectory but I
can't see anything that could be used directly.

I suppose one could extract the arch from octave_config_info.archlibdir
or other fields, but maybe there's a better way.


reply via email to

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