Menu

#8 Doesn't Link on Mavericks

open
nobody
mavericks (1)
5
2015-02-23
2014-04-18
No

On a current Mavericks I get from fsqlf.v0.03-80-ga310ad5.zip, downloaded today

fatal: Not a git repository (or any of the parent directories): .git
gcc -m32 -Wall  core/lex.yy.c   -o fsqlf
Undefined symbols for architecture i386:
  "_max", referenced from:
      _max_or_current in lex-9eb12e.o
      _calculate_spacing in lex-9eb12e.o
     (maybe you meant: _max_or_current)
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [fsqlf] Error 1

Any ideas?

el

Discussion

  • Eberhard W Lisse

    Something like this in settings.h seems to help

    #if !defined(max)
    # define max(a, b)                     \
         ({ typeof (a) __x = (a), __y = (b);   \
            (__x > __y) ? __x : __y; })
    #else
    #define max MAX
    #endif
    
    /*
    inline int max(int a, int b){
        return a > b ? a : b;
    }
    */
    

    though I have no clue how to wrap this into a Mavericks conditional.

    el

     

    Last edit: Eberhard W Lisse 2014-04-19
  • Danas Mikelinskas

    Sorry, can't help - I don't have access to any mac.

    The only thing that comes to mind is to remove -m32 in

    gcc -m32 -Wall  core/lex.yy.c   -o fsqlf
    

    (or to experiment with other options)

     

    Last edit: Danas Mikelinskas 2014-05-13
  • Danas Mikelinskas

    Just in case, renamed one function.
    It was named max previously, might have clashed with some compiler dependent name.

    If you could confirm that issue is solved (or opposite to that) it would be really great.

     

Anonymous
Anonymous

Add attachments
Cancel





Monday.com Logo