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

Shared libraries are built without SONAME #21

Open
yurivict opened this issue Jun 10, 2018 · 3 comments
Open

Shared libraries are built without SONAME #21

yurivict opened this issue Jun 10, 2018 · 3 comments

Comments

@yurivict
Copy link

Warning: /usr/ports/biology/ngs/work/stage/usr/local/lib/libngs-sdk.so.2.9.0 doesn't have a SONAME.

Every shared library in SDK normally should have SONAME.

@kwrodarmer
Copy link
Contributor

I don't know how you built it, but our builds absolutely assign an SONAME:

$ objdump -p  libngs-sdk.so.2.9.0 | grep SONAME
  SONAME               libngs-sdk.so.2

@yurivict
Copy link
Author

yurivict commented Jun 10, 2018

You use this line for SONAME:

   L($F, 'SONAME  = -install_name ' .
               '$(INST_LIBDIR)$(BITS)/$(subst $(VERSION),$(MAJVERS),$(@F)) \\');

and it doesn't work for some reason. It might be MacOS-specific.
Instead, the same line as for gcc works in clang on FreeBSD:

@@ -881,8 +895,7 @@ EndText
     L($F, "PIC     = $PIC") if ($PIC);
     if ($PKG{LNG} eq 'C') {
         if ($TOOLS =~ /clang/i) {
-   L($F, 'SONAME  = -install_name ' .
-               '$(INST_LIBDIR)$(BITS)/$(subst $(VERSION),$(MAJVERS),$(@F)) \\');
+   L($F, 'SONAME = -Wl,-soname=$(subst $(VERSION),$(MAJVERS),$(@F)) \\');
    L($F, '    -compatibility_version $(MAJMIN) -current_version $(VERSION) \\');
    L($F, '    -flat_namespace -undefined suppress');
         } else {

@kwrodarmer kwrodarmer reopened this Jun 11, 2018
@kwrodarmer
Copy link
Contributor

You are using a Mac build. As I said, our configuration isn't equipped to detect BSD, but if it did, it could use a slightly modified Linux build. Our default compiler on Linux is GCC, but we can substitute compilers. The CLANG makefile tends to be just like GCC in all ways but the tool name.

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