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

No SONAME in libjulia-debug.so.0.5.0 #16668

Closed
ronisbr opened this issue May 30, 2016 · 8 comments
Closed

No SONAME in libjulia-debug.so.0.5.0 #16668

ronisbr opened this issue May 30, 2016 · 8 comments
Labels
building Build system, or building Julia or its dependencies

Comments

@ronisbr
Copy link
Member

ronisbr commented May 30, 2016

Hi guys!

I'm packing latest git version of Julia and today I noticed the following warning:

julia-unstable-debug.x86_64: W: no-soname /usr/lib64/libjulia-debug.so.0.5.0

Indeed, using objdump I can see that there is no SONAME in the -debug library:

# objdump -x libjulia-debug.so.0.5.0  |grep SONAME
#

Notice that everything is fine with libjulia.so.0.5.0:

# objdump -x libjulia.so.0.5.0  |grep SONAME
  SONAME               libjulia.so.0.5
#

Is there anyway to fix this problem?

@nalimilan
Copy link
Member

@staticfloat knows best.

@tkelman tkelman added the building Build system, or building Julia or its dependencies label May 31, 2016
@tkelman
Copy link
Contributor

tkelman commented May 31, 2016

He also hasn't been on github in about a week, so may be faster to just read through the diff from #16362 and see what's missing for the debug library.

@ronisbr
Copy link
Member Author

ronisbr commented Jun 1, 2016

I think I got it. Look here how libjulia.so is built:

ifeq ($(SHLIB_EXT), so)
  SONAME := -Wl,-soname=libjulia.$(JL_MAJOR_SHLIB_EXT)
else
  SONAME :=
endif

$(build_shlibdir)/libjulia.$(JL_MAJOR_MINOR_SHLIB_EXT): $(SRCDIR)/julia.expmap $(OBJS) $(BUILDDIR)/flisp/libflisp.a $(BUILDDIR)/support/libsupport.a $(LIBUV)
    @$(call PRINT_LINK, $(CXXLD) $(CXXFLAGS) $(CXXLDFLAGS) $(SHIPFLAGS) $(OBJS) $(RPATH_ORIGIN) -o $@ $(LDFLAGS) $(JLIBLDFLAGS) $(RELEASE_LIBS) $(SONAME)) $(CXXLDFLAGS)
    $(INSTALL_NAME_CMD)libjulia.$(SHLIB_EXT) $@

On the other hand, the libjulia-debug.so is built using:

$(build_shlibdir)/libjulia-debug.$(JL_MAJOR_MINOR_SHLIB_EXT): $(SRCDIR)/julia.expmap $(DOBJS) $(BUILDDIR)/flisp/libflisp-debug.a $(BUILDDIR)/support/libsupport-debug.a $(LIBUV)
    @$(call PRINT_LINK, $(CXXLD) $(CXXFLAGS) $(CXXLDFLAGS) $(DEBUGFLAGS) $(DOBJS) $(RPATH_ORIGIN) -o $@ $(LDFLAGS) $(JLIBLDFLAGS) $(DEBUG_LIBS))
    $(INSTALL_NAME_CMD)libjulia-debug.$(SHLIB_EXT) $@

So, I think I need to change the src/Makefile so that I can build libjulia-debug.so using:

$(build_shlibdir)/libjulia-debug.$(JL_MAJOR_MINOR_SHLIB_EXT): $(SRCDIR)/julia.expmap $(DOBJS) $(BUILDDIR)/flisp/libflisp-debug.a $(BUILDDIR)/support/libsupport-debug.a $(LIBUV)
    @$(call PRINT_LINK, $(CXXLD) $(CXXFLAGS) $(CXXLDFLAGS) $(DEBUGFLAGS) $(DOBJS) $(RPATH_ORIGIN) -o $@ $(LDFLAGS) $(JLIBLDFLAGS) $(DEBUG_LIBS) $(SONAME))
    $(INSTALL_NAME_CMD)libjulia-debug.$(SHLIB_EXT) $@

I'll try and then I comment here if it worked.

Thanks for the help @tkelman and @nalimilan

@ronisbr
Copy link
Member Author

ronisbr commented Jun 1, 2016

Just one question: the SONAME of libjulia-debug.so.0.5.0 should be libjulia.so.0.5 or libjulia-debug.so.0.5?

@yuyichao
Copy link
Contributor

yuyichao commented Jun 1, 2016

libjulia-debug.so.0.5 I believe duplicated soname will cause a lot of confusions.

@ronisbr
Copy link
Member Author

ronisbr commented Jun 1, 2016

Thanks @yuyichao

@tkelman
Copy link
Contributor

tkelman commented Jun 1, 2016

Unrelated, but looks like $(CXXLDFLAGS) is needlessly duplicated at the end when linking the release libjulia, it's already there earlier after $(CXXFLAGS)

@ronisbr
Copy link
Member Author

ronisbr commented Jun 1, 2016

I added the SONAME to libjulia-debug and the problem is apparently fixed. Thus, I created a PR with the changes.

@tkelman tkelman closed this as completed in 8d419e5 Jun 3, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
building Build system, or building Julia or its dependencies
Projects
None yet
Development

No branches or pull requests

4 participants