www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.dwt - Well I'm progressing -slowly

reply Ty Tower <tytower hotmail.com.au> writes:
After analising the command line sent for a small example program I am trying
to compile I have found that my dmd command is having trouble . Probably any
one of you could have explained this had you trie a little harder .

Anyway here is the latest output

[tytower linuxbox dwt-linux]$ dmd MyStuff/main.d
gcc main.o -o main -m32 -Xlinker -L/usr/bin/../lib -ltango-user-dmd
-ltango-base-dmd -lpthread -lm
/usr/bin/ld: cannot find -lm
collect2: ld returned 1 exit status
--- errorlevel 1

Now all of the libraries are and were there all the time , albeit in /usr/lib/ 
for the majority and in /lib/ for the libm,so.6 which is linked to libm-2.4.so.

In the error noted above however the "ld" cannot find it. Now without all the
other extraneous b/s of versions etc , surely someone can suggest why this
might be.

I have tried copying bth the libm file and link into /usr/lib to no avail.

If it seems like I am rude ,it is because I have been on this ,on and off for
more than a week and I tend to call bullshit for what it is.
Feb 18 2008
next sibling parent reply "David Wilson" <dw botanicus.net> writes:
Hi Ty,

Have you got the static variants of those libraries installed? (i.e.
libm.a)  Seems you are doing a static link using dynamic libraries..

On Debian, these are found in package "libc6-dev", other distros will
have them elsewhere.


David.

On 2/18/08, Ty Tower <tytower hotmail.com.au> wrote:
 After analising the command line sent for a small example program I am trying
to compile I have found that my dmd command is having trouble . Probably any
one of you could have explained this had you trie a little harder .

 Anyway here is the latest output

 [tytower linuxbox dwt-linux]$ dmd MyStuff/main.d
 gcc main.o -o main -m32 -Xlinker -L/usr/bin/../lib -ltango-user-dmd
-ltango-base-dmd -lpthread -lm
 /usr/bin/ld: cannot find -lm
 collect2: ld returned 1 exit status
 --- errorlevel 1

 Now all of the libraries are and were there all the time , albeit in /usr/lib/
 for the majority and in /lib/ for the libm,so.6 which is linked to libm-2.4.so.

 In the error noted above however the "ld" cannot find it. Now without all the
other extraneous b/s of versions etc , surely someone can suggest why this
might be.

 I have tried copying bth the libm file and link into /usr/lib to no avail.

 If it seems like I am rude ,it is because I have been on this ,on and off for
more than a week and I tend to call bullshit for what it is.

Feb 18 2008
next sibling parent Ty Tower <tytower hotmail.com.au> writes:
David Wilson Wrote:

 Hi Ty,
 
 Have you got the static variants of those libraries installed? (i.e.
 libm.a)  Seems you are doing a static link using dynamic libraries..
 
 On Debian, these are found in package "libc6-dev", other distros will
 have them elsewhere.
 
 
 David.

Thanks David . No I have only the .so. version. I am intrigued by your comment that I am doing a static link using dynamic libraries . Can you expand on that please . How would the command line change to use dynamic libraries? Rather than do a lot of typing can you point me to a site that explains the difference ?
Feb 18 2008
prev sibling parent reply John Reimer <terminal.node gmail.com> writes:
David Wilson wrote:
 Hi Ty,
 
 Have you got the static variants of those libraries installed? (i.e.
 libm.a)  Seems you are doing a static link using dynamic libraries..
 
 On Debian, these are found in package "libc6-dev", other distros will
 have them elsewhere.
 
 
 David.
 

On Linux, linking is exactly the same for static and dynamic libraries. This is one of the advantages of the linux system. There is no dll or import library complexity to deal with as there is on Windows. The difference with the developer packages is that they usually supply both the static and dynamic libs without the postfix version numbers, They also supply the necessary C headers and documentation. Some Linux distributions include the developer versions of the libraries by default. Other distributions do not. Ty might have to download these libs to get things working... which would explain a lot of the problems he's been having. I notice also that the command line error complained "/usr/bin/ld: cannot find -lm" which is odd. It seems to be not interpreting the commandline flag: I would expect it to say "cannot find libm.a (or libm.so). But I'm not certain. Nonetheless the compiler is looking for the the non-version decorated libm and cannot find it. Incidentally, libm is the default math library on linux. Most linux should have it installed. The developer lib package may be necessary to access this library directly, but even then one could access the non-developer version simply by making a symbolic link to the versioned one in the lib directory where it resides. Or one could even provide the full path the the versioned library on the command line to achieve the same thing. But instead of fiddling with the system, the user should just download the necessary developer version of these libraries. Part of these problems seem to be that Ty is unfamiliar with linux, or, at least, linux development. If this is the case, there is a LOT more to help out with then just dmd/dwt related issues. Linux is not an easy system to learn to program on since there are many tools with which to get familiar. Thus, we must assume, to some extent, that the dwt user has some familiarity with the system he develops on. It would horribly time-consuming otherwise to have to step the user through platform development peculiarities and linux administration. Thankfully, we don't have to do that... since there appears to be an amazing supply of very accommodating and knowledgeable people here. But I do think it is unfair to assume we owe such a user all our time and attention for such details. -JJR
Feb 18 2008
parent reply Ty Tower <tytower hotmail.com.au> writes:
Content-Type: text/plain

John Reimer Wrote:
 On Linux, linking is exactly the same for static and dynamic libraries. 
   This is one of the advantages of the linux system.  There is no dll or 
 import library complexity to deal with as there is on Windows.
 
 The difference with the developer packages is that they usually supply 
 both the static and dynamic libs without the postfix version numbers, 
 They also supply the necessary C headers and documentation.
 
 Some Linux distributions include the developer versions of the libraries 
 by default.  Other distributions do not.  Ty might have to download 
 these libs to get things working... which would explain a lot of the 
 problems he's been having.
 

