Compiled binary for OS X

Help
xApple
2008-04-27
2013-04-17
  • xApple

    xApple - 2008-04-27

    Do you think it would be possible to offer a precompiled binary for OS X ?
    I'm having trouble compiling it from the sources files for my OS (Mac OS X 10.5.2)...
    This must surely be easy for you.

    Thanks a lot !

     
    • Mistar Oblivion

      Mistar Oblivion - 2009-06-11

      I think the way that mym hooks into mysql and zlib precludes this, though I am uncertain.

      If you are having problems compiling, perhaps you could post your errors here?

       
  • Anonymous - 2009-11-09

    I have compiled mym for **maci** architecture (Matlab 2009a), however am getting errors for the **maci64** architecture (Matlab 2009b).  I can post my mym.mexmaci if it would helpful.

     
  • Anonymous - 2010-03-16

    I have been able to compile this on mac 10.6.2 with the following command line:

    /Applications/MATLAB_R2009b.app/bin/mex -v -maci64 -I../mysql-connector-c-6.0.2-osx10.5-x86-64bit/include/ -I/Applications/MATLAB_R2009b.app/extern/include/ -L/Applications/MATLAB_R2009b.app/bin/maci64/ -L../mysql-connector-c-6.0.2-osx10.5-x86-64bit/lib/ -lz -lmysqlclient_r -lSystemStubs -lpthread mym.cpp

    Unfortuntely, upon running mym from matlab I get:

    >> mym
    ??? Invalid MEX-file '/Users/cp/Downloads/mym_src_v1.0.9/mym.mexmaci64': dlopen(/Users/cp/Downloads/mym_src_v1.0.9/mym.mexmaci64, 1):
    Library not loaded: libmysql.16.dylib
      Referenced from: /Users/cp/Downloads/mym_src_v1.0.9/mym.mexmaci64
      Reason: image not found.

    I think this is due to the whole @loader mechanism in OS X. I think this could be solved by linking the libraries statically. How do I do that with mex?

    Thanks
    CRP

     
  • CKF

    CKF - 2012-04-09

    Disclaimer: I'm a matlab user, not a very experienced programmer.

    I'm trying to install mym using the matlab compiler on R2011a on a mac with 10.7 and xCode 4.3.  I've installed the patch to allow mex to use gcc, but I'm constantly getting errors when I run:

    >> mex -I/usr/include -I/usr/include/c++/4.2.1 -L/usr/lib -lz -lmysqlclient mym.cpp

    I get:

    mym.cpp: In function 'void fancyprint(MYSQL_RES*)':
    mym.cpp:143: warning: format '%d' expects type 'int', but argument 3 has type 'ulong'
    mym.cpp:143: warning: format '%d' expects type 'int', but argument 3 has type 'ulong'
    Undefined symbols for architecture x86_64:
      "_mxCreateNumericArray_700", referenced from:
          deserialize(char const*, unsigned long)in mym.o
          deserializeArray(char const*, unsigned long)in mym.o
      "_mxCalloc", referenced from:
          deserialize(char const*, unsigned long)in mym.o
          serializeBinary(unsigned long&, mxArray_tag const*, char const*, bool)in mym.o
          deserializeArray(char const*, unsigned long)in mym.o
          deserializeStruct(char const*, unsigned long)in mym.o
          deserializeCell(char const*, unsigned long)in mym.o
          serializeFile(unsigned long&, mxArray_tag const*, char const*, bool)in mym.o
          serializeString(unsigned long&, mxArray_tag const*, char const*, bool)in mym.o
          …
      "_mxGetData", referenced from:
          deserialize(char const*, unsigned long)in mym.o
          serializeBinary(unsigned long&, mxArray_tag const*, char const*, bool)in mym.o
          deserializeArray(char const*, unsigned long)in mym.o
          serializeString(unsigned long&, mxArray_tag const*, char const*, bool)in mym.o
          serializeArray(unsigned long&, mxArray_tag const*, char const*, bool)in mym.o
      "_mxFree", referenced from:
          deserialize(char const*, unsigned long)in mym.o
          deserializeArray(char const*, unsigned long)in mym.o
          deserializeStruct(char const*, unsigned long)in mym.o
          serializeFile(unsigned long&, mxArray_tag const*, char const*, bool)in mym.o
          serializeCell(unsigned long&, mxArray_tag const*, char const*, bool)in mym.o
          serializeStruct(unsigned long&, mxArray_tag const*, char const*, bool)in mym.o
          _mexFunction in mym.o
          …
      "_mxGetNaN", referenced from:
          global constructors keyed to _Z11deserializePKcmin mym.o
      "_mxGetNumberOfElements", referenced from:
          serializeBinary(unsigned long&, mxArray_tag const*, char const*, bool)in mym.o
          deserializeArray(char const*, unsigned long)in mym.o
          serializeArray(unsigned long&, mxArray_tag const*, char const*, bool)in mym.o
          serializeCell(unsigned long&, mxArray_tag const*, char const*, bool)in mym.o
          serializeStruct(unsigned long&, mxArray_tag const*, char const*, bool)in mym.o
      "_mxGetElementSize", referenced from:
          deserializeArray(char const*, unsigned long)in mym.o
          serializeArray(unsigned long&, mxArray_tag const*, char const*, bool)in mym.o
      "_mxGetImagData", referenced from:
          deserializeArray(char const*, unsigned long)in mym.o
          serializeArray(unsigned long&, mxArray_tag const*, char const*, bool)in mym.o
      "_mxCreateStructArray_700", referenced from:
          deserializeStruct(char const*, unsigned long)in mym.o
      "_mxSetFieldByNumber_700", referenced from:
          deserializeStruct(char const*, unsigned long)in mym.o
      "_mxCreateCellArray_700", referenced from:
          deserializeCell(char const*, unsigned long)in mym.o
      "_mxSetCell_700", referenced from:
          deserializeCell(char const*, unsigned long)in mym.o
          _mexFunction in mym.o
      "_mxGetDimensions_700", referenced from:
          serializeFile(unsigned long&, mxArray_tag const*, char const*, bool)in mym.o
          serializeString(unsigned long&, mxArray_tag const*, char const*, bool)in mym.o
          serializeArray(unsigned long&, mxArray_tag const*, char const*, bool)in mym.o
          serializeCell(unsigned long&, mxArray_tag const*, char const*, bool)in mym.o
          serializeStruct(unsigned long&, mxArray_tag const*, char const*, bool)in mym.o
          _mexFunction in mym.o
      "_mxGetString_700", referenced from:
          serializeFile(unsigned long&, mxArray_tag const*, char const*, bool)in mym.o
          serializeString(unsigned long&, mxArray_tag const*, char const*, bool)in mym.o
          getstring(mxArray_tag const*) in mym.o
      "_mxGetNumberOfDimensions_700", referenced from:
          serializeString(unsigned long&, mxArray_tag const*, char const*, bool)in mym.o
          serializeArray(unsigned long&, mxArray_tag const*, char const*, bool)in mym.o
          serializeCell(unsigned long&, mxArray_tag const*, char const*, bool)in mym.o
          serializeStruct(unsigned long&, mxArray_tag const*, char const*, bool)in mym.o
          _mexFunction in mym.o
      "_mxIsEmpty", referenced from:
          serializeString(unsigned long&, mxArray_tag const*, char const*, bool)in mym.o
      "_mxIsChar", referenced from:
          serializeString(unsigned long&, mxArray_tag const*, char const*, bool)in mym.o
          serializeCell(unsigned long&, mxArray_tag const*, char const*, bool)in mym.o
          serializeStruct(unsigned long&, mxArray_tag const*, char const*, bool)in mym.o
          _mexFunction in mym.o
      "_mxIsNumeric", referenced from:
          serializeString(unsigned long&, mxArray_tag const*, char const*, bool)in mym.o
          serializeCell(unsigned long&, mxArray_tag const*, char const*, bool)in mym.o
          serializeStruct(unsigned long&, mxArray_tag const*, char const*, bool)in mym.o
          _mexFunction in mym.o
      "_mxIsLogical", referenced from:
          serializeString(unsigned long&, mxArray_tag const*, char const*, bool)in mym.o
          serializeCell(unsigned long&, mxArray_tag const*, char const*, bool)in mym.o
          serializeStruct(unsigned long&, mxArray_tag const*, char const*, bool)in mym.o
      "_mxIsComplex", referenced from:
          serializeString(unsigned long&, mxArray_tag const*, char const*, bool)in mym.o
          serializeArray(unsigned long&, mxArray_tag const*, char const*, bool)in mym.o
      "_mxIsDouble", referenced from:
          serializeString(unsigned long&, mxArray_tag const*, char const*, bool)in mym.o
      "_mxIsSingle", referenced from:
          serializeString(unsigned long&, mxArray_tag const*, char const*, bool)in mym.o
      "_mxIsInt8", referenced from:
          serializeString(unsigned long&, mxArray_tag const*, char const*, bool)in mym.o
      "_mxIsInt32", referenced from:
          serializeString(unsigned long&, mxArray_tag const*, char const*, bool)in mym.o
      "_mxIsUint8", referenced from:
          serializeString(unsigned long&, mxArray_tag const*, char const*, bool)in mym.o
          _mexFunction in mym.o
      "_mxIsUint32", referenced from:
          serializeString(unsigned long&, mxArray_tag const*, char const*, bool)in mym.o
      "_mxGetClassID", referenced from:
          serializeArray(unsigned long&, mxArray_tag const*, char const*, bool)in mym.o
      "_mxGetCell_700", referenced from:
          serializeCell(unsigned long&, mxArray_tag const*, char const*, bool)in mym.o
      "_mxCreateDoubleMatrix_700", referenced from:
          serializeCell(unsigned long&, mxArray_tag const*, char const*, bool)in mym.o
          serializeStruct(unsigned long&, mxArray_tag const*, char const*, bool)in mym.o
          _mexFunction in mym.o
      "_mxIsStruct", referenced from:
          serializeCell(unsigned long&, mxArray_tag const*, char const*, bool)in mym.o
          serializeStruct(unsigned long&, mxArray_tag const*, char const*, bool)in mym.o
          _mexFunction in mym.o
      "_mxIsCell", referenced from:
          serializeCell(unsigned long&, mxArray_tag const*, char const*, bool)in mym.o
          serializeStruct(unsigned long&, mxArray_tag const*, char const*, bool)in mym.o
          _mexFunction in mym.o
      "_mxDestroyArray", referenced from:
          serializeCell(unsigned long&, mxArray_tag const*, char const*, bool)in mym.o
          serializeStruct(unsigned long&, mxArray_tag const*, char const*, bool)in mym.o
      "_mxGetNumberOfFields", referenced from:
          serializeStruct(unsigned long&, mxArray_tag const*, char const*, bool)in mym.o
      "_mxGetFieldNameByNumber", referenced from:
          serializeStruct(unsigned long&, mxArray_tag const*, char const*, bool)in mym.o
      "_mxGetFieldByNumber_700", referenced from:
          serializeStruct(unsigned long&, mxArray_tag const*, char const*, bool)in mym.o
      "_mxGetM", referenced from:
          getstring(mxArray_tag const*) in mym.o
          _mexFunction in mym.o
      "_mxGetN", referenced from:
          getstring(mxArray_tag const*) in mym.o
          _mexFunction in mym.o
      "_mxGetPr", referenced from:
          _mexFunction in mym.o
      "_mxRealloc", referenced from:
          _mexFunction in mym.o
      "_mxMalloc", referenced from:
          _mexFunction in mym.o
      "_mxCreateStructMatrix_700", referenced from:
          _mexFunction in mym.o
      "_mxCreateCellMatrix_700", referenced from:
          _mexFunction in mym.o
      "_mxSetField_700", referenced from:
          _mexFunction in mym.o
      "_mxGetField_700", referenced from:
          _mexFunction in mym.o
      "_mxCreateString", referenced from:
          _mexFunction in mym.o
    ld: symbol(s) not found for architecture x86_64
    collect2: ld returned 1 exit status

        mex: link of ' "mym.mexmaci64"' failed.

    ??? Error using ==> mex at 208
    Unable to complete successfully.

    My apologies for being very stupid with programming, but any help or suggestions on how to address this problem would be terribly appreciated.

    Thanks,
    CKF

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks