Re: [Chicken-users] [Chicken-hackers] CHICKEN 4.9.0rc1 is available

2014-05-08 Thread Peter Bex
On Thu, May 08, 2014 at 12:32:16AM +0200, Michele La Monaca wrote:
> Hi,
> 
> > Could you try the attached patch instead?  I've tested it on Debian
> > (with zsh and csh), OpenIndiana, Haiku, Cygwin and Mingw-msys.
> 
> Works fine on Solaris.

Thanks for testing.  I've pushed this to master *and* prerelease (which
means it will end up into 4.9.0)

Cheers,
Peter
-- 
http://www.more-magic.net

___
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] [Chicken-hackers] CHICKEN 4.9.0rc1 is available

2014-05-07 Thread Michele La Monaca
Hi,

> Could you try the attached patch instead?  I've tested it on Debian
> (with zsh and csh), OpenIndiana, Haiku, Cygwin and Mingw-msys.

Works fine on Solaris.

> What shell is Solaris really using?

Solaris 10 -> Bourne shell.
Solaris 11 -> Korn shell.

I would like to make my OpenIndiana
> mimick the "real" Solaris as much as possible (I'd install Solaris but
> I didn't manage to get it installed in a VM.  And downloading it is a
> royal pain, too).  I checked, but "sh" in OpenIndiana is ksh, which also
> knows about ${PWD}.  Even csh seems to support ${PWD}.  So it appears
> it's not exactly a bashism, but rather an extremely common extension to
> POSIX sh.  So knowing exactly what Solaris uses for a shell would be
> very helpful.

This might help:

http://www.gnu.org/software/autoconf/manual/autoconf-2.64/html_node/Special-Shell-Variables.html#Special-Shell-Variables

Regards,
Michele

___
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] [Chicken-hackers] CHICKEN 4.9.0rc1 is available

2014-05-07 Thread Peter Bex
On Tue, May 06, 2014 at 10:23:42PM +, Mario Domenech Goulart wrote:
> Hi Michele,
> 
> Many thanks.  Attached is your patch signed-off (tested on Linux).

Hi guys,

Thanks for your efforts.  Unfortunately, this patch breaks the mingw-msys
build.  The msys tools all require a "faux Unix" path, like /c/mingw
rather than a Windows-style path like c:/mingw or c:\mingw.

We define TEST_DIR as `pwd -W`, which prints out a Windows-style path
because this value is passed to programs, which use them in system calls
(which are not emulated by mingw, so must be native paths).

Could you try the attached patch instead?  I've tested it on Debian
(with zsh and csh), OpenIndiana, Haiku, Cygwin and Mingw-msys.

What shell is Solaris really using?  I would like to make my OpenIndiana
mimick the "real" Solaris as much as possible (I'd install Solaris but
I didn't manage to get it installed in a VM.  And downloading it is a
royal pain, too).  I checked, but "sh" in OpenIndiana is ksh, which also
knows about ${PWD}.  Even csh seems to support ${PWD}.  So it appears
it's not exactly a bashism, but rather an extremely common extension to
POSIX sh.  So knowing exactly what Solaris uses for a shell would be
very helpful.

Cheers,
Peter
-- 
http://www.more-magic.net
>From 765eff9d0bce2601897f374934f3acd6e3a5fa51 Mon Sep 17 00:00:00 2001
From: Michele La Monaca 
Date: Tue, 6 May 2014 13:17:57 +0200
Subject: [PATCH] fix private repository tests for Solaris

Signed-off-by: Mario Domenech Goulart 
Signed-off-by: Peter Bex 
---
 tests/runtests.sh |7 ---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/tests/runtests.sh b/tests/runtests.sh
index d2ffe72..5007f8a 100755
--- a/tests/runtests.sh
+++ b/tests/runtests.sh
@@ -398,10 +398,11 @@ $compile -e embedded3.c embedded4.scm
 echo " private repository test ..."
 mkdir -p tmp
 $compile private-repository-test.scm -private-repository -o tmp/xxx
-tmp/xxx $PWD/tmp
-PATH=$PWD/tmp:$PATH xxx $PWD/tmp
+tmp/xxx ${TEST_DIR}/tmp
+# This MUST be `pwd`: ${PWD} is not portable, and ${TEST_DIR} breaks mingw-msys
+PATH=`pwd`/tmp:$PATH xxx ${TEST_DIR}/tmp
 # this may crash, if the PATH contains a non-matching libchicken.dll on 
