[M3devel] make_dir failure

Jay jay.krell at cornell.edu
Sat Jan 31 20:05:36 CET 2009


It looks ok to me.
What happens if you create /usr/local/cm3/bin and /tmp/cm3/usr/local/cm3/bin?
Unix is imho bogusly finicky and doesn't like foo/../bar unless foo exists.
Windows parses out the .. without checking if foo exists, leaving this sort of construct more useful.
The Modula-3/Quake code I think never smushes out the ".." here, but making it do so is very reasonable.
 
 
This is part of how I avoid cminstall and just having one cm3.cfg -- all the paths are computed from the path of cm3/cm3.cfg. Probably defaulting them in the Modula-3 code instead of requiring them be set by Quake would be good, as part of a larger goal of more Modula-3 and less Quake. Quake coudl still override them if necessary.
 
 
 - Jay

----------------------------------------
> From: dragisha at m3w.org
> To: m3devel at elegosoft.com
> Date: Sat, 31 Jan 2009 18:31:39 +0100
> Subject: [M3devel] make_dir failure
>
> I am trying to build rpm for AMD64_LINUX... I have this situation
> (strace output fragment)
>
> 25802 utimes("/tmp/cm3/usr/local/cm3/pkg/m3core/AMD64_LINUX/libm3core.so", {{1233421816, 0}, {1233421693, 0}}) = 0
> 25802 stat("/tmp/cm3/usr/local/cm3/bin/../lib64", 0x7fff53109270) = -1 ENOENT (No such file or directory)
> 25802 stat("/tmp/cm3/usr/local/cm3/bin/..", 0x7fff531090d0) = -1 ENOENT (No such file or directory)
> 25802 stat("/tmp/cm3/usr/local/cm3/bin", 0x7fff53108f30) = -1 ENOENT (No such file or directory)
> 25802 stat("/tmp/cm3/usr/local/cm3", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
> 25802 mkdir("/tmp/cm3/usr/local/cm3/bin", 0777) = 0
> 25802 mkdir("/tmp/cm3/usr/local/cm3/bin/..", 0777) = -1 EEXIST (File exists)
> 25802 fcntl(2, F_GETFL) = 0x8002 (flags O_RDWR|O_LARGEFILE)
> 25802 fcntl(2, F_SETFL, O_RDWR|O_NONBLOCK|O_LARGEFILE) = 0
> 25802 write(2, "\"/usr/src/redhat/BUILD/cm3/m3-li"..., 312) = 312
> 25802 fcntl(2, F_SETFL, O_RDWR|O_LARGEFILE) = 0
> 25802 fcntl(2, F_GETFL) = 0x8002 (flags O_RDWR|O_LARGEFILE)
> 25802 fcntl(2, F_SETFL, O_RDWR|O_NONBLOCK|O_LARGEFILE) = 0
> 25802 write(2, "\n", 1) = 1
> 25802 fcntl(2, F_SETFL, O_RDWR|O_LARGEFILE) = 0
> 25802 fcntl(1, F_GETFL) = 0x8002 (flags O_RDWR|O_LARGEFILE)
> 25802 fcntl(1, F_SETFL, O_RDWR|O_NONBLOCK|O_LARGEFILE) = 0
> 25802 write(1, "Fatal Error: package build faile"..., 34) = 34
> 25802 fcntl(1, F_SETFL, O_RDWR|O_LARGEFILE) = 0
> 25802 unlink("m3make.args") = 0
>
> .M3SHIP command in question is:
>
> make_dir("/usr/local/cm3/bin/../lib64")
>
> Looks like path normalization function are a bit... confused?
> --
> Dragiša Durić 
>
>


More information about the M3devel mailing list