digitalmars.D.bugs - spawnvp on linux
- Carlos Santander B. (22/22) Feb 17 2005 Is spawnvp supported on linux? I have no idea what it does, but this is
- John Reimer (6/34) Feb 17 2005 spawnvp() doesn't appear to be part of Linux. There are other calls tha...
- Mark Junker (8/13) Feb 17 2005 Do you see the "FiAaAAaZi" after spawnvp? This indicates a C++ name
- John Reimer (6/19) Feb 17 2005 I couldn't find it on my Linux system. It doesn't appear in spawn.h or
- Mark Junker (7/12) Feb 17 2005 It seems that you're right. According to Borlands documentation, it only...
- Carlos Santander B. (7/20) Feb 17 2005 Partially wrong: the "FiAaAAaZi" means D name mangling. What ld is
Is spawnvp supported on linux? I have no idea what it does, but this is causing me problems (notice that I don't even use spawnvp): //-------------------------------- import std.process; void main () { system("ls"); } //-------------------------------- $ dmd test.d gcc test.o -o test -lphobos -lpthread -lm /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/../../../libphobos.a(process.o)(.gnu.linkonce.t_D3std7process7spa nvpFiAaAAaZi+0x44): En la función `_D3std7process7spawnvpFiAaAAaZi': : undefined reference to `spawnvp' collect2: ld devolvió el estado de salida 1 --- errorlevel 1 $ It looks like spawvnp can't be found by ld. This didn't happen with DMD 0.112 (0.111) because it didn't have spawvp. Using DMD 0.113 on Fedora Core 2, gcc version 3.3.3. _______________________ Carlos Santander Bernal
Feb 17 2005
On Thu, 17 Feb 2005 17:15:03 -0500, Carlos Santander B. wrote:Is spawnvp supported on linux? I have no idea what it does, but this is causing me problems (notice that I don't even use spawnvp): //-------------------------------- import std.process; void main () { system("ls"); } //-------------------------------- $ dmd test.d gcc test.o -o test -lphobos -lpthread -lm /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/../../../libphobos.a(process.o)(.gnu.linkonce.t_D3std7process7spa nvpFiAaAAaZi+0x44): En la función `_D3std7process7spawnvpFiAaAAaZi': : undefined reference to `spawnvp' collect2: ld devolvió el estado de salida 1 --- errorlevel 1 $ It looks like spawvnp can't be found by ld. This didn't happen with DMD 0.112 (0.111) because it didn't have spawvp. Using DMD 0.113 on Fedora Core 2, gcc version 3.3.3. _______________________ Carlos Santander Bernalspawnvp() doesn't appear to be part of Linux. There are other calls that are available: fork() (the old *nix standby) , posix_spawn(), and posix_spawnp(). This looks like a bug in phobos. - John R.
Feb 17 2005
Carlos Santander B. schrieb:Is spawnvp supported on linux? I have no idea what it does, but this is causing me problems (notice that I don't even use spawnvp):I'm quite sure it exists./usr/lib/gcc-lib/i386-redhat-linux/3.3.3/../../../libphobos.a(process.o)(.gnu.linkonce.t_D3std7process7spa nvpFiAaAAaZi+0x44): En la función `_D3std7process7spawnvpFiAaAAaZi': : undefined reference to `spawnvp'Do you see the "FiAaAAaZi" after spawnvp? This indicates a C++ name mangling. spawnvp is a C function. libphobos (process.o) seems to use it without an extern "C" for the function declaration - or it's not declared at all. It really looks like a bug in libphobos (process.o). Regards, Mark
Feb 17 2005
On Fri, 18 Feb 2005 00:54:48 +0100, Mark Junker wrote:Carlos Santander B. schrieb:I couldn't find it on my Linux system. It doesn't appear in spawn.h or any other files or in the 'man' docs. Were you able to find it?Is spawnvp supported on linux? I have no idea what it does, but this is causing me problems (notice that I don't even use spawnvp):I'm quite sure it exists.It's defined in std.c.process, and it's declared extern(C). I doesn't seem to exist on Linux, so that doesn't help. - John R./usr/lib/gcc-lib/i386-redhat-linux/3.3.3/../../../libphobos.a(process.o)(.gnu.linkonce.t_D3std7process7spa nvpFiAaAAaZi+0x44): En la función `_D3std7process7spawnvpFiAaAAaZi': : undefined reference to `spawnvp'Do you see the "FiAaAAaZi" after spawnvp? This indicates a C++ name mangling. spawnvp is a C function. libphobos (process.o) seems to use it without an extern "C" for the function declaration - or it's not declared at all. It really looks like a bug in libphobos (process.o).
Feb 17 2005
John Reimer schrieb:It seems that you're right. According to Borlands documentation, it only exists on Win32 ...I'm quite sure it exists.I couldn't find it on my Linux system. It doesn't appear in spawn.h or any other files or in the 'man' docs. Were you able to find it?It's defined in std.c.process, and it's declared extern(C). I doesn't seem to exist on Linux, so that doesn't help.Ah, now I understand ... sorry ... can it be that std.process.spawnvp() is declared but not defined for Linux? So the compiler should emit an error? Regards, Mark
Feb 17 2005
Mark Junker wrote:Carlos Santander B. schrieb:Partially wrong: the "FiAaAAaZi" means D name mangling. What ld is saying that std.process.spawnvp() is looking for spawnvp(), which doesn't exist. That is correct, because std.process.spawnvp() calls std.c.process.spawvp() which is declared (as John said) as extern(C). _______________________ Carlos Santander Bernal/usr/lib/gcc-lib/i386-redhat-linux/3.3.3/../../../libphobos.a(process.o)(.gnu.linkonce.t_D3std7process7spa nvpFiAaAAaZi+0x44): En la función `_D3std7process7spawnvpFiAaAAaZi': : undefined reference to `spawnvp'Do you see the "FiAaAAaZi" after spawnvp? This indicates a C++ name mangling. spawnvp is a C function. libphobos (process.o) seems to use it without an extern "C" for the function declaration - or it's not declared at all. It really looks like a bug in libphobos (process.o). Regards, Mark
Feb 17 2005