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

tmap-3.2.0 - link error on OSX 10.8.2, missing symbols #3

Open
2bits opened this issue Oct 17, 2012 · 4 comments
Open

tmap-3.2.0 - link error on OSX 10.8.2, missing symbols #3

2bits opened this issue Oct 17, 2012 · 4 comments

Comments

@2bits
Copy link

2bits commented Oct 17, 2012

Hello. I'm reporting this for Homebrew, a package installer for OSX. We are having trouble upgrading to version 3.2.0 of tmap, and we are getting some strange undefined symbols during linking that I'm not able to "find" :-)

I am using OSX 10.8.2 on a Core i5 iMac, with XCode-4.5.1. My deps are:

  • autoconf: 2.69
  • automake: 1.12.4
  • libtool: 2.4.2

My install log showing the error is here.
My config.log is in a gist here.
The nm output from a couple of those object files is here.

You'll see from the logs that I have patched your configure.ac for the purposes of debugging this to remove the debug flag and the optimization flag -g -Wall -O3. On OSX, O3 can optimize out some symbols, but even though I've disabled optimization, they symbols are still either U undefined or T defined with a weird address of zero, eg. 0x0000000000 The problem occurs even if I don't patch anything and just try to build this by extracting, configuring, making without using Homebrew at all.

I would offer a patch, but I'm out of ideas atm.

@nh13
Copy link
Contributor

nh13 commented Oct 17, 2012

Works with gcc/g++ but not cc/c++. Any ideas? Try "./configure CC=cc CXX=c++" to force it to use the cc/c++ compilers.

@2bits
Copy link
Author

2bits commented Oct 18, 2012

I should have said that I tired compiling with clang-4.1 and llvm-gcc-4.2.1, which are the only two compilers that come with XCode these days. Also the default cc and cxx are set up like this on OSX 10.7 and 10.8:

$ ls -l `which cc`
lrwxr-xr-x  1 root  wheel  5 Oct  5 21:17 /usr/bin/cc -> clang
$ ls -l `which c++`
lrwxr-xr-x  1 root  wheel  7 Oct  5 21:17 /usr/bin/c++ -> clang++

So the clang output I gave you matches what would happen if I set CC and CXX. All the 2000+ apps that Homebrew can build have to compile with the default compilers unfortunately. If possible I'd like to stop tmap from being delisted by solving this, but I'm really at a loss to understand why the symbols would not exist. Maybe the compilers have a bug. It would not be the first time. I'll fire up gcc-4.6 and see what I can learn.

@iontorrent-dev
Copy link
Contributor

Agreed we need to find a fix but be a little patient as this has just come to my attention. I am at a loss as tol why these new apple provided compilers are not working. Perhaps it has something to do with the stdlib versions? Thanks for digging.

On Oct 17, 2012, at 5:42 PM, "2bits" <[email protected]mailto:[email protected]> wrote:

I should have said that I tired compiling with clang-4.1 and llvm-gcc-4.2.1, which are the only two compilers that come with XCode these days. Also the default cc and cxx are set up like this on OSX 10.7 and 10.8:

$ ls -l which cc
lrwxr-xr-x 1 root wheel 5 Oct 5 21:17 /usr/bin/cc -> clang
$ ls -l which c++
lrwxr-xr-x 1 root wheel 7 Oct 5 21:17 /usr/bin/c++ -> clang++

So the clang output I gave you matches what would happen if I set CC and CXX. All the 2000+ apps that Homebrew can build have to compile with the default compilers unfortunately. If possible I'd like to stop tmap from being delisted by solving this, but I'm really at a loss to understand why the symbols would not exist. Maybe the compilers have a bug. It would not be the first time. I'll fire up gcc-4.6 and see what I can learn.


Reply to this email directly or view it on GitHubhttps://github.com//issues/3#issuecomment-9549513.

@2bits
Copy link
Author

2bits commented Oct 18, 2012

No rush at all. I found a fix for the missing symbols by using llvm-gcc after you mentioned it worked with gcc. If it's okay, I'll open another issue with a build error I get when I --enable-perftools that's unrelated.

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

3 participants