www.digitalmars.com         C & C++   DMDScript  

D.gnu - _ModuleInfo_3std1c5linux5linux

reply nobody <nobody_member pathlink.com> writes:
Hello,
the programm 

import std.c.linux.linux;

void main() {}

gives tho following error:

gdc -o cstream cstream.d
/tmp/ccQbRyye.o:(.data+0x30): undefined reference to
`_ModuleInfo_3std1c5linux5linux'
collect2: ld gab 1 als Ende-Status zurück

My gdc
gdc -v
Es werden eingebaute Spezifikationen verwendet.
Ziel: i686-pc-linux-gnu
Konfiguriert mit: ../gcc-4.0.2/configure --enable-languages=c,d,c++
--prefix=/usr/local/gcc-4.0.2 --enable-shared
Thread-Modell: posix
gcc-Version 4.0.2 (gdc 0.17, using dmd 0.140)

Have someone an idea what here goes wrong?
Jan 16 2006
next sibling parent reply =?ISO-8859-1?Q?Anders_F_Bj=F6rklund?= <afb algonet.se> writes:
nobody wrote:

 Hello,
 the programm 
 
 import std.c.linux.linux;
 
 void main() {}
 
 gives tho following error:
 
 gdc -o cstream cstream.d
 /tmp/ccQbRyye.o:(.data+0x30): undefined reference to
 `_ModuleInfo_3std1c5linux5linux'
I believe that std.c.linux.linux is DMD-only, and that you should be using std.c.unix.unix ? But I was also pretty sure that GDC *used* to include the old module, for DMD compatibility... --anders
Jan 16 2006
parent reply nobody <nobody_member pathlink.com> writes:
In article <dqgeue$1ilb$1 digitaldaemon.com>, 
=?ISO-8859-1?Q?Anders_F_Bj=F6rklund?= says... 
 
nobody wrote: 
 
 Hello, 
 the programm  
  
 import std.c.linux.linux; 
  
 void main() {} 
  
 gives tho following error: 
  
 gdc -o cstream cstream.d 
 /tmp/ccQbRyye.o:(.data+0x30): undefined reference to 
 `_ModuleInfo_3std1c5linux5linux' 
I believe that std.c.linux.linux is DMD-only, and that you should be using std.c.unix.unix ? But I was also pretty sure that GDC *used* to include the old module, for DMD compatibility...
It run fine with std.c.unix.unix . Thank you. I have made the suggestion from Thomas too, but there gives a lot of error Message, like /usr/local/gcc-4.0.2/lib/gcc/i686-pc-linux-gnu/4.0.2/../../../libgphobos.a(configunix.o): (.rodata+0x404): multiple definition of `FD_SETSIZE' /usr/local/gcc-4.0.2/lib/gcc/i686-pc-linux-gnu/4.0.2/../../../libgphobos.a(linux.o): (.rodata+0x1b0): first defined here and so on. It seems that dmd and gdc aren't compatible anymore. To replace unix again linux, seems more logical. For example your programm run under Solaris and you insert a linux module look a little bit strange.
Jan 17 2006
parent =?ISO-8859-1?Q?Anders_F_Bj=F6rklund?= <afb algonet.se> writes:
nobody wrote:

 It seems that dmd and gdc aren't compatible anymore. 
Anymore ? AFAIK, DMD has *never* worked with anything else than X86/Linux, even the "version"s are missing.
 To replace unix again linux, seems more logical. 
It's not a replacement, as "linux" is still defined - on Linux. On Mac OS X, "darwin" is defined. And so on. It's more of a superset ?
 For example your programm run under Solaris and you
 insert a linux module look a little bit strange. 
Indeed. Sometimes you do need linux-specific modules, but most of the time you can get along with one for all "Unix". There was some argument about the "version(Unix)", as some people preferred to use POSIX instead of UNIX... But version(Windows) and version(Unix) it is, in GDC. --anders PS. But I do think that GDC on Linux tries to be compatible with DMD, and that std.c.linux.linux missing is just a bug. But it won't be portable...
Jan 17 2006
prev sibling parent Thomas Kuehne <thomas-dloop kuehne.cn> writes:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

nobody schrieb am 2006-01-16:
 Hello,
 the programm 

 import std.c.linux.linux;

 void main() {}

 gives tho following error:

 gdc -o cstream cstream.d
 /tmp/ccQbRyye.o:(.data+0x30): undefined reference to
 `_ModuleInfo_3std1c5linux5linux'
 collect2: ld gab 1 als Ende-Status zurück

 My gdc
 gdc -v
 Es werden eingebaute Spezifikationen verwendet.
 Ziel: i686-pc-linux-gnu
 Konfiguriert mit: ../gcc-4.0.2/configure --enable-languages=c,d,c++
 --prefix=/usr/local/gcc-4.0.2 --enable-shared
 Thread-Modell: posix
 gcc-Version 4.0.2 (gdc 0.17, using dmd 0.140)

 Have someone an idea what here goes wrong?
Seems like libgphobos.a is missing some files. Simple fix: (you might need to adapt some pathes) gdc -c /usr/local/include/d/3.4.5/std/c/linux/linux.d ar a /usr/local/lib/libgphobos.a linux.o Thomas -----BEGIN PGP SIGNATURE----- iD8DBQFDzBaa3w+/yD4P9tIRAoU7AJ9zAmUwTxZTLROcI8cOVRK1fabA3ACgk3VB kETDHyoox+oocpWMB23C44s= =lA+e -----END PGP SIGNATURE-----
Jan 16 2006