As I said the libraries are there under the name of /lib/libm-2.4.so , and linked to it is libm.so.6
 I notice also that the command line error complained "/usr/bin/ld: 
 cannot find -lm"  which is odd.  It seems to be not interpreting the 
 commandline flag: I would expect it to say "cannot find libm.a (or 
 libm.so).  But I'm not certain.  Nonetheless the compiler is looking for 
 the the non-version decorated libm and cannot find it.
 
 Incidentally, libm is the default math library on linux.  Most linux 
 should have it installed.  The developer lib package may be necessary to 
 access this library directly, but even then one could access the 
 non-developer version simply by making a symbolic link to the versioned 
 one in the lib directory where it resides.  Or one could even provide 
 the full path the the versioned library on the command line to achieve 
 the same thing.
 
 But instead of fiddling with the system, the user should just download 
 the necessary developer version of these libraries.
 
 Part of these problems seem to be that Ty is unfamiliar with linux, or, 
 at least, linux development. 

You assume a lot . and incorrectly at that . I have a fairly intimate knowledge of Linux but this I have not seen before. I have approached it on a look at what is happening in the compile command from the start and gradually understand what each swith or control is supposed to do and make sure it can do it . I think I am at the last of that and this problem is offered for solution by anyone more knowledgeabl than me on compiling and linking. I don't think either my approach or your wrong assumption justify the comments below
 If this is the case, there is a LOT more 
 to help out with then just dmd/dwt related issues.  Linux is not an easy 
 system to learn to program on since there are many tools with which to 
 get familiar. Thus, we must assume, to some extent, that the dwt user 
 has some familiarity with the system he develops on.  It would horribly 
 time-consuming otherwise to have to step the user through platform 
 development peculiarities and linux administration.
 
 Thankfully, we don't have to do that... since there appears to be an 
 amazing supply of very accommodating and knowledgeable people here.  But 
 I do think it is unfair to assume we owe such a user all our time and 
 attention for such details.
 
 -JJR

If you look at the example program "helloworld1.d"which I will attach here , there are a lot of problems in dwt . The writer's comment is effectively " I don't know why but you have to import the following libraries or you will get linker errors" Perhaps if you are going to spend the time to type and post in such quantity you could stick to why you think "-lm" might not be being found . I have tried putting /lib/ in front of my PATH and also at the end to no avail. I have copied both file and link to /usr/lib aain to no avaail . This is my $PATH PATH=/lib:./:/usr/bin:/bin:/usr/local/bin:/usr/X11R6/bin/:/usr/games:/usr/lib/qt3/bin:/usr/lib/qt3/bin:/usr/lib/qt3/bin:/usr/local/:/usr/local/lib:/usr/include:/lib When I find the cause for the triple qt entry I'll be in heaven. I'm starting to think the library may have been corrupted somehow. Have you had any reports of file corruption by dmd or dsss?
Feb 19 2008
next sibling parent John Reimer <terminal.node gmail.com> writes:
Ty Tower wrote:
 John Reimer Wrote:
 On Linux, linking is exactly the same for static and dynamic libraries. 
   This is one of the advantages of the linux system.  There is no dll or 
 import library complexity to deal with as there is on Windows.

 The difference with the developer packages is that they usually supply 
 both the static and dynamic libs without the postfix version numbers, 
 They also supply the necessary C headers and documentation.

 Some Linux distributions include the developer versions of the libraries 
 by default.  Other distributions do not.  Ty might have to download 
 these libs to get things working... which would explain a lot of the 
 problems he's been having.

As I said the libraries are there under the name of /lib/libm-2.4.so , and linked to it is libm.so.6

Okay. I don't know why there isn't a libm.so sym-link to these libs than. Try making one and see what happens.
 
 I notice also that the command line error complained "/usr/bin/ld: 
 cannot find -lm"  which is odd.  It seems to be not interpreting the 
 commandline flag: I would expect it to say "cannot find libm.a (or 
 libm.so).  But I'm not certain.  Nonetheless the compiler is looking for 
 the the non-version decorated libm and cannot find it.

 Incidentally, libm is the default math library on linux.  Most linux 
 should have it installed.  The developer lib package may be necessary to 
 access this library directly, but even then one could access the 
 non-developer version simply by making a symbolic link to the versioned 
 one in the lib directory where it resides.  Or one could even provide 
 the full path the the versioned library on the command line to achieve 
 the same thing.

 But instead of fiddling with the system, the user should just download 
 the necessary developer version of these libraries.

 Part of these problems seem to be that Ty is unfamiliar with linux, or, 
 at least, linux development. 

You assume a lot . and incorrectly at that . I have a fairly intimate knowledge of Linux but this I have not seen before. I have approached it on a look at what is happening in the compile command from the start and gradually understand what each swith or control is supposed to do and make sure it can do it . I think I am at the last of that and this problem is offered for solution by anyone more knowledgeabl than me on compiling and linking. I don't think either my approach or your wrong assumption justify the comments below

Okay. Perhaps I assumed wrong, but it appeared otherwise. I thought most linux developers understood that linking to a static or dynamic library was achieved the same way on linux (with the -l switch). Incidentally, I do not claim to have an intimate knowledge of linux developement or linux. I do have a comfortable working knowledge of it, however.
 If this is the case, there is a LOT more 
 to help out with then just dmd/dwt related issues.  Linux is not an easy 
 system to learn to program on since there are many tools with which to 
 get familiar. Thus, we must assume, to some extent, that the dwt user 
 has some familiarity with the system he develops on.  It would horribly 
 time-consuming otherwise to have to step the user through platform 
 development peculiarities and linux administration.

 Thankfully, we don't have to do that... since there appears to be an 
 amazing supply of very accommodating and knowledgeable people here.  But 
 I do think it is unfair to assume we owe such a user all our time and 
 attention for such details.

 -JJR

