Menu

#7 Make error on Mac OSX Yosemite

v1.0 (example)
open
nobody
None
5
2016-03-01
2015-09-18
No

I get the following errors when I try "make -j" in the uncompressed directory with Makefile on OSX yosemite (10.10.4). I have tried all the solutions I could find via stack overflow and elsewhere to no avail.

2 warnings generated.
c++ -O3 -Wall -std=c++0x -I../nlopt/include -I../boost/include main.o Stats.o BaitClass.o PreyClass.o InterClass.o UIClass.o Mapping.o ../boost/lib/libboost_program_options.a -L../nlopt/lib -lnlopt -o ../bin/SAINTexpress-spc
c++ -O3 -Wall -std=c++0x -I../nlopt/include -I../boost/include main.o Stats.o BaitClass.o PreyClass.o InterClass.o UIClass.o Mapping.o ../boost/lib/libboost_program_options.a -L../nlopt/lib -lnlopt -o ../bin/SAINTexpress-int
Undefined symbols for architecture x86_64:
"Fastmat<quant_t>::~Fastmat()", referenced from:
statModel(std::__1::vector<std::__1::vector\<unsigned long,="" std::__1::allocator\<unsigned="" long=""> >, std::__1::allocator\<std::__1::vector\<unsigned long,="" std::__1::allocator\<unsigned="" long=""> > > > const&, std::__1::vector<std::__1::basic_string\<char, std::__1::char_traits\<char="">, std::__1::allocator\<char> >, std::__1::allocator\<std::__1::basic_string\<char, std::__1::char_traits\<char="">, std::__1::allocator\<char> > > > const&, Fastmat<quant_t> const&, Fastmat<quant_t> const&, std::__1::vector<unsigned long,="" std::__1::allocator\<unsigned="" long=""> > const&, unsigned long, unsigned long) in Stats.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[1]: *** [SAINTexpress-int] Error 1
make: *** [bin/SAINTexpress-int] Error 2</unsigned></quant_t></quant_t></char></std::__1::basic_string\<char,></char></std::__1::basic_string\<char,></std::__1::vector\<unsigned></std::__1::vector\<unsigned></quant_t>

Discussion

  • erik verschueren

    Hi Brian,

    I had a similar issue. I ended up first installing the boost and nlopt libraries through Homebrew : http://brew.sh/ using "brew install [libaryname]". Then I compiled the saint .cpp files with a generic makefile (attached). Just replace the current makefile and call 'make' in the source directory. I guess you could modify the Makefile to use the libraries includes with the SAINT download as well but I preferred having my own installation (for other purposes).

    Hope this helps
    Erik

     
  • Salvatore Loguercio

    Hi Erik,

    I tried what you suggested but to no avail ( on mac os x El Capitan, 10.11.2).

    make error:

    g++ -Wall -std=c++0x -I/usr/local/include -I/usr/local/include/boost -o saint-spc -L/usr/local/lib -lboost_program_options -lnlopt
    Undefined symbols for architecture x86_64:
    "_main", referenced from:
    implicit entry/start for main executable
    ld: symbol(s) not found for architecture x86_64
    clang: error: linker command failed with exit code 1 (use -v to see invocation)
    make: *** [saint-spc] Error 1

    Any further suggestions?

    Thanks for your help!

     
  • Guo Ci Teo

    Guo Ci Teo - 2016-02-27

    Hi Brian,
    I have uploaded a new version. Please try that.

     
  • Salvatore Loguercio

    Hi Guo,

    saintq 0.04 now compiles correctly on Mac OS X 10.11.2 El Capitan. Thank you!

    It looks like SAINTexpress has the same problem though - 'make' fails with:

    'Undefined symbols for architecture x86_64'

    It would be great if you guys could fix this one, too.

    Thanks!

     

Log in to post a comment.

MongoDB Logo MongoDB