2011/2/7 Romain Beauxis <[email protected]>:
> 2011/2/7 Elliott Barnes <[email protected]>:
>> Hi, thanks for the corrections.
>>
>> We now have some success, I think. :)
>>
>> /media/jingles was just an example of my directory structure.
>>
>> Here's the output:
>>
>>
>>         Objective Caml version 3.11.2
>>
>>  # Sys.is_directory "/username/jingles";;
>>  - : bool = true
>>
>> Hope that helps somewhat.
>
> Yes, thanks. However, sorry for insisting but I really need the unix
> test too. In fact, I have just tested locally the noatime attribute
> and it does not seem to raise any issue. Thus, the issue probably lies
> somewhere else, which is why testing the unix command would help a
> lot..
>
> Again, here is the command:
>  * As normal user, run:
>    ledit ocaml unix.cma
>  * At the promp, paste:
>    Unix.stat "/username/jingles";;
>  * Send us the result (hopefully an ocaml exception..)
>
> If the above keeps on not working, you may do the following:
>  * As root:
>    apt-get install ocaml-findlib
>  * Paste the following code in a /tmp/test.ml file:
> (***** Test code ****°
> let () =
>  Printf.printf "Result: %b\n%!"
>    ((Unix.stat Sys.argv.(1)).Unix.st_kind = Unix.S_DIR)
> (****** End test code ****)

(Damn!!) Sorry, I meant:

(***** Test code ****)
let () =
 Printf.printf "Result: %b\n%!"
   ((Unix.stat Sys.argv.(1)).Unix.st_kind = Unix.S_DIR)
(****** End test code ****)

>  * Compile the file:
>    ocamlfind ocamlopt -linkpkg -package unix -g /tmp/test.ml -o /tmp/test
>  * Run it:
>  OCAMLRUNPARAM="b" /tmp/test /username/media
>
> Any of those two ways should show an error hopefully..
>
> Romain
>
>> Cheers.
>>
>> Elliott.
>>
>> On 07/02/2011, Romain Beauxis <[email protected]> wrote:
>>> 2011/2/7 Elliott Barnes <[email protected]>:
>>>> Hi.
>>>
>>> Hi,
>>>
>>> Thanks for your patience :)
>>>
>>>> I ran both commands, but I'm getting the following output - don't
>>>> think it's what you're afer:
>>>>
>>>>         Objective Caml version 3.11.2
>>>>
>>>>  # (Unix.stat "/jingles").Unix.st_kind = Unix.S_DIR;;
>>>>  Error: Reference to undefined global `Unix'
>>>>  # Sys.is_directory "/jingles"
>>>
>>> If you run:
>>>   ledit ocaml unix.cma
>>> it should load the unix module.. Did you run it with unix.cma added at the
>>> end ?
>>> Also, I am sorry for the mistake, for the second one I meant (followed
>>> by return):
>>>   Sys.is_directory "/media/jingles";;
>>> notice the ;; at the end..
>>>
>>> Finally, you should use the directory that is not working so
>>> "/media/jingles" I think (the above commands show "/jingles")
>>>
>>> Romain
>>>
>>>> Thanks.
>>>>
>>>> On 07/02/2011, Romain Beauxis <[email protected]> wrote:
>>>>> Hi,
>>>>>
>>>>> No fix has yet been comitted. What would be very nice if if you could
>>>>> do the following:
>>>>>
>>>>>  * As root:
>>>>> apt-get install ocaml-nox ledit
>>>>>  * As normal user, run
>>>>>   ledit ocaml
>>>>>  * At the prompt paste this line (followed by return):
>>>>>   (Unix.stat "/media/jingles").Unix.st_kind = Unix.S_DIR;;
>>>>>  * Then type the following (followed by return again):
>>>>>   Sys.is_directory "/media/jingles"
>>>>>  * Post here the results of the two commeands
>>>>>
>>>>> This would confirm the expected issue and I would be able to commit
>>>>> immediatly a fix..
>>>>>
>>>>> Romain
>>>>>
>>>>> 2011/2/7 Elliott Barnes <[email protected]>:
>>>>>> Hi.
>>>>>>
>>>>>> What do I have to change? I didn't see any code above.
>>>>>>
>>>>>> Cheers.
>>>>>>
>>>>>> On 07/02/2011, Romain Beauxis <[email protected]> wrote:
>>>>>>> 2011/2/7 Elliott Barnes <[email protected]>
>>>>>>>
>>>>>>>> Hi.
>>>>>>>>
>>>>>>>
>>>>>>> Hi!
>>>>>>>
>>>>>>>
>>>>>>>> The dh -h command wasn't found, but when running the cat command I got
>>>>>>>> the following:
>>>>>>>>
>>>>>>>
>>>>>>> Sorry I meant df -h However, I think we have enough information at this
>>>>>>> point, see below..
>>>>>>>
>>>>>>>
>>>>>>>>  # /etc/fstab: static file system information.
>>>>>>>>  #
>>>>>>>>  # <file system> <mount point>   <type>   <options>       <dump>
>>>>>>>> <pass>
>>>>>>>>  dev             /dev            devtmpfs rw              0       0
>>>>>>>>  proc            /proc           proc     defaults        0       0
>>>>>>>>  /dev/xvda  /  ext3  grpquota,errors=remount-ro,usrquota,noatime,rw  0
>>>>>>>>  1
>>>>>>>>  /dev/xvdb       none            swap     sw              0       0
>>>>>>>>
>>>>>>>
>>>>>>> The "noatime" attribute seems very suspicious concerning your issue for
>>>>>>> me.
>>>>>>> Basically, noatime removes all access time information from the file
>>>>>>> system.
>>>>>>> I wouldn't be surprised that with such option, a call to Unix.stat
>>>>>>> fails.
>>>>>>>
>>>>>>> There is another function to test if a file is a directory
>>>>>>> (Sys.is_directory). I could almost be that this one would work for you
>>>>>>> and
>>>>>>> would be a better alternative to the current code..
>>>>>>>
>>>>>>> It would be very nice if you could test the ocaml code I sent
>>>>>>> previously
>>>>>>> (with Samuel's corrections). That way we could be sure of that the
>>>>>>> problem
>>>>>>> is the one I mentioned and fix the code appropriately...
>>>>>>>
>>>>>>> Romain
>>>>>>>
>>>>>>>
>>>>>>>>
>>>>>>>> Thanks.
>>>>>>>>
>>>>>>>> On 07/02/2011, Romain Beauxis <[email protected]> wrote:
>>>>>>>> > Hi!
>>>>>>>> >
>>>>>>>> > 2011/2/7 Elliott Barnes <[email protected]>
>>>>>>>> >
>>>>>>>> >> Hi guys, and once again thanks for all your suggestions.
>>>>>>>> >>
>>>>>>>> >> Upon running the "ocaml unix.cma" command as suggested, I got a
>>>>>>>> >> "command not found" message, which makes me think it's not
>>>>>>>> >> installed
>>>>>>>> >> -
>>>>>>>> >> could this be the cause of the problem?
>>>>>>>> >>
>>>>>>>> >
>>>>>>>> > You can install the command by installing the ocaml-nox package.
>>>>>>>> >
>>>>>>>> >
>>>>>>>> >> I'm running Ubuntu 10.04. Upon installing Liquidsoap, instead of
>>>>>>>> >> adding the Ubuntu repository, I had to add the Debiun one; I
>>>>>>>> >> received
>>>>>>>> >> an error when trying to retreave the package index - again, could
>>>>>>>> >> this
>>>>>>>> >> be the root of the problem, or are the repositories virtually the
>>>>>>>> >> same
>>>>>>>> >> anyway?
>>>>>>>> >>
>>>>>>>> >
>>>>>>>> > I don't think this is a problem..
>>>>>>>> >
>>>>>>>> > What could be more interesting is some details about the filesystem
>>>>>>>> > that
>>>>>>>> you
>>>>>>>> > use and the structure of your files.. For instance, the output of:
>>>>>>>> >   dh -h
>>>>>>>> > and
>>>>>>>> >   cat /etc/fstab
>>>>>>>> > should provide useful informations. If you think those values are
>>>>>>>> private,
>>>>>>>> > you can send them to me off-list..
>>>>>>>> >
>>>>>>>> > Romain
>>>>>>>> >
>>>>>>>> >
>>>>>>>> >> Cheers, and sorry for all the problems.
>>>>>>>> >>
>>>>>>>> >> Thanks.
>>>>>>>> >>
>>>>>>>> >> Elliott.
>>>>>>>> >>
>>>>>>>> >> On 07/02/2011, Samuel Mimram <[email protected]> wrote:
>>>>>>>> >> > On Mon, Feb 7, 2011 at 3:01 PM, Romain Beauxis
>>>>>>>> >> > <[email protected]>wrote:
>>>>>>>> >> >
>>>>>>>> >> >> What you could do if you have ocaml installed is try the
>>>>>>>> >> >> following:
>>>>>>>> >> >>  * As command-line, type ocaml (or if you have ledit installed:
>>>>>>>> >> >> ledit
>>>>>>>> >> >> ocaml)
>>>>>>>> >> >>  * Paste the following expression:
>>>>>>>> >> >> (Unix.stat "/media/jingles").Unix.st_kind = Unix.S_DIR
>>>>>>>> >> >>
>>>>>>>> >> >
>>>>>>>> >> > More precisely, run
>>>>>>>> >> >
>>>>>>>> >> > ocaml unix.cma
>>>>>>>> >> >
>>>>>>>> >> > and execute
>>>>>>>> >> >
>>>>>>>> >> > (Unix.stat "/media/jingles").Unix.st_kind = Unix.S_DIR;;
>>>>>>>> >> >
>>>>>>>> >> > (notice the ;; in the end).
>>>>>>>> >> >
>>>>>>>> >> > ++
>>>>>>>> >> >
>>>>>>>> >> > Sam.
>>>>>>>> >> >
>>>>>>>> >>
>>>>>>>> >>
>>>>>>>> >> --
>>>>>>>> >> Elliott.
>>>>>>>> >>
>>>>>>>> >> Contact Info:
>>>>>>>> >>
>>>>>>>> >> Skype:
>>>>>>>> >> bigboy11111
>>>>>>>> >> MSN/Windows Live:
>>>>>>>> >> [email protected]
>>>>>>>> >> Website:
>>>>>>>> >> http://www.elliottbarnes.net/
>>>>>>>> >> Twitter:
>>>>>>>> >> http://www.twitter.com/elliott94
>>>>>>>> >> Live Journal:
>>>>>>>> >> http://elliott94.livejournal.com/
>>>>>>>> >> Last.fm Profile:
>>>>>>>> >> http://www.last.fm/user/elliottbarnes
>>>>>>>> >> Facebook:
>>>>>>>> >> http://facebook.com/elliott94
>>>>>>>> >>
>>>>>>>> >
>>>>>>>>
>>>>>>>>
>>>>>>>> --
>>>>>>>> Elliott.
>>>>>>>>
>>>>>>>> Contact Info:
>>>>>>>>
>>>>>>>> Skype:
>>>>>>>> bigboy11111
>>>>>>>> MSN/Windows Live:
>>>>>>>> [email protected]
>>>>>>>> Website:
>>>>>>>> http://www.elliottbarnes.net/
>>>>>>>> Twitter:
>>>>>>>> http://www.twitter.com/elliott94
>>>>>>>> Live Journal:
>>>>>>>> http://elliott94.livejournal.com/
>>>>>>>> Last.fm Profile:
>>>>>>>> http://www.last.fm/user/elliottbarnes
>>>>>>>> Facebook:
>>>>>>>> http://facebook.com/elliott94
>>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> Elliott.
>>>>>>
>>>>>> Contact Info:
>>>>>>
>>>>>> Skype:
>>>>>> bigboy11111
>>>>>> MSN/Windows Live:
>>>>>> [email protected]
>>>>>> Website:
>>>>>> http://www.elliottbarnes.net/
>>>>>> Twitter:
>>>>>> http://www.twitter.com/elliott94
>>>>>> Live Journal:
>>>>>> http://elliott94.livejournal.com/
>>>>>> Last.fm Profile:
>>>>>> http://www.last.fm/user/elliottbarnes
>>>>>> Facebook:
>>>>>> http://facebook.com/elliott94
>>>>>>
>>>>>
>>>>
>>>>
>>>> --
>>>> Elliott.
>>>>
>>>> Contact Info:
>>>>
>>>> Skype:
>>>> bigboy11111
>>>> MSN/Windows Live:
>>>> [email protected]
>>>> Website:
>>>> http://www.elliottbarnes.net/
>>>> Twitter:
>>>> http://www.twitter.com/elliott94
>>>> Live Journal:
>>>> http://elliott94.livejournal.com/
>>>> Last.fm Profile:
>>>> http://www.last.fm/user/elliottbarnes
>>>> Facebook:
>>>> http://facebook.com/elliott94
>>>>
>>>
>>
>>
>> --
>> Elliott.
>>
>> Contact Info:
>>
>> Skype:
>> bigboy11111
>> MSN/Windows Live:
>> [email protected]
>> Website:
>> http://www.elliottbarnes.net/
>> Twitter:
>> http://www.twitter.com/elliott94
>> Live Journal:
>> http://elliott94.livejournal.com/
>> Last.fm Profile:
>> http://www.last.fm/user/elliottbarnes
>> Facebook:
>> http://facebook.com/elliott94
>>
>

------------------------------------------------------------------------------
The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
Find and fix more than 250 security defects in the development cycle.
Locate bottlenecks in serial and parallel code that limit performance.
http://p.sf.net/sfu/intel-dev2devfeb
_______________________________________________
Savonet-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/savonet-users

Reply via email to