If you look at the example program "helloworld1.d"which I will attach here , there are a lot of problems in dwt . The writer's comment is effectively " I don't know why but you have to import the following libraries or you will get linker errors" Perhaps if you are going to spend the time to type and post in such quantity you could stick to why you think "-lm" might not be being found .

This is not clearly a dwt issue, so I won't (or shouldn't) devote more time to postulating why -lm is not found. That would be futile for me at this point. You are correct that I spent too much time typing a post in such quantity (including this one). libm is a dependency that the dmd compiler adds to the command-line, and this has been so for a long time. So if it isn't working right now, I wouldn't blame it on dwt just because this is the library you are trying to use right now. I'd tend to look further into why dmd is not working. Furthermore, I have no idea why one needs to add the Tango imports to get things linking correctly. I suggest you ditch dwt from your system and test dmd/dsss/Tango (or perhaps Phobos first) rigorously before you even approach dwt again.
 I have tried putting /lib/ in front of my PATH and also at the end to no
avail. I have copied both file and link to /usr/lib aain to no avaail . This is
my $PATH  
 PATH=/lib:./:/usr/bin:/bin:/usr/local/bin:/usr/X11R6/bin/:/usr/games:/usr/lib/qt3/bin:/usr/lib/qt3/bin:/usr/lib/qt3/bin:/usr/local/:/usr/local/lib:/usr/include:/lib
 When I find the cause for the triple qt entry I'll be in heaven.
 

These are all linux issues (or dmd setup issues). If these cannot be straightened out, I can't help.
 I'm starting to think the library may have been corrupted somehow. Have you
had any reports of file corruption by dmd or dsss?
 
 

No. It's very unlikely libm could get corrupted by dmd or dsss... unless you run linux as the superuser all the time (which would be a bad idea). Even then, I don't know why dmd or dsss would do such a thing. Your whole linux distribution would be compromised if they could or did. Even so, ld would probably report the error if libm was corrupt. Maybe a reinstall of your Linux distribution or a different distribution might be the answer. That may seem like a lame suggestion to you; but sadly, this is becoming the best I've got. -JJR
Feb 19 2008
prev sibling parent reply =?UTF-8?B?IkrDqXLDtG1lIE0uIEJlcmdlciI=?= <jeberger free.fr> writes:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Ty Tower wrote:
 John Reimer Wrote:
 On Linux, linking is exactly the same for static and dynamic libraries. 
   This is one of the advantages of the linux system.  There is no dll or 
 import library complexity to deal with as there is on Windows.

 The difference with the developer packages is that they usually supply 
 both the static and dynamic libs without the postfix version numbers, 
 They also supply the necessary C headers and documentation.

 Some Linux distributions include the developer versions of the libraries 
 by default.  Other distributions do not.  Ty might have to download 
 these libs to get things working... which would explain a lot of the 
 problems he's been having.

As I said the libraries are there under the name of /lib/libm-2.4.so , and linked to it is libm.so.6

glibc-devel package. If you have, there should be a /usr/lib/libm.so (which should be a symlink to one of the others). If this symlink is not there, I suggest reinstalling glibc-devel. You might also want to try "rpm -V glibc-devel" to make sure that your install has not been corrupted somehow. Jerome - -- +------------------------- Jerome M. BERGER ---------------------+ | mailto:jeberger free.fr | ICQ: 238062172 | | http://jeberger.free.fr/ | Jabber: jeberger jabber.fr | +---------------------------------+------------------------------+ -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (GNU/Linux) iD8DBQFHuyH3d0kWM4JG3k8RAqtMAKCTUG31mxUZhuE69BZcaTZqOSHasQCfZapU qlNeTybauBj5hl2fmCqFbTc= =979w -----END PGP SIGNATURE-----
Feb 19 2008
parent Ty Tower <tytower hotmail.com.au> writes:
Jérôme M. Berger Wrote:

 	That's from the glibc package. You must also install the
 glibc-devel package. If you have, there should be a /usr/lib/libm.so
 (which should be a symlink to one of the others). If this symlink is
 not there, I suggest reinstalling glibc-devel.
 
 	You might also want to try "rpm -V glibc-devel" to make sure that
 your install has not been corrupted somehow.
 
 		Jerome

I think you may have found it for me Jerome , looks like some corruption has crept in Here's the output [root linuxbox tytower]# rpm -V glibc-devel missing /boot/kernel.h-2.6.17 missing /usr/lib/libm.so [root linuxbox tytower]#
Feb 19 2008
prev sibling next sibling parent reply Jesse Phillips <jessekphillips gmail.com> writes:
On Mon, 18 Feb 2008 04:31:58 -0500, Ty Tower wrote:

 After analising the command line sent for a small example program I am
 trying to compile I have found that my dmd command is having trouble .
 Probably any one of you could have explained this had you trie a little
 harder .
 
 Anyway here is the latest output
 
 [tytower linuxbox dwt-linux]$ dmd MyStuff/main.d gcc main.o -o main -m32
 -Xlinker -L/usr/bin/../lib -ltango-user-dmd -ltango-base-dmd -lpthread
 -lm /usr/bin/ld: cannot find -lm
 collect2: ld returned 1 exit status
 --- errorlevel 1
 
 Now all of the libraries are and were there all the time , albeit in
 /usr/lib/  for the majority and in /lib/ for the libm,so.6 which is
 linked to libm-2.4.so.
 
 In the error noted above however the "ld" cannot find it. Now without
 all the other extraneous b/s of versions etc , surely someone can
 suggest why this might be.
 
 I have tried copying bth the libm file and link into /usr/lib to no
 avail.
 
 If it seems like I am rude ,it is because I have been on this ,on and
 off for more than a week and I tend to call bullshit for what it is.

Ty Tower, I am sorry to say that I do not see how you could be progressing -slowly. You see I just looked through all of your other compile errors, and not one was having a problem finding -lm. This tells me that instead of progressing forward, your doing it backwards. I do commend you for taking to the time to understand what the linker is doing and trying to figure out what you don't understand. (Your post was much more concise and polite in d.learn). To recap: [tytower linuxbox import]$ dmd ./test_gridlayout.d /usr/bin/../src/phobos/std/c/windows/windows.d(12): static assert is false Wrong DWT dwt/dwtexamples/helloworld/HelloWorld1 -m32 -Xlinker --start-group -lphobos -lcairo -lglib-2.0 -ldl -lgmodule-2.0 -lgobject-2.0 -lpango-1.0 -lXfixes -lX11 -lXdamage -lXcomposite -lXcursor -lXrandr -lXi -lXinerama -lXrender -lXext -lXtst -lfontconfig -lpangocairo-1.0 -lgthread-2.0 -lgdk_pixbuf-2.0 -latk-1.0 -lgdk-x11-2.0 -lgtk-x11-2.0 -Xlinker -L./ -Xlinker -L/usr/lib/ -Xlinker -L/usr/lib -Xlinker -L/root/d/lib -Xlinker -L/usr/bin/../lib -ltango-user-dmd -ltangobos -Xlinker -L/usr/bin/../lib -ltango-user-dmd -ltangobos -ltango-base-dmd -lpthread -lm /usr/lib/gcc/i586-mandriva-linux-gnu/4.1.2/../../../libphobos.a (linux.o).data+0x0): multiple definition of `MAP_FAILED' dsss_objs/D/tango.stdc.posix.sys.mman.o.data+0x1c): first defined here /usr/lib/gcc/i586-mandriva-linux-gnu/4.1.2/../../../libphobos.a (linux.o).data+0x4): multiple definition of `FD_SETSIZE' dsss_objs/D/tango.stdc.posix.sys.select.o.data+0x4): first defined here /usr/lib/gcc/i586-mandriva-linux-gnu/4.1.2/../../../libphobos.a (linux.o).data+0xc): multiple definition of `RTLD_NOW' dsss_objs/D/tango.stdc.posix.dlfcn.o.data+0x4): first defined here /usr/lib/gcc/i586-mandriva-linux-gnu/4.1.2/../../../libphobos.a (linux.o).data+0x10): multiple definition of `_SIGSET_NWORDS' dsss_objs/D/tango.stdc.posix.signal.o.data+0x40): first defined here /usr/bin/ld: cannot find -lXdamage collect2: ld returned 1 exit status --- errorlevel 1 conflicting tango and phobos /usr/lib/gcc/i586-mandriva-linux-gnu/4.1.2/../../../libphobos.a (linux.o).data+0x0): multiple definition of `MAP_FAILED' dsss_objs/D/tango.stdc.posix.sys.mman.o.data+0x1c): first defined here /usr/lib/gcc/i586-mandriva-linux-gnu/4.1.2/../../../libphobos.a (linux.o).data+0x4): multiple definition of `FD_SETSIZE' dsss_objs/D/tango.stdc.posix.sys.select.o.data+0x4): first defined here /usr/lib/gcc/i586-mandriva-linux-gnu/4.1.2/../../../libphobos.a (linux.o).data+0xc): multiple definition of `RTLD_NOW' dsss_objs/D/tango.stdc.posix.dlfcn.o.data+0x4): first defined here /usr/lib/gcc/i586-mandriva-linux-gnu/4.1.2/../../../libphobos.a (linux.o).data+0x10): multiple definition of `_SIGSET_NWORDS' dsss_objs/D/tango.stdc.posix.signal.o.data+0x40): first defined here /usr/bin/ld: cannot find -lXdamage collect2: ld returned 1 exit status Conflicting tango and Phobos d/lib -Xlinker -L/usr/bin/../lib -ltango-user-dmd -ltangobos -Xlinker -L/usr/bin/../lib -ltango-user-dmd -ltangobos -ltango-base-dmd -lpthread -lm /usr/lib/gcc/i586-mandriva-linux-gnu/4.1.2/../../../libphobos.a (linux.o).data+0x0): multiple definition of `MAP_FAILED' dsss_objs/D/tango.stdc.posix.sys.mman.o.data+0x1c): first defined here /usr/lib/gcc/i586-mandriva-linux-gnu/4.1.2/../../../libphobos.a (linux.o).data+0x4): multiple definition of `FD_SETSIZE' dsss_objs/D/tango.stdc.posix.sys.select.o.data+0x4): first defined here /usr/lib/gcc/i586-mandriva-linux-gnu/4.1.2/../../../libphobos.a (linux.o).data+0xc): multiple definition of `RTLD_NOW' dsss_objs/D/tango.stdc.posix.dlfcn.o.data+0x4): first defined here /usr/lib/gcc/i586-mandriva-linux-gnu/4.1.2/../../../libphobos.a (linux.o).data+0x10): multiple definition of `_SIGSET_NWORDS' dsss_objs/D/tango.stdc.posix.signal.o.data+0x40): first defined here /usr/bin/ld: cannot find -lXdamage collect2: ld returned 1 exit status Conflicting tango and phobos, yes these end with cannot find -lXdamage, on problem can propagate another. (Life of a programmer) [tytower linuxbox dwt-linux]$ dmd main.d gcc main.o -o main -m32 -Xlinker -L/usr/bin/../lib -ltango-user-dmd -ltango-base-dmd -lpthread -lm main.o.data+0x38): undefined reference to `_D3dwt7widgets7Display12__ModuleInfoZ' main.o.data+0x3c): undefined reference to `_D3dwt7widgets5Shell12__ModuleInfoZ' main.o: In function `_Dmain': main.d.text._Dmain+0x8): undefined reference to `_D3dwt7widgets7Display7Display7__ClassZ' main.d.text._Dmain+0x13): undefined reference to `_D3dwt7widgets7Display7Display5_ctorMFZC3dwt7widgets7Display7Display' main.d.text._Dmain+0x1b): undefined reference to `_D3dwt7widgets5Shell5Shell7__ClassZ' main.d.text._Dmain+0x29): undefined reference to `_D3dwt7widgets5Shell5Shell5_ctorMFC3dwt7widgets7Display7DisplayZC3dwt7widgets5Shell5Shell' collect2: ld returned 1 exit status Could not find reference to needed libraries, you used dmd instead of dsss or rebuild, so the proper -l flags were not added. [tytower linuxbox dwt-linux]$ dmd MyStuff/main.d gcc main.o -o main -m32 -Xlinker -L/usr/bin/../lib -ltango-user-dmd -ltango-base-dmd -lpthread -lm main.o.data+0x38): undefined reference to `_D3dwt7widgets7Display12__ModuleInfoZ' main.o.data+0x3c): undefined reference to `_D3dwt7widgets5Shell12__ModuleInfoZ' main.o: In function `_Dmain': MyStuff/main.d.text._Dmain+0x8): undefined reference to `_D3dwt7widgets7Display7Display7__ClassZ' MyStuff/main.d.text._Dmain+0x13): undefined reference to `_D3dwt7widgets7Display7Display5_ctorMFZC3dwt7widgets7Display7Display' MyStuff/main.d.text._Dmain+0x1b): undefined reference to `_D3dwt7widgets5Shell5Shell7__ClassZ' MyStuff/main.d.text._Dmain+0x29): undefined reference to `_D3dwt7widgets5Shell5Shell5_ctorMFC3dwt7widgets7Display7DisplayZC3dwt7widgets5Shell5Shell' collect2: ld returned 1 exit status Exactly the same as the last one, no change in operation what-so-ever. Now had -lm been missing everything would have stopped where you currently are stuck. So please don't claim BS, don't disregard are statements of improper versions. Surprisingly I'm still willing to help, but only if this ignorant bashing of help stops. You may not even want my help anymore, but I don't think anyone will be helping you if you continue with your current methods.
Feb 18 2008
next sibling parent reply Ty Tower <tytower hotmail.com.au> writes:
Jesse I'll have a look at what you have said however plaease take note - this
is exactly what I am saying ;  You post without thinking

As I am finding ,understanding and correcting problems in my command line the
compiler is getting further and further through before throwing in the towel. 
The output therefore changes. I beleive I am now on the last of it and the next
post offers me a course of investigation whereas your post wants to knock -as
have most of your posts.
Feb 18 2008
parent reply Bill Baxter <dnewsgroup billbaxter.com> writes:
Ty Tower wrote:
 Up yours =Don't bother posting answers to my queries again
 
 I will immediately skip them--   Clown

Really uncalled for. Next time you want help, you might try being polite. --bb
Feb 18 2008
parent Ty Tower <tytower hotmail.com.au> writes:
Bill Baxter Wrote:
 
 Really uncalled for.  Next time you want help, you might try being polite.
 
 --bb

You may think so but this guy has been following my posts and posting without a lot of thought merely to have a shot . Bit of a paranoid I think to look at the time spent quoting other posts. When you look closely at his posts in this thread they are mostly wrong and rubbish - something wrong with him- There is a limit to being polite.
Feb 19 2008
prev sibling next sibling parent Jesse Phillips <jessekphillips gmail.com> writes:
On Mon, 18 Feb 2008 15:22:45 -0500, Ty Tower wrote:

 Jesse I'll have a look at what you have said however plaease take note -
 this is exactly what I am saying ;  You post without thinking
 
 As I am finding ,understanding and correcting problems in my command
 line the compiler is getting further and further through before throwing
 in the towel.  The output therefore changes. I beleive I am now on the
 last of it and the next post offers me a course of investigation whereas
 your post wants to knock -as have most of your posts.

I am confused on your accusation here, are you saying that my posts have no thought because I don't read your posts? If that is your claim it is a lie, as I have read ever post of yours and every post replying to your posts. Not only that, but I have compared my own knowledge with those responses to see if anything needed corrected or added. I have even taken time to see how accurate your accusations have been. I feel I have put a lot of thought into my posts. As stated before, your last posted problem is not a step forward. Running into an inability find a needed linked file is at the first stages of linking. Your other problems had already gone past this stage and run into duplicate definitions. The last think you bring up is that most of my posts have been to "knock" yours. This first group has been purely help: http://www.digitalmars.com/webnews/newsgroups.php? art_group=digitalmars.D.dwt&article_id=623 http://www.digitalmars.com/webnews/newsgroups.php? art_group=digitalmars.D.dwt&article_id=636 http://www.digitalmars.com/webnews/newsgroups.php? art_group=digitalmars.D.dwt&article_id=681 http://www.digitalmars.com/webnews/newsgroups.php? art_group=digitalmars.D.dwt&article_id=722 Then we have the group of informative and "knocking," the last on starting with help, but mostly explaining way we made suggestions, after having been accused of not putting thoughts into our posts. http://www.digitalmars.com/webnews/newsgroups.php? art_group=digitalmars.D.dwt&article_id=662 http://www.digitalmars.com/webnews/newsgroups.php? art_group=digitalmars.D.dwt&article_id=733 This final group has provided you with no help, but instead trying to demonstrate that your frustration with our help has been related own misunderstanding of the problem and not ours. http://www.digitalmars.com/webnews/newsgroups.php? art_group=digitalmars.D.dwt&article_id=740 And of course this Current post. These post have come about not because of your still needing help, or creating new problems, but because of your continued hostility to those that have already provided you with help. As I do not want to be accused of not thinking I will have to explain way said line is hostile: "Probably any one of you could have explained this had you trie a little harder ." You say we just needed to try a little harder. This would suggest that if we looked at the output from your command we could have explained why you might have been missing -lm. This conclusion is supported by the added: "Now without all the other extraneous b/s of versions etc , surely someone can suggest why this might be." Now had you politely return here with this new problem requesting help, I would have seen no reason to have corrected you incorrect accusation. I set for to correct this by providing all of the output you gave us, to show you that at no point did a problem with -lm show up. I ask how does that not show thought? In final hopes of resolution, you will note that only with this post have I hit the 50/50 mark for hostile postings. I suppose to round this off as hostile, I could through in the hostile postings you have had, but I did not see that as the purpose of this posting.
Feb 18 2008
prev sibling parent reply Ty Tower <tytower hotmail.com.au> writes:
Jesse Phillips Wrote:
[tytower linuxbox dwt-linux]$ dmd main.d gcc main.o -o main -m32 -Xlinker
-L/usr/bin/../lib -ltango-user-dmd -ltango-base-dmd -lpthread -lm
main.o.data+0x38): undefined reference to
`_D3dwt7widgets7Display12__ModuleInfoZ' main.o.data+0x3c): undefined
reference to `_D3dwt7widgets5Shell12__ModuleInfoZ' main.o: In function
`_Dmain':
main.d.text._Dmain+0x8): undefined reference to
`_D3dwt7widgets7Display7Display7__ClassZ' main.d.text._Dmain+0x13):
undefined reference to
`_D3dwt7widgets7Display7Display5_ctorMFZC3dwt7widgets7Display7Display'
main.d.text._Dmain+0x1b): undefined reference to
`_D3dwt7widgets5Shell5Shell7__ClassZ' main.d.text._Dmain+0x29):
undefined reference to
`_D3dwt7widgets5Shell5Shell5_ctorMFC3dwt7widgets7Display7DisplayZC3dwt7widgets5Shell5Shell'
collect2: ld returned 1 exit status

