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
Seg fault after (apparently successful) cygwin instlal #3089
Comments
Comment author: administrator Xavier Leroy, Thanks for the quick response (which is great, since the course begins
That's good...but it would be nice if the Tcl/Tk part DID work, so
Hmmm. I could send you the hard drive and the motherboard :-) Seriously...I guess I can try to go back to an earlier version
Indeed. The debugger is the only reason I'm using that port. --John |
Comment author: administrator
Yes, the TCL/TK interface is optional, the rest of the system will
We've had several reports of this problem but could never reproduce As a quick workaround, you can run "configure" with the "-no-curses" As a side note, you may have good reasons to use the Cygwin port of Hope this helps,
|
Original bug ID: 3089
Reporter: administrator
Status: closed
Resolution: fixed
Priority: normal
Severity: minor
Category: ~DO NOT USE (was: OCaml general)
Bug description
Full_Name: John Hughes
Version: 3.08.0
OS: Windows XP
Submission from: ip68-228-151-51.ri.ri.cox.net (68.228.151.51)
I started with a virgin XP install -- I don't even have Office installed on this
machine. I was preparing a list of instructions for my students to install
cygwin,
ocaml, GNUEmacs, tuareg, etc.
Short summary:
The caml install partly failed:
./configure -tk-no-x11
mostly worked except in the Labltk portion, which said
tcl.h not found
Configuration failed, LablTk will not be built.
Note, though, that in fact tcl.h is in /usr/include. The configure script seems
to check just about every other possible place except this one.
Anyhow, figuring I didn't really care about Labltk, I went ahead and ran "make
world" which seemed to go fine. Then I ran ocaml. Here's a transcript:
$ ocaml
Objective Caml version 3.08.0
4.0;;
foo;;
Segmentation fault (core dumped)
jfh@waterman /usr/include
$
Not good. In fact, any time I type in an unknown identifier, I get a segfault.
Indeed, it appears that most syntax errors do the same thing:
$ ocaml
Objective Caml version 3.08.0
1/0;;
Exception: Division_by_zero.
let foo x y = x -> y;;
Segmentation fault (core dumped)
Just so that you can duplicate it, I'll copy here the entire instructions
that I followed in the course of the installation; I suppose that you can
safely skip the installation of Dr.Scheme, but since I did it, I thought
I'd include it here. The part concerning ML occurs just after the line
saying
so you can begin by looking for that
Looking forward to hearing from you. (By the way, if all this works,
I'm happy to clean up my install instructions for you to put on the
website if you think it might help anyone.)
--John Hughes
====================INSTALL INSTRUCTIONS FOLLOW====================
Preparation
Create cs17setup folder on your desktop
Make sure you have at least (###) of space on your hard drive
Downloading (requires 15 MB)
Download DrScheme: http://download.plt-scheme.org/drscheme/ into CS17setup
(8M)
Tortoise:
Go to http://www.tortoisecvs.org/download.shtml
Grab the download that says "Stable (for deployment)" and put it in CS17setup
Putty, Pageant et al.
Go to http://www.genetics.ucla.edu/intranet/howtos/tortoisecvs/
Grab the three things (Putty, Pageant, and PuTTYgen) under "Advanced SSH
configuration"
and put them in CS17setup
<for OCaml, if you want to work at home>
Cygwin
Go to http://www.cygwin.com/
Click on "Install or update now (using setup.exe); save setup.exe to CS17setup
Tuareg mode: go to http://www-rocq.inria.fr/~acohen/tuareg/ and click on
"Download";
accept the conditions; download tuareg-mode.tar.gz into CS17setup
Ocaml + debugger: go to http://caml.inria.fr/ocaml/distrib.html ; click on
"source
distribution" and save in CS17setup.
6A: If you don't already have "stuffit" on your computer, download stuffit
from www.stuffit.com into the CS17setup directory
7: GnuEmacs: go to http://ftp.gnu.org/gnu/windows/emacs/ and download
emacs-21.3-bin-i386.tar.gz into the CS17setup directory
Setup [at start, C:Program FIles = 120M]
Install DrScheme (52M); it's the download whose name start with "plt..."
Simply click "OK" in each step of the installer, but on the last one, unclick
"run DrScheme" before selecting "finish"
Install Tortoise CVS; on the last page of the installer, click "I'll restart
the computer later" before
clicking "finish" or "OK".
Installing putty and friends.
In "My Documents", create a folder called "ssh".
a. Move the putty files to a good place: create a folder in C:\Program Files
called "Putty";
b. Move three files from CS17setup to this new folder: putty, puttygen, and
pageant.
c. Navigate to the C:\Program Files\ folder, and click and drag the "Putty" icon
down to the "Start Menu"
and wait; the start menu should open; drag up to "Programs" and wait; the
"Programs" sub-menu should
open. Move it into the Programs menu (in alphabetical order perhaps?) and
release. This will cause it
to appear on the start menu.
d. Click on the start menu, then programs, then putty, and see the three
programs in there -- putty, puttygen, and pageant.
e. Select "puttygen". If you get a warning about unverified publishers, say
"OK".
Make sure that SSH2RSA is selected at the bottom, click on "generate", and then
move your mouse around as
instructed; soon puttygen will generate a "key pair"
f. Type a passphrase twice. I recommend something that you can remember easily;
indeed, I recommend something
that you can safely describe in words ("My favorite number, followed by the name
of the dog of my best friend
in 4th grade"); you can put this description somewhere (like in your ssh
folder!) so that you can remember
it, but no one else can find out what it is. DO NOT LEAVE THE PASSPHRASE EMPTY.
g. Click "save provate key" and save it in /My Documents/ssh/ssh-private-key
h. Select everything in the box at the top of the PuttyKeyGenerator dialog
(Where it says
"Public key for pasting into...") and hit ctrl-C to copy it to the clipboard.
i. Open Notepad and type ctrl-V; save the file in
/MyDocuments/ssh/authorized_keys2
j. Send some email from your home computer to your account at Brown Computer
Science; attach the document
authorized_keys2 that you just created.
k. On your account at Brown CS, read your mail; you'll find that there's an
attachment
(no surprise!) to the mail you just sent; you need to save it in
~/.ssh/authorized_keys2
l. Still at BrownCS, do the following
% chmod 700 ~/.ssh
% chmod 600 ~/.ssh/authorized_keys2.
{Note that items k and l require that you take a hike to BrownCS; you can do
them later, but
the "log in to brown" and "check that CVS works" steps will fail until you've
done them.}
a. Start...Program Files...Putty...putty
b. Under "Category", click on ssh and then "auth"; the appearance of the window
will change.
c. Under "authemtication", "Attempt keyboard-interacive" should be selected;
under authentication parameters,
both boxes should be unchecked; check on "Browse" and navigate to "My
Documents/ssh/" and select
"ssh-private-key.ppk" and click "Open"
d. At the left hand side, under "Category", click "session".
e. Type "ssh.cs.brown.edu" in the HostName field. Other settings should be
Port: 22
Protocol: SSH
Close Window: Never
Click "Open".
You'll get a warning "The server's host key is not cached in the registry..."
Click "Yes".
You'll be asked to login as someone; use your CS account name (I would use "jfh"
because that's MY
CS login, for instance).
f. It'll then ask you for the passphrase. Type in your favorite number followed
by the name of
your best friend's dog, or whatever else you chose.
g. If you do this before steps k and l, you'll get "No supported authentication
methods
left to try"; if you do it after, you should get something that says "Linux
incoming..."
and "Forwarding you to ..." and finally, a Linux prompt. You can type "exit" at
the
prompt, and it'll say "connection to ... closed" and a small window will pop up
saying
"Connection closed by remote host". Click "OK". Destroy the putty window.
NOTE: You can use this any time you want as a means of logging in to the CS Dept
machines from now on. Just fire up Putty, and connect!
a. Run setup.exe in the CS17setup folder
b. See "Cywin net release setup program". click "Next"
c. Select install-from-internet; click "Next"
d. See root directory C:\cygwin; leave this as is; install for "all users";
leave default text-file type as "unix". Click "Next".
e. "Set local package directory"; it should show the CS17Setup folder here;
that's fine.
Click "next".
f. Select "Direct Connection." Click "next".
g. "Choose Download Site." Pick something near you ftp://ftp.cise.ufl.edu
is a reasonable choice. Click "next"
h. "Progress". Cygwin starts its work, and aims to download some stuff.
This should happen reasonably fast. If nothing happens after a couple
of minutes, kill the program ("Cancel") and restart, choosing a different
site to download from.
i. "... Select Packages" Click on "archive default"; then on all four of the
little
double-arrow icons; this should show check-marks under the "bin" column; then
click
again on "Archive default" to hide these sub-selection. You'll do the same for a
number
of other things:
Devel ... gcc AND make
Doc Default .. cygwin-doc
Math default ... gnuplot
Click "OK". Then wait a long time while stuff is downloaded.
Select "add icon to start menu." Don't do the icon on the desktop unless you
really want to
Go to start...Cygwin Bash Shell.
You'll see something like this:
Copying skeleton files.
These files are for the user to personalise
their cygwin experience.
These will never be overwritten.
./.bashrc' ->
/home/jfh//.bashrc'./.bash_profile' ->
/home/jfh//.bash_profile'./.inputrc' ->
/home/jfh//.inputrc'Type "exit" at the prompt and the window should disappear.
5.5 If you don't have Stuffit installed already, install it now. (double click
on
the "stuffit..." file in the CS17setup directory, and follow instructions).
a. Double-click on the file you downloaded called ocaml...tar.tar; this
will result in a folder appearing in CS17setup with the name ocaml-3.08.0
(or something very like it). Move this folder to C:.
b. Go to Start...Programs...Cygwin...Cygwin Bash Shell; a black window
should show up, labeled with a black-and-green "C" icon. The next several
things you do will be typed into this window. The prompt in this window is
probably a "$" sign; I'll include this prompt in my directions.
c. Change to the right directory:
$ cd /cygdrive/c/ocaml*
d. Configure the setup process:
$ ./configure -no-tk -tk-no-x11
(Expect a LOT of messages about the progress of the configuration)
e. Make the ocaml programs:
$ make world
(Once again, expect a lot of output)
f. Install everything in the right places:
$ umask 022
$ make install
g. get things ready to cooperate with emacs:
$ cd emacs
$ make install
h. Clean up the mess you've just made:
$ cd ..
$ make clean
(expect lots more output here)
You're done!
i. Test things out: you're going to run ocaml (which has a "#" for a prompt)
and test that it works by doing the following:
$ ocaml
Object Caml version...
4.0;; <--- note the TWO semicolons
frob;; <--- should generate an error, but not make ocaml crash
# exit 0;; <--- that's a "zero", not a capital "o"$ exit
(You may get a question "Terminate batch job (Y/N)?" at this point; answer "Y")
a. Double-click on the file you downloaded whose name starts with emacs...
b. Stuffit should give you the option of "expanding" it; do so.
c. You should now see a folder called emacs-21.3 in your CS17setup folder
move this folder to C:, so that it becomes C:/emacs-21.3
d. Open the folder C:/emacs-21.3
e. Open the "bin" folder in there, and double-click on addpm.exe (which may
show up as addpm in your browser). Say "OK" when the dialog appears.
f. You're done installing GNUEmacs; there should be an entry for GunEmacs in
your start-menu now.
7.5 Customize GNUEmacs
set up a HOME variable:
a. Go to Start...Settings...Control Panel...System; click the "Advanced" tab.
b. Click (near the bottom) the "Environment Variables" button.
c. In the "User variables for ..." area, click "New"
d. For the Variable name, put in "HOME" (all capital letters, no quotes)
e. For the variable value, put in "%USERPROFILE%\My Documents" (no quotes).
f. Click OK
g. In the "System variables" area, click on "Path".
h. At the END of the variable value, add ";C:\cygwin\usr\local\bin" (without the
quotes...but
be sure to include the semicolon! DON'T put in any spaces!)
i. click OK. Click OK again; Click OK again.
Create a .emacs file:
j. Copy the _emacs file from CS17setup to your "My Documents" folder.
a. Double-click the "tuareg..." file that you downloaded, and extract the
contents; a new folder called "tuareg..." should appear in CS17setup.
b. Open the folder C:\emacs-21.3\site-lisp.
c. Drag (or copy-and-paste) all the files ending in .el from the tuareg folder
to the site-lisp folder.
a. Go to Start...Programs...GNUEmacs...Emacs and click; Emacs will appear.
b. In the Emacs window, type C-c C-f foo.ml (here "C-c" means
"control-C")
As you type the C-f, your cursor will jump to the bottom of the screen (the
"status line")
and the "foo.ml" will appear there where you type it. When you hit "",
you should
see, in the status line, something like this:
"Major mode for Caml programs, Tuareg mode"
and up above, in the menu bar, you should see "Tuareg" as one of the menus, just
before
"Help".
c. Type
4.0;;
in the main window.
d. Click on the Tuareg menu, Interactive Mode, Evaluate Buffer;
something should appear in the status line saying "Caml toplevel to run:
ocaml".
Hit
Your emacs windows should divide into two parts, the lower of which shows
an objective caml interaction window in which appears
4.0;;
e. Time to kill emacs and ocaml: go to File...Exit Emacs; when the popup
window asks you about saving files, say "no." When it says "Modified buffers
exist; exit anyway?", say "yes". WHen it says "Active Processes exist; exit
anyway?" say "yes".
The text was updated successfully, but these errors were encountered: