From: Elliott B. <ell...@go...> - 2011-02-07 20:34:37
|
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. Cheers. Elliott. On 07/02/2011, Romain Beauxis <rom...@gm...> wrote: > 2011/2/7 Elliott Barnes <ell...@go...>: >> 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 <rom...@gm...> 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 <ell...@go...>: >>>> Hi. >>>> >>>> What do I have to change? I didn't see any code above. >>>> >>>> Cheers. >>>> >>>> On 07/02/2011, Romain Beauxis <rom...@gm...> wrote: >>>>> 2011/2/7 Elliott Barnes <ell...@go...> >>>>> >>>>>> 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 <rom...@gm...> wrote: >>>>>> > Hi! >>>>>> > >>>>>> > 2011/2/7 Elliott Barnes <ell...@go...> >>>>>> > >>>>>> >> 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 <sm...@gm...> wrote: >>>>>> >> > On Mon, Feb 7, 2011 at 3:01 PM, Romain Beauxis >>>>>> >> > <rom...@gm...>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: >>>>>> >> ell...@ho... >>>>>> >> 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: >>>>>> ell...@ho... >>>>>> 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: >>>> ell...@ho... >>>> 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: >> ell...@ho... >> 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: ell...@ho... 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 |