Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CoEVP and LULESH do not link on OS X #7

Open
mcpherson opened this issue Oct 8, 2015 · 1 comment
Open

CoEVP and LULESH do not link on OS X #7

mcpherson opened this issue Oct 8, 2015 · 1 comment
Assignees

Comments

@mcpherson
Copy link
Contributor

Compilation of CoEVP library succeeds but static library generation (ar) gives errors on OS X of this form:

...
ar: warning: MathUtilitiesSpecial.o truncated to MathUtilitiesSp
ar: warning: MemoryUtilities.o truncated to MemoryUtilities
ar: warning: ParallelBuffer.o truncated to ParallelBuffer.
ar: warning: AbstractStream.o truncated to AbstractStream.
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: libcm.a(ApproxNearestNe) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: libcm.a(TimeRecorder.o) has no symbols
...

Then when attempting to link into LULESH, we see errors of this form:

Undefined symbols for architecture x86_64:
  "_freeReplyObject", referenced from:
      SingletonDB::push(unsigned __int128 const&, std::__1::vector<double, std::__1::allocator<double> > const&, unsigned long) in libcm.a(SingletonDB.o)
      SingletonDB::pull(unsigned __int128 const&) in libcm.a(SingletonDB.o)
      SingletonDB::pull_key(unsigned __int128 const&) in libcm.a(SingletonDB.o)
  "_redisCommand", referenced from:
      SingletonDB::push(unsigned __int128 const&, std::__1::vector<double, std::__1::allocator<double> > const&, unsigned long) in libcm.a(SingletonDB.o)
      SingletonDB::pull_data(unsigned __int128 const&) in libcm.a(SingletonDB.o)
      SingletonDB::SingletonDB() in libcm.a(SingletonDB.o)
      SingletonDB::~SingletonDB() in libcm.a(SingletonDB.o)
  "_redisConnect", referenced from:
      SingletonDB::SingletonDB() in libcm.a(SingletonDB.o)
  "_redisFree", referenced from:
      SingletonDB::~SingletonDB() in libcm.a(SingletonDB.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: *** [lulesh] Error 1

This is all likely compatibility issues between g++ and clang. I don't know if it's worth the effort tho chase this down.

@louisvernon
Copy link
Contributor

On 10.11.3 I see the same static library generation warnings, however LULESH links and executes correctly.

$ make FLANN=no SILO=no REDIS=no TWEMPROXY=no
...
ar: warning: ParallelBuffer.o truncated to ParallelBuffer.
ar: warning: AbstractStream.o truncated to AbstractStream.
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: libcm.a(ApproxNearestNe) has no symbols
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: libcm.a(SingletonDB_HIO) has no symbols
...
c++ -std=c++11 -g -O3 -I. -I../CM/include  -o lulesh cmdLineParser.o lulesh.o lulesh_main.o siloDump.o ../CM/lib/libcm.a     -llapack -lblas  -lm
$ ./lulesh -s
Using adaptive sampling...
step = 1, time = 1.000000e-09, dt=1.000000e-09
   Interpolation efficiency = 0.037037
step = 2, time = 2.200000e-09, dt=1.200000e-09
   Interpolation efficiency = 0.518519
step = 3, time = 3.640000e-09, dt=1.440000e-09
   Interpolation efficiency = 0.679012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants