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

credis does not build on OS X #3

Closed
GoogleCodeExporter opened this issue Apr 23, 2016 · 1 comment
Closed

credis does not build on OS X #3

GoogleCodeExporter opened this issue Apr 23, 2016 · 1 comment

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?

Checkout credis and build it

What is the expected output? What do you see instead?

Expected: built succesfully
Actual output:

cc -shared -Wl,-soname,libcredis.so -o libcredis.so credis.o
ld: unknown option: -soname
collect2: ld returned 1 exit status
gmake: *** [libcredis.so] Error 1

What version of the product are you using? On what operating system?

svn r8, OS X 10.6.2, gcc version 4.2.1

Please provide any additional information below.

"""
=== modified file 'Makefile'
--- Makefile    2009-12-03 21:30:48 +0000
+++ Makefile    2010-01-01 06:33:35 +0000
@@ -2,6 +2,13 @@
 LDFLAGS =
 CPPFLAGS =

+OS = $(shell uname -s)
+ifeq ($(OS),Darwin)
+   SHAREDLIB_LINK_OPTIONS=-dynamiclib -Wl,-install_name -Wl,
+else
+   SHAREDLIB_LINK_OPTIONS=-shared -Wl,-soname,
+endif
+
 # targets to build with 'make all'
 TARGETS = credis-test libcredis.a libcredis.so

@@ -14,7 +21,8 @@
    $(AR) -cvq $@ $^

 libcredis.so: credis.o
-   $(CC) -shared -Wl,-soname,$@ -o $@ $^
+   $(CC) $(SHAREDLIB_LINK_OPTIONS)$@ -o $@ $^
+

 credis.o: credis.c credis.h
    $(CC) -c -fPIC $(CFLAGS) $(CPPFLAGS) -o $@ credis.c

"""
See also.
http://lists.ozlabs.org/pipermail/devicetree-discuss/2009-May/000818.html
http://www.finkproject.org/doc/porting/porting.en.html

Original issue reported on code.google.com by akit...@gmail.com on 1 Jan 2010 at 6:34

@GoogleCodeExporter
Copy link
Author

proposed fixes by akitada implemented in revision 11

Original comment by romf...@gmail.com on 6 Feb 2010 at 11:23

  • Changed state: Verified

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