Could not find reference to needed libraries, you used dmd instead of
dsss or rebuild, so the proper -l flags were not added.

Just in passing I do not agree with this .There is no reason dmd would not add
the correct libraries
Prove it .
Feb 19 2008
next sibling parent reply Bill Baxter <dnewsgroup billbaxter.com> writes:
Ty Tower wrote:
 Jesse Phillips Wrote:
 [tytower linuxbox dwt-linux]$ dmd main.d gcc main.o -o main -m32 -Xlinker
 -L/usr/bin/../lib -ltango-user-dmd -ltango-base-dmd -lpthread -lm
 main.o.data+0x38): undefined reference to
 `_D3dwt7widgets7Display12__ModuleInfoZ' main.o.data+0x3c): undefined
 reference to `_D3dwt7widgets5Shell12__ModuleInfoZ' main.o: In function
 `_Dmain':
 main.d.text._Dmain+0x8): undefined reference to
 `_D3dwt7widgets7Display7Display7__ClassZ' main.d.text._Dmain+0x13):
 undefined reference to
 `_D3dwt7widgets7Display7Display5_ctorMFZC3dwt7widgets7Display7Display'
 main.d.text._Dmain+0x1b): undefined reference to
 `_D3dwt7widgets5Shell5Shell7__ClassZ' main.d.text._Dmain+0x29):
 undefined reference to
 `_D3dwt7widgets5Shell5Shell5_ctorMFC3dwt7widgets7Display7DisplayZC3dwt7widgets5Shell5Shell'
 collect2: ld returned 1 exit status
 
 Could not find reference to needed libraries, you used dmd instead of
 dsss or rebuild, so the proper -l flags were not added.
 
 Just in passing I do not agree with this .There is no reason dmd would not add
the correct libraries
 Prove it .

Prove it? Prove that dmd does not guess which libraries you need? There's nothing to prove. DMD includes the libraries listed in your sc.ini and the source files and libs you list on the command line. Nothing else. If you want to link with anything besides those, you have to list it yourself. Or use DSSS. --bb
Feb 19 2008
next sibling parent reply Derek Parnell <derek psych.ward> writes:
On Wed, 20 Feb 2008 11:31:35 +0900, Bill Baxter wrote:

 If you want to link with anything besides those, you have 
 to list it yourself.  Or use DSSS.

Or Bud :-) -- Derek Parnell Melbourne, Australia skype: derek.j.parnell
Feb 19 2008
next sibling parent Bill Baxter <dnewsgroup billbaxter.com> writes:
Derek Parnell wrote:
 On Wed, 20 Feb 2008 11:31:35 +0900, Bill Baxter wrote:
 
 If you want to link with anything besides those, you have 
 to list it yourself.  Or use DSSS.

Or Bud :-)

Yeh, I just wasn't going to recommend that because I haven't personally tried to build DWT with bud. And I don't think it's mentioned in the DWT readme currently either. But yeh, in theory Bud should work. --bb
Feb 19 2008
prev sibling parent reply John Reimer <terminal.node gmail.com> writes:
Derek Parnell wrote:
 On Wed, 20 Feb 2008 11:31:35 +0900, Bill Baxter wrote:
 
 If you want to link with anything besides those, you have 
 to list it yourself.  Or use DSSS.

Or Bud :-)

You mentioned in another post that you are still working on bud, but you haven't updated svn. Is there a more recent build of bud that we can get a hold of? I wouldn't mind giving it a try again. -JJR
Feb 19 2008
parent reply Derek Parnell <derek nomail.afraid.org> writes:
On Tue, 19 Feb 2008 21:18:01 -0800, John Reimer wrote:

 Or Bud :-)
 

You mentioned in another post that you are still working on bud, but you haven't updated svn. Is there a more recent build of bud that we can get a hold of? I wouldn't mind giving it a try again. -JJR

I'm a lucky guy :-) After saying I'd work on it last night, I get a call from a customer saying that they have a big problem and thus now so do I. It positively absolutely has to be fixed RIGHT NOW! So I work at it and sometime around 11:30pm I finish. It's now the next day and I'm waiting for them to say everything's alright. I haven't heard from all day them so I'm guessing things can't be too bad ... maybe I should call anyways. Also, Walter has now delivered DMD 2.011 so I have to recompile and fix up the 'gotchas' again. Maybe tonight ... or maybe I'll just hide away and play some CoD4 online :LOL: -- Derek (skype: derek.j.parnell) Melbourne, Australia 20/02/2008 4:36:40 PM
Feb 19 2008
parent John Reimer <terminal.node gmail.com> writes:
Derek Parnell wrote:
 On Tue, 19 Feb 2008 21:18:01 -0800, John Reimer wrote:
 
 Or Bud :-)

haven't updated svn. Is there a more recent build of bud that we can get a hold of? I wouldn't mind giving it a try again. -JJR

I'm a lucky guy :-) After saying I'd work on it last night, I get a call from a customer saying that they have a big problem and thus now so do I. It positively absolutely has to be fixed RIGHT NOW! So I work at it and sometime around 11:30pm I finish. It's now the next day and I'm waiting for them to say everything's alright. I haven't heard from all day them so I'm guessing things can't be too bad ... maybe I should call anyways. Also, Walter has now delivered DMD 2.011 so I have to recompile and fix up the 'gotchas' again. Maybe tonight ... or maybe I'll just hide away and play some CoD4 online :LOL:

He he... Yeah, I tend to get a lot of interruptions from "real life" too. Nothing like having to readjust a schedule repeatedly... and then trying to find just a bit of time to relax from it all. :) -JJR
Feb 20 2008
prev sibling parent reply Ty Tower <tytower hotmail.com.au> writes:
Nah You are missing the point here.
dmd picks up dmd.conf in linux and the libraries are pointed to by that file 

ld picks up what it needs and they end up in the command line 
so the post is not right 
dmd /MyStuff/main.d
dsss build /Mystuff/main.d

both do the same No?
Feb 19 2008
parent reply Bill Baxter <dnewsgroup billbaxter.com> writes:
Ty Tower wrote:
 Nah You are missing the point here.
 dmd picks up dmd.conf in linux and the libraries are pointed to by that file 
 
 ld picks up what it needs and they end up in the command line 
 so the post is not right 
 dmd /MyStuff/main.d
 dsss build /Mystuff/main.d
 
 both do the same No?

I use windows mostly, but I can tell you emphatically that those two absolutely do *not* do the same thing on Windows. First off, dsss build /Mysuff/main.d will just die with an error if you haven't made a dsss.conf for it. Second, assuming you do have a dsss.conf, dsss build scans main.d for any 'import' statements, and adds those files to the list of things to compile and link with. Likewise it adds the imports of those imports, and so on recursively. 'dmd' does none of that. It just compiles and tries to link main.d into an executable, including a few default standard libs listed in sc.ini. I don't know what dmd.conf is. All this is on Windows. And I'd be surprised if it was radically different on Linux. --bb
Feb 19 2008
next sibling parent Ty Tower <tytower hotmail.com.au> writes:
Bill Baxter Wrote:
 I use windows mostly, but I can tell you emphatically that those two 
 absolutely do *not* do the same thing on Windows.
 
 First off, dsss build /Mysuff/main.d will just die with an error if you 
 haven't made a dsss.conf for it.
 
 Second, assuming you do have a dsss.conf, dsss build scans main.d for 
 any 'import' statements, and adds those files to the list of things to 
 compile and link with.  Likewise it adds the imports of those imports, 
 and so on recursively.
 
 'dmd' does none of that.  It just compiles and tries to link main.d into 
 an executable, including a few default standard libs listed in sc.ini.
 
 I don't know what dmd.conf is.
 
 All this is on Windows.  And I'd be surprised if it was radically 
 different on Linux.
 
 --bb

Right Bill thats what I need, On Linux dmd.conf I think is much the same as sc.ini on windows I have a dsss.conf file for it and the output of both, I must admit, is different and maybe with that piece of info I can progress further. Bloody Tango /Phobos. Thanks
Feb 20 2008
prev sibling parent reply Jacob Carlborg <doobnet gmail.com> writes:
Bill Baxter wrote:
 Ty Tower wrote:
 Nah You are missing the point here.
 dmd picks up dmd.conf in linux and the libraries are pointed to by 
 that file
 ld picks up what it needs and they end up in the command line so the 
 post is not right dmd /MyStuff/main.d
 dsss build /Mystuff/main.d

 both do the same No?

I use windows mostly, but I can tell you emphatically that those two absolutely do *not* do the same thing on Windows. First off, dsss build /Mysuff/main.d will just die with an error if you haven't made a dsss.conf for it. Second, assuming you do have a dsss.conf, dsss build scans main.d for any 'import' statements, and adds those files to the list of things to compile and link with. Likewise it adds the imports of those imports, and so on recursively. 'dmd' does none of that. It just compiles and tries to link main.d into an executable, including a few default standard libs listed in sc.ini. I don't know what dmd.conf is. All this is on Windows. And I'd be surprised if it was radically different on Linux. --bb

You don't need a dsss.conf file you you run dsss with the command "dsss build target", you need a dsss.conf file if you run dsss with the command "dsss build"
Feb 20 2008
parent reply Bill Baxter <dnewsgroup billbaxter.com> writes:
Jacob Carlborg wrote:
 Bill Baxter wrote:
 Ty Tower wrote:
 Nah You are missing the point here.
 dmd picks up dmd.conf in linux and the libraries are pointed to by 
 that file
 ld picks up what it needs and they end up in the command line so the 
 post is not right dmd /MyStuff/main.d
 dsss build /Mystuff/main.d

 both do the same No?

I use windows mostly, but I can tell you emphatically that those two absolutely do *not* do the same thing on Windows. First off, dsss build /Mysuff/main.d will just die with an error if you haven't made a dsss.conf for it. Second, assuming you do have a dsss.conf, dsss build scans main.d for any 'import' statements, and adds those files to the list of things to compile and link with. Likewise it adds the imports of those imports, and so on recursively. 'dmd' does none of that. It just compiles and tries to link main.d into an executable, including a few default standard libs listed in sc.ini. I don't know what dmd.conf is. All this is on Windows. And I'd be surprised if it was radically different on Linux. --bb

You don't need a dsss.conf file you you run dsss with the command "dsss build target", you need a dsss.conf file if you run dsss with the command "dsss build"

Is that so? I don't think that used to be the case... Oh, I see. For that to work you have to include the ".d" in the name. So "dsss build target.d". Otherwise you get "target is not described in the configuration file." You don't need the .d if the target is in a dsss.conf, so I don't usually type it. Good to know. --bb
Feb 20 2008
next sibling parent Jacob Carlborg <doobnet gmail.com> writes:
Bill Baxter wrote:
 Jacob Carlborg wrote:
 Bill Baxter wrote:
 Ty Tower wrote:
 Nah You are missing the point here.
 dmd picks up dmd.conf in linux and the libraries are pointed to by 
 that file
 ld picks up what it needs and they end up in the command line so the 
 post is not right dmd /MyStuff/main.d
 dsss build /Mystuff/main.d

 both do the same No?

I use windows mostly, but I can tell you emphatically that those two absolutely do *not* do the same thing on Windows. First off, dsss build /Mysuff/main.d will just die with an error if you haven't made a dsss.conf for it. Second, assuming you do have a dsss.conf, dsss build scans main.d for any 'import' statements, and adds those files to the list of things to compile and link with. Likewise it adds the imports of those imports, and so on recursively. 'dmd' does none of that. It just compiles and tries to link main.d into an executable, including a few default standard libs listed in sc.ini. I don't know what dmd.conf is. All this is on Windows. And I'd be surprised if it was radically different on Linux. --bb

You don't need a dsss.conf file you you run dsss with the command "dsss build target", you need a dsss.conf file if you run dsss with the command "dsss build"

Is that so? I don't think that used to be the case... Oh, I see. For that to work you have to include the ".d" in the name. So "dsss build target.d". Otherwise you get "target is not described in the configuration file." You don't need the .d if the target is in a dsss.conf, so I don't usually type it. Good to know. --bb

I wrote "target" and not "target.d" because you can have a directory as target and I assume that it also works without a dsss.conf file
Feb 20 2008
prev sibling parent torhu <no spam.invalid> writes:
Bill Baxter wrote:
 Jacob Carlborg wrote:
 You don't need a dsss.conf file you you run dsss with the command "dsss 
 build target", you need a dsss.conf file if you run dsss with the 
 command "dsss build"

Is that so? I don't think that used to be the case... Oh, I see. For that to work you have to include the ".d" in the name. So "dsss build target.d". Otherwise you get "target is not described in the configuration file." You don't need the .d if the target is in a dsss.conf, so I don't usually type it. Good to know. --bb

I was wondering about this too, so I just tested it. Seems that you don't need a dsss.conf to build stuff. But if there is one in the current dir, you can't build anything not listed in it. So it's one or the other.
Feb 20 2008
prev sibling parent Jacob Carlborg <doobnet gmail.com> writes:
Ty Tower wrote:
 Jesse Phillips Wrote:
 [tytower linuxbox dwt-linux]$ dmd main.d gcc main.o -o main -m32 -Xlinker
 -L/usr/bin/../lib -ltango-user-dmd -ltango-base-dmd -lpthread -lm
 main.o.data+0x38): undefined reference to
 `_D3dwt7widgets7Display12__ModuleInfoZ' main.o.data+0x3c): undefined
 reference to `_D3dwt7widgets5Shell12__ModuleInfoZ' main.o: In function
 `_Dmain':
 main.d.text._Dmain+0x8): undefined reference to
 `_D3dwt7widgets7Display7Display7__ClassZ' main.d.text._Dmain+0x13):
 undefined reference to
 `_D3dwt7widgets7Display7Display5_ctorMFZC3dwt7widgets7Display7Display'
 main.d.text._Dmain+0x1b): undefined reference to
 `_D3dwt7widgets5Shell5Shell7__ClassZ' main.d.text._Dmain+0x29):
 undefined reference to
 `_D3dwt7widgets5Shell5Shell5_ctorMFC3dwt7widgets7Display7DisplayZC3dwt7widgets5Shell5Shell'
 collect2: ld returned 1 exit status
 
 Could not find reference to needed libraries, you used dmd instead of
 dsss or rebuild, so the proper -l flags were not added.
 
 Just in passing I do not agree with this .There is no reason dmd would not add
