Skip to content

Commit

Permalink
expunge readline
Browse files Browse the repository at this point in the history
  • Loading branch information
nolta committed Mar 26, 2014
1 parent edfbda4 commit e38577b
Show file tree
Hide file tree
Showing 26 changed files with 22 additions and 1,358 deletions.
6 changes: 3 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@ notifications:
- http:https://criid.ee.washington.edu:8000/travis-hook
- http:https://julia.mit.edu:8000/travis-hook
before_install:
- BUILDOPTS="LLVM_CONFIG=llvm-config-3.3 LLVM_LLC=llc-3.3 VERBOSE=1 USE_BLAS64=0"; for lib in LLVM ZLIB SUITESPARSE ARPACK BLAS FFTW LAPACK GMP MPFR PCRE LIBUNWIND READLINE GRISU OPENLIBM RMATH; do export BUILDOPTS="$BUILDOPTS USE_SYSTEM_$lib=1"; done
- BUILDOPTS="LLVM_CONFIG=llvm-config-3.3 LLVM_LLC=llc-3.3 VERBOSE=1 USE_BLAS64=0"; for lib in LLVM ZLIB SUITESPARSE ARPACK BLAS FFTW LAPACK GMP MPFR PCRE LIBUNWIND GRISU OPENLIBM RMATH; do export BUILDOPTS="$BUILDOPTS USE_SYSTEM_$lib=1"; done
- sudo apt-get update -qq -y
- sudo apt-get install zlib1g-dev
- sudo add-apt-repository ppa:staticfloat/julia-deps -y
- sudo apt-get update -qq -y
- sudo apt-get install patchelf gfortran llvm-3.3-dev libsuitesparse-dev libncurses5-dev libopenblas-dev liblapack-dev libarpack2-dev libfftw3-dev libgmp-dev libpcre3-dev libunwind7-dev libreadline-dev libdouble-conversion-dev libopenlibm-dev librmath-dev libmpfr-dev -y
- sudo apt-get install patchelf gfortran llvm-3.3-dev libsuitesparse-dev libopenblas-dev liblapack-dev libarpack2-dev libfftw3-dev libgmp-dev libpcre3-dev libunwind7-dev libdouble-conversion-dev libopenlibm-dev librmath-dev libmpfr-dev -y
script:
- make $BUILDOPTS prefix=/tmp/julia install
- cd .. && mv julia julia2
- cd /tmp/julia/share/julia/test && /tmp/julia/bin/julia-debug-readline runtests.jl all
- cd /tmp/julia/share/julia/test && /tmp/julia/bin/julia-debug-basic runtests.jl all
- cd - && mv julia2 julia
- echo "Ready for packaging..."
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ A useful bug report filed as a Github issue provides information about how to re
1. Before opening a new [Github issue](https://github.com/JuliaLang/julia/issues):
- Try searching the existing issues or the [`julia-users` mailing list](https://groups.google.com/forum/#!forum/julia-users) to see if someone else has already noticed the same problem.
- Try some simple debugging techniques to help isolate the problem.
- Try running the code with the debug REPL. If you have a source distribution of Julia, you can build your own debug REPL with `make debug`, which produces the `usr/bin/julia-debug-basic` and `usr/bin/julia-debug-readline` REPLs.
- Try running the code with the debug REPL. If you have a source distribution of Julia, you can build your own debug REPL with `make debug`, which produces the `usr/bin/julia-debug-basic` REPL.
- Consider running the debug REPL in a debugger such as `gdb` or `lldb`. Obtaining even a simple [backtrace](http:https://www.unknownroad.com/rtfm/gdbtut/gdbsegfault.html) is very useful.
- If Julia segfaults, try following [these debugging tips](https://gist.github.com/staticfloat/6188418#segfaults-during-bootstrap-sysimgjl) to help track down the specific origin of the bug.

Expand Down
22 changes: 1 addition & 21 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Julia is licensed under the MIT License:

> Copyright (c) 2009-2013: Jeff Bezanson, Stefan Karpinski, Viral B. Shah,
> Copyright (c) 2009-2014: Jeff Bezanson, Stefan Karpinski, Viral B. Shah,
> and other contributors:
>
> https://github.com/JuliaLang/julia/contributors
Expand All @@ -24,25 +24,6 @@ Julia is licensed under the MIT License:
> OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
> WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
[`repl-readline.c`](https://github.com/JuliaLang/julia/blob/master/ui/repl-readline.c)
is licensed under the GNU General Public License Version 2:

> Copyright (c) 2009-2013: Jeff Bezanson, Stefan Karpinski, Viral B. Shah.
>
> This program is free software; you can redistribute it and/or modify
> it under the terms of the GNU General Public License as published by
> the Free Software Foundation; either version 2 of the License, or
> (at your option) any later version.
>
> This program is distributed in the hope that it will be useful,
> but WITHOUT ANY WARRANTY; without even the implied warranty of
> MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
> GNU General Public License for more details.
>
> You should have received a copy of the GNU General Public License along
> with this program; if not, write to the Free Software Foundation, Inc.,
> 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
External libraries, if used, include their own licenses:

- [7-Zip](http:https://www.7-zip.org/license.txt)
Expand All @@ -67,7 +48,6 @@ External libraries, if used, include their own licenses:
- [OPENBLAS](https://raw.github.com/xianyi/OpenBLAS/master/LICENSE)
- [PATCHELF](http:https://hydra.nixos.org/build/1524660/download/1/README)
- [PCRE](http:https://www.pcre.org/licence.txt)
- [READLINE](http:https://cnswww.cns.cwru.edu/php/chet/readline/rltop.html)
- [RMATH](http:https://www.r-project.org/Licenses/)
- [SUITESPARSE](http:https://www.cise.ufl.edu/research/sparse/SuiteSparse/current/SuiteSparse/)
- [ZLIB](http:https://zlib.net/zlib_license.html)
19 changes: 1 addition & 18 deletions Make.inc
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ OPENBLAS_TARGET_ARCH=
# Use libraries available on the system instead of building them
USE_SYSTEM_LLVM=0
USE_SYSTEM_LIBUNWIND=0
USE_SYSTEM_READLINE=0
USE_SYSTEM_PCRE=0
USE_SYSTEM_LIBM=0
USE_SYSTEM_OPENLIBM=0
Expand Down Expand Up @@ -163,7 +162,7 @@ fPIC = -fPIC
EXE =
endif

DEFAULT_REPL = readline
DEFAULT_REPL = basic
JULIAGC = MARKSWEEP
USE_COPY_STACKS = 1

Expand Down Expand Up @@ -350,22 +349,6 @@ LLVM_CONFIG=$(LLVMROOT)/bin/llvm-config$(EXE)
LLVM_LLC=$(LLVMROOT)/bin/llc$(EXE)
endif

ifeq ($(USE_SYSTEM_READLINE), 1)
READLINE = -lreadline
else
ifeq ($(OS),WINNT)
READLINE = $(build_libdir)/libreadline.a
else
READLINE = $(build_libdir)/libreadline.a
endif
endif

ifeq ($(OS),WINNT)
READLINE += $(build_libdir)/libhistory.a
else
READLINE += -lncurses
endif

ifeq ($(USE_SYSTEM_PCRE), 1)
PCRE_CONFIG = pcre-config
else
Expand Down
4 changes: 0 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,6 @@ Otherwise, install or contact your systems administrator to install a more recen
Problem | Possible Solution
------------------------|---------------------
OpenBLAS build failure | Set one of the following build options in `Make.user` and build again: <ul><li> `OPENBLAS_TARGET_ARCH=BARCELONA` (AMD CPUs) or `OPENBLAS_TARGET_ARCH=NEHALEM` (Intel CPUs)<ul>Set `OPENBLAS_DYNAMIC_ARCH = 0` to disable compiling multiple architectures in a single binary.</ul></li><li> `USE_SYSTEM_BLAS=1` uses the system provided `libblas` <ul><li>Set `LIBBLAS=-lopenblas` and `LIBBLASNAME=libopenblas` to force the use of the system provided OpenBLAS when multiple BLAS versions are installed </li></ul></li></ul>
readline build error | Set `USE_SYSTEM_READLINE=1` in `Make.user`
ncurses build error | Install the `libncurses5` development package <ul><li> Debian/Ubuntu: `apt-get install libncurses5-dev` </li><li> RPM-based systems: `yum install libncurses5-devel` </li></ul>
Illegal Instruction error | Check if your CPU supports AVX while your OS does not (e.g. through virtualization, as described in [this issue](https://github.com/JuliaLang/julia/issues/3263)), and try installing LLVM 3.3 instead of LLVM 3.2.

### OS X
Expand Down Expand Up @@ -168,7 +166,6 @@ Julia uses the following external libraries, which are automatically downloaded

- **[LLVM]** — compiler infrastructure.
- **[FemtoLisp]** — packaged with Julia source, and used to implement the compiler front-end.
- **[readline]** — library allowing shell-like line editing in the terminal, with history and familiar key bindings.
- **[libuv]** — portable, high-performance event-based I/O library
- **[OpenLibm]** — a portable libm library containing elementary math functions.
- **[OpenSpecFun]** — a library containing Bessel and error functions of complex arguments.
Expand Down Expand Up @@ -208,7 +205,6 @@ Julia uses the following external libraries, which are automatically downloaded
[PCRE]: http:https://www.pcre.org/
[LLVM]: http:https://www.llvm.org/
[FemtoLisp]: https://github.com/JeffBezanson/femtolisp
[readline]: http:https://cnswww.cns.cwru.edu/php/chet/readline/rltop.html
[GMP]: http:https://gmplib.org/
[MPFR]: http:https://www.mpfr.org/
[double-conversion]: http:https://double-conversion.googlecode.com/
Expand Down
5 changes: 2 additions & 3 deletions README.windows.md
Original file line number Diff line number Diff line change
Expand Up @@ -165,13 +165,12 @@ Julia runs on Windows XP SP2 or later (including Windows Vista, Windows 7, and W
```
make run-julia
```
(the full syntax is `make run-julia[-release|-debug] [DEFAULT_REPL=(basic|readline)]`)
(the full syntax is `make run-julia[-release|-debug]`)
- Using the Julia executables directly
```
usr/bin/julia-readline
usr/bin/julia-basic
```
(or `julia-basic` if you prefer)
## Cross-compiling
Expand Down
1 change: 0 additions & 1 deletion contrib/julia.lang
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,6 @@
</match>
</context>

<!-- See *lang_keywords[] in ui/repl-readline.c for a list -->
<context id="keyword" style-ref="keyword">
<!-- code blocks -->
<keyword>begin</keyword>
Expand Down
1 change: 0 additions & 1 deletion contrib/mac/macports.make
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ USEGCC=1
USECLANG=0
SUITESPARSE_VER_MAJOR=4
JMAKEFLAGS = USE_SYSTEM_LLVM=1 LLVM_CONFIG=${LLVM_CONFIG} \
USE_SYSTEM_READLINE=1 \
USE_SYSTEM_PCRE=1 PCRE_CONFIG=${PCRE_CONFIG} \
USE_SYSTEM_LIBM=1 \
USE_SYSTEM_OPENLIBM=0 \
Expand Down
2 changes: 1 addition & 1 deletion contrib/vagrant/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,4 @@ downloaded during provisioning. To take advantage of these dependencies, use
the `jlmake` alias in place of `make`.

When the build is complete, you can run
`~/julia/usr/bin/julia-readline` to start Julia.
`~/julia/usr/bin/julia-basic` to start Julia.
4 changes: 2 additions & 2 deletions contrib/vagrant/Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ rm /home/vagrant/postinstall.sh
cat - > /home/vagrant/.bash_aliases <<"EOF"
export JULIA_VAGRANT_BUILD=1
BUILDOPTS="LLVM_CONFIG=llvm-config-3.3 USE_BLAS64=0"
for lib in LLVM ZLIB SUITESPARSE ARPACK BLAS FFTW LAPACK GMP MPFR PCRE LIBUNWIND READLINE GRISU OPENLIBM RMATH; do
for lib in LLVM ZLIB SUITESPARSE ARPACK BLAS FFTW LAPACK GMP MPFR PCRE LIBUNWIND GRISU OPENLIBM RMATH; do
export BUILDOPTS="$BUILDOPTS USE_SYSTEM_$lib=1"
done
Expand All @@ -18,7 +18,7 @@ apt-get update -qq -y
apt-get install python-software-properties -y
add-apt-repository ppa:staticfloat/julia-deps -y
apt-get update -qq -y
apt-get install g++ git make patchelf gfortran llvm-3.3 libsuitesparse-dev libncurses5-dev libopenblas-dev liblapack-dev libarpack2-dev libfftw3-dev libgmp-dev libpcre3-dev libunwind7-dev libreadline-dev libdouble-conversion-dev libopenlibm-dev librmath-dev libmpfr-dev -y
apt-get install g++ git make patchelf gfortran llvm-3.3 libsuitesparse-dev libopenblas-dev liblapack-dev libarpack2-dev libfftw3-dev libgmp-dev libpcre3-dev libunwind7-dev libdouble-conversion-dev libopenlibm-dev librmath-dev libmpfr-dev -y
SCRIPT

Vagrant.configure("2") do |config|
Expand Down
2 changes: 1 addition & 1 deletion contrib/windows/build-installer.nsi
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ Section "Dummy Section" SecDummy
SetOutPath $INSTDIR
File /a /r "julia-${Commit}\*"
WriteUninstaller "$INSTDIR\Uninstall.exe"
CreateShortcut "$INSTDIR\julia.lnk" "$INSTDIR\bin\julia-readline.exe"
CreateShortcut "$INSTDIR\julia.lnk" "$INSTDIR\bin\julia-basic.exe"
SectionEnd

Section "uninstall"
Expand Down
2 changes: 1 addition & 1 deletion contrib/windows/prepare-julia-env.bat
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

set SYS_PATH=%PATH%
set PATH=%~dp0;%~dp0bin;%~dp0usr\bin;%~dp0..\usr\bin;%~dp0..\..\usr\bin;%SYS_PATH%
set JULIA_EXE=julia-readline.exe
set JULIA_EXE=julia-basic.exe
for %%A in (%JULIA_EXE%) do set JULIA_HOME=%%~dp$PATH:A
set JULIA=%JULIA_HOME%%JULIA_EXE%
set PATH=%SYS_PATH%
Expand Down
2 changes: 1 addition & 1 deletion contrib/windows/test-julia.bat
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ pushd %cd%
setlocal enableextensions enabledelayedexpansion
call "%~dp0prepare-julia-env.bat" %tests%
cd "%JULIA_HOME%..\share\julia\test"
call "%JULIA_HOME%julia-readline.exe" runtests.jl %tests%
call "%JULIA_HOME%julia-basic.exe" runtests.jl %tests%
endlocal
popd
pause
Expand Down
4 changes: 1 addition & 3 deletions deps/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,7 @@
/openblas-*
/patchelf-*
/pcre-*
/readline-*
!readline-win.h
/root
/SuiteSparse-*
/zlib-*
/utf8proc-*
/utf8proc-*
92 changes: 2 additions & 90 deletions deps/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ CONFIGURE_COMMON += F77="$(FC)" CC="$(CC)" CXX="$(CXX)"
# they will override the values passed above to ./configure
MAKE_COMMON = DESTDIR="" prefix=$(build_prefix) bindir=$(build_bindir) libdir=$(build_libdir) libexecdir=$(build_libexecdir) datarootdir=$(build_datarootdir) includedir=$(build_includedir) sysconfdir=$(build_sysconfdir)

#autoconf configure-driven scripts: llvm readline pcre arpack fftw unwind gmp mpfr patchelf uv
#autoconf configure-driven scripts: llvm pcre arpack fftw unwind gmp mpfr patchelf uv
#custom Makefile rules: openlibm Rmath double-conversion random suitesparse-wrapper suitesparse lapack openblas utf8proc

# prevent installing libs into usr/lib64 on opensuse
Expand Down Expand Up @@ -65,14 +65,6 @@ ifeq ($(USE_SYSTEM_LLVM), 0)
STAGE1_DEPS += llvm
endif

ifeq ($(OS),WINNT)
READLINE_VER = 5.0
endif

ifeq ($(USE_SYSTEM_READLINE), 0)
STAGE1_DEPS += readline
endif

ifeq ($(USE_SYSTEM_PCRE), 0)
STAGE1_DEPS += pcre
endif
Expand Down Expand Up @@ -146,7 +138,7 @@ install: $(addprefix install-, $(LIBS))
cleanall: $(addprefix clean-, $(LIBS))
distclean: $(addprefix distclean-, $(LIBS))
rm -rf $(build_prefix)
getall: get-llvm get-readline get-uv get-pcre get-double-conversion get-openlibm get-openspecfun get-random get-openblas get-lapack get-fftw get-suitesparse get-arpack get-unwind get-osxunwind get-gmp get-mpfr get-zlib get-patchelf get-utf8proc
getall: get-llvm get-uv get-pcre get-double-conversion get-openlibm get-openspecfun get-random get-openblas get-lapack get-fftw get-suitesparse get-arpack get-unwind get-osxunwind get-gmp get-mpfr get-zlib get-patchelf get-utf8proc

## PATHS ##
# sort is used to remove potential duplicates
Expand Down Expand Up @@ -407,86 +399,6 @@ install-llvm: $(LLVM_OBJ_TARGET)
#todo: LLVM make check target is broken on julia.mit.edu (and really slow elsewhere)


## GNU readline ##


ifeq ($(OS),WINNT)
READLINE_OBJ_TARGET = $(build_libdir)/libreadline.a
READLINE_OBJ_SOURCE = readline-$(READLINE_VER)/libreadline.a
READLINE_URL = https://github.com/JuliaLang/readline/tarball/master
READLINE_OPTS = --disable-shared --enable-static --with-curses
READLINE_CFLAGS = LOCAL_DEFS="-include $(abspath .)/readline-win.h"
readline-$(READLINE_VER).tar.gz:
$(JLDOWNLOAD) $@ $(READLINE_URL)
touch -c $@
readline-$(READLINE_VER)/configure: readline-$(READLINE_VER).tar.gz
mkdir readline-$(READLINE_VER)
$(TAR) -C readline-$(READLINE_VER) --strip-components 1 -xf $<
touch -c $@
$(READLINE_OBJ_TARGET): $(READLINE_OBJ_SOURCE) readline-$(READLINE_VER)/checked
$(MAKE) -C readline-$(READLINE_VER) $(READLINE_CFLAGS) install $(MAKE_COMMON)
touch -c $@
else
READLINE_OBJ_TARGET = $(build_libdir)/libreadline.$(SHLIB_EXT)
ifneq ($(OS),Darwin)
READLINE_OBJ_SOURCE = readline-$(READLINE_VER)/shlib/libreadline.$(SHLIB_EXT).$(READLINE_VER)
else
READLINE_OBJ_SOURCE = readline-$(READLINE_VER)/shlib/libreadline.$(READLINE_VER).$(SHLIB_EXT)
endif
READLINE_URL = ftp:https://ftp.gnu.org/gnu/readline/readline-$(READLINE_VER).tar.gz
READLINE_OPTS = --enable-shared --enable-static --with-curses
READLINE_CFLAGS =
readline-$(READLINE_VER).tar.gz:
$(JLDOWNLOAD) $@ http:https://ftp.gnu.org/gnu/readline/$@
touch -c $@
readline-$(READLINE_VER)/configure: readline-$(READLINE_VER).tar.gz
$(TAR) zxf $<
cd readline-$(READLINE_VER) && patch -p0 < ../readline62-001
cd readline-$(READLINE_VER) && patch -p0 < ../readline62-002
cd readline-$(READLINE_VER) && patch -p0 < ../readline62-003
cd readline-$(READLINE_VER) && patch -p0 < ../readline62-004
touch -c $@
$(READLINE_OBJ_TARGET): $(READLINE_OBJ_SOURCE) readline-$(READLINE_VER)/checked
$(MAKE) -C readline-$(READLINE_VER) install $(MAKE_COMMON)
chmod +w $(build_libdir)/libreadline.* $(build_libdir)/libhistory.*
ifeq ($(OS), Darwin)
$(INSTALL_NAME_CMD)libreadline.$(SHLIB_EXT) $(build_libdir)/libreadline.$(SHLIB_EXT)
$(INSTALL_NAME_CMD)libhistory.dylib $(build_libdir)/libhistory.dylib
else ifeq ($(OS), Linux)
for filename in $(build_libdir)/libhistory.so* $(build_libdir)/libreadline.so* ; do \
$(PATCHELF) --set-rpath '$$ORIGIN' $$filename ;\
done
endif
touch -c $@
endif

readline-$(READLINE_VER)/config.status: readline-$(READLINE_VER)/configure
cd readline-$(READLINE_VER) && \
chmod a+x ./configure && \
./configure $(CONFIGURE_COMMON) $(READLINE_OPTS)
touch -c $@
$(READLINE_OBJ_SOURCE): readline-$(READLINE_VER)/config.status
cd readline-$(READLINE_VER) && \
$(MAKE) $(READLINE_CFLAGS)
touch -c $@
readline-$(READLINE_VER)/checked: $(READLINE_OBJ_SOURCE)
cd readline-$(READLINE_VER) && \
$(MAKE) check $(READLINE_CFLAGS)
echo 1 > $@

clean-readline:
-$(MAKE) -C readline-$(READLINE_VER) clean
-rm -f $(READLINE_OBJ_TARGET)
distclean-readline:
-rm -rf readline-$(READLINE_VER).tar.gz readline-$(READLINE_VER)

get-readline: readline-$(READLINE_VER).tar.gz
configure-readline: readline-$(READLINE_VER)/config.status
compile-readline: $(READLINE_OBJ_SOURCE)
check-readline: readline-$(READLINE_VER)/checked
install-readline: $(READLINE_OBJ_TARGET)


## LIBUV ##

UV_SRC_TARGET = libuv/.libs/libuv.a
Expand Down
1 change: 0 additions & 1 deletion deps/Versions.make
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
LLVM_VER = 3.3
LLVM_LIB_SUFFIX =
READLINE_VER = 6.2
PCRE_VER = 8.31
GRISU_VER = 1.1.1
DSFMT_VER = 2.2
Expand Down
14 changes: 0 additions & 14 deletions deps/readline-win.h

This file was deleted.

Loading

0 comments on commit e38577b

Please sign in to comment.