Skip to content

Commit

Permalink
fix JuliaLang#2942. bump libuv version. cleanup windows build errata …
Browse files Browse the repository at this point in the history
…with automatic fixes.
  • Loading branch information
vtjnash committed Apr 26, 2013
1 parent e68b079 commit de0cb82
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 11 deletions.
9 changes: 7 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,13 @@ julia-debug julia-release:
$(BUILD)/share/julia/helpdb.jl: doc/helpdb.jl | $(BUILD)/share/julia
@cp $< $@

COMMIT:
@#this is a .PHONY target so that it will always run
@echo `git rev-parse --short HEAD`-$(OS)-$(ARCH) \(`date +"%Y-%m-%d %H:%M:%S"`\) > COMMIT

# use sys.ji if it exists, otherwise run two stages
$(BUILD)/$(JL_PRIVATE_LIBDIR)/sys.ji: VERSION base/*.jl base/pkg/*.jl base/linalg/*.jl $(BUILD)/share/julia/helpdb.jl
@echo `git rev-parse --short HEAD`-$(OS)-$(ARCH) \(`date +"%Y-%m-%d %H:%M:%S"`\) > COMMIT
$(MAKE) $(QUIET_MAKE) COMMIT
$(QUIET_JULIA) cd base && \
(test -f $(BUILD)/$(JL_PRIVATE_LIBDIR)/sys.ji || $(JULIA_EXECUTABLE) -bf sysimg.jl) && $(JULIA_EXECUTABLE) -f sysimg.jl || echo "*** This error is usually fixed by running 'make clean'. If the error persists, try 'make cleanall'. ***"

Expand Down Expand Up @@ -88,6 +92,7 @@ ifeq ($(OS), WINNT)
-cp $(JULIAHOME)/contrib/windows/* $(PREFIX)
endif
cp $(JULIAHOME)/VERSION $(PREFIX)/share/julia/VERSION
$(MAKE) $(QUIET_MAKE) COMMIT
cp $(JULIAHOME)/COMMIT $(PREFIX)/share/julia/COMMIT

dist:
Expand Down Expand Up @@ -142,7 +147,7 @@ distclean: cleanall

.PHONY: default debug release julia-debug julia-release \
test testall test-* clean distclean cleanall \
run-julia run-julia-debug run-julia-release
run-julia run-julia-debug run-julia-release COMMIT

test: release
@$(MAKE) $(QUIET_MAKE) -C test default
Expand Down
7 changes: 1 addition & 6 deletions README.windows.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,4 @@ If you are building for 64-bit windows. The steps are pretty much the same. Just
Important Build Errata
----------------------

- Arpack 3.1.2 has an error in the tar file (a symlink from ./depcomp to a nonexistant file) that prevents it from being extracted on windows (cross-build is fine). To resolve this, we need a tar file that doesn't contain this symlink file. I found the easiest way to solve this was to run `make -C deps get-arpack` and then edit the arpack-*.tar.gz in 7zip to delete the depcomp symlink file before running the primary make target.

- LLVM 3.x has an error on when compiling for 64-bit Windows that causes the build to fail when building the shared library file. Therefore, before building, you will need to change `--enable-shared` to `--disable-shared` in the `LLVM_FLAGS` variable in `deps/Makefile`.

- The cross-build does not have access to git. If you want your sysimg to contain version information from the commit, remove the `#` from the line in Makefile that begins with @#echo `git rev-parse --short HEAD ...` and ends with `... > COMMIT`

- None currently
11 changes: 9 additions & 2 deletions deps/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,9 @@ endif
else
LLVM_FLAGS += --disable-assertions --enable-optimized
endif
ifeq ($(OS), WINNT)
LLVM_FLAGS += --with-extra-ld-options="-Wl,--stack,8388608" LDFLAGS="" --disable-shared
endif

ifeq ($(BUILD_LLDB),1)
ifeq ($(USECLANG),1)
Expand Down Expand Up @@ -389,7 +392,11 @@ $(UV_OBJ_SOURCE): $(JULIAHOME)/.git/modules/deps/libuv/HEAD
endif
LIBUV_MAKE_FLAGS = -C libuv CC="$(CC)" AR="$(AR)"
ifeq ($(OS),WINNT)
LIBUV_MAKE_FLAGS += OS=mingw
LIBUV_MAKE_FLAGS += PLATFORM=mingw
else
ifneq ($(OS),$(BUILD_OS))
$(error libuv may autodetect your cross-compile PLATFORM incorrectly)
endif
endif
$(UV_OBJ_SOURCE): libuv/Makefile
$(MAKE) libuv.a $(LIBUV_MAKE_FLAGS)
Expand All @@ -406,7 +413,7 @@ $(UV_OBJ_TARGET): $(UV_OBJ_SOURCE)
cp -r libuv/include/* $(BUILD)/include

clean-uv:
-$(MAKE) clean $(LIBUV_MAKE_FLAGS)
-$(MAKE) clean $(LIBUV_MAKE_FLAGS) RUNNER_LIBS=
-rm -rf $(BUILD)/lib/libuv.a $(BUILD)/include/uv.h $(BUILD)/include/uv-private
distclean-uv: clean-uv

Expand Down
2 changes: 1 addition & 1 deletion deps/libuv

0 comments on commit de0cb82

Please sign in to comment.