X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f From: Rugxulo Newsgroups: comp.os.msdos.djgpp Subject: Ruby 1.8.7 p352 (DOSEMU + sh -c "./configure && make") Date: Wed, 21 Dec 2011 14:46:23 -0800 (PST) Organization: http://groups.google.com Lines: 137 Message-ID: NNTP-Posting-Host: 65.13.115.246 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: posting.google.com 1324508423 14243 127.0.0.1 (21 Dec 2011 23:00:23 GMT) X-Complaints-To: groups-abuse AT google DOT com NNTP-Posting-Date: Wed, 21 Dec 2011 23:00:23 +0000 (UTC) Complaints-To: groups-abuse AT google DOT com Injection-Info: n39g2000yqh.googlegroups.com; posting-host=65.13.115.246; posting-account=p5rsXQoAAAB8KPnVlgg9E_vlm2dvVhfO User-Agent: G2/1.0 X-Google-Web-Client: true X-Google-Header-Order: HNKRAUELSC X-HTTP-UserAgent: Mozilla/5.0 (X11; U; Linux i686; en-US) AppleWebKit/534.16 (KHTML, like Gecko) Chrome/10.0.630.0 Safari/534.16,gzip(gfe) Bytes: 6388 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Hi guys, I don't really care about Ruby, never learned it. And it doesn't help that 1.8.7 (last to support DJGPP, barely) will "die" soon (as intended) in lieu of 1.9.3. Pre-existing binaries do exist for 1.8.4 (circa late 2005), but I still wanted to see if I could get 1.8.7 (circa 2008 but with latest patches) to build yet again. http://www.ruby-lang.org/en/ http://www.ruby-lang.org/en/news/2011/07/02/ruby-1-8-7-p352-released/ http://www.ruby-lang.org/en/news/2011/10/06/plans-for-1-8-7/ ftp://ftp.ruby-lang.org/pub/ruby/binaries/djgpp/1.8/ Unfortunately, Urabe (despite my email to him) never officially patched the DJGPP bugs from last time, so it still needs some tweaks. And I'm not sure these are correct, but anyways .... ========================================== --- configure.bak 2011-12-21 15:48:12 +0000 +++ configure 2011-12-21 15:48:12 +0000 @@ -12001,7 +12001,7 @@ _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then +if false; then #sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" else cat --- util.bak 2011-12-21 15:50:52 +0000 +++ util.c 2011-12-21 15:51:22 +0000 @@ -80,7 +80,7 @@ # define S_ISDIR(m) ((m & S_IFMT) == S_IFDIR) #endif -#if defined(MSDOS) || defined(__CYGWIN32__) || defined(_WIN32) +#if defined(__CYGWIN32__) || defined(_WIN32) || defined(__DJGPP__) /* * Copyright (c) 1993, Intergraph Corporation * @@ -234,7 +234,7 @@ memcpy(RSTRING_PTR(str), buf, RSTRING_LEN(str)); } -#if defined(__CYGWIN32__) || defined(_WIN32) +#if defined(__CYGWIN32__) || defined(_WIN32) || defined(__DJGPP__) #if defined __CYGWIN32__ || defined __MINGW32__ extern int _open(const char *, int, ...); extern int _close(int); @@ -252,7 +252,7 @@ if ((fd = _open(s, O_CREAT|O_EXCL, 0666)) >= 0) { _close(fd); - _unlink(s); /* don't leave it laying around */ + unlink(s); /* don't leave it laying around */ return 1; } else if (errno == EEXIST) { --- config.bak 2011-12-21 15:56:02 +0000 +++ config.h 2011-12-21 15:53:26 +0000 @@ -59,7 +59,7 @@ #define HAVE_SYS_PARAM_H 1 #define HAVE_PWD_H 1 #define HAVE_GRP_H 1 -#define HAVE_UTIME_H 1 +/* #define HAVE_UTIME_H 1 */ #define HAVE_MEMORY_H 1 #define HAVE_DIRECT_H 1 #define HAVE_SYS_RESOURCE_H 1 @@ -116,7 +116,7 @@ #define HAVE_FTRUNCATE 1 #define HAVE_CHSIZE 1 #define HAVE_TIMES 1 -#define HAVE_UTIMES 1 +/* #define HAVE_UTIMES 1 */ #define HAVE_FCNTL 1 #define HAVE_LOCKF 1 #define HAVE_LSTAT 1 --- sample/test.bak 2011-12-21 15:55:04 +0000 +++ sample/test.rb 2011-12-21 15:55:04 +0000 @@ -1740,8 +1740,11 @@ tmp.close test_ok(done) -File.unlink "script_tmp" or `/bin/rm -f "script_tmp"` -File.unlink "script_tmp.bak" or `/bin/rm -f "script_tmp.bak"` +#File.unlink "script_tmp" or `/bin/rm -f "script_tmp"` +#File.unlink "script_tmp.bak" or `/bin/rm -f "script_tmp.bak"` +`/bin/rm -f "script_tmp"` +`/bin/rm -f "script_tmp.bak"` + $bad = false if (dir = File.dirname(File.dirname($0))) == '.' ========================================== Mainly, I was using this as an example of ./configure hanging (under DOSEMU, unlike WinXP) at the config.status part (as mentioned previously re: BRrexx). It seems to be a problem with NUL handling (as mentioned previously re: GNU Emacs). Perhaps I should report it to Bart Oldeman (DOSEMU dude). For now, though, if anybody cares (doubt it), maybe you can use this workaround (GNU Autoconf 2.65). So, in short, summary of the patch: 1). Avoid DOSEMU "NUL" bug so that config.status can run correctly to generate the Makefile stuff. (Otherwise, Ctrl-Break is your only way [sic!].) 2). Fix a silly MSDOS define that isn't DJGPP specific (and gives the wrong impression). I think Ruby always assumes long = pointer, but one guy said that matches DOS' huge model, so who knows, maybe a 16-bit port is possible (or already done?? dunno ...), heh. 3). Add __DJGPP__ define check so that it can find _valid_filename (util.c) else won't compile at all. 4). Rename _unlink (MS-specific??) to unlink. 5). Comment out HAVE_UTIME_H and HAVE_UTIMES ... dunno why but it mishandles this. Perhaps using at ./configure time both "ac_cv_header_utime_h=no" and "ac_cv_func_utimes=no" would've been a better way (EDIT: Yup). 6). Remove File.unlink parts (in lieu of `/bin/rm -f`) as they were bombing out (don't work? or only if not exist??) in test.rb. BTW, be sure to unpack in root dir of C:\ as some of the directories are long (maybe too long, I didn't fully check, probably bigger than 64+3, ugh). But you don't need all the ext/* stuff anyways (e.g. no tcltklib), see ext/Setup.dj. (The /djgpp/ subdir stuff is old and bitrotted and doesn't work, AFAICT.) P.S. Am I doing this wrong? Yes, I've installed Ozkan's Linux-hosted cross-compiler, but in some ways I'd rather have native builds. Should I be using DJGPP's native AutoConf 2.59 build and "autoscan" or whatever?? Would that make it work better in plain DOS?? (For me, ./ configure literally doesn't seem to run at all there, even with DOSLFN loaded.)