Windows:
-#PATH=$PATH:$PWD/tmp xxx $PWD/tmp
+#PATH=$PATH:${TEST_DIR}/tmp xxx ${TEST_DIR}/tmp
 rm -fr rev-app rev-app-2 reverser/*.import.* reverser/*.so
 
 echo " reinstall tests"
-- 
1.7.10.4

___
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] [Chicken-hackers] CHICKEN 4.9.0rc1 is available

2014-05-06 Thread Mario Domenech Goulart
Hi Michele,

On Tue, 6 May 2014 17:39:32 +0200 Michele La Monaca 
 wrote:

>> Thanks a lot.  As I understand it, $PWD and `pwd` don't produce the same
>> value on your system.  Is it right?
>
> Right. The attached script produces this output on my system:
>
> /tmp
> /tmp
>
> /tmp
> /tmp/tmp
>
>
>> Getting the current work directory is surprisingly hard (maybe not that
>> surprising).  There's $PWD, the pwd shell builtin and the pwd executable
>> file (usually /bin/pwd or /usr/bin/pwd).  Sometimes they don't produce
>> consistent results when the current work directory is a symlink or the
>> path to it contains a symlink.  That's probably why this test breaks on
>> your system.
>
> Anyway $TEST_DIR and hence `pwd` (builtin or not) seems to work
> properly on all systems, so it looks a safer choice.
>
>> Does the path to the directory where you built and tested CHICKEN
>> contain a symlink?
>
> No.
>
>> What shell are you using?
>
> On Solaris 10 /bin/sh is a bourne shell (thus it has a builtin pwd
> much like the korn shell).

Many thanks.  Attached is your patch signed-off (tested on Linux).

Best wishes.
Mario
-- 
http://parenteses.org/mario
>From 633d0c6bd49d7c4501136abe3f9e1b1bdf538e10 Mon Sep 17 00:00:00 2001
From: Michele La Monaca 
Date: Tue, 6 May 2014 13:17:57 +0200
Subject: [PATCH] fix private repository tests for Solaris

Signed-off-by: Mario Domenech Goulart 
---
 tests/runtests.sh |6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/tests/runtests.sh b/tests/runtests.sh
index d2ffe72..2dbeedd 100755
--- a/tests/runtests.sh
+++ b/tests/runtests.sh
@@ -398,10 +398,10 @@ $compile -e embedded3.c embedded4.scm
 echo " private repository test ..."
 mkdir -p tmp
 $compile private-repository-test.scm -private-repository -o tmp/xxx
-tmp/xxx $PWD/tmp
-PATH=$PWD/tmp:$PATH xxx $PWD/tmp
+tmp/xxx ${TEST_DIR}/tmp
+PATH=${TEST_DIR}/tmp:$PATH xxx ${TEST_DIR}/tmp
 # this may crash, if the PATH contains a non-matching libchicken.dll on Windows:
-#PATH=$PATH:$PWD/tmp xxx $PWD/tmp
+#PATH=$PATH:${TEST_DIR}/tmp xxx ${TEST_DIR}/tmp
 rm -fr rev-app rev-app-2 reverser/*.import.* reverser/*.so
 
 echo " reinstall tests"
-- 
1.7.10.4

___
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] [Chicken-hackers] CHICKEN 4.9.0rc1 is available

2014-05-06 Thread Michele La Monaca
Hi Mario,

> Thanks a lot.  As I understand it, $PWD and `pwd` don't produce the same
> value on your system.  Is it right?

Right. The attached script produces this output on my system:

/tmp
/tmp

/tmp
/tmp/tmp


> Getting the current work directory is surprisingly hard (maybe not that
> surprising).  There's $PWD, the pwd shell builtin and the pwd executable
> file (usually /bin/pwd or /usr/bin/pwd).  Sometimes they don't produce
> consistent results when the current work directory is a symlink or the
> path to it contains a symlink.  That's probably why this test breaks on
> your system.

Anyway $TEST_DIR and hence `pwd` (builtin or not) seems to work
properly on all systems, so it looks a safer choice.

> Does the path to the directory where you built and tested CHICKEN
> contain a symlink?

No.

> What shell are you using?

On Solaris 10 /bin/sh is a bourne shell (thus it has a builtin pwd
much like the korn shell).

Regards,
Michele


pwd-test.sh
Description: Bourne shell script
___
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] [Chicken-hackers] CHICKEN 4.9.0rc1 is available

2014-05-06 Thread John Cowan
Mario Domenech Goulart scripsit:

> Getting the current work directory is surprisingly hard (maybe not that
> surprising).  There's $PWD, the pwd shell builtin and the pwd executable
> file (usually /bin/pwd or /usr/bin/pwd).  

You can't count on the shell built-in existing; it's a bashism.  As for
/bin/pwd, it turns out it has options:  /bin/pwd -L does sanity checks
on $PWD and outputs it if it looks sane (if not, it falls back to its
internal algorithm), whereas /bin/pwd -P ignores $PWD.  The default is -L.
I doubt if one Unix programmer in ten thousand knows about these.

Some Unixes have a syscall to retrieve the current directory.  If not,
the canonical algorithm is to stat "." to find out its device number
and i-number, and then cd to ".." and search the new current
directory for a name whose i-number matches the one we had before.
Repeat until we reach the root (i-number 2).

-- 
John Cowan  http://www.ccil.org/~cowanco...@ccil.org
There are three kinds of people in the world:
those who can count, and those who can't.

___
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] [Chicken-hackers] CHICKEN 4.9.0rc1 is available

2014-05-06 Thread Mario Domenech Goulart
Hi Michele,

On Tue, 6 May 2014 14:19:19 +0200 Michele La Monaca 
 wrote:

> this patch fixes the private repository issue in Solaris.

Thanks a lot.  As I understand it, $PWD and `pwd` don't produce the same
value on your system.  Is it right?

Getting the current work directory is surprisingly hard (maybe not that
surprising).  There's $PWD, the pwd shell builtin and the pwd executable
file (usually /bin/pwd or /usr/bin/pwd).  Sometimes they don't produce
consistent results when the current work directory is a symlink or the
path to it contains a symlink.  That's probably why this test breaks on
your system.

Does the path to the directory where you built and tested CHICKEN
contain a symlink?  What shell are you using?

Best wishes.
Mario

>
> Regards,
> Michele
>
> On Sun, May 4, 2014 at 3:54 PM, Michele La Monaca
>  wrote:
>> OS : Solaris 10
>> ARCH   : sparc
>> C_COMP : Sun C 5.11
>>
>> Installation works? : yes
>> Installation of eggs works? : yes
>> Tests work? : almost ->
>>
>> ===private repository test ...
>>
>> Error: (read-symbolic-link) could not canonicalize path with symbolic
>> links, component does not exis
>> t: "..."
>>
>>
>> Regards,
>> Michele
>>
>> On Fri, Apr 18, 2014 at 3:12 PM, Mario Domenech Goulart
>>  wrote:
>>> Hi,
>>>
>>> The first release candidate for CHICKEN 4.9.0 has been released.  It's
>>> available at
>>> http://code.call-cc.org/dev-snapshots/2014/04/17/chicken-4.9.0rc1.tar.gz
>>>
>>> See http://code.call-cc.org/dev-snapshots/2014/04/17/NEWS for the list
>>> of changes.
>>>
>>> Please, give it a test and report back to the mailing list your
>>> findings.
>>>
>>> Here's a suggested test procedure:
>>>
>>>   $ make PLATFORM= PREFIX= install check
>>>   $ /bin/chicken-install pastiche
>>>
>>> If you want to build CHICKEN with a compiler other than the default one,
>>> just use C_COMPILER= (e.g., C_COMPILER=clang) on the make
>>> invocation.
>>>
>>> Of course, feel free to explore other supported build options (see the
>>> README file for more information) and actually use CHICKEN 4.9.0rc1 for
>>> your software.
>>>
>>> If you can, please let us know the following information about the
>>> environment you tested the RC tarball on:
>>>
>>> Operating system: (e.g., FreeBSD 10.0, Debian 7, Windows XP mingw-msys)
>>> Hardware platform: (e.g., x86, x86-64, PPC)
>>> C Compiler: (e.g., GCC 4.8.1, clang 3.0-6.2)
>>> Installation works?: yes or no
>>> Tests work?: yes or no
>>> Installation of eggs works?: yes or no
>>>
>>> Thanks in advance.
>>>
>>> The CHICKEN Team
>>> --
>>> http://www.call-cc.org
>>>
>>> ___
>>> Chicken-users mailing list
>>> Chicken-users@nongnu.org
>>> https://lists.nongnu.org/mailman/listinfo/chicken-users
>
> ___
> Chicken-hackers mailing list
> chicken-hack...@nongnu.org
> https://lists.nongnu.org/mailman/listinfo/chicken-hackers

-- 
http://parenteses.org/mario

___
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users