the correct libraries
 Prove it .
 
 

Why do you keep insisting on using only dmd and not dsss? DSSS is a great tool that will help you a lot when you compile D code. You can also download, build and install D related applications and libraries with just one command, like ruby gems if you are familiar with that. I see no reason not to use it.
Feb 20 2008
prev sibling parent reply Ty Tower <tytower hotmail.com.au> writes:
Heh Heh Heh
Well I nearly got all the examples built and I especially like the Addressbook .
I'll do a separate post to cover the Mandrake issue because it looks like you
don't have a Mandrake user or they would have hit the same problems.

Next up ..but first I would like to get the control example compiled and I have
hit another snag so I must ask in case someone sees something stupid and tells
me . In the mean time I'll keep looking

These two lines come up after the usual, now all the libraries are there and
all the versions are the latest (last two weeks) except dmd is 1.whatever

/usr/lib/gcc/i586-mandriva-linux-gnu/4.1.2/../../../libDD-dwt.a(dwt.widgets.Link
o):(.rodata+0x890): multiple definition of
`_D5tango4text4Text11__T4TextTaZ4Text4Span6__initZ'
/usr/lib/gcc/i586-mandriva-linux-gnu/4.1.2/../../../libDD-dwt.a(dwt.widgets.FileDialog
o):(.rodata+0x100): first defined here

Can anybody help with this ...all of dwt is compiled and running 
Feb 21 2008
parent Jacob Carlborg <doobnet gmail.com> writes:
Ty Tower wrote:
  ...all of dwt is compiled and running 

Nice to see that you are making progress and managed to compile and run dwt
Feb 21 2008