[Scons-users] Custom Builder Problems

Marc Joliet marcec at gmx.de
Thu Dec 19 20:48:00 EST 2013


Am Thu, 19 Dec 2013 16:16:52 -0800
schrieb Sean McCauliff <Sean.D.McCauliff at nasa.gov>:


> Hi I'm new to Scons. Sorry if this has been asked before.

>

> I'm trying to create a custom builder for mex files. These are shared

> libraries that are then linked into Matlab at run time. I've run into

> one or two custom builders for mex files but I'm not able to get them to

> work so I decided I would just write my own.


Have you run into mine, too [0]? It's not particularly well done (it was my
first SCons tool), but I know it can work because I use it for my own Mex
extension, for which it has yet to fail.

The difference to your approach (and the one from the SCons Wiki) is that I wrapped
the SharedLibrary builder, as opposed to using the mex executable, following [1].

One thing I can mention if you try this route (be it with or without my tool):
you have to pass "-fno-reorder-blocks" to GCC starting with version 4.5,
otherwise MATLAB crashes (don't ask me why, maybe because of ABI
incompatibilities with its bundled libraries, but that's just a guess).

If you *did* try it and it failed for you for whatever reason and the above
doesn't help, I would definitely like to know!


> Any help would be appreciated.

>

> Thanks,

> Sean


[0] https://github.com/marcecj/scons_matlab
[1]
http://www.mathworks.de/de/help/matlab/matlab_external/custom-building-mex-files.html

HTH
--
Marc Joliet
--
"People who think they know everything really annoy those of us who know we
don't" - Bjarne Stroustrup
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: not available
Url : http://four.pairlist.net/pipermail/scons-users/attachments/20131220/eb829e9c/attachment.pgp


More information about the Scons-users mailing list