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

cannot compile ~/sdks/cpp-libawd/src/awd.cc on linux (patch attached as diff) #47

Open
GoogleCodeExporter opened this issue Jan 5, 2016 · 0 comments

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
1. cd ~/sdks/cpp-libawd
2. rework the Makefile to compile on Linux

-CFLAGS=-Wall -g -L. -arch i386 -arch x86_64 -DAWD_VERSION_BUILD=$(BUILDVERSION)
+CFLAGS=-Wall -g -L. -fPIC -DAWD_VERSION_BUILD=$(BUILDVERSION)
-DYLIB=libawd.dylib
+DYLIB=libawd.so
-   $(CXX) -dynamiclib -install_name $(LIBDIR)/$(DYLIB) -current_version 
$(LIBVER) $(LDFLAGS) $(CFLAGS) $(OBJ) -o $(BUILDDIR)/$(DYLIB)
+   $(CXX) -shared -install_name $(LIBDIR)/$(DYLIB) $(LDFLAGS) $(CFLAGS) $(OBJ) 
-o $(BUILDDIR)/$(DYLIB)

3. make clean all

What is the expected output? What do you see instead?
An unexpected build error occurs:

/usr/bin/ld: errno: TLS definition in /lib/x86_64-linux-gnu/libc.so.6 section 
.tbss mismatches non-TLS reference in src/awd.o
/lib/x86_64-linux-gnu/libc.so.6: could not read symbols: Bad value
collect2: ld returned 1 exit status


What version of the product are you using? On what operating system?
$ hg tip
changeset:   490:f2c379aa1520
tag:         tip
user:        Richard Olsson <r@richardolsson.se>
date:        Fri Jul 13 10:47:06 2012 +0200
summary:     Maya exporter now respects the viewer options from the G

Please provide any additional information below.
The problem is the redefinition of errno in line 252 of src/awd.cc
is not compatible with glibc thread local storage. 

A diff that corrects this (uses C++ headers instead of extern data) for Linux 
and continues to compile under Snow Leopard is attached.

Please let me know your preferred approach to patch sumissions.

Original issue reported on code.google.com by elkq...@gmail.com on 20 Nov 2012 at 6:02

Attachments:

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

No branches or pull requests

1 participant