* Sys.getenv does not work under OS X?
@ 2008-09-11 12:51 Alan Schmitt
2008-09-11 12:54 ` [Caml-list] " Christian Sternagel
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Alan Schmitt @ 2008-09-11 12:51 UTC (permalink / raw)
To: caml-list
[-- Attachment #1: Type: text/plain, Size: 479 bytes --]
Hello,
I'm using OS X (Leopard, up to date), with ocaml 3.10.2 (compiled with
godi), and I was trying to use htmlc which fails for some reason. it
boils down to the following:
schmitta@charm compiler % echo $HOST
charm.inrialpes.fr
schmitta@charm compiler % ledit ocaml
Objective Caml version 3.10.2
# Sys.getenv "$HOST";;
Exception: Not_found.
# Sys.getenv "HOST";;
Exception: Not_found.
Is Sys.getenv supposed to work under OS X?
Thanks a lot,
Alan Schmitt
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 186 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Caml-list] Sys.getenv does not work under OS X?
2008-09-11 12:51 Sys.getenv does not work under OS X? Alan Schmitt
@ 2008-09-11 12:54 ` Christian Sternagel
2008-09-11 12:58 ` Nicolas Pouillard
2008-09-11 14:22 ` Eric Cooper
2 siblings, 0 replies; 5+ messages in thread
From: Christian Sternagel @ 2008-09-11 12:54 UTC (permalink / raw)
To: Alan Schmitt; +Cc: caml-list
Alan Schmitt wrote:
> Hello,
>
> I'm using OS X (Leopard, up to date), with ocaml 3.10.2 (compiled with
> godi), and I was trying to use htmlc which fails for some reason. it
> boils down to the following:
>
> schmitta@charm compiler % echo $HOST
> charm.inrialpes.fr
> schmitta@charm compiler % ledit ocaml
> Objective Caml version 3.10.2
>
> # Sys.getenv "$HOST";;
> Exception: Not_found.
> # Sys.getenv "HOST";;
> Exception: Not_found.
Maybe you ment
Sys.getenv "HOSTNAME"
?
cheers
christian
>
>
> Is Sys.getenv supposed to work under OS X?
>
> Thanks a lot,
>
> Alan Schmitt
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Caml-list mailing list. Subscription management:
> http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
> Archives: http://caml.inria.fr
> Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
> Bug reports: http://caml.inria.fr/bin/caml-bugs
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Caml-list] Sys.getenv does not work under OS X?
2008-09-11 12:51 Sys.getenv does not work under OS X? Alan Schmitt
2008-09-11 12:54 ` [Caml-list] " Christian Sternagel
@ 2008-09-11 12:58 ` Nicolas Pouillard
2008-09-11 14:22 ` Eric Cooper
2 siblings, 0 replies; 5+ messages in thread
From: Nicolas Pouillard @ 2008-09-11 12:58 UTC (permalink / raw)
To: Alan Schmitt; +Cc: caml-list
[-- Attachment #1: Type: text/plain, Size: 673 bytes --]
Excerpts from Alan Schmitt's message of Thu Sep 11 14:51:06 +0200 2008:
> Hello,
>
> I'm using OS X (Leopard, up to date), with ocaml 3.10.2 (compiled with
> godi), and I was trying to use htmlc which fails for some reason. it
> boils down to the following:
>
> schmitta@charm compiler % echo $HOST
> charm.inrialpes.fr
> schmitta@charm compiler % ledit ocaml
> Objective Caml version 3.10.2
>
> # Sys.getenv "$HOST";;
> Exception: Not_found.
Wrong
> # Sys.getenv "HOST";;
> Exception: Not_found.
Should work
> Is Sys.getenv supposed to work under OS X?
I'm guessing some special thing for HOST, since it work for HOME
--
Nicolas Pouillard aka Ertai
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 194 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Caml-list] Sys.getenv does not work under OS X?
2008-09-11 12:51 Sys.getenv does not work under OS X? Alan Schmitt
2008-09-11 12:54 ` [Caml-list] " Christian Sternagel
2008-09-11 12:58 ` Nicolas Pouillard
@ 2008-09-11 14:22 ` Eric Cooper
2008-09-11 14:42 ` Alan Schmitt
2 siblings, 1 reply; 5+ messages in thread
From: Eric Cooper @ 2008-09-11 14:22 UTC (permalink / raw)
To: caml-list
On Thu, Sep 11, 2008 at 02:51:06PM +0200, Alan Schmitt wrote:
> schmitta@charm compiler % echo $HOST
> charm.inrialpes.fr
Are you sure HOST is an environment variable, and not just a variable
that's set in your shell? You can use "printenv HOST" to check.
--
Eric Cooper e c c @ c m u . e d u
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Caml-list] Sys.getenv does not work under OS X?
2008-09-11 14:22 ` Eric Cooper
@ 2008-09-11 14:42 ` Alan Schmitt
0 siblings, 0 replies; 5+ messages in thread
From: Alan Schmitt @ 2008-09-11 14:42 UTC (permalink / raw)
To: caml-list
[-- Attachment #1: Type: text/plain, Size: 503 bytes --]
On 11 sept. 08, at 16:22, Eric Cooper wrote:
> On Thu, Sep 11, 2008 at 02:51:06PM +0200, Alan Schmitt wrote:
>> schmitta@charm compiler % echo $HOST
>> charm.inrialpes.fr
>
> Are you sure HOST is an environment variable, and not just a variable
> that's set in your shell? You can use "printenv HOST" to check.
Thanks for all the answers, this is the problem. I don't know what
sets "HOST" but I had to export it to be able to access it.
Thanks again for helping me find the culprit.
Alan Schmitt
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 186 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2008-09-11 14:42 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-09-11 12:51 Sys.getenv does not work under OS X? Alan Schmitt
2008-09-11 12:54 ` [Caml-list] " Christian Sternagel
2008-09-11 12:58 ` Nicolas Pouillard
2008-09-11 14:22 ` Eric Cooper
2008-09-11 14:42 ` Alan Schmitt
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox