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

adios does not compile/link on Apple Mac OS(Undefined symbols for architecture x86_64) #156

Open
burlen opened this issue Nov 13, 2017 · 7 comments

Comments

@burlen
Copy link

burlen commented Nov 13, 2017

the full error is:

libtool: link: /usr/bin/clang -O2 -g -fPIC -o bpdump bpdump-bpdump.o  ../../src/libadios_internal_nompi.a
Undefined symbols for architecture x86_64:
  "_adiost_tool", referenced from:
      _adiost_pre_init in libadios_internal_nompi.a(libcoreonce_a-adiost_callback_internal.o)
     (maybe you meant: _my_adiost_tool, _default_adiost_tool )
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

don't know if it's related but I see numerous warning above about .a files with no symbols

/Library/Developer/CommandLineTools/usr/bin/ranlib: file: libadiosreadf.a(adiosf_defs_mod.o) has no symbols
@burlen
Copy link
Author

burlen commented Nov 13, 2017

@mw70 have you had success building adios on apple?

@burlen
Copy link
Author

burlen commented Nov 13, 2017

compiler version

$gcc --version
Configured with: --prefix=/Library/Developer/CommandLineTools/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 9.0.0 (clang-900.0.38)
Target: x86_64-apple-darwin16.7.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin

@eisenhauer
Copy link
Member

Kevin Huck has a fix for this...

@khuck
Copy link
Contributor

khuck commented Nov 15, 2017

I made a patch in my fork: https://github.com/khuck/ADIOS but I have to test it on other platforms before making the pull request.

@burlen
Copy link
Author

burlen commented Nov 15, 2017

@khuck Thank you! your patch fixed the mac build. You mentioned you hadn't tested on linux, so I gave it run. it breaks the linux build. error looks familiar.

make[3]: Entering directory '/work/SENSEI/adios-master/utils/gpp'
test "../../../ADIOS/utils/gpp" = "." || cp ../../../ADIOS/utils/gpp/ad_config.py ../../../ADIOS/utils/gpp/type_mapper.py .; chmod a+x *.py
make[3]: Leaving directory '/work/SENSEI/adios-master/utils/gpp'
Making all in bpdump
make[3]: Entering directory '/work/SENSEI/adios-master/utils/bpdump'
/bin/sh ../../libtool  --tag=CC   --mode=link gcc  -fPIC -g   -fPIC -o bpdump bpdump-bpdump.o ../../src/libadios_internal_nompi.a -lnetcdf  -lpthread -lm 
libtool: link: gcc -fPIC -g -fPIC -o bpdump bpdump-bpdump.o  ../../src/libadios_internal_nompi.a -lnetcdf -lpthread -lm
../../src/libadios_internal_nompi.a(libcoreonce_a-adiost_callback_internal.o): In function `adiost_pre_init':
/work/SENSEI/adios-master/src/../../ADIOS/src/core/adiost_callback_internal.c:73: undefined reference to `adiost_tool'
collect2: error: ld returned 1 exit status
Makefile:592: recipe for target 'bpdump' failed
make[3]: *** [bpdump] Error 1

@khuck
Copy link
Contributor

khuck commented Nov 15, 2017

OK, I removed the check for __clang__ for the weak definition, it should always be defined as a weak symbol now.

@jychoi-hpc
Copy link
Member

Is this fix merged yet? I am getting the same error on my mac.

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

4 participants