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

Finally version libjulia with a proper filename #16362

Merged
merged 7 commits into from
May 18, 2016
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions Make.inc
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,10 @@ else
JULIA_COMMIT := $(JULIA_VERSION)
endif

# Increase these every release when breaking ABI in a backward-incompatible way
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To be more preciseI would say Increase SOMINOR with every minor release, and SOMAJOR with every major (ABI-breaking) release (and reset SOMINOR to 0)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

any way of making this a little more automatic, or harder to forget?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A solution I find natural, and which works well with semantic versioning, it to have SOMAJOR equal to the major Julia version, and SOMINOR to the minor version. The parallel between SOVERSION and the official version makes things clearer.

Until 1.0, SOMAJOR would be equal to 0.$minorversion and SOMINOR to $patchversion.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that would be easy to automate, and I know there are other libraries that do that, but I think I've also read that tying API version numbers to soname ABI version numbers is actually wrong. I'm not sure what the downsides would be though.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed, the second link explicitly says "The software version of your library should match the interface version.". That matches the semantic versioning contract.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think you can make the major version a decimal like that, so I'm opting instead to set the major version number to Y in Julia's X.Y.Z version number. Once we hit 1.0, we'll add W to the major soversion, where W is the number of major releases before 1.0, so that we continue to count up with major releases.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you can perfectly do that, that's even the solution required by Fedora when upstream does not set a SONAME: use SOMAJOR=0.X until upstream ships a release with SOMAJOR = 1. See https://fedoraproject.org/wiki/Packaging:Guidelines?rd=Packaging/Guidelines#Downstream_.so_name_versioning

SOMAJOR := 1
SOMINOR := 0

# Whether to use GPL libraries or not.
USE_GPL_LIBS ?= 1

Expand Down
17 changes: 9 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -153,14 +153,15 @@ release-candidate: release testall
@echo 1. Remove deprecations in base/deprecated.jl
@echo 2. Update references to the julia version in the source directories, such as in README.md
@echo 3. Bump VERSION
@echo 4. Create tag, push to github "\(git tag v\`cat VERSION\` && git push --tags\)" #"` # These comments deal with incompetent syntax highlighting rules
@echo 5. Clean out old .tar.gz files living in deps/, "\`git clean -fdx\`" seems to work #"`
@echo 6. Replace github release tarball with tarballs created from make light-source-dist and make full-source-dist
@echo 7. Follow packaging instructions in DISTRIBUTING.md to create binary packages for all platforms
@echo 8. Upload to AWS, update http://julialang.org/downloads and http://status.julialang.org/stable links
@echo 9. Update checksums on AWS for tarball and packaged binaries
@echo 10. Announce on mailing lists
@echo 11. Change master to release-0.X in base/version.jl and base/version_git.sh as in 4cb1e20
@echo 4. Increase SOMAJOR and SOMINOR if needed.
@echo 5. Create tag, push to github "\(git tag v\`cat VERSION\` && git push --tags\)" #"` # These comments deal with incompetent syntax highlighting rules
@echo 6. Clean out old .tar.gz files living in deps/, "\`git clean -fdx\`" seems to work #"`
@echo 7. Replace github release tarball with tarballs created from make light-source-dist and make full-source-dist
@echo 8. Follow packaging instructions in DISTRIBUTING.md to create binary packages for all platforms
@echo 9. Upload to AWS, update http://julialang.org/downloads and http://status.julialang.org/stable links
@echo 10. Update checksums on AWS for tarball and packaged binaries
@echo 11. Announce on mailing lists
@echo 12. Change master to release-0.X in base/version.jl and base/version_git.sh as in 4cb1e20
@echo

$(build_man1dir)/julia.1: $(JULIAHOME)/doc/man/julia.1 | $(build_man1dir)
Expand Down
30 changes: 26 additions & 4 deletions src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -160,29 +160,51 @@ else
CXXLD = $(LD) -dll -export:jl_setjmp -export:jl_longjmp
endif

$(build_shlibdir)/libjulia-debug.$(SHLIB_EXT): $(SRCDIR)/julia.expmap $(DOBJS) $(BUILDDIR)/flisp/libflisp-debug.a $(BUILDDIR)/support/libsupport-debug.a $(LIBUV)
# If we're on windows, don't do versioned shared libraries. If we're on OSX,
# put the version number before the .dylib. Otherwise, put it after.
ifeq ($(OS), WINNT)
JL_SHLIB_EXT := $(SHLIB_EXT)
else
ifeq ($(OS), Darwin)
JL_SHLIB_EXT := $(SOMAJOR).$(SOMINOR).$(SHLIB_EXT)
JL_MAJOR_SHLIB_EXT := $(SOMAJOR).$(SHLIB_EXT)
else
JL_SHLIB_EXT := $(SHLIB_EXT).$(SOMAJOR).$(SOMINOR)
JL_MAJOR_SHLIB_EXT := $(SHLIB_EXT).$(SOMAJOR)
endif
endif

$(build_shlibdir)/libjulia-debug.$(JL_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) $@
ifneq ($(OS), WINNT)
@ln -sf $@ $(build_shlibdir)/libjulia-debug.$(JL_MAJOR_SHLIB_EXT)
@ln -sf $@ $(build_shlibdir)/libjulia-debug.$(SHLIB_EXT)
endif
$(DSYMUTIL) $@
$(BUILDDIR)/libjulia-debug.a: $(SRCDIR)/julia.expmap $(DOBJS) $(BUILDDIR)/flisp/libflisp-debug.a $(BUILDDIR)/support/libsupport-debug.a
rm -f $@
@$(call PRINT_LINK, ar -rcs $@ $(DOBJS))
libjulia-debug: $(build_shlibdir)/libjulia-debug.$(SHLIB_EXT)
libjulia-debug: $(build_shlibdir)/libjulia-debug.$(JL_SHLIB_EXT)

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

$(build_shlibdir)/libjulia.$(SHLIB_EXT): $(SRCDIR)/julia.expmap $(OBJS) $(BUILDDIR)/flisp/libflisp.a $(BUILDDIR)/support/libsupport.a $(LIBUV)
$(build_shlibdir)/libjulia.$(JL_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) $@
ifneq ($(OS), WINNT)
@ln -sf $@ $(build_shlibdir)/libjulia.$(JL_MAJOR_SHLIB_EXT)
@ln -sf $@ $(build_shlibdir)/libjulia.$(SHLIB_EXT)
endif
$(DSYMUTIL) $@
$(BUILDDIR)/libjulia.a: julia.expmap $(OBJS) $(BUILDDIR)/flisp/libflisp.a $(BUILDDIR)/support/libsupport.a
rm -f $@
@$(call PRINT_LINK, ar -rcs $@ $(OBJS))
libjulia-release: $(build_shlibdir)/libjulia.$(SHLIB_EXT)
libjulia-release: $(build_shlibdir)/libjulia.$(JL_SHLIB_EXT)

clean:
-rm -fr $(build_shlibdir)/libjulia* $(build_shlibdir)/libccalltest*
Expand Down